Logo Search packages:      
Sourcecode: sofia-sip version File versions  Download package

nua_client_request Class Reference

List of all members.

Detailed Description

For internal use only.

Each handle has a queue of client-side requests; if a request is pending, a new request from API is added to the queue. After the request is complete, it is removed from the queue and destroyed by the default. The exception is the client requests bound to a dialog usage: they are saved and re-used when the dialog usage is refreshed (and sometimes when the usage is terminated).

The client request is subclassed and its behaviour modified using virtual function table in nua_client_methods_t.

The first three methods (crm_template(), crm_init(), crm_send()) are called when the request is sent first time.

The crm_template() is called if a template request message is needed (for example, in case of unregister, unsubscribe and unpublish, the template message is taken from the request establishing the usage).

The crm_init() is called when the template message and dialog leg has been created and populated by the tags procided by the application. Its parameters msg and sip are pointer to the template request message that is saved in the nua_client_request::cr_msg field.

The crm_send() is called with a copy of the template message that has been populated with all the fields included in the request, including and . The crm_send() function, such as nua_publish_client_request(), usually calls nua_base_client_trequest() that then creates the nta-level transaction.

The response to the request is processed by crm_check_restart(), which modifies and restarts the request when needed (e.g., when negotiating expiration time). After the request has been suitably modified, e.g., the expiration time has been increased, the restart function calls nua_client_restart(), which restarts the request and relays the intermediate response to the application with nua_client_restart() and crm_report().

The final responses are processed by crm_recv() and and preliminary ones by crm_preliminary(). All virtual functions should call nua_base_client_response() beside method-specific processing.

The nua_base_client_response() relays the response to the application with nua_client_restart() and crm_report().

Terminating Dialog Usages and Dialogs
The response is marked as terminating with nua_client_set_terminating(). When a terminating request completes the dialog usage is removed and the dialog is destroyed (unless there is an another active usage).

Definition at line 251 of file nua_dialog.h.

Public Attributes

unsigned cr_acked:1
unsigned short cr_answer_recv
unsigned cr_answer_sent:1
unsigned cr_auto:1
unsigned cr_challenged:1
unsigned cr_contactize:1
unsigned cr_dialog:1
int cr_event
unsigned cr_graceful:1
unsigned cr_has_contact:1
sip_method_t cr_method
char const * cr_method_name
nua_client_methods_t const * cr_methods
unsigned cr_neutral:1
unsigned cr_offer_recv:1
unsigned cr_offer_sent:1
nua_owner_t * cr_owner
char const * cr_phrase
nua_client_request_t ** cr_prev
unsigned cr_refs
unsigned cr_reporting:1
unsigned cr_restarting:1
unsigned short cr_retry_count
uint32_t cr_seq
nua_saved_signal_t cr_signal [1]
unsigned short cr_status
tagi_t const * cr_tags
signed int cr_terminated:2
unsigned cr_terminating:1
nua_dialog_usage_t * cr_usage
unsigned cr_wait_for_cred:1
unsigned cr_waiting:1

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index