Ignore:
Timestamp:
Oct 23, 2013 5:34:48 AM (11 years ago)
Author:
bennylp
Message:

More re #1519:

  • account API implementation (incomplete, callback is still not called)
  • using callback class design pattern (observer?)
  • after this, it might be changed to use inheritance pattern instead
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/pjsua2/pjsip/include/pjsua2/types.hpp

    r4608 r4631  
    7070typedef void *TransportHandle; 
    7171 
     72/* 
     73 * Forward declaration of Account, AccountCallback, AccountConfig, to be used 
     74 * by Endpoint. 
     75 */ 
     76class Account; 
     77class AccountCallback; 
     78class AccountConfig; 
     79 
    7280 
    7381/** 
     
    105113    /** The line number of PJSUA source file that throws the error */ 
    106114    int         srcLine; 
     115 
     116    /** Build error string. */ 
     117    string      info(bool multi_line=false) const; 
    107118 
    108119    /** Default constructor */ 
     
    156167        PJSUA2_CHECK_RAISE_ERROR2(status, "") 
    157168 
     169#define PJSUA2_CHECK_EXPR(expr)                 \ 
     170        do { \ 
     171            pj_status_t the_status = expr;      \ 
     172            PJSUA2_CHECK_RAISE_ERROR2(the_status, #expr); \ 
     173        } while (0) 
    158174 
    159175////////////////////////////////////////////////////////////////////////////// 
     
    166182{ 
    167183    /** 
     184     * The authentication scheme (e.g. "digest"). 
     185     */ 
     186    string      scheme; 
     187 
     188    /** 
    168189     * Realm on which this credential is to be used. Use "*" to make 
    169190     * a credential that can be used to authenticate against any challenges. 
    170191     */ 
    171192    string      realm; 
    172  
    173     /** 
    174      * The authentication scheme (e.g. "digest"). 
    175      */ 
    176     string      scheme; 
    177193 
    178194    /** 
     
    208224    string      akaAmf; 
    209225 
     226    /** Default constructor */ 
     227    AuthCredInfo(); 
     228 
     229    /** Construct a credential with the specified parameters */ 
     230    AuthCredInfo(const string &scheme, 
     231                 const string &realm, 
     232                 const string &user_name, 
     233                 const int data_type, 
     234                 const string data); 
    210235}; 
    211236 
Note: See TracChangeset for help on using the changeset viewer.