[libdvdcss-devel] Replace DVD access method #defines by an enum.

[email protected] (Diego Biurrun)
Newsgroups gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel
Message-ID <[email protected]>
libdvdcss | branch: master | Diego Biurrun <[email protected]> | Fri Oct 31 19:37:27 2014 +0100| [b0e25fc0e2abe8a3ae980aa50881ac0c692b8433] | committer: Diego Biurrun

Replace DVD access method #defines by an enum.

> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=b0e25fc0e2abe8a3ae980aa50881ac0c692b8433
---

 src/libdvdcss.h |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/libdvdcss.h b/src/libdvdcss.h
index 4f1f4af..399a1a3 100644
--- a/src/libdvdcss.h
+++ b/src/libdvdcss.h
@@ -35,6 +35,14 @@
 #include "device.h"
 
 /*****************************************************************************
+ * libdvdcss method: used like init flags
+ *****************************************************************************/
+enum dvdcss_method {
+    DVDCSS_METHOD_KEY,
+    DVDCSS_METHOD_DISC,
+    DVDCSS_METHOD_TITLE,
+};
+/*****************************************************************************
  * The libdvdcss structure
  *****************************************************************************/
 struct dvdcss_s
@@ -51,7 +59,7 @@ struct dvdcss_s
     int ( * pf_readv ) ( dvdcss_t, struct iovec *, int );
 
     /* Decryption stuff */
-    int          i_method;
+    enum dvdcss_method i_method;
     css_t        css;
     int          b_ioctls;
     int          b_scrambled;
@@ -78,13 +86,6 @@ struct dvdcss_s
 };
 
 /*****************************************************************************
- * libdvdcss method: used like init flags
- *****************************************************************************/
-#define DVDCSS_METHOD_KEY        0
-#define DVDCSS_METHOD_DISC       1
-#define DVDCSS_METHOD_TITLE      2
-
-/*****************************************************************************
  * Functions used across the library
  *****************************************************************************/
 #define print_debug( dvdcss, ... ) \

_______________________________________________
libdvdcss-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvdcss-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.