#include <PtProvider.h>
Public Types | |
enum | ProviderState { IN_SERVICE, OUT_OF_SERVICE, SHUTDOWN } |
Public Member Functions | |
virtual PtStatus | addProviderListener (PtProviderListener &rListener) |
param: (in) login - user identifier (used for authentication) param: (in) password - password (used for authentication) param: (in) server - Pingtel server expressed as "host:port" param: (in) options - (not presently used) param: (in) pCallManager - Pointer to the call manager param: (out) rProvider - set to refer to a PtProvider object More... | |
virtual PtStatus | createCall (PtCall &rCall) |
param: (in) rListener - the listener to add to this provider retcode: PT_SUCCESS - success retcode: PT_EXISTS - rListener is already registered retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available More... | |
virtual PtStatus | removeProviderListener (PtProviderListener &rListener) |
param: (out) rCall - reference to the newly created call retcode: PT_SUCCESS - success retcode: PT_RESOURCE_UNAVAILABLE - insufficient resources retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available More... | |
virtual PtStatus | shutdown (void) |
param: (in) rListener - the listener to remove from this provider retcode: PT_SUCCESS - success retcode: PT_NOT_FOUND - rListener not registered retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available More... | |
virtual PtStatus | getAddress (const char *phoneURL, PtAddress &rAddress) |
retcode: PT_SUCCESS - success retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available More... | |
virtual PtStatus | getAddresses (PtAddress arAddresses[], int size, int &nItems) |
param: (in) phoneURL - a URL representing the phone number to look up param: (out) rAddress - reference to the address object corresponding to phoneURL retcode: PT_SUCCESS - success retcode: PT_INVALID_ARGUMENT - phoneURL was not recognized retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available More... | |
virtual PtStatus | getCalls (PtCall arCalls[], int size, int &nItems) |
param: (out) arAddresses - the array of PtAddress references param: (in) size - the number of elements in the addresses array param: (out) nItems - the number of items assigned retcode: PT_SUCCESS - success retcode: PT_MORE_DATA - there are more than size addresses retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available More... | |
virtual PtStatus | getProviderListeners (PtProviderListener *listeners[], int size, int &nItems) |
param: (out) arCalls - the array of PtCall pointers param: (in) size - the number of elements in the calls array param: (out) nItems - the number of items assigned retcode: PT_SUCCESS - success retcode: PT_MORE_DATA - there are more than size calls retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available More... | |
virtual int | getState (void) |
param: (out) listeners - the array of PtProviderListener pointers param: (in) size - the number of elements in the pListeners array param: (out) nItems - the number of items assigned retcode: PT_SUCCESS - success retcode: PT_MORE_DATA - there are more than size listeners retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available More... | |
virtual PtStatus | getTerminal (const char *name, PtTerminal &rTerminal) |
retcode: IN_SERVICE - the provider is available for use retcode: OUT_OF_SERVICE - the provider is temporarily unavailable retcode: SHUTDOWN - the provider is permanently unavailable More... | |
virtual PtStatus | getTerminals (PtTerminal arTerms[], int size, int &nItems) |
param: (in) name - the name to look up (typically the phone extension) param: (out) rpTerminal - the terminal object for name retcode: PT_SUCCESS - success retcode: PT_INVALID_ARGUMENT - name was not recognized retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available More... | |
virtual PtStatus | numAddresses (int &count) |
param: (out) arTerms - the array of PtTerminal references param: (in) size - the number of elements in the terms array param: (out) nItems - the number of items assigned retcode: PT_SUCCESS - success retcode: PT_MORE_DATA - there are more than size terminals retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available More... | |
virtual PtStatus | numCalls (int &count) |
param: (out) count - the number of addresses known to this provider retcode: PT_SUCCESS - success retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available More... | |
virtual PtStatus | numProviderListeners (int &count) |
param: (out) count - the number of calls known to this provider retcode: PT_SUCCESS - success retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available More... | |
virtual PtStatus | numTerminals (int &count) |
param: (out) count - the number of listeners known to this provider retcode: PT_SUCCESS - success retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available More... | |
Static Public Member Functions | |
static PtStatus | getProvider (const char *login, const char *password, const char *server, const char *options, CpCallManager *pCallMgr, PtProvider *&rpProvider) |
enumcode: IN_SERVICE - the provider is currently available for use enumcode: OUT_OF_SERVICE - the provider is currently not available for use enumcode: SHUTDOWN - the provider is permanently no longer available for use More... | |
Protected Member Functions | |
void | initialize () |
PtStatus | createProvider (const char *login, const char *password, const char *server, const char *options, CpCallManager *pCallMgr=NULL) |
PtProvider (const char *login, const char *password, const char *server, const char *options, CpCallManager *pCallMgr=NULL) | |
PtProvider (const PtProvider &rPtProvider) | |
PtProvider & | operator= (const PtProvider &rhs) |
PtProvider (UtlString &rLogin, UtlString &rPass) | |
PtProvider () | |
virtual | ~PtProvider () |
Protected Attributes | |
UtlString | mLogin |
UtlString | mPass |
ProviderState | mState |
OsTime | mTimeOut |
Static Protected Attributes | |
static OsBSem | semInit |
static PtProvider * | spInstance = 0L |
static TaoClientTask * | mpClient = 0 |
static TaoReference * | mpTransactionCnt = 0 |
static TaoObjectMap * | mpCalls = 0 |
static TaoReference * | mpCallCnt = 0 |
static TaoObjectMap * | mpAddresses = 0 |
static TaoReference * | mpAddressCnt = 0 |
static unsigned int | mRef = 0 |
Static Private Member Functions | |
static UtlBoolean | isLocal (const char *host) |
Private Attributes | |
OsProtectEventMgr * | mpEventMgr |
Static Private Attributes | |
static UtlBoolean | mbInvalidIP = FALSE |
static OsBSem | sLock |
Friends | |
class | PtTerminal |
param: (out) count - the number of terminals known to this provider retcode: PT_SUCCESS - success retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available More... | |
enum ProviderState |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedvirtual |
|
virtual |
param: (in) login - user identifier (used for authentication) param: (in) password - password (used for authentication) param: (in) server - Pingtel server expressed as "host:port" param: (in) options - (not presently used) param: (in) pCallManager - Pointer to the call manager param: (out) rProvider - set to refer to a PtProvider object
retcode: PT_SUCCESS - rProvider reference to a PtProvider object retcode: PT_PROVIDER_UNAVAILABLE - the Pingtel server did not respond retcode: PT_HOST_NOT_FOUND - Invalid host or port for server retcode: PT_AUTH_FAILED - Invalid login name or password
param: (in) rListener - the listener to add to this provider retcode: PT_SUCCESS - success retcode: PT_EXISTS - rListener is already registered retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available
|
protected |
retcode: PT_SUCCESS - success retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available
param: (in) phoneURL - a URL representing the phone number to look up param: (out) rAddress - reference to the address object corresponding to phoneURL retcode: PT_SUCCESS - success retcode: PT_INVALID_ARGUMENT - phoneURL was not recognized retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available
param: (out) arAddresses - the array of PtAddress references param: (in) size - the number of elements in the addresses array param: (out) nItems - the number of items assigned retcode: PT_SUCCESS - success retcode: PT_MORE_DATA - there are more than size addresses retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available
|
static |
enumcode: IN_SERVICE - the provider is currently available for use enumcode: OUT_OF_SERVICE - the provider is currently not available for use enumcode: SHUTDOWN - the provider is permanently no longer available for use
|
virtual |
param: (out) arCalls - the array of PtCall pointers param: (in) size - the number of elements in the calls array param: (out) nItems - the number of items assigned retcode: PT_SUCCESS - success retcode: PT_MORE_DATA - there are more than size calls retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available
|
virtual |
param: (out) listeners - the array of PtProviderListener pointers param: (in) size - the number of elements in the pListeners array param: (out) nItems - the number of items assigned retcode: PT_SUCCESS - success retcode: PT_MORE_DATA - there are more than size listeners retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available
|
virtual |
retcode: IN_SERVICE - the provider is available for use retcode: OUT_OF_SERVICE - the provider is temporarily unavailable retcode: SHUTDOWN - the provider is permanently unavailable
|
virtual |
param: (in) name - the name to look up (typically the phone extension) param: (out) rpTerminal - the terminal object for name retcode: PT_SUCCESS - success retcode: PT_INVALID_ARGUMENT - name was not recognized retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available
|
protected |
|
staticprivate |
|
virtual |
param: (out) arTerms - the array of PtTerminal references param: (in) size - the number of elements in the terms array param: (out) nItems - the number of items assigned retcode: PT_SUCCESS - success retcode: PT_MORE_DATA - there are more than size terminals retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available
|
virtual |
param: (out) count - the number of addresses known to this provider retcode: PT_SUCCESS - success retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available
|
virtual |
param: (out) count - the number of calls known to this provider retcode: PT_SUCCESS - success retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available
|
virtual |
param: (out) count - the number of listeners known to this provider retcode: PT_SUCCESS - success retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available
|
protected |
|
virtual |
param: (out) rCall - reference to the newly created call retcode: PT_SUCCESS - success retcode: PT_RESOURCE_UNAVAILABLE - insufficient resources retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available
|
virtual |
param: (in) rListener - the listener to remove from this provider retcode: PT_SUCCESS - success retcode: PT_NOT_FOUND - rListener not registered retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available
|
friend |
param: (out) count - the number of terminals known to this provider retcode: PT_SUCCESS - success retcode: PT_PROVIDER_UNAVAILABLE - the provider is not available
|
staticprivate |
|
protected |
|
staticprotected |
|
staticprotected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
private |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
staticprotected |
|
staticprivate |
|
staticprotected |