Haka
module.h
Go to the documentation of this file.
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 
10 #ifndef HAKA_MODULE_H
11 #define HAKA_MODULE_H
12 
13 #include <wchar.h>
14 #include <haka/thread.h>
15 #include <haka/version.h>
16 #include <haka/parameters.h>
17 
18 
29 };
30 
34 struct module {
35  void *handle;
36  atomic_t ref;
40  const char *name;
41  const char *description;
42  const char *author;
51  int (*init)(struct parameters *args);
52 
57  void (*cleanup)();
58 };
59 
66 struct module *module_load(const char *module_name, struct parameters *args);
67 
73 void module_addref(struct module *module);
74 
78 void module_release(struct module *module);
79 
84 void module_set_path(const char *path, bool c);
85 
90 
94 void module_add_path(const char *path, bool c);
95 
99 const char *module_get_path(bool c);
100 
101 #endif /* HAKA_MODULE_H */
int api_version
Definition: module.h:43
void(* cleanup)()
Definition: module.h:57
const char * module_get_path(bool c)
Definition: module.c:260
Definition: module.h:34
int(* init)(struct parameters *args)
Definition: module.h:51
Definition: module.h:27
enum module_type type
Definition: module.h:38
Definition: module.h:24
void module_addref(struct module *module)
Definition: module.c:136
const char * author
Definition: module.h:42
void module_set_path(const char *path, bool c)
Definition: module.c:208
bool module_set_default_path()
Definition: module.c:151
Definition: module.h:28
struct module * module_load(const char *module_name, struct parameters *args)
Definition: module.c:31
void module_add_path(const char *path, bool c)
Definition: module.c:227
volatile uint32 atomic_t
Definition: thread.h:267
const char * name
Definition: module.h:40
Definition: module.h:23
Definition: module.h:26
Definition: module.h:25
const char * description
Definition: module.h:41
module_type
Definition: module.h:22
void module_release(struct module *module)
Definition: module.c:141