Changeset 3243 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
- Timestamp:
- Aug 1, 2010 9:48:51 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_app.c
r3216 r3243 27 27 //#define STEREO_DEMO 28 28 //#define TRANSPORT_ADAPTER_SAMPLE 29 //#define HAVE_MULTIPART_TEST 29 30 30 31 /* Ringtones US UK */ … … 2219 2220 } 2220 2221 2222 #ifdef HAVE_MULTIPART_TEST 2223 /* 2224 * Enable multipart in msg_data and add a dummy body into the 2225 * multipart bodies. 2226 */ 2227 static void add_multipart(pjsua_msg_data *msg_data) 2228 { 2229 static pjsip_multipart_part *alt_part; 2230 2231 if (!alt_part) { 2232 pj_str_t type, subtype, content; 2233 2234 alt_part = pjsip_multipart_create_part(app_config.pool); 2235 2236 type = pj_str("text"); 2237 subtype = pj_str("plain"); 2238 content = pj_str("Sample text body of a multipart bodies"); 2239 alt_part->body = pjsip_msg_body_create(app_config.pool, &type, 2240 &subtype, &content); 2241 } 2242 2243 msg_data->multipart_ctype.type = pj_str("multipart"); 2244 msg_data->multipart_ctype.subtype = pj_str("mixed"); 2245 pj_list_push_back(&msg_data->multipart_parts, alt_part); 2246 } 2247 # define TEST_MULTIPART(msg_data) add_multipart(msg_data) 2248 #else 2249 # define TEST_MULTIPART(msg_data) 2250 #endif 2251 2221 2252 /* 2222 2253 * Find next call when current call is disconnected or when user … … 3433 3464 pj_str_t tmp; 3434 3465 struct input_result result; 3466 pjsua_msg_data msg_data; 3435 3467 pjsua_call_info call_info; 3436 3468 pjsua_acc_info acc_info; … … 3501 3533 } 3502 3534 3503 pjsua_call_make_call( current_acc, &tmp, 0, NULL, NULL, NULL); 3535 pjsua_msg_data_init(&msg_data); 3536 TEST_MULTIPART(&msg_data); 3537 pjsua_call_make_call( current_acc, &tmp, 0, NULL, &msg_data, NULL); 3504 3538 break; 3505 3539 … … 3639 3673 pj_str_t hvalue; 3640 3674 pjsip_generic_string_hdr hcontact; 3641 pjsua_msg_data msg_data;3642 3675 3643 3676 if (!simple_input("Answer with code (100-699)", buf, sizeof(buf))) … … 3887 3920 } else { 3888 3921 int call = current_call; 3889 pjsua_msg_data msg_data;3890 3922 pjsip_generic_string_hdr refer_sub; 3891 3923 pj_str_t STR_REFER_SUB = { "Refer-Sub", 9 }; … … 3942 3974 int call = current_call; 3943 3975 int dst_call; 3944 pjsua_msg_data msg_data;3945 3976 pjsip_generic_string_hdr refer_sub; 3946 3977 pj_str_t STR_REFER_SUB = { "Refer-Sub", 9 }; … … 4084 4115 digits = pj_str(buf); 4085 4116 for (i=0; i<digits.slen; ++i) { 4086 pjsua_msg_data msg_data;4087 4117 char body[80]; 4088 4118
Note: See TracChangeset
for help on using the changeset viewer.