📄 provisioninterface.hxx
字号:
*/ void getJtapiHostToGroupMap(HostToGroupMap &retList) throw(VException&); /** Return a map of host to group for the Feature servers */ void getFeatureHostToGroupMap(HostToGroupMap &retList) throw(VException&); /** Return a map of host to group for the Marshal servers */ void getMarshalHostToGroupMap(HostToGroupMap &retList) throw(VException&); /** Return a map of host to group for the Cdr servers */ void getCdrHostToGroupMap(HostToGroupMap &retList) throw(VException&); /** Return a map of host to group for the Heartbeat servers */ void getHeartbeatHostToGroupMap( HostToGroupMap &retList) throw(VException&); /** Return a map of host to group for the Redirect servers */ void getRedirectHostToGroupMap( HostToGroupMap &retList) throw(VException&); /** Return a map of host to group for the Redirect servers */ void getPolicyHostToGroupMap( HostToGroupMap &retList) throw(VException&); // Given a server name, get the server data for that server /** Takes a jtapi server name, obtains the data * from provision server and fills it in the data object provied. */ void getJtapiData(const string &jtapiName, VJtapiServerData &data) throw (VException &); /** Takes a feature server name, obtains the data * from provision server and fills it in the data object provied. */ void getFeatureData(const string &featureName, VFeatureServerData &data) throw (VException &); /** Takes a marshal name, obtains the data * from provision server and fills it in the data object provied. */ void getMarshalData(const string &marshalName, VMarshalServerData &data) throw (VException &); /** Takes a location server name, obtains the data * from provision server and fills it in the data object provied. */ void getLocationData(const string &locationName, VLocationServerData &data) throw (VException &); /** Takes a location server routes file name, obtains the data * from provision server and fills it in the data object provided. */ void getLocationRouteData(const string &locationRouteName, VLocationRouteData &data) throw (VException &); /** Takes a Cdr server name, obtains the data * from provision server and fills it in the data object provied. */ void getCdrData(const string &cdrName, VCdrServerData &data) throw (VException &); /** Takes a redirect server name, obtains the data * from provision server and fills it in the data object provied. */ void getRedirectData(const string &redirectName, VRedirectServerData &data) throw (VException &); /** Takes a redirect server name, obtains the data * from provision server and fills it in the data object provied. */ void getPolicyData(const string &policyName, VPolicyServerData &data) throw (VException &); /// void getAccountData(const string &userName, VAccountData &data) throw (VException &); /// string getUserIp(const string& userName) throw (VException&); /// void getAliases(const string& userName, list < string > &retVal) throw (VException&);/// string getMasterUser(const string &userName) throw (VException &); /// bool getTermContactList(const string &userName, list < string > &retVal) throw (VException&); /// Get list of subscribers void getSubscribers(vector < Data > & list) throw (VException &); /// Get list of aliases for subscribers void getAllAliases(vector < Data > & list) throw (VException &); /// Deletes a subscriber from the system void deleteSubscriber(const string& subscriberName) throw (VException &); /// Get the called list for a given user account void getCalledList(const string& rsHost, int port, const string& acctName, vector < Data > & data) throw (VException &); /// Get the calling list for a given user account void getCallingList(const string& rsHost, int port, const string& acctName, vector < Data > & data) throw (VException &); /** See if an account name is valid. Will return true if the user name exists, but false if it is an alias (only returns true if the Account exists and is a master user) */ bool isAccount(const string& userName); /// Get all the called CPL scripts for feature server void getCalledFeatureScripts(const string& hostName, int port, vector < Data > & retList) throw (VException &); /// Get all the calling CPL scripts for feature server void getCallingFeatureScripts(const string& hostName, int port, vector < Data > & retList) throw (VException &); /** * Gets dial plan XML data, parses it and returns list of * contacts in retData * * the default Phone dial plan name is defaultPhonePlan.xml * the default IP dial plan name is defaultIpPlan.xml * to receive update notification for dial plan * call * * registerForUpdate(callBackFunc, "defaultPhonePlan.xml", VCONFIG); * registerForUpdate(callBackFunc, "defaultIpPlan.xml", VCONFIG); */ void getDialPlan(const string& name, vector < VPlanElement > & retData) throw (VException &); // ***************************************************************** // Registration functions // ***************************************************************** /** Register client for notification for a given item Callback func get called whenever item is updated. */ void registerForUpdate(CallBackFunc func, const string& name, PContext context); /** Register client for notification for a anything new within a given context on the server. Callback func get called whenever any new information is available for server. For example if a new user is added and called/calling list is created, RS will be notified. The data sent in the callback function is the comma separated list of entries added for the server. */ void registerForUpdate(const string& host, int port, CallBackFunc func, PContext context); /// Register a directory for update (should be group, but backward compat) void registerDirForUpdate(CallBackFunc func, const string& group); /// Unregister for an item void unregisterForUpdate(CallBackFunc func, const string& name, PContext context); /// Unregister an a context void unregisterForUpdate(const string& host, int port, CallBackFunc func, PContext context); /// Unregister a directory for update // This one is called "group" but is same as dir. Since no one was using // the unregister I could name it properly.... void unregisterGroupForUpdate(CallBackFunc func, const string& group); /// Get the network address of the currently used pServer const NetworkAddress& getNetAddress() { return _interface.getNetAddress(); } private: /** Constructor initializes with the name of provision server for redundancy passed as command line argument. Intentionally made private so that it can not be instantiated directly. It also creates an instance of listener in a separate thread to listen for data updates (through the interface) */ ProvisionInterface(const char* primHostname, const int primPort, const char* altHostname, const int altPort, const char* readSecretFile, const char* writeSecretFile); /** Register function for configuration update notification * function gets called when a configuration change occures */ void updateConfigCallback(const string& name); void registerForUpdateImpl(CallBackFunc func, const string& name); void unregisterForUpdateImpl(CallBackFunc func, const string& name); /// Sends update notification for a data item void sendUpdateNotification(const string &item, const string &name); /// Sends delete notification for a data item void sendDeleteNotification(const string &item, const string &name); /// Sends update notification is dirName contents change on PS void sendUpdateNotification(const string& group, const string& name, bool delFlag); // each of these populates the server list, which is cached. These // simply return if called when the cache is good. These call // intitializeMap on the individual container classes (see the // provisioning/util directory for these)///void initializeJtapiServerList() throw(VException&);///void initializeFeatureServerList() throw(VException&);///void initializeMarshalServerList() throw(VException&);///void initializeCdrServerList() throw(VException&);///void initializeHeartbeatServerList() throw(VException&);///void initializeRedirectServerList() throw(VException&);///void initializePolicyServerList() throw(VException&); /// Translates the enum of contexts to strings string dirContext(PContext context); // Containers for the Server Group containers/Server lists VFeatureServerGroupContainer _featureServerGrpCont; VMarshalServerGroupContainer _marshalServerGrpCont; VRedirectServerGroupContainer _redirectServerGrpCont; VCdrServerGroupContainer _cdrServerGrpCont; VHeartbeatServerGroupContainer _heartbeatServerGrpCont; VJtapiServerGroupContainer _jtapiServerGrpCont; VPolicyServerGroupContainer _policyServerGrpCont; /// pointer to the singleton instance static ProvisionInterface* _instance; /// Host name the library is running on string _hostName;friend class PSListener;/// listener for updates from server PSListener* _listener; typedef list < CallBackFunc > CallBackList; typedef map < string, CallBackList > CallBackMap; /// Map to contain callbacks for a given data item CallBackMap _callBackMap; /// interface to the PS PSInterface _interface;};/* Local Variables: *//* c-file-style: "stroustrup" *//* indent-tabs-mode: nil *//* c-file-offsets: ((access-label . -) (inclass . ++)) *//* c-basic-offset: 4 *//* End: */#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -