Asterisk - The Open Source Telephony Project GIT-master-f36a736
Functions | Variables
res_curl.c File Reference

curl resource engine More...

#include "asterisk.h"
#include <curl/curl.h>
#include "asterisk/module.h"
Include dependency graph for res_curl.c:

Go to the source code of this file.

Functions

static void __reg_module (void)
 
static void __unreg_module (void)
 
struct ast_moduleAST_MODULE_SELF_SYM (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 = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_REALTIME_DEPEND, }
 
static const struct ast_module_infoast_module_info = &__mod_info
 

Detailed Description

curl resource engine

Author
Tilghman Lesher res_c.nosp@m.url_.nosp@m.v1@th.nosp@m.e-ti.nosp@m.lghma.nosp@m.n.co.nosp@m.m

Depends on the CURL library - http://curl.haxx.se/

Definition in file res_curl.c.

Function Documentation

◆ __reg_module()

static void __reg_module ( void  )
static

Definition at line 73 of file res_curl.c.

◆ __unreg_module()

static void __unreg_module ( void  )
static

Definition at line 73 of file res_curl.c.

◆ AST_MODULE_SELF_SYM()

struct ast_module * AST_MODULE_SELF_SYM ( void  )

Definition at line 73 of file res_curl.c.

◆ load_module()

static int load_module ( void  )
static

Definition at line 56 of file res_curl.c.

57{
59
60 if (curl_global_init(CURL_GLOBAL_ALL)) {
61 ast_log(LOG_ERROR, "Unable to initialize the cURL library. Cannot load res_curl.so\n");
63 }
64
65 return res;
66}
#define ast_log
Definition: astobj2.c:42
#define LOG_ERROR
@ AST_MODULE_LOAD_SUCCESS
Definition: module.h:70
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
Definition: module.h:78

References ast_log, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, and LOG_ERROR.

◆ unload_module()

static int unload_module ( void  )
static

Definition at line 49 of file res_curl.c.

50{
51 curl_global_cleanup();
52
53 return 0;
54}

Variable Documentation

◆ __mod_info

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 = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_REALTIME_DEPEND, }
static

Definition at line 73 of file res_curl.c.

◆ ast_module_info

const struct ast_module_info* ast_module_info = &__mod_info
static

Definition at line 73 of file res_curl.c.