Changeset 476 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_im.c
- Timestamp:
- May 26, 2006 12:17:46 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_im.c
r300 r476 153 153 text.slen = rdata->msg_info.msg->body->len; 154 154 155 pjsua_ui_on_pager(call_index, from, to, &text); 155 if (pjsua.cb.on_pager) 156 (*pjsua.cb.on_pager)(call_index, from, to, &text); 156 157 157 158 } else { … … 170 171 } 171 172 172 pjsua_ui_on_typing(call_index, from, to, is_typing); 173 if (pjsua.cb.on_typing) 174 (*pjsua.cb.on_typing)(call_index, from, to, is_typing); 173 175 } 174 176 … … 270 272 * Send IM outside dialog. 271 273 */ 272 pj_status_tpjsua_im_send(int acc_index, const char *dst_uri,273 const char *str)274 PJ_DEF(pj_status_t) pjsua_im_send(int acc_index, const char *dst_uri, 275 const char *str) 274 276 { 275 277 pjsip_tx_data *tdata; … … 282 284 283 285 /* Create request. */ 284 status = pjsip_endpt_create_request( pjsua.endpt, &pjsip_message_method, 285 &dst, &pjsua.acc[acc_index].local_uri, 286 &dst, NULL, NULL, -1, NULL, &tdata); 286 status = pjsip_endpt_create_request(pjsua.endpt, &pjsip_message_method, 287 &dst, 288 &pjsua.config.acc_config[acc_index].id, 289 &dst, NULL, NULL, -1, NULL, &tdata); 287 290 if (status != PJ_SUCCESS) { 288 291 pjsua_perror(THIS_FILE, "Unable to create request", status); … … 296 299 /* Add contact. */ 297 300 pjsip_msg_add_hdr( tdata->msg, (pjsip_hdr*) 298 299 300 &pjsua.acc[acc_index].contact_uri));301 pjsip_generic_string_hdr_create(tdata->pool, 302 &STR_CONTACT, 303 &pjsua.config.acc_config[acc_index].contact)); 301 304 302 305 /* Duplicate text. … … 331 334 * Send typing indication outside dialog. 332 335 */ 333 pj_status_tpjsua_im_typing(int acc_index, const char *dst_uri,334 pj_bool_t is_typing)336 PJ_DEF(pj_status_t) pjsua_im_typing(int acc_index, const char *dst_uri, 337 pj_bool_t is_typing) 335 338 { 336 339 const pj_str_t dst = pj_str((char*)dst_uri); … … 340 343 /* Create request. */ 341 344 status = pjsip_endpt_create_request( pjsua.endpt, &pjsip_message_method, 342 &dst, &pjsua.acc[acc_index].local_uri, 345 &dst, 346 &pjsua.config.acc_config[acc_index].id, 343 347 &dst, NULL, NULL, -1, NULL, &tdata); 344 348 if (status != PJ_SUCCESS) {
Note: See TracChangeset
for help on using the changeset viewer.