Ignore:
Timestamp:
Oct 20, 2009 1:56:26 PM (15 years ago)
Author:
bennylp
Message:

Initial commit for ticket #937: Revamping of presence management to make it more efficient

Presence enhancements:

  • finer grained buddy lock object, instead of using global PJSUA-LIB's mutex
  • individual resubscription timer for buddies and also add random delay interval so that resubscriptions don't happen simultaneously (may hog processing and bandwidth).
  • in general reduced the use of global PJSUA-LIB's mutex for more efficiency
  • added last termination code in buddy info
  • use the RPID note's text for buddy's offline status rather than the default "offline" status, if available
  • resubscribe automatically on several termination causes as explained in the ticket (still untested)

General enhancements:

  • added pjsua_schedule_timer() and pjsua_cancel_timer() APIs
File:
1 edited

Legend:

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

    r2943 r2956  
    13981398 
    13991399/** 
     1400 * Schedule a timer entry. Note that the timer callback may be executed 
     1401 * by different thread, depending on whether worker thread is enabled or 
     1402 * not. 
     1403 * 
     1404 * @param entry         Timer heap entry. 
     1405 * @param delay     The interval to expire. 
     1406 * 
     1407 * @return              PJ_SUCCESS on success, or the appropriate error code. 
     1408 * 
     1409 * @see pjsip_endpt_schedule_timer() 
     1410 */ 
     1411PJ_DECL(pj_status_t) pjsua_schedule_timer(pj_timer_entry *entry, 
     1412                                          const pj_time_val *delay); 
     1413 
     1414 
     1415/** 
     1416 * Cancel the previously scheduled timer. 
     1417 * 
     1418 * @param entry         Timer heap entry. 
     1419 * 
     1420 * @see pjsip_endpt_cancel_timer() 
     1421 */ 
     1422PJ_DECL(void) pjsua_cancel_timer(pj_timer_entry *entry); 
     1423 
     1424 
     1425/** 
    14001426 * This is a utility function to display error message for the specified  
    14011427 * error code. The error message will be sent to the log. 
     
    31293155 
    31303156    /** 
    3131      * Specifies the last presence subscription terminatino reason. If  
     3157     * Specifies the last presence subscription termination code. This would 
     3158     * return the last status of the SUBSCRIBE request. If the subscription 
     3159     * is terminated with NOTIFY by the server, this value will be set to 
     3160     * 200, and subscription termination reason will be given in the 
     3161     * \a sub_term_reason field. 
     3162     */ 
     3163    unsigned            sub_term_code; 
     3164 
     3165    /** 
     3166     * Specifies the last presence subscription termination reason. If  
    31323167     * presence subscription is currently active, the value will be empty. 
    31333168     */ 
Note: See TracChangeset for help on using the changeset viewer.