]> git.sesse.net Git - vlc/blobdiff - include/vlc_configuration.h
Correct module descriptor indentation (no functional changes)
[vlc] / include / vlc_configuration.h
index 41e999885937cc63bfa28689b097bc63b9e9ad38..7a40485d063e98db35e962bafbf1ca6de9021fc5 100644 (file)
@@ -41,37 +41,33 @@ extern "C" {
  *****************************************************************************/
 
 /* Configuration hint types */
+#define CONFIG_HINT_CATEGORY                0x02  /* Start of new category */
+#define CONFIG_HINT_SUBCATEGORY             0x03  /* Start of sub-category */
+#define CONFIG_HINT_SUBCATEGORY_END         0x04  /* End of sub-category */
+#define CONFIG_HINT_USAGE                   0x05  /* Usage information */
 
-
-#define CONFIG_HINT_CATEGORY                0x0002  /* Start of new category */
-#define CONFIG_HINT_SUBCATEGORY             0x0003  /* Start of sub-category */
-#define CONFIG_HINT_SUBCATEGORY_END         0x0004  /* End of sub-category */
-#define CONFIG_HINT_USAGE                   0x0005  /* Usage information */
-
-#define CONFIG_CATEGORY                     0x0006 /* Set category */
-#define CONFIG_SUBCATEGORY                  0x0007 /* Set subcategory */
-#define CONFIG_SECTION                      0x0008 /* Start of new section */
-
-#define CONFIG_HINT                         0x000F
+#define CONFIG_CATEGORY                     0x06 /* Set category */
+#define CONFIG_SUBCATEGORY                  0x07 /* Set subcategory */
+#define CONFIG_SECTION                      0x08 /* Start of new section */
 
 /* Configuration item types */
-#define CONFIG_ITEM_STRING                  0x0010  /* String option */
-/* unused 0x0020 */
-#define CONFIG_ITEM_MODULE                  0x0030  /* Module option */
-#define CONFIG_ITEM_INTEGER                 0x0040  /* Integer option */
-#define CONFIG_ITEM_BOOL                    0x0050  /* Bool option */
-#define CONFIG_ITEM_FLOAT                   0x0060  /* Float option */
-#define CONFIG_ITEM_DIRECTORY               0x0070  /* Directory option */
-#define CONFIG_ITEM_KEY                     0x0080  /* Hot key option */
-#define CONFIG_ITEM_MODULE_CAT              0x0090  /* Module option */
-#define CONFIG_ITEM_MODULE_LIST             0x00A0  /* Module option */
-#define CONFIG_ITEM_MODULE_LIST_CAT         0x00B0  /* Module option */
-#define CONFIG_ITEM_FONT                    0x00C0  /* Font option */
-#define CONFIG_ITEM_PASSWORD                0x00D0  /* Password option (*) */
-#define CONFIG_ITEM_LOADFILE                0x00E0  /* Read file option */
-#define CONFIG_ITEM_SAVEFILE                0x00F0  /* Written file option */
-
-#define CONFIG_ITEM                         0x00F0
+#define CONFIG_ITEM_FLOAT                   0x20  /* Float option */
+#define CONFIG_ITEM_INTEGER                 0x40  /* Integer option */
+#define CONFIG_ITEM_RGB                     0x41  /* RGB color option */
+#define CONFIG_ITEM_BOOL                    0x60  /* Bool option */
+#define CONFIG_ITEM_STRING                  0x80  /* String option */
+#define CONFIG_ITEM_PASSWORD                0x81  /* Password option (*) */
+#define CONFIG_ITEM_KEY                     0x82  /* Hot key option */
+#define CONFIG_ITEM_MODULE                  0x84  /* Module option */
+#define CONFIG_ITEM_MODULE_CAT              0x85  /* Module option */
+#define CONFIG_ITEM_MODULE_LIST             0x86  /* Module option */
+#define CONFIG_ITEM_MODULE_LIST_CAT         0x87  /* Module option */
+#define CONFIG_ITEM_LOADFILE                0x8C  /* Read file option */
+#define CONFIG_ITEM_SAVEFILE                0x8D  /* Written file option */
+#define CONFIG_ITEM_DIRECTORY               0x8E  /* Directory option */
+#define CONFIG_ITEM_FONT                    0x8F  /* Font option */
+
+#define CONFIG_ITEM(x) (((x) & ~0xF) != 0)
 
 /*******************************************************************
  * All predefined categories and subcategories
@@ -159,9 +155,16 @@ struct module_config_t
     int         *pi_list;                              /* Idem for integers */
     char       **ppsz_list_text;          /* Friendly names for list values */
     int          i_list;                               /* Options list size */
-    int          i_type;                               /* Configuration type */
-    vlc_callback_t pf_update_list; /*callback to initialize dropdownlists */
-    char         i_short;                      /* Optional short option name */
+    vlc_callback_t pf_update_list; /* Callback to initialize dropdown lists */
+    uint8_t      i_type;                              /* Configuration type */
+    char         i_short;                     /* Optional short option name */
+
+    /* Misc */
+    unsigned    b_dirty:1;        /* Dirty flag to indicate a config change */
+    unsigned    b_advanced:1;        /* Flag to indicate an advanced option */
+    unsigned    b_internal:1; /* Flag to indicate option is not to be shown */
+    unsigned    b_unsaveable:1;               /* Config should not be saved */
+    unsigned    b_safe:1;       /* Safe to use in web plugins and playlists */
 
     /* Actions list */
     int            i_action;                           /* actions list size */
@@ -171,29 +174,18 @@ struct module_config_t
     /* Deprecated */
     char        *psz_oldname;                          /* Old option name */
     bool        b_removed;
-
-    /* Misc */
-    bool        b_dirty;          /* Dirty flag to indicate a config change */
-    bool        b_advanced;          /* Flag to indicate an advanced option */
-    bool        b_internal;   /* Flag to indicate option is not to be shown */
-    bool        b_restart;   /* Flag to indicate the option needs a restart */
-                              /* to take effect */
-    /* Option values loaded from config file */
-    bool        b_unsaveable;                /* Config should not be saved */
-
-    bool        b_safe;
 };
 
 /*****************************************************************************
  * Prototypes - these methods are used to get, set or manipulate configuration
  * data.
  *****************************************************************************/
-VLC_API int config_GetType(vlc_object_t *, const char *) LIBVLC_USED;
-VLC_API int64_t config_GetInt(vlc_object_t *, const char *) LIBVLC_USED;
+VLC_API int config_GetType(vlc_object_t *, const char *) VLC_USED;
+VLC_API int64_t config_GetInt(vlc_object_t *, const char *) VLC_USED;
 VLC_API void config_PutInt(vlc_object_t *, const char *, int64_t);
-VLC_API float config_GetFloat(vlc_object_t *, const char *) LIBVLC_USED;
+VLC_API float config_GetFloat(vlc_object_t *, const char *) VLC_USED;
 VLC_API void config_PutFloat(vlc_object_t *, const char *, float);
-VLC_API char * config_GetPsz(vlc_object_t *, const char *) LIBVLC_USED LIBVLC_MALLOC;
+VLC_API char * config_GetPsz(vlc_object_t *, const char *) VLC_USED VLC_MALLOC;
 VLC_API void config_PutPsz(vlc_object_t *, const char *, const char *);
 
 VLC_API int config_SaveConfigFile( vlc_object_t * );
@@ -202,11 +194,11 @@ VLC_API int config_SaveConfigFile( vlc_object_t * );
 VLC_API void config_ResetAll( vlc_object_t * );
 #define config_ResetAll(a) config_ResetAll(VLC_OBJECT(a))
 
-VLC_API module_config_t * config_FindConfig( vlc_object_t *, const char * ) LIBVLC_USED;
-VLC_API char * config_GetDataDir( vlc_object_t * ) LIBVLC_USED LIBVLC_MALLOC;
+VLC_API module_config_t * config_FindConfig( vlc_object_t *, const char * ) VLC_USED;
+VLC_API char * config_GetDataDir( vlc_object_t * ) VLC_USED VLC_MALLOC;
 #define config_GetDataDir(a) config_GetDataDir(VLC_OBJECT(a))
-VLC_API const char * config_GetLibDir( void ) LIBVLC_USED;
-VLC_API const char * config_GetConfDir( void ) LIBVLC_USED;
+VLC_API const char * config_GetLibDir( void ) VLC_USED;
+VLC_API const char * config_GetConfDir( void ) VLC_USED;
 
 typedef enum vlc_userdir
 {
@@ -225,11 +217,11 @@ typedef enum vlc_userdir
     VLC_VIDEOS_DIR,
 } vlc_userdir_t;
 
-VLC_API char * config_GetUserDir( vlc_userdir_t ) LIBVLC_USED LIBVLC_MALLOC;
+VLC_API char * config_GetUserDir( vlc_userdir_t ) VLC_USED VLC_MALLOC;
 
 VLC_API void config_AddIntf( vlc_object_t *, const char * );
 VLC_API void config_RemoveIntf( vlc_object_t *, const char * );
-VLC_API bool config_ExistIntf( vlc_object_t *, const char * ) LIBVLC_USED;
+VLC_API bool config_ExistIntf( vlc_object_t *, const char * ) VLC_USED;
 
 #define config_GetType(a,b) config_GetType(VLC_OBJECT(a),b)
 #define config_GetInt(a,b) config_GetInt(VLC_OBJECT(a),b)
@@ -275,7 +267,7 @@ VLC_API void config_ChainParse( vlc_object_t *, const char *psz_prefix, const ch
  *
  * The options values are unescaped using config_StringUnescape.
  */
-VLC_API char *config_ChainCreate( char **ppsz_name, config_chain_t **pp_cfg, const char *psz_string ) LIBVLC_USED LIBVLC_MALLOC;
+VLC_API char *config_ChainCreate( char **ppsz_name, config_chain_t **pp_cfg, const char *psz_string ) VLC_USED VLC_MALLOC;
 
 /**
  * This function will release a linked list of config_chain_t
@@ -286,7 +278,7 @@ VLC_API void config_ChainDestroy( config_chain_t * );
 /**
  * This function will duplicate a linked list of config_chain_t
  */
-VLC_API config_chain_t * config_ChainDuplicate( const config_chain_t * ) LIBVLC_USED LIBVLC_MALLOC;
+VLC_API config_chain_t * config_ChainDuplicate( const config_chain_t * ) VLC_USED VLC_MALLOC;
 
 /**
  * This function will unescape a string in place and will return a pointer on
@@ -308,7 +300,7 @@ VLC_API char * config_StringUnescape( char *psz_string );
  *
  * The escaped characters are ' " and \
  */
-VLC_API char * config_StringEscape( const char *psz_string ) LIBVLC_USED LIBVLC_MALLOC;
+VLC_API char * config_StringEscape( const char *psz_string ) VLC_USED VLC_MALLOC;
 
 # ifdef __cplusplus
 }