Changeset 515 for pjproject/trunk/pjsip/include/pjsip/sip_module.h
- Timestamp:
- Jun 17, 2006 4:08:30 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_module.h
r230 r515 30 30 31 31 /** 32 * @defgroup PJSIP_MOD SIP Modules 33 * @ingroup PJSIP 32 * @defgroup PJSIP_MOD Modules 33 * @ingroup PJSIP_CORE_CORE 34 * @brief Modules are the primary means to extend PJSIP! 34 35 * @{ 35 */ 36 37 /** 38 * Module registration structure, which is passed by the module to the 39 * endpoint during the module registration process. This structure enables 40 * the endpoint to query the module capability and to further communicate 41 * with the module. 36 * Modules are the primary means to extend PJSIP. Without modules, PJSIP 37 * would not know how to handle messages, and will simply discard all 38 * incoming messages. 39 * 40 * Modules are registered by creating and initializing #pjsip_module 41 * structure, and register the structure to PJSIP with 42 * #pjsip_endpt_register_module(). 43 * 44 * The <A HREF="/docs.htm">PJSIP Developer's Guide</A> 45 * has a thorough discussion on this subject, and readers are encouraged 46 * to read the document for more information. 47 */ 48 49 /** 50 * The declaration for SIP module. This structure would be passed to 51 * #pjsip_endpt_register_module() to register the module to PJSIP. 42 52 */ 43 53 struct pjsip_module … … 47 57 48 58 /** 49 * Module name. 59 * Module name to identify the module. 60 * 61 * This field MUST be initialized before registering the module. 50 62 */ 51 63 pj_str_t name; 52 64 53 65 /** 54 * Module ID. 66 * Module ID. Application must initialize this field with -1 before 67 * registering the module to PJSIP. After the module is registered, 68 * this field will contain a unique ID to identify the module. 55 69 */ 56 70 int id; … … 60 74 * regard to other modules. Higher number will make the module gets 61 75 * initialized later. 76 * 77 * This field MUST be initialized before registering the module. 62 78 */ 63 79 int priority; 64 80 65 81 /** 66 * Pointer to function to be called to initialize the module. 82 * Optional function to be called to initialize the module. This function 83 * will be called by endpoint during module registration. If the value 84 * is NULL, then it's equal to returning PJ_SUCCESS. 67 85 * 68 86 * @param endpt The endpoint instance. … … 72 90 73 91 /** 74 * Pointer to function to be called to start the module. 92 * Optional function to be called to start the module. This function 93 * will be called by endpoint during module registration. If the value 94 * is NULL, then it's equal to returning PJ_SUCCESS. 75 95 * 76 96 * @return Module should return zero to indicate success. … … 79 99 80 100 /** 81 * Pointer to function to be called to deinitialize the module before 82 * it is unloaded. 101 * Optional function to be called to deinitialize the module before 102 * it is unloaded. This function will be called by endpoint during 103 * module unregistration. If the value is NULL, then it's equal to 104 * returning PJ_SUCCESS. 83 105 * 84 106 * @return Module should return PJ_SUCCESS to indicate success. … … 87 109 88 110 /** 89 * Pointer to function to be called to deinitialize the module before 90 * it is unloaded. 111 * Optional function to be called to deinitialize the module before 112 * it is unloaded. This function will be called by endpoint during 113 * module unregistration. If the value is NULL, then it's equal to 114 * returning PJ_SUCCESS. 91 115 * 92 116 * @param mod The module. … … 97 121 98 122 /** 99 * Called to process incoming request.123 * Optional function to be called to process incoming request message. 100 124 * 101 125 * @param rdata The incoming message. … … 108 132 109 133 /** 110 * Called to processed incoming response.134 * Optional function to be called to process incoming response message. 111 135 * 112 136 * @param rdata The incoming message. … … 119 143 120 144 /** 121 * Called to process outgoing request. 145 * Optional function to be called when transport layer is about to 146 * transmit outgoing request message. 122 147 * 123 148 * @param tdata The outgoing request message. … … 130 155 131 156 /** 132 * Called to process outgoing response message. 157 * Optional function to be called when transport layer is about to 158 * transmit outgoing response message. 133 159 * 134 160 * @param tdata The outgoing response message. … … 141 167 142 168 /** 143 * Called when this module is acting as transaction user for the specified 144 * transaction, when the transaction's state has changed. 169 * Optional function to be called when this module is acting as 170 * transaction user for the specified transaction, when the 171 * transaction's state has changed. 145 172 * 146 173 * @param tsx The transaction. … … 158 185 enum pjsip_module_priority 159 186 { 187 /** 188 * This is the priority used by transport layer. 189 */ 160 190 PJSIP_MOD_PRIORITY_TRANSPORT_LAYER = 8, 191 192 /** 193 * This is the priority used by transaction layer. 194 */ 161 195 PJSIP_MOD_PRIORITY_TSX_LAYER = 16, 196 197 /** 198 * This is the priority used by the user agent and proxy layer. 199 */ 162 200 PJSIP_MOD_PRIORITY_UA_PROXY_LAYER = 32, 201 202 /** 203 * This is the priority used by the dialog usages. 204 */ 163 205 PJSIP_MOD_PRIORITY_DIALOG_USAGE = 48, 206 207 /** 208 * This is the recommended priority to be used by applications. 209 */ 164 210 PJSIP_MOD_PRIORITY_APPLICATION = 64, 165 211 };
Note: See TracChangeset
for help on using the changeset viewer.