build: make the "rpm" rule work once again
[iwhd.git] / backend.h
blobe6207c755bba6ef11b2de826d5dc0f75b749f6ba
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(_BACKEND_H)
17 #define _BACKEND_H
19 #include "state_defs.h"
21 typedef void init_func_t (struct _provider *prov);
22 /* Get provider from passed backend_thunk. */
23 typedef void *get_child_func_t (void *);
24 /* Get provider from passed pipe_private. */
25 typedef void *put_child_func_t (void *);
26 typedef void *cache_child_func_t (void *);
27 /* Get provider as an argument. */
28 typedef int delete_func_t (const struct _provider *prov,
29 const char *bucket, const char *key,
30 const char *url);
31 typedef int bcreate_func_t (const struct _provider *prov,
32 const char *bucket);
33 typedef int register_func_t (my_state *ms,
34 const struct _provider *prov,
35 const char *next, GHashTable *args);
37 typedef struct {
38 const char *name;
39 init_func_t *init_func;
40 get_child_func_t *get_child_func;
41 put_child_func_t *put_child_func;
42 cache_child_func_t *cache_child_func;
43 delete_func_t *delete_func;
44 bcreate_func_t *bcreate_func;
45 register_func_t *register_func;
46 } backend_func_tbl;
48 #define THREAD_FAILED ((void *)(-1))
50 void backend_init (void);
52 #endif