code discription
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:
functions
* AKA() : DigestAKAv1MD5.c
* base64_decode_string() : base64.c
* base64_encode_string2() : base64.c
* calc_HA1() : rfc2617.c
* calc_response() : rfc2617.c
* ComputeOPc() : milenage.c
* f1() : milenage.c
* f1star() : milenage.c
* f2345() : milenage.c
* f5star() : milenage.c
* MD5() : DigestAKAv1MD5.c
* RijndaelEncrypt() : rijndael.c
* RijndaelKeySchedule() : rijndael.c
variables
* base64 : base64.c
* hexa : DigestAKAv1MD5.c
* OP : milenage.c
typedefs
* AK : DigestAKAv1MD5.c
* AMF : DigestAKAv1MD5.c
* AUTN : DigestAKAv1MD5.c
* AUTS : DigestAKAv1MD5.c
* AUTS64 : DigestAKAv1MD5.c
* CK : DigestAKAv1MD5.c
* IK : DigestAKAv1MD5.c
* K : DigestAKAv1MD5.c
* MAC : DigestAKAv1MD5.c
* RAND : DigestAKAv1MD5.c
* RES : DigestAKAv1MD5.c
* RESHEX : DigestAKAv1MD5.c
enums
* HA_MD5 : rfc2617.h
* HA_MD5_SESS : rfc2617.h
Methods to handle both SIP and IMS eXosip events
Functions
Call * find_call (int cid)
void add_call (Call *new_call)
void delete_call (int cid)
void call_released (eXosip_event_t *je)
void start_rtp_session (eXosip_event_t *je)
void common_process_info (eXosip_event_t *je)
Function Documentation
void add_call ( Call * new_call )
Adds a call to the call_list
Parameters: new_call - The call to add to the list
void call_released ( eXosip_event_t * je )
Removes a call from the call list as a result of the call being released by the remote host or of a global failure
Parameters: je - a pointer to the event that caused the call to be releaseed
void common_process_info ( eXosip_event_t * je )
Process a INFO message, used for transmitting DTMF tones
Parameters: je - a pointer to the INFO event
void delete_call ( int cid )
Removes the call with the given call ID from the call list
Parameters: cid - The call ID of the call to be removed
Call* find_call ( int cid )
Finds the call with the given call ID in the call list
Parameters: cid - The call ID to search for
Returns: the Call struct or NULL if not found
void start_rtp_session ( eXosip_event_t * je )
Sets up and starts an RTP session
Parameters: je - a pointer to the event that caused the rtp session to be initiated
Methods to handle both SIP and IMS interface events
Functions
void set_mode ()
void terminate_call ()
void reject_call ()
void common_start_im_session (const gchar *chat_uri_entry)
void common_send_dtmf (int val)
Function Documentation
void common_send_dtmf ( int val )
Sends DTMF tones in an NFO message
Parameters: val - the value of the DTMF tone to send
void common_start_im_session ( const gchar * chat_uri_entry )
Starts an Instant Messaging session as a result of sending a MESSAGE Opens an IM Window and brings correct tab to the foreground Method is the same for IMS and SIP mode
Parameters: chat_uri_entry - URI to start the IM session with
void reject_call ( )
Rejects a call, method is the same for SIP and IMS mode
void set_mode ( )
Sets the mode into either IMS or SIP mode, used only on startup
void terminate_call ( )
Terminates a call, method is the same for SIP and IMS mode
Methods to handle IMS eXosip events
Functions
void ims_process_401 (eXosip_event_t *je)
void ims_process_registration_200ok (eXosip_event_t *je)
int ims_message_requires_preconditions (osip_message_t *message)
int ims_message_requires_100rel (osip_message_t *message)
void ims_process_incoming_invite (eXosip_event_t *je)
void ims_process_18x (eXosip_event_t *je)
void ims_process_prack (eXosip_event_t *je)
void ims_process_update (eXosip_event_t *je)
void ims_process_2xx (eXosip_event_t *je)
void ims_process_200ok (eXosip_event_t *je)
void ims_process_ack (eXosip_event_t *je)
void ims_process_message (eXosip_event_t *je)
void ims_start_im_session (eXosip_event_t *je)
void ims_process_incoming_reinvite (eXosip_event_t *je)
Function Documentation
int ims_message_requires_100rel ( osip_message_t * message )
Determines if an IMS message requires reliable responses
Parameters: message - a pointer to the message to check
Returns: 0 if no reliable responses are required and 1 otherwise
int ims_message_requires_preconditions ( osip_message_t * message )
Determines if an IMS message has preconditions
Parameters: message - a pointer to the message to check
Returns: 0 if no preconditions and 1 if there are preconditions
void ims_process_18x ( eXosip_event_t * je )
Processes an IMS 18X response
Parameters: je - a pointer to the 18X event
void ims_process_200ok ( eXosip_event_t * je )
Processes a IMS 200 OK response
Parameters: je - a pointer to the 200 OK event
void ims_process_2xx ( eXosip_event_t * je )
Processes a IMS 2XX response
Parameters: je - a pointer to the 2XX event
void ims_process_401 ( eXosip_event_t * je )
Processes an IMS 401 response
Parameters: je - a pointer to the 401 event
void ims_process_ack ( eXosip_event_t * je )
Processes a IMS ACK response
Parameters: je - a pointer to the ACK event
void ims_process_incoming_invite ( eXosip_event_t * je )
Processes an IMS INVITE request
Parameters: je - a pointer to the INVITE event
void ims_process_incoming_reinvite ( eXosip_event_t * je )
Processes an INVITE within a call
Parameters: je - a pointer to the INVITE event
void ims_process_message ( eXosip_event_t * je )
Processes a IMS out of call MESSAGE
Parameters: je - a pointer to the MESSAGE event
void ims_process_prack ( eXosip_event_t * je )
Processes a IMS PRACK response
Parameters: je - a pointer to the PRACK event
void ims_process_registration_200ok ( eXosip_event_t * je )
Processes an 200 OK resonse to a register request
Parameters: je - a pointer to the 200 OK event
void ims_process_update ( eXosip_event_t * je )
Processes a IMS UPDATE request
Parameters: je - a pointer to the UPDATE event
void ims_start_im_session ( eXosip_event_t * je )
Starts an Instant Messaging session as a result of receiving an IMS out of call MESSAGE
Parameters: je - a pointer to the MESSAGE event
Methods to handle IMS interface events
Functions
void ims_call_initiate ()
void ims_send_instant_message ()
void ims_send_register ()
void ims_open_im_window ()
void ims_call_answer ()
void ims_send_deregister_message ()
void ims_call_reinvite (gpointer button)
Function Documentation
void ims_call_answer ()
Answers an IMS call and sends a 200 OK response
void ims_call_initiate ( )
Initiates an IMS call by sending an IMS INVITE request
void ims_call_reinvite ( gpointer button )
Sends an IMS INVITE within a call
void ims_open_im_window ()
Checks for correct URI's,etc. and opens an IM Window if 1 is'nt already open
void ims_send_deregister_message ()
Sends an IMS DEREGISTER request
void ims_send_instant_message ()
Sends an out of call IMS MESSAGE
void ims_send_register ()
Sends an IMS REGISTER request
Main
Functions
int initialise_eXosip ()
int initialise_ortp ()
gint get_exosip_events (gpointer main_window)
Function Documentation
gint get_exosip_events ( gpointer main_window )
Fetch any waiting eXosip events
Parameters:
main_window - a pointer to the main window widget
int initialise_eXosip ( )
Initialise eXosip
int initialise_ortp ()
Initiliase oRTP
Preferences
Functions
char * preferences_remove_newline (char *input)
void preferences_get_preferences_from_file (char *filename)
void preferences_write_preferences_to_file (char *filename)
void preferences_set_preferences_dialog ()
void preferences_get_preferences_dialog (gpointer button)
Function Documentation
void preferences_get_preferences_dialog ( gpointer button)
Get all the fields from the preferences dialog.
Parameters:
button - a pointer to the OK button in the preferences dialog
void preferences_get_preferences_from_file ( char * filename )
Fetches the preferences from the specified file.
Parameters:
filename - path and filename of preferences file (defaults to ".imsuapref")
char* preferences_remove_newline ( char * input )
Removes newline char from the end of a string.
Parameters:
input - the orginal string
Returns:
the new string without the newline char
void preferences_set_preferences_dialog ()
Set all the fields in the preferences dialog.
void preferences_write_preferences_to_file (char * filename )
Write the preferences to the specified file.
Parameters:
filename - path and filename of preferences file (defaults to ".imsuapref")
Presence
Functions
void presence_change_presentity ()
void presence_publish_presentity (char *basic, char *note)
void presence_get_xml_elements (xmlNode *root_node, char *entity)
void presence_process_notify (eXosip_event_t *je)
buddydata * presence_find_buddy (char *buddy)
void presence_add_buddy (char *buddy)
void presence_remove_buddy (char *buddy)
void presence_subscribe_to_presentity (char *buddy, int expires)
void presence_subscribe_to_all_presentities (int expires)
void presence_display_buddies ()
void presence_get_buddy_list_from_file (char *filename)
void presence_write_buddy_list_to_file (char *filename)
Function Documentation
void presence_add_buddy ( char * buddy )
Add a buddy to the buddy list.
Parameters:
buddy - the uri of the buddy to add
void presence_change_presentity ( )
Upate presentity display and publish new presence information.
void presence_display_buddies ( )
Displays a list of all buddies.
buddydata* presence_find_buddy ( char * buddy )
Finds a buddy in the list of buddies.
Parameters:
buddy - the uri of the buddy to find
Returns:
the buddy struct if found or NULL if not found
void presence_get_buddy_list_from_file ( char * filename )
Gets list of buddies from file.
Parameters:
filename - filename where the buddies are kept - default to .buddylist
void presence_get_xml_elements ( xmlNode * root_node, char *entity)
Get the <basic> and <note> elements from an XML document.
Parameters:
root_node - the root node of the XML document entity - the URI of the presentity
void presence_process_notify ( eXosip_event_t * je )
Process an incoming presence notification.
Parameters:
je - the eXosip event
void presence_publish_presentity(char * basic, char * note)
Publish presentity.
void presence_remove_buddy ( char * buddy )
Remove a buddy from the buddy list.
Parameters:
buddy - the uri of the buddy to remove
void presence_subscribe_to_all_presentities( int expires )
Subscribe to the presentity of all on the buddy list.
Parameters:
expires - length that subscriptions are valid
void presence_subscribe_to_presentity(char * buddy,int expires)
Send an eXosip subscribe for a presentity.
Parameters:
buddy - the uri of the buddy to watch
expires - length that subscription is valid
void presence_write_buddy_list_to_file (char * filename)
Writes list of buddies to file.
Parameters:
filename - filename where the buddies are kept - default to .buddylist
SDP body helpers
Functions
int sdp_complete_200ok (int did, osip_message_t *answer, Call *ca)
int sdp_complete_ims (osip_message_t *message, osip_message_t **answer, Call *ca)
Function Documentation
int sdp_complete_200ok ( int did,
osip_message_t * answer,
Call * ca
)
Completes the reply SDP body of a SIP message
Parameters:
did - The call's DID
answer - The osip message with the completed SDP body
ca - The current call
int sdp_complete_ims ( osip_message_t * message,
osip_message_t ** answer,
Call * ca
)
Completes the reply SDP body of an IMS message
Parameters:
message - The received message
answer - The osip message with the completed SDP body
ca - The current call
Methods to handle SIP eXosip events
Functions
void sip_process_incoming_invite (eXosip_event_t *je)
void sip_process_ringing (eXosip_event_t *je)
void sip_process_ack (eXosip_event_t *je)
void sip_process_200ok (eXosip_event_t *je)
void sip_process_message (eXosip_event_t *je)
void sip_start_im_session (eXosip_event_t *je)
Function Documentation
void sip_process_200ok ( eXosip_event_t * je )
Processes a SIP 200 OK response
Parameters:
je - a pointer to the 200 OK event
void sip_process_ack ( eXosip_event_t * je )
Processes a SIP ACK response
Parameters:
je - a pointer to the ACK event
void sip_process_incoming_invite ( eXosip_event_t * je )
Processes a SIP INVITE request
Parameters:
je - a pointer to the INVITE event
void sip_process_message ( eXosip_event_t * je )
Processes a SIP out of call MESSAGE
Parameters:
je - a pointer to the MESSAGE event
void sip_process_ringing ( eXosip_event_t * je )
Processes a SIP RINGING response
Parameters:
je - a pointer to the RINGING event
void sip_start_im_session ( eXosip_event_t * je )
Starts an Instant Messaging session as a result of receiving a SIP out of call MESSAGE
Parameters:
je - a pointer to the MESSAGE event
Methods to handle SIP interface events
Functions
void sip_call_initiate ()
void sip_send_instant_message ()
void sip_send_register ()
void sip_open_im_window ()
void sip_call_answer ()
void sip_send_deregister_message ()
Function Documentation
void sip_call_answer ( )
Answers an SIP call and sends a 200 OK response
void sip_call_initiate ( )
Initiates a SIP call by sending a SIP INVITE request
void sip_open_im_window ( )
Checks for correct URI's,etc. and opens an IM Window if 1 is'nt already open
void sip_send_deregister_message ( )
Sends a SIP DEREGISTER request
void sip_send_instant_message ( )
Sends an out of call SIP MESSAGE
void sip_send_register ( )
Sends a SIP REGISTER request
Useful methods
Functions
char * add_quotes (char *in)
char * imsua_remove_quotes (char *text)
char * add_sip_scheme (char *in)
char * imsua_add_lr_to_route (char *route)
void set_display (char *text)
void set_reg_event_display (char *text)
void imsua_append_text_to_display (char *text)
void imsua_append_text_to_reg_event_display (char *text)
void imsua_set_presentity_display (char *new_presentity)
void imsua_clear_buddy_list_display ()
void imsua_append_text_to_buddy_list_display (char *buddy, char *basic, char *note)
void imsua_set_message_display (char *text)
void imsua_clear_presrules_display ()
void imsua_set_presrules_display (char *text)
void imsua_display_event_info (eXosip_event_t *je)
int imsua_is_associated_uri (char *uri)
void imsua_add_service_routes (osip_message_t **message)
void set_status_bar (char *text)
char * imsua_get_time ()
int timeval_subtract (struct timeval *result, struct timeval *x, struct timeval *y)
char * imsua_addpath (char *filename)
int imsua_regex_match (char *string, char *pattern)
void imsua_log (char *message)
Function Documentation
char* add_quotes ( char * in )
Encapsulates a string in quotes.
Parameters:
in - the orginal string
Returns:
the new string encapsulated in quotes
char* add_sip_scheme ( char * in )
Adds the sip: scheme to a string
Parameters:
in - the orginal string
Returns:
the new string with sip: prepended
char* imsua_add_lr_to_route ( char * route )
Adds the lr parameter to a route string.
Parameters:
route - the orginal route
Returns:
the new route with the lr parameter
void imsua_add_service_routes ( osip_message_t ** message )
Add the service routes learnt during registration.
Parameters:
message - the osip message to add the service routes
char* imsua_addpath ( char * filename )
Add file path to filename.
Parameters:
result - the full path and filename
filename - filename without path
void imsua_append_text_to_buddy_list_display ( char * buddy,
char * basic,
char * note
)
Appends text to buddy list display.
Parameters:
buddy - the buddy address to append
basic - the basic parameter to append
note - the note parameter to append
void imsua_append_text_to_display ( char * text )
Appends text to the Display widget.
Parameters:
text - the text value to append
void imsua_append_text_to_reg_event_display ( char * text )
Appends text to the reg event display widget.
Parameters:
text - the text value to append
void imsua_clear_buddy_list_display ( )
Clears the buddy list display
void imsua_clear_presrules_display ( )
Clears the pres-rules display.
void imsua_display_event_info ( eXosip_event_t * je )
Show the event info in the message display.
Parameters:
je - the eXosip event
char* imsua_get_time ( )
Writes the clock time to a string
Parameters:
time_str - the pointer to store the time in
int imsua_is_associated_uri ( char * uri )
Check to see if this uri is one of our associated uris.
Parameters:
uri - the uri to check
void imsua_log ( char * message )
Print debugging information to stderr.
Parameters:
message - the debugging message
int imsua_regex_match ( char * string,
char * pattern
)
Match regular expression.
Parameters:
result - returns 1 on success, 0 otherwise
string - the string
pattern - the regular expression
char* imsua_remove_quotes ( char * text )
Removes outer quotes from a string.
Parameters:
in - the orginal string
Returns:
the new string without quotes
void imsua_set_message_display ( char * text )
Appends text to message display.
Parameters:
text - the text value to append
void imsua_set_presentity_display ( char * new_presentity )
Sets presentity display.
Parameters:
new_presentity - the text value to set
void imsua_set_presrules_display ( char * text )
Appends text to pres-rules display.
Parameters:
text - the text value to append
void set_display ( char * text )
Sets the text of the Display widget.
Parameters:
text - the text
void set_reg_event_display ( char * text )
Sets the text of the reg event display widget.
Parameters:
text - the text
void set_status_bar ( char * text )
Sets the text of the Status Bar widget.
Parameters:
text - the text value
int timeval_subtract ( struct timeval * result,
struct timeval * x,
struct timeval * y
)
Subtract y from x timevals and return the answer. This is useful for timing network delays.
Parameters:
result - the difference between the two times
x - value at end of timer
y - value at start of timer
Watchers
Functions
void watchers_subscribe_to_watcherinfo (int expires)
void watchers_get_xml_elements (xmlNode *root_node)
void watchers_process_notify (eXosip_event_t *je)
watcherdata * watchers_find_watcher (char *uri)
void watchers_add_watcher (watcherdata *watcher)
void watchers_remove_watcher (char *uri)
void watchers_remove_all_watchers ()
void watchers_display_watchers ()
Function Documentation
void watchers_add_watcher ( watcherdata * watcher )
Add a watcher to the list of watchers.
Parameters:
watcher - a new watcher struct
void watchers_display_watchers ( )
Displays all watchers in the watchers tab.
watcherdata* watchers_find_watcher ( char * uri )
Find a particular watcher in the list of watchers.
Parameters:
uri - the uri of the watcher to find
void watchers_get_xml_elements ( xmlNode * root_node )
Parses the XML from NOTIFY messages.
Parameters:
root_node - the root node of the XML document
void watchers_process_notify ( eXosip_event_t * je )
Handle an incoming NOTIFY event.
Parameters:
je - the eXosip event
void watchers_remove_all_watchers ( )
Removes all watchers from the watcher list.
void watchers_remove_watcher ( char * uri )
Remove a watcher from the list of watchers.
Parameters:
uri - the uri of the watcher to remove
void watchers_subscribe_to_watcherinfo ( int expires )
Subscribe to the watcher info event.
Parameters:
expires - length that subscriptions are valid
XCAP
Functions
int xcap_find_user_in_rule (xmlNodePtr cur, char *user)
int xcap_remove_user_from_rule (xmlNodePtr cur, char *user)
int xcap_add_user_to_rule (xmlNodePtr cur, char *user)
int xcap_rule_is_not_empty (xmlNodePtr cur)
int xcap_rule_is_block (xmlNode *cur)
int xcap_rule_is_confirm (xmlNodePtr cur)
int xcap_rule_is_politeblock (xmlNodePtr cur)
int xcap_rule_is_allow (xmlNodePtr cur)
xmlNsPtr xcap_get_namespace (xmlDocPtr doc, xmlNodePtr cur, char *comparehref)
int xcap_delete_empty_rules (xmlDocPtr doc)
xmlDocPtr xcap_add_new_rule (xmlDocPtr doc, char *ruleName, char *action, char *user)
void xcap_allow_user (char *user)
void xcap_block_user (char *user)
void xcap_reset_presrules_doc ()
void xcap_pretty_print_xml (xmlNodePtr cur)
size_t WriteMemoryCallback (void *ptr, size_t size, size_t nmemb, void *data)
void xcap_get_presrules_from_server ()
size_t read_callback (void *ptr, size_t size, size_t nmemb, void *stream)
void xcap_put_presrules_to_server ()
Function Documentation
size_t read_callback ( void * ptr,
size_t size,
size_t nmemb,
void * stream
)
A curl callback for putting pres-rules.
size_t WriteMemoryCallback ( void * ptr,
size_t size,
size_t nmemb,
void * data
)
A curl callback for getting pres-rules.
xmlDocPtr xcap_add_new_rule ( xmlDocPtr doc,
char * ruleName,
char * action,
char * user
)
Add a new rule to a pres-rules document.
Parameters:
doc - the pres-rules document
rulename - the name of the rule, i.e. pres_whitelist or pres_blacklist
action - the action of the rule, i.e. allow, block, confirm or polite-block
user - the first user id of the rule
int xcap_add_user_to_rule ( xmlNodePtr cur,
char * user
)
Add a user to a pres-rules document rule.
Parameters:
cur - in this rule
user - the uri of the user
Returns:
1 if successful
void xcap_allow_user ( char * user )
Allow a user in our presence rules.
Parameters:
user - the uri of the user to add
void xcap_block_user ( char * user )
Block a user in our presence rules.
Parameters:
user - the uri of the user to block
int xcap_delete_empty_rules ( xmlDocPtr doc )
Delete all empty rules from a pres-rules doc.
Parameters:
doc - the pres-rules document
int xcap_find_user_in_rule ( xmlNodePtr cur,
char * user
)
Find a user id in a pres-rules document rule.
Parameters:
cur - search in this rule
user - the uri of the user to search for
Returns:
1 if user found or 0 otherwise
xmlNsPtr xcap_get_namespace ( xmlDocPtr doc,
xmlNodePtr cur,
char * comparehref
)
Finds a buddy in the list of buddies.
Parameters:
buddy - the uri of the buddy to find
Returns:
the buddy struct if found or NULL if not found
void xcap_get_presrules_from_server ( )
Download our pres-rules from the XCAP server.
void xcap_pretty_print_xml ( xmlNodePtr cur )
Pretty print our rules in the pres-rules tab.
Parameters:
cur - the root element of the pres-rules document
void xcap_put_presrules_to_server ( )
Upload our pres-rules to the XCAP server.
int xcap_remove_user_from_rule ( xmlNodePtr cur,
char * user
)
Remove a user from a pres-rules document rule.
Parameters:
cur - search in this rule
user - the uri of the user to search for
Returns:
1 if user found or 0 otherwise
void xcap_reset_presrules_doc ( )
Reset the presence rules document with no rules.
int xcap_rule_is_allow ( xmlNodePtr cur )
Check if this is an allow rule.
Parameters:
cur - the rule to check
Returns:
1 if true or 0 otherwise
int xcap_rule_is_block ( xmlNode * cur )
Check if this is a block rule.
Parameters:
cur - the rule to check
Returns:
1 if true or 0 otherwise
int xcap_rule_is_confirm ( xmlNodePtr cur )
Check if this is a confirm rule.
Parameters:
cur - the rule to check
Returns:
1 if true or 0 otherwise
int xcap_rule_is_not_empty ( xmlNodePtr cur )
Check if there are any users in the current rule.
Parameters:
cur - in this rule
Returns:
1 if not empty or 0 otherwise
int xcap_rule_is_politeblock ( xmlNodePtr cur )
Check if this is a polite-block rule.
Parameters:
cur - the rule to check
Returns:
1 if true or 0 otherwise