protected virtual Boolean createQueue()
{
System.String givenName, queueIdCreated;
uint cuid;
if (this.isQueue())
return false;
contentDirectory.CreateQueueSync(listId, "0/Zones", out givenName, out queueIdCreated, out containerInfoMetaData);
if(!String.IsNullOrWhiteSpace(queueIdCreated))
this.writeLog(LogType.Error, String.Format("Fehler beim erstellen einer queue aus containerID '{0}'", containerId));
contentDirectory.RemoveFromQueueSync(queueIdCreated, 0, 4294967295, out cuid);
if (this.list.Count > 0)
{
// move container or item to queue (Sync)
if (!String.IsNullOrEmpty(containerId))
contentDirectory.AddContainerToQueueSync(queueIdCreated, containerId, containerId/*"urn:upnp-org:serviceId:ContentDirectory"*/, "", "", 0, 4294967295, 0);
else
// there hast to be only one object in list! otherwise it would be a container ora a queue!
contentDirectory.AddItemToQueueSync(queueIdCreated, this.list[0].objectId, 0);
}
containerId = queueIdCreated;
// reread list from new queue! (Sync!) we have to get the new list with the new ids!!!
this.retrieveListByContainerId(containerId, "*", true);
return true;
}