]> git.sesse.net Git - vlc/blobdiff - include/vlc/libvlc_events.h
vlc_object_get_name, vlc_object_set_name: accessors
[vlc] / include / vlc / libvlc_events.h
index 1f59a1a157bb3c6d38abd186258bb95712b7ab6d..649fffa2d627623cfb5f9cac234a5364b318f8e4 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * libvlc_events.h:  libvlc_events external API structure
  *****************************************************************************
- * Copyright (C) 1998-2007 the VideoLAN team
+ * Copyright (C) 1998-2008 the VideoLAN team
  * $Id $
  *
  * Authors: Filippo Carone <littlejohn@videolan.org>
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifndef _LIBVLC_EVENTS_H
-#define _LIBVLC_EVENTS_H 1
+#ifndef LIBVLC_EVENTS_H
+#define LIBVLC_EVENTS_H 1
+
+/**
+ * \file
+ * This file defines libvlc_event external API
+ */
 
 # ifdef __cplusplus
 extern "C" {
@@ -39,7 +44,13 @@ extern "C" {
  * @{
  */
 
-typedef enum libvlc_event_type_t {
+#ifdef __cplusplus
+enum libvlc_event_type_e {
+#else
+enum libvlc_event_type_t {
+#endif
+    /* Append new event types at the end.
+     * Do not remove, insert or re-order any entry. */
     libvlc_MediaMetaChanged,
     libvlc_MediaSubItemAdded,
     libvlc_MediaDurationChanged,
@@ -47,10 +58,15 @@ typedef enum libvlc_event_type_t {
     libvlc_MediaFreed,
     libvlc_MediaStateChanged,
 
-    libvlc_MediaPlayerPlayed,
+    libvlc_MediaPlayerNothingSpecial,
+    libvlc_MediaPlayerOpening,
+    libvlc_MediaPlayerBuffering,
+    libvlc_MediaPlayerPlaying,
     libvlc_MediaPlayerPaused,
-    libvlc_MediaPlayerEndReached,
     libvlc_MediaPlayerStopped,
+    libvlc_MediaPlayerForward,
+    libvlc_MediaPlayerBackward,
+    libvlc_MediaPlayerEndReached,
     libvlc_MediaPlayerEncounteredError,
     libvlc_MediaPlayerTimeChanged,
     libvlc_MediaPlayerPositionChanged,
@@ -72,9 +88,25 @@ typedef enum libvlc_event_type_t {
     libvlc_MediaListPlayerStopped,
 
     libvlc_MediaDiscovererStarted,
-    libvlc_MediaDiscovererEnded
-
-} libvlc_event_type_t;
+    libvlc_MediaDiscovererEnded,
+
+    libvlc_MediaPlayerTitleChanged,
+    libvlc_MediaPlayerSnapshotTaken,
+    libvlc_MediaPlayerLengthChanged,
+
+    libvlc_VlmMediaAdded,
+    libvlc_VlmMediaRemoved,
+    libvlc_VlmMediaChanged,
+    libvlc_VlmMediaInstanceStarted,
+    libvlc_VlmMediaInstanceStopped,
+    libvlc_VlmMediaInstanceStatusInit,
+    libvlc_VlmMediaInstanceStatusOpening,
+    libvlc_VlmMediaInstanceStatusPlaying,
+    libvlc_VlmMediaInstanceStatusPause,
+    libvlc_VlmMediaInstanceStatusEnd,
+    libvlc_VlmMediaInstanceStatusError,
+    /* New event types HERE */
+};
 
 /**
  * An Event
@@ -83,7 +115,7 @@ typedef enum libvlc_event_type_t {
  * \param u Event dependent content
  */
 
-typedef struct libvlc_event_t
+struct libvlc_event_t
 {
     libvlc_event_type_t type;
     void * p_obj;
@@ -126,11 +158,15 @@ typedef struct libvlc_event_t
         } media_player_time_changed;
         struct
         {
-            libvlc_time_t new_seekable;
+            int new_title;
+        } media_player_title_changed;
+        struct
+        {
+            uint64_t new_seekable; /* FIXME: that's a boolean! */
         } media_player_seekable_changed;
         struct
         {
-            libvlc_time_t new_pausable;
+            uint64_t new_pausable; /* FIXME: that's a BOOL!!! */
         } media_player_pausable_changed;
 
         /* media list */
@@ -177,32 +213,33 @@ typedef struct libvlc_event_t
             int index;
         } media_list_view_will_delete_item;
 
-        /* media discoverer */
+        /* media list player */
         struct
         {
-            void * unused;
-        } media_media_discoverer_started;
+            libvlc_media_t * item;
+        } media_list_player_next_item_set;
+        
+        /* snapshot taken */
         struct
         {
-            void * unused;
-        } media_media_discoverer_ended;
-
-    } u;
-} libvlc_event_t;
+             char* psz_filename ;
+        } media_player_snapshot_taken ;
 
-/**
- * Event manager that belongs to a libvlc object, and from whom events can
- * be received.
- */
-
-typedef struct libvlc_event_manager_t libvlc_event_manager_t;
+        /* Length changed */
+        struct
+        {
+            libvlc_time_t   new_length;
+        } media_player_length_changed;
 
-/**
- * Callback function notification
- * \param p_event the event triggering the callback
- */
+        /* VLM media */
+        struct
+        {
+            const char * psz_media_name;
+            const char * psz_instance_name;
+        } vlm_media_event;
+    } u;
+};
 
-typedef void ( *libvlc_callback_t )( const libvlc_event_t *, void * );
 
 /**@} */