curl resource engine More...
#include "asterisk.h"
#include <curl/curl.h>
#include "asterisk/module.h"
Go to the source code of this file.
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | load_module (void) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "cURL Resource Module" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_REALTIME_DEPEND, } |
static struct ast_module_info * | ast_module_info = &__mod_info |
curl resource engine
Definition in file res_curl.c.
static void __reg_module | ( | void | ) | [static] |
Definition at line 78 of file res_curl.c.
static void __unreg_module | ( | void | ) | [static] |
Definition at line 78 of file res_curl.c.
static int load_module | ( | void | ) | [static] |
Definition at line 62 of file res_curl.c.
References ast_log(), AST_MODULE_LOAD_DECLINE, and LOG_ERROR.
00063 { 00064 int res = 0; 00065 00066 if (curl_global_init(CURL_GLOBAL_ALL)) { 00067 ast_log(LOG_ERROR, "Unable to initialize the CURL library. Cannot load res_curl\n"); 00068 return AST_MODULE_LOAD_DECLINE; 00069 } 00070 00071 return res; 00072 }
static int unload_module | ( | void | ) | [static] |
Definition at line 42 of file res_curl.c.
References ast_log(), ast_module_check(), and LOG_ERROR.
00043 { 00044 int res = 0; 00045 00046 /* If the dependent modules are still in memory, forbid unload */ 00047 if (ast_module_check("func_curl.so")) { 00048 ast_log(LOG_ERROR, "func_curl.so (dependent module) is still loaded. Cannot unload res_curl.so\n"); 00049 return -1; 00050 } 00051 00052 if (ast_module_check("res_config_curl.so")) { 00053 ast_log(LOG_ERROR, "res_config_curl.so (dependent module) is still loaded. Cannot unload res_curl.so\n"); 00054 return -1; 00055 } 00056 00057 curl_global_cleanup(); 00058 00059 return res; 00060 }
struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "cURL Resource Module" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_REALTIME_DEPEND, } [static] |
Definition at line 78 of file res_curl.c.
struct ast_module_info* ast_module_info = &__mod_info [static] |
Definition at line 78 of file res_curl.c.