Changeset 499:8844ce6b2c20 in verona


Ignore:
Timestamp:
Jun 7, 2012 11:50:50 AM (12 months ago)
Author:
Vadim Lebedev <vadim@…>
Branch:
default
Message:

implement phAnswerMessage to allow explicity generateion of answers to incoming MESSAGE requests

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • phapi/phapi.c

    r481 r499  
    20202020 
    20212021PHAPI_EXPORT int 
     2022phAnswerMessage(int tid, int code) 
     2023{ 
     2024        int i; 
     2025 
     2026        eXosip_lock(); 
     2027        i = eXosip_message_send_answer(tid, code, NULL); 
     2028        eXosip_unlock(); 
     2029        return i >= 0 ? i : -PH_BADARG; 
     2030} 
     2031         
     2032PHAPI_EXPORT int 
    20222033phLineSubscribe(int vlid, const char *uri, const int winfo) 
    20232034{ 
     
    68896900                info.rawctt = rawCtt; 
    68906901 
    6891                 eXosip_message_send_answer(je->tid, 202, NULL); 
     6902                if (!phcfg.no_msg_auto_reply) 
     6903                    eXosip_message_send_answer(je->tid, 202, NULL); 
    68926904                if (phcb->msgProgress != NULL) 
    68936905                        phcb->msgProgress(je->tid, &info); 
  • phapi/phapi.h

    r465 r499  
    482482 
    483483 
     484PHAPI_EXPORT int 
     485phAnswerMessage(int tid, int code); 
     486 
     487 
    484488/** 
    485489 * Subscribe to presence 
     
    13331337  int qos;                  /* QoS bits to add to TOS to : 0x2 min cost, 0x4 max reliability, 0x8 max throughput, 0x10 min delay */ 
    13341338  unsigned int hdxlevel;    /* if bit31=1  HDX level is valid and bits0-30 contains the power threshold */ 
    1335  
     1339  int no_msg_auto_reply;            /* when 1 avoid auto answering message requests */ 
    13361340}; 
    13371341 
  • phcpp/phapipp.cpp

    r466 r499  
    180180{ 
    181181        return phLineSendMessage3(vlid, target, to, buff, mime, hdrs.size(), (const struct ph_hdr_val*) &hdrs.front() ); 
     182} 
     183 
     184int phapi::answerMessage(int tid, int code) 
     185{ 
     186        return phAnswerMessage(tid, code); 
    182187} 
    183188 
  • phcpp/phapipp.h

    r498 r499  
    121121                        const std::vector<std::pair<const char*, const char* > >& hdrs, const char* target = 0); 
    122122 
     123        virtual int answerMessage(int tid, int code); 
     124 
    123125        virtual int subscribe(int vlid, const char* to, int winfo, int use_proxy = 1, int expire = 600, 
    124126                        const std::vector<std::pair<const char*, const char* > >* hdrs = 0); 
Note: See TracChangeset for help on using the changeset viewer.