public ContainerDataNode(NodeContainer aNode, NodeContainer aParent, Library aLibrary, IContentDirectorySupportV2 aSupport, ContainerItunes.InsertDelegate aInserter, string aInstallPath) { iLibrary = aLibrary; iSupport = aSupport; iNode = aNode; iMetadataFactory = new MetadataFactory(iLibrary, iSupport, aInstallPath); iMetadata = iMetadataFactory.Create(iNode, aParent); iInserter = aInserter; iInstallPath = aInstallPath; }
public ContainerDataMessage(string aText, IContentDirectorySupportV2 aSupport, ContainerItunes.InsertDelegate aInserter, string aInstallPath) { // create a root node NodeRoot root = new NodeRoot("iTunes", 0, null); // create the metadata for it MetadataFactory factory = new MetadataFactory(null, aSupport, aInstallPath); iMetadata = factory.Create(root, null); // create the child metadata iChildMetadata = new item(); iChildMetadata.Id = "1"; iChildMetadata.ParentId = "0"; iChildMetadata.Restricted = true; iChildMetadata.Title = aText; iChildMetadata.WriteStatus = "PROTECTED"; try { iChildMetadata.ArtworkUri.Add(aSupport.VirtualFileSystem.Uri(Path.Combine(aInstallPath, "Itunes.png"))); } catch (HttpServerException) { } iInserter = aInserter; }