⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connection.h

📁 基于sipfoundy 公司开发的sipx协议API
💻 H
📖 第 1 页 / 共 2 页
字号:
   virtual UtlBoolean transferControllerStatus(int connectionState, int response) = 0;   // Method to communicate status to target call on transfer   // controller side   virtual UtlBoolean answer(const void* hWnd = NULL) = 0;   virtual UtlBoolean hangUp() = 0;   virtual UtlBoolean hold() = 0;   virtual UtlBoolean offHold() = 0;   virtual UtlBoolean renegotiateCodecs() = 0;   virtual UtlBoolean accept(int forwardOnNoAnswerTimeOut) = 0;   virtual UtlBoolean reject() = 0;   virtual UtlBoolean redirect(const char* forwardAddress) = 0;   virtual UtlBoolean processMessage(OsMsg& eventMessage,                                    UtlBoolean callInFocus, UtlBoolean onHook) = 0;                                       virtual UtlBoolean sendInfo(UtlString contentType, UtlString sContent){ return false; }   //:Virtual method signature and default implementation for sendInfo - this should be overridden by   //:SipConnection.	OsStatus addTaoListener(OsServerTask* pListener,									char* callId = NULL,									int ConnectId = 0,									int mask = 0);	void setLocalAddress(const char* address);    //! Change the local identity for the existing connection    /*!      *  \param newLocalIdentity - new identity to be used for local side in subsequent signalling     *  \param shouldSignalIdentityChangeNow - send signalling to indicate local identity change now     */    virtual UtlBoolean changeLocalIdentity(const UtlString& newLocalIdentity,                                           const UtlBoolean& shouldSignalIdentityChangeNow) = 0;    void unimplemented(const char* methodName) const;    void markForDeletion() ;      //: Is this connection marked for deletion?    void setMediaInterface(CpMediaInterface* pMediaInterface) ;      //:Set the media interface for this connection          CpMediaInterface* getMediaInterfacePtr();      //:Gets the media interface pointer for this connection.    UtlBoolean validStateTransition(SIPX_CALLSTATE_EVENT eFrom, SIPX_CALLSTATE_EVENT eTo) ;    //! notify call state event change    /*!     *  \param eMajor - major event type     *  \param sMinor - minor event type     *  \param pEventData - who knows, it is different for each event type ?????  Yuck     *  \param assertedRemoteIdentity - the asserted identity if it has changed otherwise NULL     */    void fireSipXEvent(SIPX_CALLSTATE_EVENT eMajor,                        SIPX_CALLSTATE_CAUSE eMinor,                        void *pEventData = NULL,                       const char* assertedRemoteIdentity = NULL);/* ============================ ACCESSORS ================================= */	void getLocalAddress(UtlString* address);	int getState(int isLocal = 0) const;	int getState(int isLocal, int& cause) const;	int getTerminalState(int isLocal) const;   int getLocalState() const ;     // Get the local state for this connection   int getRemoteState() const ;     // Get the remote state for this connection   static void getStateString(int state, UtlString* stateLabel);   void getCallId(UtlString* callId);   // Call specific   void getCallerId(UtlString* callerId);   // Caller in a call specific   virtual UtlBoolean getRemoteAddress(UtlString* remoteAddress) const = 0;   //: get Connection address   //! returns: TRUE/FALSE if the connection has an address.  The connection may not have an address assigned yet (i.e. if it is not fully setup).   virtual UtlBoolean getRemoteAddress(UtlString* remoteAddress, UtlBoolean leaveFieldParametersIn) const = 0;   //: get Connection address   //! returns: TRUE/FALSE if the connection has an address.  The connection may not have an address assigned yet (i.e. if it is not fully setup). 	virtual UtlBoolean getSession(SipSession& sessioon) = 0;    //! Send a SIP message, only implemented by SIP enabled connections    virtual UtlBoolean sendInDialog(SipMessage& message,                                     OsMsgQ* responseQueue,                                    void* responseListenerData) = 0;	int getResponseCode() { return mResponseCode; };	void getResponseText(UtlString& responseText);	int getConnectionId() { return mConnectionId; };   OsStatus getDeleteAfter(OsTime& time) ;     //: Get the time after which this connection can be deleted.  This      //: timespan is relative to boot./* ============================ INQUIRY =================================== */    UtlBoolean isRemoteCallee();    UtlBoolean remoteRequestedHold();    virtual UtlBoolean willHandleMessage(OsMsg& eventMessage) const = 0;	static UtlBoolean isStateTransitionAllowed(int newState, int oldState);    virtual UtlBoolean isConnection(const char* callId,                                   const char* toTag,                                  const char* fromTag,                                  UtlBoolean  strictCompare) const = 0;    virtual UtlBoolean isSameRemoteAddress(Url& remoteAddress) const = 0;    UtlBoolean isMarkedForDeletion() const ;      //: Determines if this connection has been marked for deletion and      //: should be purged from the call.    UtlBoolean isHeld() const ;      //:Is this connection on remote hold (not sending or receiving audio)/* //////////////////////////// PROTECTED ///////////////////////////////// */protected: 	//: Set the connection state and notify observer of state change	void setState(int newState, 					int isLocal, 					int cause = CONNECTION_CAUSE_NORMAL, 					int termState = -1); 	//: Set the terminal connection state and notify observer of state change 	void setTerminalConnectionState(int newState, int isLocal, int cause = CONNECTION_CAUSE_NORMAL);    virtual void setOfferingTimer(int milliSeconds);    virtual void setRingingTimer(int seconds);	void postTaoListenerMessage(int state, int newCause, int isLocal = 0);	//: Behavior of progression from Offering to next state	// The connections will:	// IMMEDIATE, PAUSE, NEVER go to Alerting	// Default is IMMEDIATE (offeringDelay = 0) proceed to Alerting	// PAUSE waits upto offeringDealy milliseconds	// NEVER (offeringDelay = -1)waits forever in Offering state	// If PAUSE or NEVER are set, the connection may be told to	// proceed to Failed stated with reject() or redirect() or	// to Alerting state with accept(), while the connection is in	// Offering state	int mOfferingDelay;    // The use and values of the following four members are as defined in Call    int mLineAvailableBehavior;    UtlString mForwardUnconditional;    int mLineBusyBehavior;    UtlString mForwardOnBusy;    int mForwardOnNoAnswerSeconds;    void setCallId(const char* callId);    void setCallerId(const char* callId);    CpCallManager* mpCallManager;    CpCall* mpCall;    CpMediaInterface* mpMediaInterface;    int mConnectionId;	UtlBoolean mRemoteIsCallee;	//UtlBoolean mLocalHeld;	UtlBoolean mRemoteRequestedHold;	UtlString remoteRtpAddress;	int remoteRtpPort;    int remoteRtcpPort;	int sendCodec;	int receiveCodec;		int mLocalConnectionState;	int mRemoteConnectionState;    int mConnectionStateCause;	int mTerminalConnState;//	int mLocalTerminalConnState;//	int mRemoteTerminalConnState;	int mFarEndHoldState;	int mResponseCode;		// response code obtained at processResponse, passed through events to upper layer	UtlString mResponseText;	// response text obtained at processResponse	TaoObjectMap*		mpListeners;			TaoReference*		mpListenerCnt;	UtlString mLocalAddress;    UtlString mOriginalCallConnectionAddress;    UtlString mTargetCallConnectionAddress;    UtlString mTargetCallId;    /* //////////////////////////// PRIVATE /////////////////////////////////// */private:	//Private as it must be locked and accessed outside this thread	UtlString connectionCallId;    UtlString connectionCallerId;	OsMutex  callIdMutex;    OsTime   mDeleteAfter ;    // Instructs the call to delete this connection                              // after this time period (time since boot)    SIPX_CALLSTATE_EVENT m_eLastMajor ;     SIPX_CALLSTATE_CAUSE m_eLastMinor ;     SIPX_CALLSTATE_EVENT m_eLastAudioMajor;    SIPX_CALLSTATE_CAUSE m_eLastAudioMinor;	Connection(const Connection& rConnection);     //:Copy constructor (disabled)	Connection& operator=(const Connection& rhs);     //:Assignment operator (disabled)	int terminalConnectionState(int connState);};/* ============================ INLINE METHODS ============================ */#endif  // _Connection_h_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -