pndnotifyd: fix some crashes
[pandora-libraries.git] / minimenu / mmcustom_cats.h
1
2 #ifndef h_mmcustom_cats_h
3 #define h_mmcustom_cats_h
4
5 #define MMCUSTOM_CATS_MAX 255
6 #define MMCUSTOM_CATS_PREF_FILENAME ".mmcats.conf"
7
8 #define MMCUSTOM_CATS_SECTION "custom_categories"
9
10 #define MMCUSTOM_CATS_NOCAT "*parent*"
11
12 typedef struct {
13   char *cat;
14   char *parent_cat;
15 } mmcustom_cat_t;
16
17 extern mmcustom_cat_t mmcustom_complete[];
18 extern unsigned int mmcustom_count;
19
20 unsigned char mmcustom_setup ( void ); // load
21 void mmcustom_shutdown ( void );       // unload
22 unsigned char mmcustom_is_ready ( void );
23
24 unsigned char mmcustom_write ( char *fullpath /* if NULL, uses canonical location */ );   // save
25 char *mmcustom_determine_path ( void );
26
27 mmcustom_cat_t *mmcustom_query ( char *catname, char *parentcatname ); // parentcatname NULL for parents
28 unsigned int mmcustom_subcount ( char *parentcatname ); // how many custom subcats of the named cat (FD or custom)
29
30 mmcustom_cat_t *mmcustom_register ( char *catname, char *parentcatname );
31 void mmcustom_unregister ( char *catname, char *parentcatname );
32
33 unsigned int mmcustom_count_subcats ( char *catname );
34
35 #endif