// This function returns the new items (Adds) // for a folder. public List <ServerSyncCommand> GetServerAddsForFolder(string folderId) { List <ServerSyncCommand> addCommands = new List <ServerSyncCommand>(); string collectionXPath = ".//airsync:Collection[airsync:CollectionId = \"" + folderId + "\"]"; XmlNode folderNode = responseXml.SelectSingleNode(collectionXPath, xmlNsMgr); if (folderNode != null) { XmlNodeList addNodes = folderNode.SelectNodes(".//airsync:Add", xmlNsMgr); foreach (XmlNode addNode in addNodes) { XmlNode serverIdNode = addNode.SelectSingleNode("./airsync:ServerId", xmlNsMgr); XmlNode applicationDataNode = addNode.SelectSingleNode("./airsync:ApplicationData", xmlNsMgr); if (serverIdNode != null && applicationDataNode != null) { ServerSyncCommand addCommand = new ServerSyncCommand( ServerSyncCommand.ServerSyncCommandType.Add, serverIdNode.InnerText, applicationDataNode, null); addCommands.Add(addCommand); } } } return(addCommands); }
// This function returns the new items (Adds) // for a folder. public List<ServerSyncCommand> GetServerAddsForFolder(string folderId) { List<ServerSyncCommand> addCommands = new List<ServerSyncCommand>(); string collectionXPath = ".//airsync:Collection[airsync:CollectionId = \"" + folderId + "\"]"; XmlNode folderNode = responseXml.SelectSingleNode(collectionXPath, xmlNsMgr); if (folderNode != null) { XmlNodeList addNodes = folderNode.SelectNodes(".//airsync:Add", xmlNsMgr); foreach (XmlNode addNode in addNodes) { XmlNode serverIdNode = addNode.SelectSingleNode("./airsync:ServerId", xmlNsMgr); XmlNode applicationDataNode = addNode.SelectSingleNode("./airsync:ApplicationData", xmlNsMgr); if (serverIdNode != null && applicationDataNode != null) { ServerSyncCommand addCommand = new ServerSyncCommand( ServerSyncCommand.ServerSyncCommandType.Add, serverIdNode.InnerText, applicationDataNode, null); addCommands.Add(addCommand); } } } return addCommands; }