Index: pjproject/trunk/pjnath/src/pjnath-test/ice_test.c
===================================================================
--- pjproject/trunk/pjnath/src/pjnath-test/ice_test.c	(revision 1108)
+++ pjproject/trunk/pjnath/src/pjnath-test/ice_test.c	(revision 1111)
@@ -38,5 +38,5 @@
 static pj_stun_config stun_cfg;
 
-static void on_ice_complete(pj_ice_st *icest, 
+static void on_ice_complete(pj_ice_strans *icest, 
 			    pj_status_t status)
 {
@@ -49,5 +49,5 @@
 
 
-static void on_rx_data(pj_ice_st *icest, unsigned comp_id, 
+static void on_rx_data(pj_ice_strans *icest, unsigned comp_id, 
 		       void *pkt, pj_size_t size,
 		       const pj_sockaddr_t *src_addr,
@@ -90,6 +90,6 @@
 static int ice_basic_create_destroy_test()
 {
-    pj_ice_st *im;
-    pj_ice_st_cb icest_cb;
+    pj_ice_strans *im;
+    pj_ice_strans_cb icest_cb;
     pj_status_t status;
 
@@ -100,9 +100,9 @@
     icest_cb.on_rx_data = &on_rx_data;
 
-    status = pj_ice_st_create(&stun_cfg, "icetest", 2, NULL, &icest_cb, &im);
+    status = pj_ice_strans_create(&stun_cfg, "icetest", 2, NULL, &icest_cb, &im);
     if (status != PJ_SUCCESS)
 	return -10;
 
-    pj_ice_st_destroy(im);
+    pj_ice_strans_destroy(im);
 
     return 0;
@@ -110,16 +110,16 @@
 
 
-static pj_status_t start_ice(pj_ice_st *ist, pj_ice_st *remote)
+static pj_status_t start_ice(pj_ice_strans *ist, pj_ice_strans *remote)
 {
     unsigned count;
-    pj_ice_cand cand[PJ_ICE_MAX_CAND];
+    pj_ice_sess_cand cand[PJ_ICE_MAX_CAND];
     pj_status_t status;
 
     count = PJ_ARRAY_SIZE(cand);
-    status = pj_ice_st_enum_cands(remote, &count, cand);
+    status = pj_ice_strans_enum_cands(remote, &count, cand);
     if (status != PJ_SUCCESS)
 	return status;
 
-    return pj_ice_st_start_ice(ist, &remote->ice->rx_ufrag, &remote->ice->rx_pass,
+    return pj_ice_strans_start_ice(ist, &remote->ice->rx_ufrag, &remote->ice->rx_pass,
 			       count, cand);
 }
@@ -134,5 +134,5 @@
 };
 
-static int init_ice_st(pj_ice_st *ice_st,
+static int init_ice_st(pj_ice_strans *ice_st,
 		       pj_bool_t add_valid_comp,
 		       unsigned dummy_cnt,
@@ -145,5 +145,5 @@
     /* Create components */
     for (i=0; i<ice_st->comp_cnt; ++i) {
-	status = pj_ice_st_create_comp(ice_st, i+1, PJ_ICE_ST_OPT_DONT_ADD_CAND, NULL);
+	status = pj_ice_strans_create_comp(ice_st, i+1, PJ_ICE_ST_OPT_DONT_ADD_CAND, NULL);
 	if (status != PJ_SUCCESS)
 	    return -21;
@@ -155,5 +155,5 @@
 
 	pj_sockaddr_in_init(&addr, pj_cstr(&a, cand[i].addr), (pj_uint16_t)cand[i].port);
-	status = pj_ice_st_add_cand(ice_st, cand[i].comp_id, cand[i].type,
+	status = pj_ice_strans_add_cand(ice_st, cand[i].comp_id, cand[i].type,
 				    65535, &addr, PJ_FALSE);
 	if (status != PJ_SUCCESS)
@@ -164,5 +164,5 @@
     if (add_valid_comp) {
 	for (i=0; i<ice_st->comp_cnt; ++i) {
-	    status = pj_ice_st_add_cand(ice_st, i+1, PJ_ICE_CAND_TYPE_HOST, 65535,
+	    status = pj_ice_strans_add_cand(ice_st, i+1, PJ_ICE_CAND_TYPE_HOST, 65535,
 					&ice_st->comp[i]->local_addr.ipv4, PJ_TRUE);
 	    if (status != PJ_SUCCESS)
@@ -179,8 +179,8 @@
  * local address of selected by agent 2.
  */
-static int verify_address(pj_ice_st *agent1, pj_ice_st *agent2,
+static int verify_address(pj_ice_strans *agent1, pj_ice_strans *agent2,
 			  unsigned comp_id)
 {
-    pj_ice_cand *rcand, *lcand;
+    pj_ice_sess_cand *rcand, *lcand;
     int lcand_id;
 
@@ -194,5 +194,5 @@
 
     /* Get default local candidate of agent 2 */
-    pj_ice_find_default_cand(agent2->ice, comp_id, &lcand_id);
+    pj_ice_sess_find_default_cand(agent2->ice, comp_id, &lcand_id);
     if (lcand_id < 0)
 	return -62;
@@ -232,6 +232,6 @@
 			    struct dummy_cand acand[])
 {
-    pj_ice_st *im1, *im2;
-    pj_ice_st_cb icest_cb;
+    pj_ice_strans *im1, *im2;
+    pj_ice_strans_cb icest_cb;
     struct ice_data *id1, *id2;
     pj_timestamp t_start, t_end;
@@ -253,5 +253,5 @@
 
     /* Create first ICE */
-    status = pj_ice_st_create(&stun_cfg, "offerer", comp_cnt, NULL, &icest_cb, &im1);
+    status = pj_ice_strans_create(&stun_cfg, "offerer", comp_cnt, NULL, &icest_cb, &im1);
     if (status != PJ_SUCCESS)
 	return -20;
@@ -267,5 +267,5 @@
 
     /* Create second ICE */
-    status = pj_ice_st_create(&stun_cfg, "answerer", comp_cnt, NULL, &icest_cb, &im2);
+    status = pj_ice_strans_create(&stun_cfg, "answerer", comp_cnt, NULL, &icest_cb, &im2);
     if (status != PJ_SUCCESS)
 	return -25;
@@ -282,10 +282,10 @@
 
     /* Init ICE on im1 */
-    status = pj_ice_st_init_ice(im1, PJ_ICE_ROLE_CONTROLLING, NULL, NULL);
+    status = pj_ice_strans_init_ice(im1, PJ_ICE_SESS_ROLE_CONTROLLING, NULL, NULL);
     if (status != PJ_SUCCESS)
 	return -29;
 
     /* Init ICE on im2 */
-    status = pj_ice_st_init_ice(im2, PJ_ICE_ROLE_CONTROLLED, NULL, NULL);
+    status = pj_ice_strans_init_ice(im2, PJ_ICE_SESS_ROLE_CONTROLLED, NULL, NULL);
     if (status != PJ_SUCCESS)
 	return -29;
@@ -323,10 +323,10 @@
 	/* Send data. It must be successful! */
 	data_from_offerer = pj_str("from offerer");
-	status = pj_ice_send_data(im1->ice, 1, data_from_offerer.ptr, data_from_offerer.slen);
+	status = pj_ice_sess_send_data(im1->ice, 1, data_from_offerer.ptr, data_from_offerer.slen);
 	if (status != PJ_SUCCESS)
 	    return -47;
 
 	data_from_answerer = pj_str("from answerer");
-	status = pj_ice_send_data(im2->ice, 1, data_from_answerer.ptr, data_from_answerer.slen);
+	status = pj_ice_sess_send_data(im2->ice, 1, data_from_answerer.ptr, data_from_answerer.slen);
 	if (status != PJ_SUCCESS)
 	    return -48;
@@ -429,6 +429,6 @@
 
 
-    pj_ice_st_destroy(im1);
-    pj_ice_st_destroy(im2);
+    pj_ice_strans_destroy(im1);
+    pj_ice_strans_destroy(im2);
     handle_events(100);
     return 0;
