#include "config.h"
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <sofia-sip/su_tag_class.h>
#include <sofia-sip/su_wait.h>
#include "sofia-sip/soa.h"
#include "sofia-sip/sdp.h"
#include "sofia-sip/soa_session.h"
#include "sofia-sip/soa_add.h"
#include <sofia-sip/hostdomain.h>
#include <sofia-sip/su_tagarg.h>
#include <sofia-sip/su_localinfo.h>
#include <sofia-sip/su_uniqueid.h>
#include <sofia-sip/string0.h>
#include <sofia-sip/su_errno.h>
#include <sofia-sip/sip_status.h>
Include dependency graph for soa.c:
Functions | |
int | soa_add (char const *name, struct soa_session_actions const *actions) |
Add a named soa backend. | |
soa_session_actions const * | soa_find (char const *name) |
Search for a named backend. | |
soa_session_t * | soa_session_ref (soa_session_t *ss) |
Increase reference count. | |
void | soa_session_unref (soa_session_t *ss) |
Decrease reference count. | |
void | soa_destroy (soa_session_t *ss) |
Destroy a session. | |
int | soa_set_params (soa_session_t *ss, tag_type_t tag, tag_value_t value,...) |
Set tagged parameters. | |
int | soa_get_params (soa_session_t const *ss, tag_type_t tag, tag_value_t value,...) |
Get tagged parameters. | |
tagi_t * | soa_get_paramlist (soa_session_t const *ss, tag_type_t tag, tag_value_t value,...) |
Return a list of parameters. | |
int | soa_get_warning (soa_session_t *ss, char const **return_text) |
Return warning code and text. | |
int | soa_get_capability_sdp (soa_session_t const *ss, sdp_session_t const **return_sdp, char const **return_sdp_str, int *return_len) |
Return SDP description of capabilities. | |
int | soa_base_set_capability_sdp (soa_session_t *ss, sdp_session_t *sdp, char const *str0, int len0) |
Set capabilities. | |
int | soa_get_user_sdp (soa_session_t const *ss, sdp_session_t const **return_sdp, char const **return_sdp_str, int *return_len) |
Return SDP description of the session. | |
int | soa_get_user_version (soa_session_t const *ss) |
Returns the version number of user session description. | |
int | soa_base_set_user_sdp (soa_session_t *ss, sdp_session_t *sdp, char const *str0, int len0) |
Set user SDP (base version). | |
int | soa_get_remote_sdp (soa_session_t const *ss, sdp_session_t const **return_sdp, char const **return_sdp_str, int *return_len) |
Return remote SDP description of the session. | |
int | soa_get_remote_version (soa_session_t const *ss) |
Returns the version number of remote session description. | |
int | soa_set_remote_sdp (soa_session_t *ss, sdp_session_t const *sdp, char const *str, int len) |
Set remote SDP (offer or answer). | |
int | soa_base_set_remote_sdp (soa_session_t *ss, int new_version, sdp_session_t *sdp, char const *str0, int len0) |
Set remote SDP (base version). | |
int | soa_get_local_sdp (soa_session_t const *ss, sdp_session_t const **return_sdp, char const **return_sdp_str, int *return_len) |
Get local SDP. | |
int | soa_init_offer_answer (soa_session_t *ss) |
Initialize offer/answer state machine. | |
int | soa_generate_offer (soa_session_t *ss, int always, soa_callback_f *completed) |
Run Offer step. | |
int | soa_generate_answer (soa_session_t *ss, soa_callback_f *completed) |
int | soa_process_answer (soa_session_t *ss, soa_callback_f *completed) |
Complete offer-answer after receiving answer. | |
int | soa_base_process_answer (soa_session_t *ss, soa_callback_f *completed) |
Processes answer from remote end. | |
int | soa_process_reject (soa_session_t *ss, soa_callback_f *completed) |
Process rejection of offer. | |
int | soa_base_process_reject (soa_session_t *ss, soa_callback_f *completed) |
Process reject from remote end. | |
int | soa_activate (soa_session_t *ss, char const *option) |
Activate session. | |
int | soa_deactivate (soa_session_t *ss, char const *option) |
Deactivate session. | |
void | soa_terminate (soa_session_t *ss, char const *option) |
Terminate session. | |
int | soa_description_set (soa_session_t *ss, struct soa_description *ssd, sdp_session_t *sdp, char const *sdp_str, int str_len) |
Set session descriptions. | |
int | soa_description_dup (su_home_t *home, struct soa_description *ssd, struct soa_description const *ssd0) |
Duplicate a session descriptions. | |
void | soa_description_free (soa_session_t *ss, struct soa_description *ssd) |
Free session descriptions. | |
int | soa_init_sdp_origin (soa_session_t *ss, sdp_origin_t *o, char buffer[64]) |
Initialize SDP o= line. | |
int | soa_init_sdp_connection (soa_session_t *ss, sdp_connection_t *c, char buffer[64]) |
Obtain a local address for SDP connection structure. | |
Variables | |
char const | SOA_DEBUG [] |
Environment variable determining the default debug log level. | |
su_log_t | soa_log [] |
Debug log for soa module. |
int soa_activate | ( | soa_session_t * | ss, | |
char const * | option | |||
) |
Activate session.
int soa_deactivate | ( | soa_session_t * | ss, | |
char const * | option | |||
) |
Deactivate session.
int soa_generate_answer | ( | soa_session_t * | ss, | |
soa_callback_f * | completed | |||
) |
int soa_generate_offer | ( | soa_session_t * | ss, | |
int | always, | |||
soa_callback_f * | completed | |||
) |
Run Offer step.
ss | pointer to session object | |
always | always send offer (even if offer/answer has been completed) | |
completed | pointer to callback function which is invoked when operation is completed |
1 | when operation is successful | |
0 | when operation is not needed | |
-1 | upon an error |
int soa_get_capability_sdp | ( | soa_session_t const * | ss, | |
sdp_session_t const ** | return_sdp, | |||
char const ** | return_sdp_str, | |||
int * | return_len | |||
) |
Return SDP description of capabilities.
0 | if there is no description to return | |
1 | if description is returned | |
-1 | upon an error |
int soa_get_local_sdp | ( | soa_session_t const * | ss, | |
sdp_session_t const ** | return_sdp, | |||
char const ** | return_sdp_str, | |||
int * | return_len | |||
) |
Get local SDP.
The local SDP is usually result of SDP negotiation.
int soa_get_remote_sdp | ( | soa_session_t const * | ss, | |
sdp_session_t const ** | return_sdp, | |||
char const ** | return_sdp_str, | |||
int * | return_len | |||
) |
Return remote SDP description of the session.
0 | if there is no description to return | |
1 | if description is returned | |
-1 | upon an error |
int soa_get_remote_version | ( | soa_session_t const * | ss | ) |
Returns the version number of remote session description.
The version numbering starts from zero and is incremented for each modification.
int soa_get_user_sdp | ( | soa_session_t const * | ss, | |
sdp_session_t const ** | return_sdp, | |||
char const ** | return_sdp_str, | |||
int * | return_len | |||
) |
Return SDP description of the session.
0 | if there is no description to return | |
1 | if description is returned | |
-1 | upon an error |
int soa_get_user_version | ( | soa_session_t const * | ss | ) |
Returns the version number of user session description.
The version numbering starts from zero and is incremented for each modification.
int soa_process_answer | ( | soa_session_t * | ss, | |
soa_callback_f * | completed | |||
) |
Complete offer-answer after receiving answer.
int soa_process_reject | ( | soa_session_t * | ss, | |
soa_callback_f * | completed | |||
) |
Process rejection of offer.
void soa_terminate | ( | soa_session_t * | ss, | |
char const * | option | |||
) |
Terminate session.
Environment variable determining the default debug log level.
The SOA_DEBUG environment variable is used to determine the default debug logging level. The normal level is 3.