nth 1.12.11devel
|
Transaction API for HTTP. More...
#include <sofia-sip/su_wait.h>
#include <sofia-sip/su_tag.h>
#include <sofia-sip/http.h>
#include <sofia-sip/http_status.h>
#include <sofia-sip/nth_tag.h>
Go to the source code of this file.
Defines | |
#define | NTH_CLIENT_MAGIC_T |
Default type of application context for client NTH requests. | |
#define | NTH_SITE_MAGIC_T |
Default type of application context for NTH servers. | |
#define | NTH_H |
Defined when <sofia-sip/nth.h> has been included. | |
#define | NTH_VERSION |
Version number. | |
Typedefs | |
typedef struct nth_engine_s | nth_engine_t |
NTH engine. | |
typedef struct nth_client_s | nth_client_t |
NTH client request. | |
typedef struct nth_site_s | nth_site_t |
NTH (virtual) hosts or site(s) | |
typedef struct nth_request_s | nth_request_t |
Server transaction. | |
typedef NTH_CLIENT_MAGIC_T | nth_client_magic_t |
Application context for client requests. | |
typedef NTH_SITE_MAGIC_T | nth_site_magic_t |
Application context for NTH servers. | |
Functions | |
msg_t * | nth_engine_msg_create (nth_engine_t *he, int flags) |
Create a new message. | |
int | nth_client_status (nth_client_t const *clnt) |
Gets client status. | |
http_method_t | nth_client_method (nth_client_t const *cnlt) |
Gets client method. | |
int | nth_client_is_streaming (nth_client_t const *hc) |
Is client streaming response? | |
url_t const * | nth_client_url (nth_client_t const *clnt) |
Get original Request-URI. | |
msg_t * | nth_client_request (nth_client_t *clnt) |
Get request message. | |
msg_t * | nth_client_response (nth_client_t const *clnt) |
Get response message. | |
void | nth_client_destroy (nth_client_t *clnt) |
Destroy client request. | |
char const * | nth_site_server_version (void) |
Return server name and version. | |
nth_site_t * | nth_site_create (nth_site_t *parent, nth_request_f *req_callback, nth_site_magic_t *magic, url_string_t const *address, tag_type_t tag, tag_value_t value,...) |
Create a http site object. | |
su_time_t | nth_site_access_time (nth_site_t const *site) |
Get the time last time served. | |
url_t const * | nth_site_url (nth_site_t const *site) |
Get the site URL. | |
int | nth_request_status (nth_request_t const *req) |
Return request authentication status. | |
struct auth_status_t * | nth_request_auth (nth_request_t const *req) |
Return request authentication status. |
Transaction API for HTTP.
#define NTH_CLIENT_MAGIC_T |
Default type of application context for client NTH requests.
Application may define this to appropriate type before including <sofia-sip/nth.h>.
#define NTH_H |
Defined when <sofia-sip/nth.h> has been included.
#define NTH_SITE_MAGIC_T |
Default type of application context for NTH servers.
Application may define this to appropriate type before including <sofia-sip/nth.h>.
void nth_client_destroy | ( | nth_client_t * | hc | ) |
Destroy client request.
http_method_t nth_client_method | ( | nth_client_t const * | hc | ) |
Gets client method.
hc | pointer to a nth client object |
msg_t* nth_client_request | ( | nth_client_t * | hc | ) |
Get request message.
msg_t* nth_client_response | ( | nth_client_t const * | hc | ) |
Get response message.
int nth_client_status | ( | nth_client_t const * | hc | ) |
Gets client status.
hc | pointer to a nth client object |
msg_t* nth_engine_msg_create | ( | nth_engine_t * | he, |
int | flags | ||
) |
Create a new message.
struct auth_status_t* nth_request_auth | ( | nth_request_t const * | req | ) | [read] |
Return request authentication status.
req | pointer to HTTP request object |
Pointer | to authentication status struct |
int nth_request_status | ( | nth_request_t const * | req | ) |
Return request authentication status.
req | pointer to HTTP request object |
Status | code |
su_time_t nth_site_access_time | ( | nth_site_t const * | site | ) |
Get the time last time served.
nth_site_t* nth_site_create | ( | nth_site_t * | parent, |
nth_request_f * | callback, | ||
nth_site_magic_t * | magic, | ||
url_string_t const * | address, | ||
tag_type_t | tag, | ||
tag_value_t | value, | ||
... | |||
) |
Create a http site object.
The function nth_site_create() allocates and initializes a web site object. A web site object can be either
parent | pointer to parent site (NULL when creating a primary server object) |
callback | pointer to callback function called when a request is received |
magic | application context included in callback parameters |
address | absolute or relative URI specifying the address of site |
tag,value,... | list of tagged parameters |
url_t const* nth_site_url | ( | nth_site_t const * | site | ) |
Get the site URL.