Beispiel #1
0
 protected ContainerPlaylist(Session session, PlaylistContainer container, IntPtr playlistPtr, IntPtr folderId, sp_playlist_type type)
     : base(session, playlistPtr, true)
 {
     this.folderId  = folderId;
     this.container = container;
     this.type      = type;
 }
 protected ContainerPlaylist(Session session, PlaylistContainer container, IntPtr playlistPtr, IntPtr folderId, sp_playlist_type type)
     : base(session, playlistPtr, true)
 {
     this.folderId = folderId;
     this.container = container;
     this.type = type;
 }
 internal static void Delete(IntPtr playlistPtr, IntPtr folderId, sp_playlist_type type)
 {
     lock (playlistsLock)
     {
         KeyGen key = new KeyGen(playlistPtr, folderId, type);
         ContainerPlaylist playlist = playlists[key];
         int count = playlist.RemRef();
         if (count == 0)
             playlists.Remove(key);
     }
 }
Beispiel #4
0
 internal static void Delete(IntPtr playlistPtr, IntPtr folderId, sp_playlist_type type)
 {
     lock (playlistsLock)
     {
         KeyGen            key      = new KeyGen(playlistPtr, folderId, type);
         ContainerPlaylist playlist = playlists[key];
         int count = playlist.RemRef();
         if (count == 0)
         {
             playlists.Remove(key);
         }
     }
 }
Beispiel #5
0
        internal static IContainerPlaylist Get(Session session, PlaylistContainer container, IntPtr playlistPtr, IntPtr folderId, sp_playlist_type type)
        {
            KeyGen            key = new KeyGen(playlistPtr, folderId, type);
            ContainerPlaylist playlist;

            lock (playlistsLock)
            {
                if (!playlists.ContainsKey(key))
                {
                    playlists.Add(key, new ContainerPlaylist(session, container, playlistPtr, folderId, type));
                }
                playlist = playlists[key];
                playlist.AddRef();
            }
            return(new ContainerPlaylistWrapper(playlist));
        }
 internal static IContainerPlaylist Get(Session session, PlaylistContainer container, IntPtr playlistPtr, IntPtr folderId, sp_playlist_type type)
 {
     KeyGen key = new KeyGen(playlistPtr, folderId, type);
     ContainerPlaylist playlist;
     lock (playlistsLock)
     {
         if (!playlists.ContainsKey(key))
         {
             playlists.Add(key, new ContainerPlaylist(session, container, playlistPtr, folderId, type));
         }
         playlist = playlists[key];
         playlist.AddRef();
     }
     return new ContainerPlaylistWrapper(playlist);
 }
 public KeyGen(IntPtr playlistPtr, IntPtr folderId, sp_playlist_type type)
 {
     Item1 = playlistPtr;
     Item2 = folderId;
     Item3 = type;
 }
Beispiel #8
0
 public KeyGen(IntPtr playlistPtr, IntPtr folderId, sp_playlist_type type)
 {
     Item1 = playlistPtr;
     Item2 = folderId;
     Item3 = type;
 }