Changeset 4683
- Timestamp:
- Dec 5, 2013 7:21:24 AM (11 years ago)
- Location:
- pjproject/branches/projects/pjsua2/pjsip
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/branches/projects/pjsua2/pjsip/include/pjsua2/siptypes.hpp
r4672 r4683 432 432 public: 433 433 /** 434 * Default constructor. 435 */ 436 SipRxData(); 437 438 /** 434 439 * Construct from PJSIP's pjsip_rx_data 435 440 */ … … 467 472 468 473 public: 474 /** 475 * Default constructor. 476 */ 477 SipTxData(); 478 469 479 /** 470 480 * Construct from PJSIP's pjsip_tx_data … … 495 505 496 506 public: 507 /** 508 * Default constructor. 509 */ 510 SipTransaction(); 511 497 512 /** 498 513 * Construct from PJSIP's pjsip_transaction … … 625 640 public: 626 641 /** 642 * Default constructor. 643 */ 644 SipEvent(); 645 646 /** 627 647 * Construct from PJSIP's pjsip_event 628 648 */ -
pjproject/branches/projects/pjsua2/pjsip/src/pjsua2/siptypes.cpp
r4682 r4683 322 322 /////////////////////////////////////////////////////////////////////////////// 323 323 324 SipRxData::SipRxData() 325 : pjRxData(NULL) 326 { 327 } 328 324 329 void SipRxData::fromPj(pjsip_rx_data &rdata) 325 330 { … … 426 431 427 432 /////////////////////////////////////////////////////////////////////////////// 433 434 SipEvent::SipEvent() 435 : type(PJSIP_EVENT_UNKNOWN), pjEvent(NULL) 436 { 437 } 428 438 429 439 void SipEvent::fromPj(const pjsip_event &ev) … … 437 447 body.tsxState.tsx.fromPj(*ev.body.tsx_state.tsx); 438 448 if (body.tsxState.type == PJSIP_EVENT_TX_MSG) { 439 body.tsxState.src.tdata.fromPj(*ev.body.tsx_state.src.tdata); 449 if (ev.body.tsx_state.src.tdata) 450 body.tsxState.src.tdata.fromPj(*ev.body.tsx_state.src.tdata); 440 451 } else if (body.tsxState.type == PJSIP_EVENT_RX_MSG) { 441 body.tsxState.src.rdata.fromPj(*ev.body.tsx_state.src.rdata); 452 if (ev.body.tsx_state.src.rdata) 453 body.tsxState.src.rdata.fromPj(*ev.body.tsx_state.src.rdata); 442 454 } else if (body.tsxState.type == PJSIP_EVENT_TRANSPORT_ERROR) { 443 455 body.tsxState.src.status = ev.body.tsx_state.src.status; … … 448 460 } 449 461 } else if (type == PJSIP_EVENT_TX_MSG) { 450 body.txMsg.tdata.fromPj(*ev.body.tx_msg.tdata); 462 if (ev.body.tx_msg.tdata) 463 body.txMsg.tdata.fromPj(*ev.body.tx_msg.tdata); 451 464 } else if (type == PJSIP_EVENT_RX_MSG) { 452 body.rxMsg.rdata.fromPj(*ev.body.rx_msg.rdata); 465 if (ev.body.rx_msg.rdata) 466 body.rxMsg.rdata.fromPj(*ev.body.rx_msg.rdata); 453 467 } else if (type == PJSIP_EVENT_TRANSPORT_ERROR) { 454 body.txError.tdata.fromPj(*ev.body.tx_error.tdata); 455 body.txError.tsx.fromPj(*ev.body.tx_error.tsx); 468 if (ev.body.tx_error.tdata) 469 body.txError.tdata.fromPj(*ev.body.tx_error.tdata); 470 if (ev.body.tx_error.tsx) 471 body.txError.tsx.fromPj(*ev.body.tx_error.tsx); 456 472 } else if (type == PJSIP_EVENT_USER) { 457 473 body.user.user1 = ev.body.user.user1; 474 body.user.user2 = ev.body.user.user2; 475 body.user.user3 = ev.body.user.user3; 476 body.user.user4 = ev.body.user.user4; 458 477 } 459 478 pjEvent = (void *)&ev; 479 } 480 481 SipTxData::SipTxData() 482 : pjTxData(NULL) 483 { 460 484 } 461 485 … … 470 494 dstAddress = straddr; 471 495 pjTxData = (void *)&tdata; 496 } 497 498 SipTransaction::SipTransaction() 499 : role(PJSIP_ROLE_UAC), statusCode(0), pjTransaction(NULL) 500 { 472 501 } 473 502
Note: See TracChangeset
for help on using the changeset viewer.