OsStatus SipRedirectorPresenceRouting::startPresenceMonitorXmlRpcServer( void )
{
    UtlString path;
    mLocalPresenceMonitorServerUrl.getPath( path );

    XmlRpcDispatch* pXmlRpcServer = new XmlRpcDispatch( mLocalPresenceMonitorServerUrl.getHostPort(),
                                                        mLocalPresenceMonitorServerUrl.getScheme() == Url::HttpsUrlScheme,
                                                        path );
    pXmlRpcServer->addMethod( UNIFIED_PRESENCE_CHANGED_REQUEST_NAME, UnifiedPresenceChangedMethod::get);
    return OS_SUCCESS;
}
Example #2
0
// Must be called once to connect the configurationParameter methods
void ConfigRPC::registerMethods(XmlRpcDispatch&     rpc /* xmlrpc dispatch service to use */)
{
   OsWriteLock lock(*spDatabaseLock);

   if (!sRegistered)
   {
      rpc.addMethod(MethodName[ConfigRPC_Callback::Version], ConfigRPC_version::get, NULL);
      rpc.addMethod(MethodName[ConfigRPC_Callback::Get],     ConfigRPC_get::get,     NULL);
      rpc.addMethod(MethodName[ConfigRPC_Callback::Set],     ConfigRPC_set::get,     NULL);
      rpc.addMethod(MethodName[ConfigRPC_Callback::Delete],  ConfigRPC_delete::get,  NULL);

      sRegistered = true;
   }
}