14e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius 24e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius#include "XmlRpcServerMethod.h" 34e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius#include "XmlRpcServer.h" 44e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius 54e2ea8184cc1f9609f1f1251394316629a108a78Roshan Piusnamespace XmlRpc { 64e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius 74e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius 84e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius XmlRpcServerMethod::XmlRpcServerMethod(std::string const& name, XmlRpcServer* server) 94e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius { 104e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius _name = name; 114e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius _server = server; 124e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius if (_server) _server->addMethod(this); 134e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius } 144e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius 154e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius XmlRpcServerMethod::~XmlRpcServerMethod() 164e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius { 174e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius if (_server) _server->removeMethod(this); 184e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius } 194e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius 204e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius 214e2ea8184cc1f9609f1f1251394316629a108a78Roshan Pius} // namespace XmlRpc 22