Index: pjproject/trunk/pjsip/src/pjsua2/account.cpp
===================================================================
--- pjproject/trunk/pjsip/src/pjsua2/account.cpp	(revision 6009)
+++ pjproject/trunk/pjsip/src/pjsua2/account.cpp	(revision 6026)
@@ -85,5 +85,5 @@
 }
 
-void RtcpFbConfig::readObject(const ContainerNode &node) throw(Error)
+void RtcpFbConfig::readObject(const ContainerNode &node) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("RtcpFbConfig");
@@ -102,5 +102,5 @@
 }
 
-void RtcpFbConfig::writeObject(ContainerNode &node) const throw(Error)
+void RtcpFbConfig::writeObject(ContainerNode &node) const PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("RtcpFbConfig");
@@ -180,5 +180,5 @@
 }
 
-void SrtpOpt::readObject(const ContainerNode &node) throw(Error)
+void SrtpOpt::readObject(const ContainerNode &node) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("SrtpOpt");
@@ -203,5 +203,5 @@
 }
 
-void SrtpOpt::writeObject(ContainerNode &node) const throw(Error)
+void SrtpOpt::writeObject(ContainerNode &node) const PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("SrtpOpt");
@@ -222,5 +222,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountRegConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountRegConfig::readObject(const ContainerNode &node)
+				  PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountRegConfig");
@@ -241,5 +242,6 @@
 }
 
-void AccountRegConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountRegConfig::writeObject(ContainerNode &node) const
+				   PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountRegConfig");
@@ -262,5 +264,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountSipConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountSipConfig::readObject(const ContainerNode &node)
+				  PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountSipConfig");
@@ -283,5 +286,6 @@
 }
 
-void AccountSipConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountSipConfig::writeObject(ContainerNode &node) const
+				   PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountSipConfig");
@@ -303,5 +307,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountCallConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountCallConfig::readObject(const ContainerNode &node)
+				   PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountCallConfig");
@@ -314,5 +319,6 @@
 }
 
-void AccountCallConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountCallConfig::writeObject(ContainerNode &node) const
+				    PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountCallConfig");
@@ -327,5 +333,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountPresConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountPresConfig::readObject(const ContainerNode &node)
+				   PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountPresConfig");
@@ -339,5 +346,6 @@
 }
 
-void AccountPresConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountPresConfig::writeObject(ContainerNode &node) const
+				    PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountPresConfig");
@@ -353,5 +361,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountMwiConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountMwiConfig::readObject(const ContainerNode &node)
+				  PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountMwiConfig");
@@ -361,5 +370,6 @@
 }
 
-void AccountMwiConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountMwiConfig::writeObject(ContainerNode &node) const
+				   PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountMwiConfig");
@@ -371,5 +381,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountNatConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountNatConfig::readObject(const ContainerNode &node)
+				  PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountNatConfig");
@@ -403,5 +414,6 @@
 }
 
-void AccountNatConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountNatConfig::writeObject(ContainerNode &node) const
+				   PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountNatConfig");
@@ -437,5 +449,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountMediaConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountMediaConfig::readObject(const ContainerNode &node)
+				    PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountMediaConfig");
@@ -451,5 +464,6 @@
 }
 
-void AccountMediaConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountMediaConfig::writeObject(ContainerNode &node) const
+				     PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountMediaConfig");
@@ -467,5 +481,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountVideoConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountVideoConfig::readObject(const ContainerNode &node)
+				    PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountVideoConfig");
@@ -474,7 +489,10 @@
     NODE_READ_BOOL    ( this_node, autoTransmitOutgoing);
     NODE_READ_UNSIGNED( this_node, windowFlags);
-    NODE_READ_NUM_T   ( this_node, pjmedia_vid_dev_index, defaultCaptureDevice);
-    NODE_READ_NUM_T   ( this_node, pjmedia_vid_dev_index, defaultRenderDevice);
-    NODE_READ_NUM_T   ( this_node, pjmedia_vid_stream_rc_method, rateControlMethod);
+    NODE_READ_NUM_T   ( this_node, pjmedia_vid_dev_index,
+			defaultCaptureDevice);
+    NODE_READ_NUM_T   ( this_node, pjmedia_vid_dev_index,
+			defaultRenderDevice);
+    NODE_READ_NUM_T   ( this_node, pjmedia_vid_stream_rc_method,
+			rateControlMethod);
     NODE_READ_UNSIGNED( this_node, rateControlBandwidth);
     NODE_READ_UNSIGNED( this_node, startKeyframeCount);
@@ -482,5 +500,6 @@
 }
 
-void AccountVideoConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountVideoConfig::writeObject(ContainerNode &node) const
+				     PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountVideoConfig");
@@ -489,7 +508,10 @@
     NODE_WRITE_BOOL    ( this_node, autoTransmitOutgoing);
     NODE_WRITE_UNSIGNED( this_node, windowFlags);
-    NODE_WRITE_NUM_T   ( this_node, pjmedia_vid_dev_index, defaultCaptureDevice);
-    NODE_WRITE_NUM_T   ( this_node, pjmedia_vid_dev_index, defaultRenderDevice);
-    NODE_WRITE_NUM_T   ( this_node, pjmedia_vid_stream_rc_method, rateControlMethod);
+    NODE_WRITE_NUM_T   ( this_node, pjmedia_vid_dev_index,
+			 defaultCaptureDevice);
+    NODE_WRITE_NUM_T   ( this_node, pjmedia_vid_dev_index,
+			 defaultRenderDevice);
+    NODE_WRITE_NUM_T   ( this_node, pjmedia_vid_stream_rc_method,
+			 rateControlMethod);
     NODE_WRITE_UNSIGNED( this_node, rateControlBandwidth);
     NODE_WRITE_UNSIGNED( this_node, startKeyframeCount);
@@ -498,5 +520,6 @@
 ///////////////////////////////////////////////////////////////////////////////
 
-void AccountIpChangeConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountIpChangeConfig::readObject(const ContainerNode &node)
+				       PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountIpChangeConfig");
@@ -507,5 +530,6 @@
 }
 
-void AccountIpChangeConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountIpChangeConfig::writeObject(ContainerNode &node) const
+					PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountIpChangeConfig");
@@ -614,6 +638,8 @@
     ret.ice_cfg.ice_max_host_cands = natConfig.iceMaxHostCands;
     ret.ice_cfg.ice_opt.aggressive = natConfig.iceAggressiveNomination;
-    ret.ice_cfg.ice_opt.nominated_check_delay = natConfig.iceNominatedCheckDelayMsec;
-    ret.ice_cfg.ice_opt.controlled_agent_want_nom_timeout = natConfig.iceWaitNominationTimeoutMsec;
+    ret.ice_cfg.ice_opt.nominated_check_delay =
+			    natConfig.iceNominatedCheckDelayMsec;
+    ret.ice_cfg.ice_opt.controlled_agent_want_nom_timeout =
+			    natConfig.iceWaitNominationTimeoutMsec;
     ret.ice_cfg.ice_no_rtcp	= natConfig.iceNoRtcp;
     ret.ice_cfg.ice_always_update = natConfig.iceAlwaysUpdate;
@@ -624,7 +650,10 @@
     ret.turn_cfg.turn_conn_type	= natConfig.turnConnType;
     ret.turn_cfg.turn_auth_cred.type = PJ_STUN_AUTH_CRED_STATIC;
-    ret.turn_cfg.turn_auth_cred.data.static_cred.username = str2Pj(natConfig.turnUserName);
-    ret.turn_cfg.turn_auth_cred.data.static_cred.data_type = (pj_stun_passwd_type)natConfig.turnPasswordType;
-    ret.turn_cfg.turn_auth_cred.data.static_cred.data = str2Pj(natConfig.turnPassword);
+    ret.turn_cfg.turn_auth_cred.data.static_cred.username =
+			    str2Pj(natConfig.turnUserName);
+    ret.turn_cfg.turn_auth_cred.data.static_cred.data_type =
+			    (pj_stun_passwd_type)natConfig.turnPasswordType;
+    ret.turn_cfg.turn_auth_cred.data.static_cred.data =
+			    str2Pj(natConfig.turnPassword);
     ret.turn_cfg.turn_auth_cred.data.static_cred.realm = pj_str((char*)"");
     ret.turn_cfg.turn_auth_cred.data.static_cred.nonce = pj_str((char*)"");
@@ -765,7 +794,10 @@
 	natConfig.iceEnabled = PJ2BOOL(prm.ice_cfg.enable_ice);
 	natConfig.iceMaxHostCands = prm.ice_cfg.ice_max_host_cands;
-	natConfig.iceAggressiveNomination = PJ2BOOL(prm.ice_cfg.ice_opt.aggressive);
-	natConfig.iceNominatedCheckDelayMsec = prm.ice_cfg.ice_opt.nominated_check_delay;
-	natConfig.iceWaitNominationTimeoutMsec = prm.ice_cfg.ice_opt.controlled_agent_want_nom_timeout;
+	natConfig.iceAggressiveNomination =
+			PJ2BOOL(prm.ice_cfg.ice_opt.aggressive);
+	natConfig.iceNominatedCheckDelayMsec =
+			prm.ice_cfg.ice_opt.nominated_check_delay;
+	natConfig.iceWaitNominationTimeoutMsec =
+			prm.ice_cfg.ice_opt.controlled_agent_want_nom_timeout;
 	natConfig.iceNoRtcp	= PJ2BOOL(prm.ice_cfg.ice_no_rtcp);
 	natConfig.iceAlwaysUpdate = PJ2BOOL(prm.ice_cfg.ice_always_update);
@@ -779,6 +811,8 @@
 	natConfig.iceMaxHostCands= mcfg->ice_max_host_cands;
 	natConfig.iceAggressiveNomination = PJ2BOOL(mcfg->ice_opt.aggressive);
-	natConfig.iceNominatedCheckDelayMsec = mcfg->ice_opt.nominated_check_delay;
-	natConfig.iceWaitNominationTimeoutMsec = mcfg->ice_opt.controlled_agent_want_nom_timeout;
+	natConfig.iceNominatedCheckDelayMsec =
+			mcfg->ice_opt.nominated_check_delay;
+	natConfig.iceWaitNominationTimeoutMsec =
+			mcfg->ice_opt.controlled_agent_want_nom_timeout;
 	natConfig.iceNoRtcp	= PJ2BOOL(mcfg->ice_no_rtcp);
 	natConfig.iceAlwaysUpdate = PJ2BOOL(mcfg->ice_always_update);
@@ -789,7 +823,10 @@
 	natConfig.turnServer	= pj2Str(prm.turn_cfg.turn_server);
 	natConfig.turnConnType	= prm.turn_cfg.turn_conn_type;
-	natConfig.turnUserName	= pj2Str(prm.turn_cfg.turn_auth_cred.data.static_cred.username);
-	natConfig.turnPasswordType = prm.turn_cfg.turn_auth_cred.data.static_cred.data_type;
-	natConfig.turnPassword	= pj2Str(prm.turn_cfg.turn_auth_cred.data.static_cred.data);
+	natConfig.turnUserName	=
+		pj2Str(prm.turn_cfg.turn_auth_cred.data.static_cred.username);
+	natConfig.turnPasswordType =
+		prm.turn_cfg.turn_auth_cred.data.static_cred.data_type;
+	natConfig.turnPassword	=
+		pj2Str(prm.turn_cfg.turn_auth_cred.data.static_cred.data);
     } else {
 	pjsua_media_config default_mcfg;
@@ -801,7 +838,10 @@
 	natConfig.turnServer	= pj2Str(mcfg->turn_server);
 	natConfig.turnConnType	= mcfg->turn_conn_type;
-	natConfig.turnUserName	= pj2Str(mcfg->turn_auth_cred.data.static_cred.username);
-	natConfig.turnPasswordType = mcfg->turn_auth_cred.data.static_cred.data_type;
-	natConfig.turnPassword	= pj2Str(mcfg->turn_auth_cred.data.static_cred.data);
+	natConfig.turnUserName	=
+		pj2Str(mcfg->turn_auth_cred.data.static_cred.username);
+	natConfig.turnPasswordType =
+		mcfg->turn_auth_cred.data.static_cred.data_type;
+	natConfig.turnPassword	=
+		pj2Str(mcfg->turn_auth_cred.data.static_cred.data);
     }
     natConfig.contactRewriteUse	= prm.allow_contact_rewrite;
@@ -848,5 +888,5 @@
 }
 
-void AccountConfig::readObject(const ContainerNode &node) throw(Error)
+void AccountConfig::readObject(const ContainerNode &node) PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.readContainer("AccountConfig");
@@ -864,5 +904,5 @@
 }
 
-void AccountConfig::writeObject(ContainerNode &node) const throw(Error)
+void AccountConfig::writeObject(ContainerNode &node) const PJSUA2_THROW(Error)
 {
     ContainerNode this_node = node.writeNewContainer("AccountConfig");
@@ -915,5 +955,5 @@
 
 void Account::create(const AccountConfig &acc_cfg,
-                     bool make_default) throw(Error)
+                     bool make_default) PJSUA2_THROW(Error)
 {
     pjsua_acc_config pj_acc_cfg;
@@ -941,5 +981,5 @@
 }
 
-void Account::modify(const AccountConfig &acc_cfg) throw(Error)
+void Account::modify(const AccountConfig &acc_cfg) PJSUA2_THROW(Error)
 {
     pjsua_acc_config pj_acc_cfg;
@@ -955,5 +995,5 @@
 }
 
-void Account::setDefault() throw(Error)
+void Account::setDefault() PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_acc_set_default(id) );
@@ -975,5 +1015,5 @@
 }
 
-AccountInfo Account::getInfo() const throw(Error)
+AccountInfo Account::getInfo() const PJSUA2_THROW(Error)
 {
     pjsua_acc_info pj_ai;
@@ -985,5 +1025,5 @@
 }
 
-void Account::setRegistration(bool renew) throw(Error)
+void Account::setRegistration(bool renew) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_acc_set_registration(id, renew) );
@@ -991,5 +1031,5 @@
 
 void
-Account::setOnlineStatus(const PresenceStatus &pres_st) throw(Error)
+Account::setOnlineStatus(const PresenceStatus &pres_st) PJSUA2_THROW(Error)
 {
     pjrpid_element pj_rpid;
@@ -1006,10 +1046,10 @@
 }
 
-void Account::setTransport(TransportId tp_id) throw(Error)
+void Account::setTransport(TransportId tp_id) PJSUA2_THROW(Error)
 {
     PJSUA2_CHECK_EXPR( pjsua_acc_set_transport(id, tp_id) );
 }
 
-void Account::presNotify(const PresNotifyParam &prm) throw(Error)
+void Account::presNotify(const PresNotifyParam &prm) PJSUA2_THROW(Error)
 {
     pj_str_t pj_state_str   = str2Pj(prm.stateStr);
@@ -1024,10 +1064,10 @@
 }
 
-const BuddyVector& Account::enumBuddies() const throw(Error)
+const BuddyVector& Account::enumBuddies() const PJSUA2_THROW(Error)
 {
     return buddyList;
 }
 
-BuddyVector2 Account::enumBuddies2() const throw(Error)
+BuddyVector2 Account::enumBuddies2() const PJSUA2_THROW(Error)
 {
     BuddyVector2 bv2;
@@ -1044,5 +1084,5 @@
 
 Buddy* Account::findBuddy(string uri, FindBuddyMatch *buddy_match) const
-		throw(Error)
+		PJSUA2_THROW(Error)
 {
     if (!buddy_match) {
@@ -1058,5 +1098,5 @@
 }
 
-Buddy Account::findBuddy2(string uri) const throw(Error)
+Buddy Account::findBuddy2(string uri) const PJSUA2_THROW(Error)
 {
     pj_str_t pj_uri;
