Ignore:
Timestamp:
Mar 2, 2006 9:18:58 PM (18 years ago)
Author:
bennylp
Message:

Added IM and composition indication, and tested

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r255 r268  
    355355 
    356356/** 
     357 * Send instant messaging inside INVITE session. 
     358 */ 
     359void pjsua_call_send_im(int call_index, const char *text); 
     360 
     361 
     362/** 
     363 * Send IM typing indication inside INVITE session. 
     364 */ 
     365void pjsua_call_typing(int call_index, pj_bool_t is_typing); 
     366 
     367/** 
    357368 * Terminate all calls. 
    358369 */ 
     
    406417 
    407418/***************************************************************************** 
     419 * PJSUA Instant Messaging (pjsua_im.c) 
     420 */ 
     421 
     422/** 
     423 * The MESSAGE method (defined in pjsua_im.c) 
     424 */ 
     425extern const pjsip_method pjsip_message_method; 
     426 
     427 
     428/** 
     429 * Init IM module handler to handle incoming MESSAGE outside dialog. 
     430 */ 
     431pj_status_t pjsua_im_init(); 
     432 
     433 
     434/** 
     435 * Create Accept header for MESSAGE. 
     436 */ 
     437pjsip_accept_hdr* pjsua_im_create_accept(pj_pool_t *pool); 
     438 
     439/** 
     440 * Send IM outside dialog. 
     441 */ 
     442pj_status_t pjsua_im_send(int acc_index, const char *dst_uri,  
     443                          const char *text); 
     444 
     445 
     446/** 
     447 * Send typing indication outside dialog. 
     448 */ 
     449pj_status_t pjsua_im_typing(int acc_index, const char *dst_uri,  
     450                            pj_bool_t is_typing); 
     451 
     452 
     453/** 
     454 * Private: check if we can accept the message. 
     455 *          If not, then p_accept header will be filled with a valid 
     456 *          Accept header. 
     457 */ 
     458pj_bool_t pjsua_im_accept_pager(pjsip_rx_data *rdata, 
     459                                const pjsip_accept_hdr **p_accept_hdr); 
     460 
     461/** 
     462 * Private: process pager message. 
     463 *          This may trigger pjsua_ui_on_pager() or pjsua_ui_on_typing(). 
     464 */ 
     465void pjsua_im_process_pager(int call_id, const pj_str_t *from, 
     466                            const pj_str_t *to, pjsip_rx_data *rdata); 
     467 
     468 
     469/***************************************************************************** 
    408470 * User Interface API. 
    409471 * 
     
    415477 * Notify UI when invite state has changed. 
    416478 */ 
    417 void pjsua_ui_inv_on_state_changed(int call_index, pjsip_event *e); 
     479void pjsua_ui_on_call_state(int call_index, pjsip_event *e); 
    418480 
    419481/** 
    420482 * Notify UI when registration status has changed. 
    421483 */ 
    422 void pjsua_ui_regc_on_state_changed(int acc_index); 
     484void pjsua_ui_on_reg_state(int acc_index); 
     485 
     486/** 
     487 * Notify UI on incoming pager (i.e. MESSAGE request). 
     488 * Argument call_index will be -1 if MESSAGE request is not related to an  
     489 * existing call. 
     490 */ 
     491void pjsua_ui_on_pager(int call_index, const pj_str_t *from, 
     492                       const pj_str_t *to, const pj_str_t *txt); 
     493 
     494 
     495/** 
     496 * Notify UI about typing indication. 
     497 */ 
     498void pjsua_ui_on_typing(int call_index, const pj_str_t *from, 
     499                        const pj_str_t *to, pj_bool_t is_typing); 
    423500 
    424501 
Note: See TracChangeset for help on using the changeset viewer.