📄 cpghostconnection.cpp
字号:
// // // Copyright (C) 2005, 2006 SIPez LLC// Licensed to SIPfoundry under a Contributor Agreement.//// Copyright (C) 2005, 2006 SIPfoundry Inc.// Licensed by SIPfoundry under the LGPL license.// // Copyright (C) 2004, 2005 Pingtel Corp.// Licensed to SIPfoundry under a Contributor Agreement.// // $$//////////////////////////////////////////////////////////////////////////////// Author: Dan Petrie (dpetrie AT SIPez DOT com)// SYSTEM INCLUDES#include <assert.h>// APPLICATION INCLUDES#include <cp/CpGhostConnection.h>#include <net/Url.h>#include <net/SipContactDb.h>// EXTERNAL FUNCTIONS// EXTERNAL VARIABLES// CONSTANTS// STATIC VARIABLE INITIALIZATIONS/* //////////////////////////// PUBLIC //////////////////////////////////// *//* ============================ CREATORS ================================== */// ConstructorCpGhostConnection::CpGhostConnection(CpCallManager* callMgr, CpCall* call, const char* callId) :Connection(callMgr, call){ if(callId) setCallId(callId); mRemoteIsCallee = TRUE;}// Copy constructorCpGhostConnection::CpGhostConnection(const CpGhostConnection& rCpGhostConnection){}// DestructorCpGhostConnection::~CpGhostConnection(){}/* ============================ MANIPULATORS ============================== */// Assignment operatorCpGhostConnection&CpGhostConnection::operator=(const CpGhostConnection& rhs){ if (this == &rhs) // handle the assignment to self case return *this; return *this;}UtlBoolean CpGhostConnection::dequeue(UtlBoolean callInFocus){ unimplemented("CpGhostConnection::dequeue"); return(FALSE);}UtlBoolean CpGhostConnection::dial(const char* dialString, const char* callerId, const char* callId, const char* callController, const char* originalCallConnection, UtlBoolean requestQueuedCall, const void* pDisplay){ unimplemented("CpGhostConnection::dial"); return(FALSE);}UtlBoolean CpGhostConnection::originalCallTransfer(UtlString& transferTargetAddress, const char* transferControllerAddress, const char* targetCallId, bool remoteHoldBeforeTransfer){ unimplemented("CpGhostConnection::originalCallBlindTransfer"); return(FALSE);}UtlBoolean CpGhostConnection::targetCallBlindTransfer(const char* transferTargetAddress, const char* transferControllerAddress){ mRemoteAddress = transferTargetAddress; setState(CONNECTION_DIALING, CONNECTION_REMOTE, CONNECTION_CAUSE_TRANSFER); setState(CONNECTION_ESTABLISHED, CONNECTION_LOCAL, CONNECTION_CAUSE_TRANSFER); /** SIPXTAPI: TBD **/ return(TRUE);}UtlBoolean CpGhostConnection::transfereeStatus(int connectionState, int response){ unimplemented("CpGhostConnection::transfereeStatus"); return(FALSE);}UtlBoolean CpGhostConnection::transferControllerStatus(int connectionState, int cause){#ifdef TEST_PRINT UtlString connState; getStateString(connectionState, &connState); osPrintf("CpGhostConnection::transferControllerStatus state: %s cause: %d\n", connState.data(), cause); connState.remove(0);#endif setState(connectionState, CONNECTION_REMOTE, cause); /** SIPXTAPI: TBD **/ // If the transfer suceeded, imediately go to UNKNOWN as // we will not receive notification of further state changes if(connectionState == CONNECTION_ESTABLISHED) { setState(CONNECTION_UNKNOWN, CONNECTION_REMOTE, CONNECTION_CAUSE_TRANSFER); /** SIPXTAPI: TBD **/ } return(TRUE);}UtlBoolean CpGhostConnection::answer(const void* hWnd){ unimplemented("CpGhostConnection::answer"); return(FALSE);}UtlBoolean CpGhostConnection::hangUp(){ setState(CONNECTION_DISCONNECTED, CONNECTION_REMOTE, CONNECTION_CAUSE_TRANSFER); /** SIPXTAPI: TBD **/ setState(CONNECTION_DISCONNECTED, CONNECTION_LOCAL, CONNECTION_CAUSE_TRANSFER); /** SIPXTAPI: TBD **/ return(FALSE);}UtlBoolean CpGhostConnection::hold(){ unimplemented("CpGhostConnection::hold"); return(FALSE);}UtlBoolean CpGhostConnection::reject(){ unimplemented("CpGhostConnection::reject"); return(FALSE);}UtlBoolean CpGhostConnection::redirect(const char* forwardAddress){ unimplemented("CpGhostConnection::redirect"); return(FALSE);}UtlBoolean CpGhostConnection::offHold(){ unimplemented("CpGhostConnection::offHold"); return(FALSE);}UtlBoolean CpGhostConnection::renegotiateCodecs(){ unimplemented("CpGhostConnection::renegotiateCodecs"); return(FALSE);}UtlBoolean CpGhostConnection::accept(int forwardOnNoAnswerSeconds){ unimplemented("CpGhostConnection::accept"); return(FALSE);}UtlBoolean CpGhostConnection::changeLocalIdentity(const UtlString& newLocalIdentity, const UtlBoolean& shouldSignalIdentityChangeNow){ unimplemented("CpGhostConnection::changeLocalIdentity"); return(FALSE);}UtlBoolean CpGhostConnection::processMessage(OsMsg& eventMessage, UtlBoolean callInFocus, UtlBoolean onHook){ return(FALSE);}/* ============================ ACCESSORS ================================= */UtlBoolean CpGhostConnection::getRemoteAddress(UtlString* remoteAddress) const{ *remoteAddress = mRemoteAddress; return(!mRemoteAddress.isNull());}UtlBoolean CpGhostConnection::getRemoteAddress(UtlString* remoteAddress, UtlBoolean leaveFieldParametersIn) const{ unimplemented("CpGhostConnection::getRemoteAddress"); return(FALSE);}UtlBoolean CpGhostConnection::getSession(SipSession& session){ unimplemented("CpGhostConnection::getSession"); return(FALSE);}UtlBoolean CpGhostConnection::sendInDialog(SipMessage& message, OsMsgQ* responseQueue, void* responseListenerData){ unimplemented("CpGhostConnection::sendInDialog"); return(FALSE);}// Enumerate possible contact addressesvoid CpGhostConnection::getLocalContactAddresses( CONTACT_ADDRESS contacts[], size_t nMaxContacts, size_t& nActualContacts){ unimplemented("CpGhostConnection::getLocalContactAddresses");}/* ============================ INQUIRY =================================== */UtlBoolean CpGhostConnection::willHandleMessage(OsMsg& eventMessage) const{ unimplemented("CpGhostConnection::willHandleMessage"); return(FALSE);}UtlBoolean CpGhostConnection::isConnection(const char* callId, const char* toTag, const char* fromTag, UtlBoolean strictCompare) const{ unimplemented("CpGhostConnection::isConnection"); return(FALSE);}UtlBoolean CpGhostConnection::isSameRemoteAddress(Url& remoteAddress) const{ UtlString address; remoteAddress.toString(address); return(address.compareTo(mRemoteAddress) == 0);}/* //////////////////////////// PROTECTED ///////////////////////////////// *//* //////////////////////////// PRIVATE /////////////////////////////////// *//* ============================ FUNCTIONS ================================= */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -