don't ignore failed thread creation
[iwhd.git] / backend.h
blob862a10bb65948efbc9b0c04a5337b8a5f61ce426
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 /* Avoid circular include, suppress warning. */
22 struct _provider;
24 typedef void init_func_t (void);
25 typedef void *get_child_func_t (void *);
26 typedef void *put_child_func_t (void *);
27 typedef void *cache_child_func_t (void *);
28 typedef int delete_func_t (const char *bucket, const char *key,
29 const char *url);
30 typedef int bcreate_func_t (const char *bucket);
31 typedef int register_func_t (my_state *ms,
32 const struct _provider *prov,
33 const char *next, GHashTable *args);
35 typedef struct {
36 const char *name;
37 init_func_t *init_func;
38 get_child_func_t *get_child_func;
39 put_child_func_t *put_child_func;
40 cache_child_func_t *cache_child_func;
41 delete_func_t *delete_func;
42 bcreate_func_t *bcreate_func;
43 register_func_t *register_func;
44 } backend_func_tbl;
46 #define THREAD_FAILED ((void *)(-1))
48 void backend_init (void);
50 #endif