configuration.h 2.19 KB
Newer Older
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
1 2 3
/*****************************************************************************
 * configuration.h management of the modules configuration
 *****************************************************************************
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
4
 * Copyright (C) 2007 VLC authors and VideoLAN
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
5
 *
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
6 7 8
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2.1 of the License, or
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
9 10 11 12
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
13 14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
15
 *
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
16 17 18
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
19 20 21 22 23 24 25 26 27
 *****************************************************************************/

#ifndef LIBVLC_CONFIGURATION_H
# define LIBVLC_CONFIGURATION_H 1

# ifdef __cplusplus
extern "C" {
# endif

28 29 30 31 32
/* Internal configuration prototypes and structures */

int  config_CreateDir( vlc_object_t *, const char * );
int  config_AutoSaveConfigFile( vlc_object_t * );

33
void config_Free (module_config_t *, size_t);
34

35
int config_LoadCmdLine   ( vlc_object_t *, int, const char *[], int * );
36
int config_LoadConfigFile( vlc_object_t * );
37
#define config_LoadCmdLine(a,b,c,d) config_LoadCmdLine(VLC_OBJECT(a),b,c,d)
38
#define config_LoadConfigFile(a) config_LoadConfigFile(VLC_OBJECT(a))
39
bool config_PrintHelp (vlc_object_t *);
40

41 42
int config_SortConfig (void);
void config_UnsortConfig (void);
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
43

44 45
#define CONFIG_CLASS(x) ((x) & ~0x1F)

46 47 48 49 50 51
#define IsConfigStringType(type) \
    (((type) & CONFIG_ITEM_STRING) != 0)
#define IsConfigIntegerType(type) \
    (((type) & CONFIG_ITEM_INTEGER) != 0)
#define IsConfigFloatType(type) \
    ((type) == CONFIG_ITEM_FLOAT)
52

53
extern vlc_rwlock_t config_lock;
54
extern bool config_dirty;
55

56 57
bool config_IsSafe (const char *);

58
/* The configuration file */
59
#define CONFIG_FILE                     "vlcrc"
60

Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
61 62 63 64
# ifdef __cplusplus
}
# endif
#endif