build: make the "rpm" rule work once again
[iwhd.git] / setup.h
blobe70cffa9ba0e29b2031b3e12ccfc5c3e41613d61
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 const char *username;
30 const char *password;
31 const char *path;
32 backend_func_tbl *func_tbl;
33 GHashTable *attrs;
34 char *token;
35 } provider_t;
37 provider_t *main_prov;
38 provider_t *master_prov;
40 const char *parse_config (char *);
41 const 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);
51 #endif