📄 ptterminal.h
字号:
virtual PtStatus removeCallListener(PtCallListener& rCallListener); //:Removes the indicated PtCallListener from the PtTerminal. // This method removes a PtCallListener that was added via the // PtTerminal.addCallListener() method. If successful, the listener will // no longer be added to new calls which are presented to this terminal, // however it does not affect PtCallListeners that have already been // added to a call. //!param: (in) rCallListener - The listener to remove //!retcode: PT_SUCCESS - Success //!retcode: PT_NOT_FOUND - <i>rCallListener</i> not registered //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus removeTerminalListener(PtTerminalListener& rTerminalListener); //:Removes the indicated listener from the PtTerminal. //!param: (in) rTerminalListener - The listener to remove from this terminal //!retcode: PT_SUCCESS - Success //!retcode: PT_NOT_FOUND - <i>rTerminalListener</i> not registered //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus setDoNotDisturb(PtBoolean flag); //:Specifies whether the <i>do-not-disturb</i> feature should be //:activated or deactivated for this terminal. //!param: (in) flag - TRUE ==> enable, FALSE ==> disable //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus setCodecCPULimit(int limit); //:Sets the codec CPU limit level for inbound calls. //!param (in) limit - The codec/CPU limit for this call. The value can // be set to LOW (0) or HIGH (1). If set to LOW, only LOW CPU // intensive codecs are allowed. If set to HIGH, both LOW and // HIGH CPU intensive codes are allowed. //!retcode: PT_SUCCESS - Success //!retcode: PT_BUSY - Unable to communicate with call processing/* ============================ ACCESSORS ================================= */ virtual PtStatus getAddresses(PtAddress addresses[], int size, int& nItems); //:Returns an array of PtAddress objects associated with this //:terminal. // The caller provides an array that can hold up to <i>size</i> // PtAddresses. This method will fill in the <i>aAddresses</i> // array with up to <i>size</i> pointers. The actual number of items // filled in is passed back via the <i>nItems</i> argument. //!param: (out) aAddresses - The array of PtAddress's //!param: (in) size - The number of elements in the <i>addresses</i> array //!param: (out) nItems - The number of items assigned //!retcode: PT_SUCCESS - Success //!retcode: PT_MORE_DATA - There are more than <i>size</i> addresses //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus getCallListeners(PtCallListener aCallListeners[], int size, int& nItems); //:Returns an array of PtCallListener,s for all of the call //:listeners presently associated with this terminal. // The caller provides an array that can hold up to <i>size</i> // PtCallListener's. This method will fill in the // <i>aCallListeners</i> array with up to <i>size</i> PtCallListener's. The // actual number items filled in is passed back via the // <i>nItems</i> argument. //!param: (out) aCallListeners - The array of known call listeners //!param: (in) size - The number of elements in the <i>callListeners</i> array //!param: (out) nItems - The number of items assigned //!retcode: PT_SUCCESS - Success //!retcode: PT_MORE_DATA - There are more than <i>size</i> listeners //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus getComponent(const char* componentName, PtComponent& rComponent); //:Sets <i>rpComponent</i> to refer to the PtComponent object that //:corresponds to <i>componentName</i> or NULL if there is no //:component with that name. //!param: (in) componentName - The name of the desired component //!param: (out) rpComponent - Set to point to the component that corresponds to <i>componentName</i> //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus getComponents(PtComponent* components[], int size, int& nItems); //:Returns an array of PtComponent's for all of the objects used //:to model the telephony hardware associated with this terminal. // The caller provides an array that can hold up to <i>size</i> // PtComponent's. This method will fill in the <i>components</i> // array with up to <i>size</i> objects. The actual number of objects // filled in is passed back via the <i>nItems</i> argument. //!param: (out) components - The array of PtComponent's //!param: (in) size - The number of elements in the <i>components</i> array //!param: (out) nItems - The number of items assigned //!retcode: PT_SUCCESS - Success //!retcode: PT_MORE_DATA - There are more than <i>size</i> components //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus getComponentGroups(PtComponentGroup componentGroup[], int size, int& nItems); //:Returns an array of ComponentGroup objects available on the Terminal. A //:ComponentGroup object is composed of a number of Components. //:Examples of Component objects include headsets, handsets, // speakerphones, and buttons. ComponentGroup objects group Components // together. //!param: (out) pComponentGroup - The array of PtComponetGroups //!param: (in) size - The number of elements in the <i>components</i> array //!param: (out) nItems - The number of items assigned //!retcode: PT_SUCCESS - Success //!retcode: PT_MORE_DATA - There are more than <i>size</i> components //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus getConfiguration(PtConfigDb& rpConfigDb); //:Sets <i>rpConfigDb</i> to refer to the configuration object for //:this PtTerminal. // See the PtConfigDb class for information on getting and setting // configuration information. //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus getDoNotDisturb(PtBoolean& rFlag); //:Returns the current setting for the <i>do-not-disturb</i> feature. //!param: (out) rFlag - TRUE ==> enabled, FALSE ==> disabled //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available PtStatus getName(char* rpName, int maxLen); //:Returns the name associated with this PtTerminal. //!param: (out) rpName - The reference used to return the name //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus getTerminalListeners(PtTerminalListener aTermListeners[], int size, int& nItems); //:Returns an array of PtTerminalListener's for all of the //:terminal listeners presently associated with this terminal. // The caller provides an array that can hold up to <i>size</i> // PtTerminalListener's. This method will fill in the // <i>termListeners</i> array with up to <i>size</i> objects. The // actual number of pointers filled in is passed back via the // <i>nItems</i> argument. //!param: (out) aTermListeners - The array of known terminal listeners //!param: (in) size - The number of elements in the <i>termListeners</i> array //!param: (out) nItems - The number of items assigned //!retcode: PT_SUCCESS - Success //!retcode: PT_MORE_DATA - There are more than <i>size</i> listeners //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus getProvider(PtProvider& rpProvider); //:Returns a reference to the PtProvider associated with this PtTerminal. //!param: (out) rpProvider - a reference to the PtProvider object associated with this terminal //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus getTerminalConnections(PtTerminalConnection termConnections[], int size, int& nItems); //:Returns an array of PtTerminalConnection's for all of the //:terminal connections currently associated with this terminal. // The caller provides an array that can hold up to <i>size</i> // PtTerminalConnection's. This method will fill in the // <i>termConnections</i> array with up to <i>size</i> objects. The // actual number of items filled in is passed back via the <i>nItems</i> // argument. //!param: (out) aTermConnections - The array of PtTerminalConnection objects //!param: (in) size - The number of elements in the <i>termConnections</i> array //!param: (out) nItems - The number of items assigned //!retcode: PT_SUCCESS - Success //!retcode: PT_MORE_DATA - There are more than <i>size</i> terminal connections //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus numAddresses(int& count); //:Returns the number of addresses associated with this terminal. //!param: (out) count - The number of addresses associated with this terminal //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus numCallListeners(int& count); //:Returns the number of call listeners associated with this terminal. //!param: (out) count - The number of call listeners associated with this terminal //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus numComponents(int& count); //:Returns the number of components associated with this terminal. //!param: (out) count - The number of components associated with this terminal //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus numTerminalConnections(int& count); //:Returns the number of terminal connections associated with this terminal. //!param: (out) count - The number of terminal connections associated with this terminal //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available virtual PtStatus numTerminalListeners(int& count); //:Returns the number of terminal listeners associated with this terminal. //!param: (out) count - The number of terminal listeners associated with this terminal //!retcode: PT_SUCCESS - Success //!retcode: PT_PROVIDER_UNAVAILABLE - The provider is not available/* ============================ INQUIRY =================================== *//* //////////////////////////// PROTECTED ///////////////////////////////// */friend class PtProvider;friend class PtTerminalConnection;friend class PtTerminalEvent;/* //////////////////////////// PRIVATE /////////////////////////////////// */protected: OsTime mTimeOut; void initialize(const char *name); static OsBSem semInit ; //: Binary Semaphore used to guard initialiation and tear down static TaoReference *mpTransactionCnt; static TaoObjectMap *mpComponents; // the database for all existing components static TaoObjectMap *mpComponentGroups; // the database for all existing components static int mRef; char mTerminalName[PTTERMINAL_MAX_NAME_LENGTH + 1]; TaoClientTask *mpClient; enum PtComponentId { HEAD_SET = 1, HAND_SET, PHONE_SET, SPEAKER_PHONE, OTHER, BUTTON, DISPLAY, GRAPHIC_DISPLAY, HOOKSWITCH, LAMP, MICROPHONE, RINGER, SPEAKER, EXTERNAL_SPEAKER };private: OsProtectEventMgr *mpEventMgr; void setName(const char *name);};/* ============================ INLINE METHODS ============================ */#endif // _PtTerminal_h_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -