summaryrefslogtreecommitdiff
path: root/src/plugins/fset/fset-option.h
blob: c1382b88060f7f7e1bfad2c05c06b2f92f98a7ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
 * Copyright (C) 2003-2017 Sébastien Helleu <flashcode@flashtux.org>
 *
 * This file is part of WeeChat, the extensible chat client.
 *
 * WeeChat is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * WeeChat is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with WeeChat.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef WEECHAT_FSET_OPTION_H
#define WEECHAT_FSET_OPTION_H 1

#include <time.h>

/* status for fset */
#define FSET_STATUS_INSTALLED   1
#define FSET_STATUS_AUTOLOADED  2
#define FSET_STATUS_HELD        4
#define FSET_STATUS_RUNNING     8
#define FSET_STATUS_NEW_VERSION 16

struct t_fset_option
{
    char *name;                          /* option name                     */
    char *type;                          /* option type                     */
    char *default_value;                 /* option default value            */
    char *value;                         /* option value                    */
    struct t_fset_option *prev_option;   /* link to previous option         */
    struct t_fset_option *next_option;   /* link to next option             */
};

extern struct t_arraylist *fset_options;
extern struct t_hashtable *fset_option_max_length_field;
extern char *fset_option_filter;

extern int fset_option_valid (struct t_fset_option *option);
extern struct t_fset_option *fset_option_search_by_name (const char *name);
extern int fset_option_value_different_from_default (struct t_fset_option *option);
extern void fset_option_set_filter (const char *filter);
extern void fset_option_get_options ();
extern void fset_option_filter_options (const char *search);
extern struct t_hdata *fset_option_hdata_option_cb (const void *pointer,
                                                    void *data,
                                                    const char *hdata_name);
extern int fset_option_add_to_infolist (struct t_infolist *infolist,
                                        struct t_fset_option *option);
extern void fset_option_print_log ();
extern int fset_option_init ();
extern void fset_option_end ();

#endif /* WEECHAT_FSET_OPTION_H */