remove functions and struct members that are no longer needed
[iwhd.git] / setup.h
blobfb50944f347a8d4a138e03ae5746812dd0cc2b89
1 /* Copyright (C) 2010 Red Hat, Inc.
3 This program is free software: you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation, either version 3 of the License, or
6 (at your option) any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http://www.gnu.org/licenses/>. */
16 #if !defined(_SETUP_H)
17 #define _SETUP_H
19 #include <glib.h>
20 #include <curl/curl.h> /* needed by stuff in state_defs.h (from backend.h) */
21 #include <microhttpd.h> /* ditto */
22 #include "backend.h"
24 typedef struct _provider {
25 const char *name;
26 const char *type;
27 const char *host;
28 int port;
29 int deleted;
30 const char *username;
31 const char *password;
32 const char *path;
33 backend_func_tbl *func_tbl;
34 GHashTable *attrs;
35 char *token;
36 } provider_t;
38 provider_t *g_master_prov;
40 const char *parse_config (char *);
41 provider_t *get_provider (const char *name);
42 void update_provider (const char *provname,
43 const char *username,
44 const char *password);
45 const char *get_provider_value (const provider_t *prov,
46 const char *fname);
47 void init_prov_iter (GHashTableIter *iter);
49 const char *auto_config (void);
50 int validate_provider (GHashTable *h);
51 provider_t *find_provider (const char *name);
52 int add_provider (GHashTable *h);
53 provider_t *get_main_provider (void);
54 void set_main_provider (provider_t *prov);
56 #endif