FreeSWITCH API Documentation  1.7.0
switch_dso.h
Go to the documentation of this file.
1 /*
2  * Cross Platform dso/dll load abstraction
3  * Copyright(C) 2008 Michael Jerris
4  *
5  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
6  * copies of the Software, and permit persons to whom the Software is
7  * furnished to do so.
8  *
9  * This work is provided under this license on an "as is" basis, without warranty of any kind,
10  * either expressed or implied, including, without limitation, warranties that the covered code
11  * is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire
12  * risk as to the quality and performance of the covered code is with you. Should any covered
13  * code prove defective in any respect, you (not the initial developer or any other contributor)
14  * assume the cost of any necessary servicing, repair or correction. This disclaimer of warranty
15  * constitutes an essential part of this license. No use of any covered code is authorized hereunder
16  * except under this disclaimer.
17  *
18  */
19 
20 
21 #ifndef FREESWITCH_DSO_H
22 #define FREESWITCH_DSO_H
23 
25 
26 typedef int (*switch_dso_func_t) (void);
27 #ifdef WIN32
28 typedef HINSTANCE switch_dso_lib_t;
29 #else
30 typedef void *switch_dso_lib_t;
31 #endif
32 
33 typedef void *switch_dso_data_t;
34 
36 SWITCH_DECLARE(switch_dso_lib_t) switch_dso_open(const char *path, int global, char **err);
37 SWITCH_DECLARE(switch_dso_func_t) switch_dso_func_sym(switch_dso_lib_t lib, const char *sym, char **err);
38 SWITCH_DECLARE(void *) switch_dso_data_sym(switch_dso_lib_t lib, const char *sym, char **err);
39 
41 
42 #endif
43 
44 /* For Emacs:
45  * Local Variables:
46  * mode:c
47  * indent-tabs-mode:t
48  * tab-width:4
49  * c-basic-offset:4
50  * End:
51  * For VIM:
52  * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet
53  */
#define SWITCH_END_EXTERN_C
Definition: switch.h:43
SWITCH_BEGIN_EXTERN_C typedef int(* switch_dso_func_t)(void)
Definition: switch_dso.h:26
void switch_dso_destroy(switch_dso_lib_t *lib)
Definition: switch_dso.c:87
switch_dso_lib_t switch_dso_open(const char *path, int global, char **err)
Definition: switch_dso.c:95
switch_dso_func_t switch_dso_func_sym(switch_dso_lib_t lib, const char *sym, char **err)
Definition: switch_dso.c:117
void * switch_dso_data_t
Definition: switch_dso.h:33
#define SWITCH_DECLARE(type)
void * switch_dso_data_sym(switch_dso_lib_t lib, const char *sym, char **err)
Definition: switch_dso.c:126
void * switch_dso_lib_t
Definition: switch_dso.h:30
#define SWITCH_BEGIN_EXTERN_C
Definition: switch.h:42