[vlc-devel] commit: Give a clue about extending enums ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Dec 11 20:12:08 CET 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Thu Dec 11 21:11:54 2008 +0200| [2c7d795fd2344675fa0d3cf4b9c79a7fdfba1879] | committer: Rémi Denis-Courmont 

Give a clue about extending enums

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2c7d795fd2344675fa0d3cf4b9c79a7fdfba1879
---

 include/vlc/libvlc_events.h     |    6 ++++--
 include/vlc/libvlc_structures.h |    3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/vlc/libvlc_events.h b/include/vlc/libvlc_events.h
index f18728e..5a0984a 100644
--- a/include/vlc/libvlc_events.h
+++ b/include/vlc/libvlc_events.h
@@ -45,6 +45,8 @@ extern "C" {
  */
 
 typedef enum libvlc_event_type_t {
+    /* Append new event types at the end.
+     * Do not remove, insert or re-order any entry. */
     libvlc_MediaMetaChanged,
     libvlc_MediaSubItemAdded,
     libvlc_MediaDurationChanged,
@@ -85,8 +87,8 @@ typedef enum libvlc_event_type_t {
     libvlc_MediaDiscovererEnded,
 
     libvlc_MediaPlayerTitleChanged,
-    libvlc_MediaPlayerSnapshotTaken
-
+    libvlc_MediaPlayerSnapshotTaken,
+    /* New event types HERE */
 } libvlc_event_type_t;
 
 /**
diff --git a/include/vlc/libvlc_structures.h b/include/vlc/libvlc_structures.h
index a1b0a7e..49ddbbb 100644
--- a/include/vlc/libvlc_structures.h
+++ b/include/vlc/libvlc_structures.h
@@ -103,7 +103,8 @@ typedef enum libvlc_meta_t {
     libvlc_meta_Publisher,
     libvlc_meta_EncodedBy,
     libvlc_meta_ArtworkURL,
-    libvlc_meta_TrackID
+    libvlc_meta_TrackID,
+    /* Add new meta types HERE */
 } libvlc_meta_t;
 
 /**@} */




More information about the vlc-devel mailing list