public UPnP_SourceFunctions(CpConnectionManager CM, CpContentDirectory CD) { _ConnectionManager = CM; _ContentDirectory = CD; _ContentDirectory.OnResult_Browse += ContentDirectoryOnOnResultBrowse; }
private void ContentDirectoryOnOnResultBrowse(CpContentDirectory sender, string objectId, CpContentDirectory.Enum_A_ARG_TYPE_BrowseFlag browseFlag, string filter, uint startingIndex, uint requestedCount, string sortCriteria, string result, uint numberReturned, uint totalMatches, uint updateId, UPnPInvokeException upnPInvokeException, object tag) { EventArgsContainer<string> argsContainer = new EventArgsContainer<string>(result); BrowseResult(this, argsContainer); }
/// <summary> /// Event that is raised when the upnp device answers after a browse command /// </summary> /// <param name="sender"></param> /// <param name="objectId"></param> /// <param name="browseFlag"></param> /// <param name="filter"></param> /// <param name="startingIndex"></param> /// <param name="requestedCount"></param> /// <param name="sortCriteria"></param> /// <param name="result">string containing the returned xml</param> /// <param name="numberReturned"></param> /// <param name="totalMatches"></param> /// <param name="updateId"></param> /// <param name="upnPInvokeException"></param> /// <param name="tag"></param> private void ContentDirectoryOnOnResultBrowse(CpContentDirectory sender, string objectId, CpContentDirectory.Enum_A_ARG_TYPE_BrowseFlag browseFlag, string filter, uint startingIndex, uint requestedCount, string sortCriteria, string result, uint numberReturned, uint totalMatches, uint updateId, UPnPInvokeException upnPInvokeException, object tag) { List<ITrack> tracks = _xmlReader.itemReader(result); BrowseResult(this, tracks); }