summaryrefslogtreecommitdiff
path: root/pjsip/include/pjsua2/siptypes.hpp
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2014-09-09 04:10:59 +0000
committerLiong Sauw Ming <ming@teluu.com>2014-09-09 04:10:59 +0000
commit6e4021b4bb8ff06b0821519da73e59163d49c7dd (patch)
tree2b50d890a715563fe9ffe57481e0357018656614 /pjsip/include/pjsua2/siptypes.hpp
parent78dde9dab5ca35529bca5766ec9a9df17d957a24 (diff)
Fixed #1784: Remove the usage of nested structs/unions in PJSUA2 (unsupported by SWIG C++)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4918 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsua2/siptypes.hpp')
-rw-r--r--pjsip/include/pjsua2/siptypes.hpp92
1 files changed, 51 insertions, 41 deletions
diff --git a/pjsip/include/pjsua2/siptypes.hpp b/pjsip/include/pjsua2/siptypes.hpp
index a5e7550f..8e0428b9 100644
--- a/pjsip/include/pjsua2/siptypes.hpp
+++ b/pjsip/include/pjsua2/siptypes.hpp
@@ -524,18 +524,23 @@ struct TimerEvent
};
/**
+ * This structure describes transaction state event source.
+ */
+struct TsxStateEventSrc
+{
+ SipRxData rdata; /**< The incoming message. */
+ SipTxData tdata; /**< The outgoing message. */
+ TimerEntry timer; /**< The timer. */
+ pj_status_t status; /**< Transport error status. */
+ GenericData data; /**< Generic data. */
+};
+
+/**
* This structure describes transaction state changed event.
*/
struct TsxStateEvent
{
- struct
- {
- SipRxData rdata; /**< The incoming message. */
- SipTxData tdata; /**< The outgoing message. */
- TimerEntry timer; /**< The timer. */
- pj_status_t status; /**< Transport error status. */
- GenericData data; /**< Generic data. */
- } src; /**< Event source. */
+ TsxStateEventSrc src; /**< Event source. */
SipTransaction tsx; /**< The transaction. */
pjsip_tsx_state_e prevState; /**< Previous state. */
pjsip_event_id_e type; /**< Type of event source:
@@ -584,6 +589,43 @@ struct UserEvent
};
/**
+ * The event body.
+ */
+struct SipEventBody
+{
+ /**
+ * Timer event.
+ */
+ TimerEvent timer;
+
+ /**
+ * Transaction state has changed event.
+ */
+ TsxStateEvent tsxState;
+
+ /**
+ * Message transmission event.
+ */
+ TxMsgEvent txMsg;
+
+ /**
+ * Transmission error event.
+ */
+ TxErrorEvent txError;
+
+ /**
+ * Message arrival event.
+ */
+ RxMsgEvent rxMsg;
+
+ /**
+ * User event.
+ */
+ UserEvent user;
+
+};
+
+/**
* This structure describe event descriptor to fully identify a SIP event. It
* corresponds to the pjsip_event structure in PJSIP library.
*/
@@ -597,39 +639,7 @@ struct SipEvent
/**
* The event body, which fields depends on the event type.
*/
- struct
- {
- /**
- * Timer event.
- */
- TimerEvent timer;
-
- /**
- * Transaction state has changed event.
- */
- TsxStateEvent tsxState;
-
- /**
- * Message transmission event.
- */
- TxMsgEvent txMsg;
-
- /**
- * Transmission error event.
- */
- TxErrorEvent txError;
-
- /**
- * Message arrival event.
- */
- RxMsgEvent rxMsg;
-
- /**
- * User event.
- */
- UserEvent user;
-
- } body;
+ SipEventBody body;
/**
* Pointer to its original pjsip_event. Only valid when the struct is