]> git.sesse.net Git - vlc/blobdiff - projects/activex/plugin.h
activex: remove libvlc_exceptions and adapt to recent libvlc changes
[vlc] / projects / activex / plugin.h
index e030765a8864512d031ad2bf9ffa71265311520f..730c57cbb18dec881d815868e7724ce8bb17b62d 100644 (file)
@@ -1,9 +1,10 @@
 /*****************************************************************************
  * plugin.h: ActiveX control for VLC
  *****************************************************************************
- * Copyright (C) 2005 the VideoLAN team
+ * Copyright (C) 2005-2010 the VideoLAN team
  *
  * Authors: Damien Fouilleul <Damien.Fouilleul@laposte.net>
+ *          Jean-Paul Saman <jpsaman@videolan.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -199,12 +200,12 @@ public:
         if( !isRunning() )
             initVLC();
         *pp_libvlc = _p_libvlc;
-        return _p_libvlc?S_OK:E_FAIL;
+        return _p_libvlc ? S_OK : E_FAIL;
     }
     HRESULT getMD(libvlc_media_player_t **pp_md)
     {
         *pp_md = _p_mplayer;
-        return _p_mplayer?S_OK:E_FAIL;
+        return _p_mplayer ? S_OK : E_FAIL;
     }
 
     void setErrorInfo(REFIID riid, const char *description);
@@ -243,18 +244,18 @@ public:
     /*
     ** libvlc interface
     */
-    bool isPlaying(libvlc_exception_t *ex)
+    bool isPlaying()
     {
         return _p_mplayer && libvlc_media_player_is_playing(_p_mplayer);
     }
-    int  playlist_get_current_index(libvlc_exception_t *) { return _i_midx; }
-    int  playlist_add_extended_untrusted(const char *, int, const char **, libvlc_exception_t *);
-    void playlist_delete_item(int idx, libvlc_exception_t *ex)
+    int  playlist_get_current_index() { return _i_midx; }
+    int  playlist_add_extended_untrusted(const char *, int, const char **);
+    void playlist_delete_item(int idx)
     {
         if( _p_mlist )
-            libvlc_media_list_remove_index(_p_mlist,idx,ex);
+            libvlc_media_list_remove_index(_p_mlist,idx);
     }
-    void playlist_clear(libvlc_exception_t *ex)
+    void playlist_clear()
     {
         if( !_p_libvlc )
             return;
@@ -262,7 +263,7 @@ public:
             libvlc_media_list_release(_p_mlist);
         _p_mlist = libvlc_media_list_new(_p_libvlc);
     }
-    int  playlist_count(libvlc_exception_t *ex)
+    int  playlist_count()
     {
          int r = 0;
          if( !_p_mlist )
@@ -272,39 +273,39 @@ public:
          libvlc_media_list_unlock(_p_mlist);
          return r;
     }
-    void playlist_pause(libvlc_exception_t *ex)
+    void playlist_pause()
     {
-        if( isPlaying(ex) )
-            libvlc_media_player_pause(_p_mplayer,ex);
+        if( isPlaying() )
+            libvlc_media_player_pause(_p_mplayer);
     }
-    void playlist_play(libvlc_exception_t *ex)
+    void playlist_play()
     {
         if( !_p_libvlc )
             initVLC();
-        if( _p_mplayer||playlist_select(0,ex) )
-            libvlc_media_player_play(_p_mplayer,ex);
+        if( _p_mplayer || playlist_select(0) )
+            libvlc_media_player_play(_p_mplayer);
     }
-    void playlist_play_item(int idx,libvlc_exception_t *ex)
+    void playlist_play_item(int idx)
     {
         if( !_p_libvlc )
             initVLC();
-        if( playlist_select(idx,ex) )
-            libvlc_media_player_play(_p_mplayer,ex);
+        if( playlist_select(idx) )
+            libvlc_media_player_play(_p_mplayer);
     }
-    void playlist_stop(libvlc_exception_t *ex)
+    void playlist_stop()
     {
         if( _p_mplayer )
             libvlc_media_player_stop(_p_mplayer);
     }
-    void playlist_next(libvlc_exception_t *ex)
+    void playlist_next()
     {
-        if( playlist_select( _i_midx+1, ex) )
-            libvlc_media_player_play(_p_mplayer,ex);
+        if( playlist_select( _i_midx+1 ) )
+            libvlc_media_player_play(_p_mplayer);
     }
-    void playlist_prev(libvlc_exception_t *ex)
+    void playlist_prev()
     {
-        if( playlist_select( _i_midx-1, ex) )
-            libvlc_media_player_play(_p_mplayer,ex);
+        if( playlist_select( _i_midx-1 ) )
+            libvlc_media_player_play(_p_mplayer);
     }
 
 protected:
@@ -313,8 +314,8 @@ protected:
 
 private:
     void initVLC();
-    bool playlist_select(int i,libvlc_exception_t *);
-    void set_player_window(libvlc_exception_t *);
+    bool playlist_select(int i);
+    void set_player_window();
 
     //implemented interfaces
     class VLCOleObject *vlcOleObject;