]> git.sesse.net Git - vlc/blobdiff - include/vlc/libvlc_events.h
Revert "Remove enums from public APIs"
[vlc] / include / vlc / libvlc_events.h
index 024c8eef76375a44fc8e2a18d417bad13dca4e7a..9373896861d48bad3a496ab5a51fe55655728e52 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,
@@ -52,9 +63,10 @@ typedef enum libvlc_event_type_t {
     libvlc_MediaPlayerBuffering,
     libvlc_MediaPlayerPlaying,
     libvlc_MediaPlayerPaused,
-    libvlc_MediaPlayerEndReached,
+    libvlc_MediaPlayerStopped,
     libvlc_MediaPlayerForward,
     libvlc_MediaPlayerBackward,
+    libvlc_MediaPlayerEndReached,
     libvlc_MediaPlayerEncounteredError,
     libvlc_MediaPlayerTimeChanged,
     libvlc_MediaPlayerPositionChanged,
@@ -76,9 +88,19 @@ typedef enum libvlc_event_type_t {
     libvlc_MediaListPlayerStopped,
 
     libvlc_MediaDiscovererStarted,
-    libvlc_MediaDiscovererEnded
+    libvlc_MediaDiscovererEnded,
 
-} libvlc_event_type_t;
+    libvlc_MediaPlayerTitleChanged,
+    libvlc_MediaPlayerSnapshotTaken,
+    libvlc_MediaPlayerLengthChanged,
+
+    libvlc_VlmMediaAdded,
+    libvlc_VlmMediaRemoved,
+    libvlc_VlmMediaChanged,
+    libvlc_VlmMediaInstanceStarted,
+    libvlc_VlmMediaInstanceStopped,
+    /* New event types HERE */
+};
 
 /**
  * An Event
@@ -87,7 +109,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;
@@ -130,11 +152,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 */
@@ -181,32 +207,27 @@ typedef struct libvlc_event_t
             int index;
         } media_list_view_will_delete_item;
 
-        /* media discoverer */
+        /* snapshot taken */
         struct
         {
-            void * unused;
-        } media_media_discoverer_started;
+             char* psz_filename ;
+        } media_player_snapshot_taken ;
+
+        /* Length changed */
         struct
         {
-            void * unused;
-        } media_media_discoverer_ended;
+            libvlc_time_t   new_length;
+        } media_player_length_changed;
 
-    } u;
-} libvlc_event_t;
-
-/**
- * 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;
+        /* VLM media */
+        struct
+        {
+            const char * psz_media_name;
+        } vlm_media_event;
 
-/**
- * Callback function notification
- * \param p_event the event triggering the callback
- */
+    } u;
+};
 
-typedef void ( *libvlc_callback_t )( const libvlc_event_t *, void * );
 
 /**@} */