Changeset 1988 for pjproject/trunk/pjnath/include/pjnath/stun_session.h
- Timestamp:
- Jun 6, 2008 2:47:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/include/pjnath/stun_session.h
r1913 r1988 214 214 struct pj_stun_tx_data 215 215 { 216 /** PJLIB list interface */ 216 217 PJ_DECL_LIST_MEMBER(struct pj_stun_tx_data); 217 218 … … 238 239 pj_timer_entry res_timer; /**< Response cache timer. */ 239 240 }; 241 242 243 /** 244 * These are the flags to control the message logging in the STUN session. 245 */ 246 typedef enum pj_stun_sess_msg_log_flag 247 { 248 PJ_STUN_SESS_LOG_TX_REQ=1, /**< Log outgoing STUN requests. */ 249 PJ_STUN_SESS_LOG_TX_RES=2, /**< Log outgoing STUN responses. */ 250 PJ_STUN_SESS_LOG_TX_IND=4, /**< Log outgoing STUN indications. */ 251 252 PJ_STUN_SESS_LOG_RX_REQ=8, /**< Log incoming STUN requests. */ 253 PJ_STUN_SESS_LOG_RX_RES=16, /**< Log incoming STUN responses */ 254 PJ_STUN_SESS_LOG_RX_IND=32 /**< Log incoming STUN indications */ 255 } pj_stun_sess_msg_log_flag; 240 256 241 257 … … 259 275 260 276 /** 261 * Destroy the STUN session. 262 * 263 * @param sess The STUN session instance. 264 * 265 * @return PJ_SUCCESS on success, or the appropriate error code. 277 * Destroy the STUN session and all objects created in the context of 278 * this session. 279 * 280 * @param sess The STUN session instance. 281 * 282 * @return PJ_SUCCESS on success, or the appropriate error code. 283 * This function will return PJ_EPENDING if the operation 284 * cannot be performed immediately because callbacks are 285 * being called; in this case the session will be destroyed 286 * as soon as the last callback returns. 266 287 */ 267 288 PJ_DECL(pj_status_t) pj_stun_session_destroy(pj_stun_session *sess); … … 334 355 pj_stun_auth_type auth_type, 335 356 const pj_stun_auth_cred *cred); 357 /** 358 * Configure message logging. By default all flags are enabled. 359 * 360 * @param sess The STUN session instance. 361 * @param flags Bitmask combination of #pj_stun_sess_msg_log_flag 362 */ 363 PJ_DECL(void) pj_stun_session_set_log(pj_stun_session *sess, 364 unsigned flags); 336 365 337 366 /** … … 382 411 * 383 412 * @param sess The STUN session instance. 384 * @param r eqThe STUN request where the response is to be created.413 * @param rdata The STUN request where the response is to be created. 385 414 * @param err_code Error code to be set in the response, if error response 386 415 * is to be created, according to pj_stun_status enumeration. … … 433 462 * 434 463 * @return PJ_SUCCESS on success, or the appropriate error code. 464 * This function will return PJNATH_ESTUNDESTROYED if 465 * application has destroyed the session in 466 * \a on_send_msg() callback. 435 467 */ 436 468 PJ_DECL(pj_status_t) pj_stun_session_send_msg(pj_stun_session *sess, … … 450 482 * @param sess The STUN session instance. 451 483 * @param rdata The STUN request message to be responded. 452 * @param err_codeError code to be set in the response, if error response484 * @param code Error code to be set in the response, if error response 453 485 * is to be created, according to pj_stun_status enumeration. 454 486 * This argument MUST be zero if successful response is … … 473 505 * 474 506 * @return PJ_SUCCESS on success, or the appropriate error code. 507 * This function will return PJNATH_ESTUNDESTROYED if 508 * application has destroyed the session in 509 * \a on_send_msg() callback. 475 510 */ 476 511 PJ_DECL(pj_status_t) pj_stun_session_respond(pj_stun_session *sess, … … 497 532 * 498 533 * @return PJ_SUCCESS if transaction is successfully cancelled. 534 * This function will return PJNATH_ESTUNDESTROYED if 535 * application has destroyed the session in 536 * \a on_request_complete() callback. 499 537 */ 500 538 PJ_DECL(pj_status_t) pj_stun_session_cancel_req(pj_stun_session *sess, … … 512 550 * 513 551 * @return PJ_SUCCESS on success, or the appropriate error. 552 * This function will return PJNATH_ESTUNDESTROYED if 553 * application has destroyed the session in \a on_send_msg() 554 * callback. 514 555 */ 515 556 PJ_DECL(pj_status_t) pj_stun_session_retransmit_req(pj_stun_session *sess, … … 549 590 * 550 591 * @return PJ_SUCCESS on success, or the appropriate error code. 592 * This function will return PJNATH_ESTUNDESTROYED if 593 * application has destroyed the session in one of the 594 * callback. 551 595 */ 552 596 PJ_DECL(pj_status_t) pj_stun_session_on_rx_pkt(pj_stun_session *sess,
Note: See TracChangeset
for help on using the changeset viewer.