aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/http.h
diff options
context:
space:
mode:
authortwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-02 15:25:48 +0000
committertwilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-02 15:25:48 +0000
commit03c243323c91d0245abb28fa5404c9c1515b4f6d (patch)
treeafc99e2b81810955ebf6293a9a36e7f5be994448 /include/asterisk/http.h
parentc0963a561074aa5fb73f04118693043218dd3ea6 (diff)
Re-add HTTP post support by moving to res_http_post.c
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@112426 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/http.h')
-rw-r--r--include/asterisk/http.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/asterisk/http.h b/include/asterisk/http.h
index 8dd122e3f..72a164997 100644
--- a/include/asterisk/http.h
+++ b/include/asterisk/http.h
@@ -70,9 +70,9 @@ enum ast_http_method {
AST_HTTP_GET = 0,
AST_HTTP_POST,
};
+struct ast_http_uri;
-typedef struct ast_str *(*ast_http_callback)(struct ast_tcptls_session_instance *ser, const char *uri, enum ast_http_method method,
- struct ast_variable *params, int *status, char **title, int *contentlength);
+typedef struct ast_str *(*ast_http_callback)(struct ast_tcptls_session_instance *ser, const struct ast_http_uri *urih, const char *uri, enum ast_http_method method, struct ast_variable *params, struct ast_variable *headers, int *status, char **title, int *contentlength);
/*! \brief Definition of a URI handler */
struct ast_http_uri {
@@ -87,6 +87,10 @@ struct ast_http_uri {
unsigned int supports_get:1;
/*! This handler accepts POST requests */
unsigned int supports_post:1;
+ /*! Data to bind to the uri if needed */
+ void *data;
+ /*! Key to be used for unlinking if multipile URIs registerd */
+ const char *key;
};
/*! \brief Register a URI handler */
@@ -95,6 +99,9 @@ int ast_http_uri_link(struct ast_http_uri *urihandler);
/*! \brief Unregister a URI handler */
void ast_http_uri_unlink(struct ast_http_uri *urihandler);
+/*! \brief Unregister all handlers with matching key */
+void ast_http_uri_unlink_all_with_key(const char *key);
+
/*! \brief Return an ast_str malloc()'d string containing an HTTP error message */
struct ast_str *ast_http_error(int status, const char *title, const char *extra_header, const char *text);