Ignore:
Timestamp:
Jul 21, 2008 6:12:51 PM (16 years ago)
Author:
bennylp
Message:

Ticket #576: Added user data in pjsua account and buddy

File:
1 edited

Legend:

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

    r2150 r2162  
    20012001{ 
    20022002    /** 
     2003     * Arbitrary user data to be associated with the newly created account. 
     2004     * Application may set this later with #pjsua_acc_set_user_data() and 
     2005     * retrieve it with #pjsua_acc_get_user_data(). 
     2006     */ 
     2007    void           *user_data; 
     2008 
     2009    /** 
    20032010     * Account priority, which is used to control the order of matching 
    20042011     * incoming/outgoing requests. The higher the number means the higher 
     
    23952402                                         pj_bool_t is_default, 
    23962403                                         pjsua_acc_id *p_acc_id); 
     2404 
     2405/** 
     2406 * Set arbitrary data to be associated with the account. 
     2407 * 
     2408 * @param acc_id        The account ID. 
     2409 * @param user_data     User/application data. 
     2410 * 
     2411 * @return              PJ_SUCCESS on success, or the appropriate error code. 
     2412 */ 
     2413PJ_DECL(pj_status_t) pjsua_acc_set_user_data(pjsua_acc_id acc_id, 
     2414                                             void *user_data); 
     2415 
     2416 
     2417/** 
     2418 * Retrieve arbitrary data associated with the account. 
     2419 * 
     2420 * @param acc_id        The account ID. 
     2421 * 
     2422 * @return              The user data. In the case where the account ID is 
     2423 *                      not valid, NULL is returned. 
     2424 */ 
     2425PJ_DECL(void*) pjsua_acc_get_user_data(pjsua_acc_id acc_id); 
     2426 
    23972427 
    23982428/** 
     
    33603390    pj_bool_t   subscribe; 
    33613391 
     3392    /** 
     3393     * Specify arbitrary application data to be associated with with 
     3394     * the buddy object. 
     3395     */ 
     3396    void       *user_data; 
     3397 
    33623398} pjsua_buddy_config; 
    33633399 
     
    35193555 
    35203556/** 
     3557 * Find the buddy ID with the specified URI. 
     3558 * 
     3559 * @param uri           The buddy URI. 
     3560 * 
     3561 * @return              The buddy ID, or PJSUA_INVALID_ID if not found. 
     3562 */ 
     3563PJ_DECL(pjsua_buddy_id) pjsua_buddy_find(const pj_str_t *uri); 
     3564 
     3565 
     3566/** 
    35213567 * Get detailed buddy info. 
    35223568 * 
     
    35343580PJ_DECL(pj_status_t) pjsua_buddy_get_info(pjsua_buddy_id buddy_id, 
    35353581                                          pjsua_buddy_info *info); 
     3582 
     3583/** 
     3584 * Set the user data associated with the buddy object. 
     3585 * 
     3586 * @param buddy_id      The buddy identification. 
     3587 * @param user_data     Arbitrary application data to be associated with 
     3588 *                      the buddy object. 
     3589 * 
     3590 * @return              PJ_SUCCESS on success, or the appropriate error code. 
     3591 */ 
     3592PJ_DECL(pj_status_t) pjsua_buddy_set_user_data(pjsua_buddy_id buddy_id, 
     3593                                               void *user_data); 
     3594 
     3595 
     3596/** 
     3597 * Get the user data associated with the budy object. 
     3598 * 
     3599 * @param buddy_id      The buddy identification. 
     3600 * 
     3601 * @return              The application data. 
     3602 */ 
     3603PJ_DECL(void*) pjsua_buddy_get_user_data(pjsua_buddy_id buddy_id); 
     3604 
    35363605 
    35373606/** 
Note: See TracChangeset for help on using the changeset viewer.