📄 ptevent.h
字号:
//!enumcode: META_CALL_STARTING - Meta code description for the initiation or starting of a call. This implies that the call is a new call and in the active state with at least one Connection added to it. //!enumcode: META_CALL_PROGRESS - Meta code description for the progress of a call. This indicates an update in state of certain objects in the call, or the addition of TerminalConnections (but not Connections). //!enumcode: META_CALL_ADDITIONAL_PARTY - Meta code description for the addition of a party to call. This includes adding a connection to the call. //!enumcode: META_CALL_REMOVING_PARTY - Meta code description for a party leaving the call. This includes exactly one Connection moving to the <CODE>Connection.DISCONNECTED</CODE> state. //!enumcode: META_CALL_ENDING - Meta code description for the entire call ending. This includes the call going to <CODE>Call.INVALID</CODE>, all of the Connections moving to the <CODE>Connection.DISCONNECTED</CODE> state. //!enumcode: META_CALL_MERGING - Meta code description for an action of merging two calls. This involves the removal of one party from one call and the addition of the same party to another call. //!enumcode: META_CALL_TRANSFERRING - Meta code description for an action of transferring one call to another. This involves the removal of parties from one call and the addition to another call, and the common party dropping off completely. //!enumcode: META_SNAPSHOT - Meta code description for a snapshot of events. //!enumcode: META_UNKNOWN - Meta code is unknown./* ============================ CREATORS ================================== */ PtEvent(int eventId = EVENT_INVALID, int metaCode = 0, int numOldCalls = 0, const char* callId = NULL, TaoClientTask *pClient = NULL, int sipResponseCode = 0, const char* sipResponseText = 0, const char** pMetaEventCallIds = 0, const char* newCallId = NULL, PtEventCause cause = CAUSE_NORMAL, int isLocal = -1); //:Default constructor PtEvent(const PtEvent& rPtEvent); //:Copy constructor virtual ~PtEvent(); //:Destructor/* ============================ MANIPULATORS ============================== */ PtEvent& operator=(const PtEvent& rhs); //:Assignment operator virtual void setEventId(PtEventId eventId); virtual void setMetaCode(PtMetaCode metaCode); virtual void setEventCallId(const char* callId); // call id virtual void setEventSipResponseCode(int sipResponseCode); // SIP response code virtual void setEventSipResponseText(const char* sipResponseText); // SIP response text virtual void setEventNewCallId(const char* newCallId); // new call id virtual void setEventOldCallIds(int numOldCalls, UtlString* oldCallIds); // old call ids virtual void setEventCause(PtEventCause cause); // cause virtual void setEventLocal(int isLocal); // islocal?/* ============================ ACCESSORS ================================= */ PtStatus getId(PtEventId& rId); //:Returns the event identifier. // The <i>rId</i> argument is set to indicate the specific event that // has occurred. For detailed descriptions of the event ids see the // PtEventId enumeration. //!param: (out) rId - The reference used to return the id //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available PtStatus getCause(PtEventCause& rCause); //:Returns the cause of this event. // For detailed descriptions of the event causes see the PtEventCause // enumeration. //!param: (out) rCause - The reference used to return the cause //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus getMetaEvent(PtBoolean& rMetaEventExists, PtMetaEvent*& pEvent) const ; //:Returns meta event for this event. // Meta events are used to group a set of related events. Meta events // occur in pairs to indicate the start and end of the set of events. // The events between, which belong to the logical set of events, will // all have a meta event set to the start meta event. //!param: (out) rMetaEventExists - TRUE if a meta event is associated with this event. //!param: (out) rEvent - The reference used to return the meta event // If this event is not associated with a meta event, <i>pEvent</i> // has a eventID set to EVENT_INVALID. //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available PtStatus getMetaCode(int& rMetaCode); //:Returns the meta code associated with this event. The meta code provides // a higher-level description of the event. //!param: (out) rMetaCode - The meta code for this event. //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available PtStatus isNewMetaEvent(PtBoolean& rNewMetaEvent); //:Returns true when this event is the start of a meta code group. This // method is used to distinguish two contiguous groups of events bearing // the same meta code. //!param: (out) rNewMetaEvent - True if this event represents a new meta code grouping, false otherwise. //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available static const char* className(); //:Returns the name of this class. //!returns: Returns the string representation of the name of this class PtStatus getSipResponseCode(int& responseCode, UtlString& responseText); //:Return the SIP response code associated with this event //!param: (out) responseCode - The SIP response code. //!param: (out) responseText - The SIP response text. //!retcode: PT_SUCCESS - Success/* ============================ INQUIRY =================================== */ int isLocal() const ; //:Return 0 if connection not local, 1 local. static PtBoolean isCallEvent(int eventId); static PtBoolean isConnectionEvent(int eventId); static PtBoolean isTerminalEvent(int eventId); static PtBoolean isTerminalComponentEvent(int eventId); static PtBoolean isTerminalConnectionEvent(int eventId); virtual PtBoolean isClass(const char* pClassName); //:Determines if this object if of the specified type. //!param: (in) pClassName - The string to compare with the name of this class. //!retcode: TRUE - If the given string contains the class name of this class. //!retcode: FALSE - If the given string does not match that of this class virtual PtBoolean isInstanceOf(const char* pClassName); //:Determines if this object is either an instance of or is derived from //:the specified type. //!param: (in) pClassName - The string to compare with the name of this class. //!retcode: TRUE - If this object is either an instance of or is derived from the specified class. //!retcode: FALSE - If this object is not an instance of the specified class. virtual PtBoolean isSame(const PtEvent& rEvent); //:Compares events to determine if they are the same. // Compares this event with <i>rEvent</i> to determine if they are the same event. // Events are the same if they represent the same logical event occuring // at the same instant on the same object. //!param: (in) rEvent - Event to compare with this object. //!retcode: TRUE - If the events are the same. //!retcode: FALSE - If the events differ. static PtBoolean isStateTransitionAllowed(int newState, int oldState);/* //////////////////////////// PROTECTED ///////////////////////////////// */protected: int mIsLocal; PtEventId mEventId; PtEventCause mEventCause; PtMetaCode mMetaCode; int mNumOldCalls; char* mOldCallIds[MAX_OLD_CALLS]; // UtlString mOldCallIds[MAX_OLD_CALLS]; UtlString mNewCallId; TaoClientTask* mpClient; UtlString mCallId; int mSipResponseCode; UtlString mSipResponseText;// PtEvent(PtEventId eventId, PtEventCause cause = CAUSE_NORMAL);/* //////////////////////////// PRIVATE /////////////////////////////////// */private:};/* ============================ INLINE METHODS ============================ */#endif // _PtEvent_h_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -