Asterisk - The Open Source Telephony Project  21.4.1
Data Structures | Macros | Functions | Variables
res_http_post.c File Reference

HTTP POST upload support for Asterisk HTTP server. More...

#include "asterisk.h"
#include <sys/stat.h>
#include <fcntl.h>
#include <gmime/gmime.h>
#include "asterisk/linkedlists.h"
#include "asterisk/http.h"
#include "asterisk/paths.h"
#include "asterisk/tcptls.h"
#include "asterisk/manager.h"
#include "asterisk/cli.h"
#include "asterisk/module.h"
#include "asterisk/ast_version.h"

Go to the source code of this file.

Data Structures

struct  mime_cbinfo
 

Macros

#define MAX_PREFIX   80
 

Functions

static int __ast_http_post_load (int reload)
 
static void __reg_module (void)
 
static void __unreg_module (void)
 
struct ast_moduleAST_MODULE_SELF_SYM (void)
 
static int find_sequence (char *inbuf, int inlen, char *matchbuf, int matchlen)
 
static int http_post_callback (struct ast_tcptls_session_instance *ser, const struct ast_http_uri *urih, const char *uri, enum ast_http_method method, struct ast_variable *get_vars, struct ast_variable *headers)
 
static int load_module (void)
 
static GMimeMessage * parse_message (FILE *f)
 
static void post_raw (GMimePart *part, const char *post_dir, const char *fn)
 
static int process_message (GMimeMessage *message, const char *post_dir)
 
static void process_message_callback (GMimeObject *part, gpointer user_data)
 
static int readmimefile (struct ast_iostream *in, FILE *fout, char *boundary, int contentlen)
 
static int reload (void)
 
static int unload_module (void)
 

Variables

static struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "HTTP POST support" , .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 = "da6642af068ee5e6490c5b1d2cc1d238" , .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload, .requires = "http", }
 
static const struct ast_module_infoast_module_info = &__mod_info
 
static char prefix [MAX_PREFIX]
 

Detailed Description

HTTP POST upload support for Asterisk HTTP server.

Author
Terry Wilson <twils.nosp@m.on@d.nosp@m.igium.nosp@m..com

AMI over HTTP support - AMI over the http protocol

Definition in file res_http_post.c.