⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 osip.h

📁 libosip-0.9.7源码
💻 H
📖 第 1 页 / 共 5 页
字号:
 */  int callleg_match (to_t * to1, from_t * from1, to_t * to2, from_t * from2);/** * Check if the Call-Id headers match. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param callid1 The initial Call-Id header. * @param callid2 The new Call-Id header. */  int call_id_match (call_id_t * callid1, call_id_t * callid2);/** * Check if the CSeq headers match. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param cseq1 The initial CSeq header. * @param cseq2 The new CSeq header. */  int cseq_match (cseq_t * cseq1, cseq_t * cseq2);#endif				/* endif DOXYGEN *//** * Initialise the global oSIP stack elements. * This method initialise the parser and load the fsm. * This method MUST be called before any call to oSIP is made. */  int osip_global_init ();/** * Free all global resource hold by the oSIP stack. * This can only be called after all osip_t element has been "stopped". */  void osip_global_free ();/**  * Allocate an osip_t element. * @param osip the element to allocate. */  int osip_init (osip_t ** osip);/** * Free all resource in a osip_t element. * @param osip The element to free. *//** * Free all resource in a osip_t element. * @param osip The element to free. */  void osip_free (osip_t * osip);/** * Set a pointer in a osip_t element. * This help to find your application layer in callbacks. * @param osip The element to free. */  void osip_set_application_context (osip_t * osip, void *pointer);/** * Get a pointer in a osip_t element. * This help to find your application layer in callbacks. * @param osip The element to free. */  void *osip_get_application_context (osip_t * osip);#ifndef DOXYGEN/** * Lock access to the list of ict transactions. * @param osip The element to work on. */  int osip_ict_lock (osip_t * osip);/** * Unlock access to the list of ict transactions. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. */  int osip_ict_unlock (osip_t * osip);/** * Lock access to the list of ist transactions. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. */  int osip_ist_lock (osip_t * osip);/** * Unlock access to the list of ist transactions. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. */  int osip_ist_unlock (osip_t * osip);/** * Lock access to the list of nict transactions. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. */  int osip_nict_lock (osip_t * osip);/** * Unlock access to the list of nict transactions. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. */  int osip_nict_unlock (osip_t * osip);/** * Lock access to the list of nist transactions. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. */  int osip_nist_lock (osip_t * osip);/** * Unlock access to the list of nist transactions. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. */  int osip_nist_unlock (osip_t * osip);/** * Add a ict transaction in the ict list of transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. * @param ict The transaction to add. */  int osip_add_ict (osip_t * osip, transaction_t * ict);/** * Add a ist transaction in the ist list of transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. * @param ist The transaction to add. */  int osip_add_ist (osip_t * osip, transaction_t * ist);/** * Add a nict transaction in the nict list of transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. * @param nict The transaction to add. */  int osip_add_nict (osip_t * osip, transaction_t * nict);/** * Add a nist transaction in the nist list of transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. * @param nist The transaction to add. */  int osip_add_nist (osip_t * osip, transaction_t * nist);/** * Remove a ict transaction from the ict list of transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. * @param ict The transaction to add. */  int osip_remove_ict (osip_t * osip, transaction_t * ict);/** * Remove a ist transaction from the ist list of transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. * @param ist The transaction to add. */  int osip_remove_ist (osip_t * osip, transaction_t * ist);/** * Remove a nict transaction from the nict list of transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. * @param nict The transaction to add. */  int osip_remove_nict (osip_t * osip, transaction_t * nict);/** * Remove a nist transaction from the nist list of transaction. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param osip The element to work on. * @param nist The transaction to add. */  int osip_remove_nist (osip_t * osip, transaction_t * nist);#endif/** * Consume ALL pending sipevent_t previously added in the fifos of ict transactions. * @param osip The element to work on. */  int osip_ict_execute (osip_t * osip);/** * Consume ALL pending sipevent_t previously added in the fifos of ist transactions. * @param osip The element to work on. */  int osip_ist_execute (osip_t * osip);/** * Consume ALL pending sipevent_t previously added in the fifos of nict transactions. * @param osip The element to work on. */  int osip_nict_execute (osip_t * osip);/** * Consume ALL pending sipevent_t previously added in the fifos of nist transactions. * @param osip The element to work on. */  int osip_nist_execute (osip_t * osip);/** * Check if an ict transactions needs a timer event. * @param osip The element to work on. */  void osip_timers_ict_execute (osip_t * osip);/** * Check if an ist transactions needs a timer event. * @param osip The element to work on. */  void osip_timers_ist_execute (osip_t * osip);/** * Check if a nict transactions needs a timer event. * @param osip The element to work on. */  void osip_timers_nict_execute (osip_t * osip);/** * Check if a nist transactions needs a timer event. * @param osip The element to work on. */  void osip_timers_nist_execute (osip_t * osip);/* obsolete in 0.8.4: see comments in fsm/osip.c *//* transaction_t *osip_distribute_event(osip_t *osip,sipevent_t* sipevent); *//* obsolete: use osip_find_transaction + osip_create_transaction *//** * Search for a transaction that match this event (MUST be a MESSAGE event). * @param transactions The list of transactions to work on. * @param evt The element representing the SIP MESSAGE. */  transaction_t *osip_transaction_find (list_t * transactions,					sipevent_t * evt);/*  BUG!!!  BUG!!! there is a possible race conditions with this new method!!!  BUG!!!*//** * OBSOLETE!! -> some race conditions can happen in multi threaded applications. * <BR>Search for a transaction that match this event (MUST be a MESSAGE event). * @param osip The element to work on. * @param evt The element representing the SIP MESSAGE. */#ifndef OSIP_MT  transaction_t *osip_find_transaction (osip_t * osip, sipevent_t * evt);#endif  transaction_t *__osip_find_transaction (osip_t * osip, sipevent_t * evt,					  int consume);/** * Search for a transaction that match this event (MUST be a MESSAGE event) * and add this event if a transaction is found.. * @param osip The element to work on. * @param evt The element representing the SIP MESSAGE. */  int osip_find_transaction_and_add_event (osip_t * osip, sipevent_t * evt);/** * Create a transaction for this event (MUST be a SIP REQUEST event). * @param osip The element to work on. * @param evt The element representing the new SIP REQUEST. */  transaction_t *osip_create_transaction (osip_t * osip, sipevent_t * evt);/** * Create a sipevent from a SIP message string. * @param buf The SIP message as a string. */  sipevent_t *osip_parse (char *buf);#ifndef DOXYGEN/** * Allocate a sipevent. * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param type The type of the event. * @param transactionid The transaction id for this event. */  sipevent_t *osip_new_event (type_t type, int transactionid);/** * Allocate a sipevent (we know this message is an INCOMING SIP message). * NOTE: THIS IS AN INTERNAL METHOD ONLY * @param type The type of the event. * @param transactionid The transaction id for this event. */  sipevent_t *osip_new_incoming_sipmessage (sip_t * sip);#endif/** * Allocate a sipevent (we know this message is an OUTGOING SIP message). * @param sip The SIP message we want to send. */  sipevent_t *osip_new_outgoing_sipmessage (sip_t * sip);/** * Register the callback used to send SIP message. * @param cf The osip element attached to the transaction. * @param cb The method we want to register. */  void osip_setcb_send_message (osip_t * cf,				int (*cb) (transaction_t *, sip_t *, char *,					   int, int));/* callbacks for ict *//** * Register the callback called when the transaction is deleted. * @param cf The osip element attached to the transaction. * @param cb The method we want to register. */  void osip_setcb_ict_kill_transaction (osip_t * cf,					void (*cb) (transaction_t *));/** * Register the callback called when an INVITE is sent. * @param cf The osip element attached to the transaction. * @param cb The method we want to register. */  void osip_setcb_ict_invite_sent (osip_t * cf,				   void (*cb) (transaction_t *, sip_t *));/** * Register the callback called when an INVITE is retransmitted. * @param cf The osip element attached to the transaction. * @param cb The method we want to register. */  void osip_setcb_ict_invite_sent2 (osip_t * cf,				    void (*cb) (transaction_t *, sip_t *));/** * Register the callback called when an ACK is sent. * NOTE: This method is only called if the final response was not a 2xx * @param cf The osip element attached to the transaction. * @param cb The method we want to register. */  void osip_setcb_ict_ack_sent (osip_t * cf,				void (*cb) (transaction_t *, sip_t *));/** * Register the callback called when an ACK is retransmitted. * NOTE: This method is only called if the final response was not a 2xx * @param cf The osip element attached to the transaction. * @param cb The method we want to register. */  void osip_setcb_ict_ack_sent2 (osip_t * cf,				 void (*cb) (transaction_t *, sip_t *));/** * Register the callback called when a 1xx SIP message is received. * @param cf The osip element attached to the transaction. * @param cb The method we want to register. */  void osip_setcb_ict_1xx_received (osip_t * cf,				    void (*cb) (transaction_t *, sip_t *));/** * Register the callback called when a 2xx SIP message is received. * @param cf The osip element attached to the transaction. * @param cb The method we want to register. */  void osip_setcb_ict_2xx_received (osip_t * cf,				    void (*cb) (transaction_t *, sip_t *));/** * Register the callback called when a 2xx SIP message is received again. * NOTE: obsolete... THIS IS NEVER CALLED! as the transaction is destroyed * when the first 200 is received. * @param cf The osip element attached to the transaction. * @param cb The method we want to register. */  void osip_setcb_ict_2xx_received2 (osip_t * cf,				     void (*cb) (transaction_t *, sip_t *));/** * Register the callback called when a 3xx SIP message is received.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -