Ignore:
Timestamp:
Dec 4, 2013 2:38:20 AM (10 years ago)
Author:
nanang
Message:

Misc update & fix:

  • added new files (call & media) to VS2005 project
  • fixed compile warnings
  • fixed compile error when video is disabled
  • fixed Makefile when JAVA_HOME env var is set
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/pjsua2/pjsip/src/pjsua2/endpoint.cpp

    r4669 r4670  
    1919#include <pjsua2/endpoint.hpp> 
    2020#include <pjsua2/account.hpp> 
     21#include <pjsua2/call.hpp> 
    2122#include <pjsua2/presence.hpp> 
    2223#include <algorithm> 
     
    487488} 
    488489 
     490Call *Endpoint::lookupCall(int call_id, const char *op) 
     491{ 
     492    Call *call = Call::lookup(call_id); 
     493    if (!call) { 
     494        PJ_LOG(1,(THIS_FILE, 
     495                  "Error: cannot find Call instance for call id %d in " 
     496                  "%s", call_id, op)); 
     497    } 
     498 
     499    return call; 
     500} 
     501 
    489502void Endpoint::on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id, 
    490503                                pjsip_rx_data *rdata) 
     
    596609 
    597610    if (call_id != PJSUA_INVALID_ID) { 
    598         // TODO: 
    599         //      handle call pager 
    600         return; 
     611        Call *call = lookupCall(call_id, "on_pager2()"); 
     612        if (!call) { 
     613            /* Ignored */ 
     614            return; 
     615        } 
     616 
     617        call->onInstantMessage(prm); 
    601618    } else { 
    602619        Account *acc = lookupAcc(acc_id, "on_pager2()"); 
     
    632649 
    633650    if (call_id != PJSUA_INVALID_ID) { 
    634         // TODO: 
    635         //      handle call pager 
     651        Call *call = lookupCall(call_id, "on_pager_status2()"); 
     652        if (!call) { 
     653            /* Ignored */ 
     654            return; 
     655        } 
     656 
     657        call->onInstantMessageStatus(prm); 
    636658    } else { 
    637659        Account *acc = lookupAcc(acc_id, "on_pager_status2()"); 
     
    661683 
    662684    if (call_id != PJSUA_INVALID_ID) { 
    663         // TODO: 
    664         //      handle call indication 
     685        Call *call = lookupCall(call_id, "on_typing2()"); 
     686        if (!call) { 
     687            /* Ignored */ 
     688            return; 
     689        } 
     690 
     691        call->onTypingIndication(prm); 
    665692    } else { 
    666693        Account *acc = lookupAcc(acc_id, "on_typing2()"); 
     
    722749                                 pjsip_event *e) 
    723750{ 
     751    PJ_UNUSED_ARG(tsx); 
     752 
    724753    Call *call = Call::lookup(call_id); 
    725754    if (!call) { 
     
    858887    prm.statusCode = (pjsip_status_code)st_code; 
    859888    prm.reason = pj2Str(*st_text); 
    860     prm.finalNotify = final; 
    861     prm.cont = *p_cont; 
     889    prm.finalNotify = PJ2BOOL(final); 
     890    prm.cont = PJ2BOOL(*p_cont); 
    862891     
    863892    call->onCallTransferStatus(prm); 
     
    910939                                pjsua_call_setting *opt) 
    911940{ 
     941    PJ_UNUSED_ARG(reserved); 
     942 
    912943    Call *call = Call::lookup(call_id); 
    913944    if (!call) { 
Note: See TracChangeset for help on using the changeset viewer.