Ejemplo n.º 1
0
        public void AddCallbacks(PlaylistListener listener, object userdata)
        {
            IntPtr nativeUserdata = ListenerTable.PutListener(this._handle, listener, userdata);
            var    callbacks      = PlaylistDelegates.CallbacksPtr;

            NativeMethods.sp_playlist_add_callbacks(this._handle, callbacks, nativeUserdata);
        }
Ejemplo n.º 2
0
 public void RemoveCallbacks(PlaylistListener listener, object userdata)
 {
     IntPtr nativeUserdata;
     if (!ListenerTable.TryGetNativeUserdata(this._handle, listener, userdata, out nativeUserdata))
     {
         throw new ArgumentException("Playlist.RemoveCallbacks: No callback registered for userdata");
     }
     var callbacks = PlaylistDelegates.CallbacksPtr;
     NativeMethods.sp_playlist_remove_callbacks(this._handle, callbacks, nativeUserdata);
     ListenerTable.RemoveListener(this._handle, listener, userdata);
 }
Ejemplo n.º 3
0
        public void RemoveCallbacks(PlaylistListener listener, object userdata)
        {
            IntPtr nativeUserdata;

            if (!ListenerTable.TryGetNativeUserdata(this._handle, listener, userdata, out nativeUserdata))
            {
                throw new ArgumentException("Playlist.RemoveCallbacks: No callback registered for userdata");
            }
            var callbacks = PlaylistDelegates.CallbacksPtr;

            NativeMethods.sp_playlist_remove_callbacks(this._handle, callbacks, nativeUserdata);
            ListenerTable.RemoveListener(this._handle, listener, userdata);
        }
Ejemplo n.º 4
0
 public void AddCallbacks(PlaylistListener listener, object userdata)
 {
     IntPtr nativeUserdata = ListenerTable.PutListener(this._handle, listener, userdata);
     var callbacks = PlaylistDelegates.CallbacksPtr;
     NativeMethods.sp_playlist_add_callbacks(this._handle, callbacks, nativeUserdata);
 }