XmlRpc++: XmlRpcServerMethod.h Source File

- Main Page
- Classes
- Files

# XmlRpcServerMethod.h

    00001
    00002 #ifndef _XMLRPCSERVERMETHOD_H_
    00003 #define _XMLRPCSERVERMETHOD_H_
    00004 //
    00005 // XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
    00006 //
    00007 #if defined(_MSC_VER)
    00008 # pragma warning(disable:4786)    // identifier was truncated in debug info
    00009 #endif
    00010
    00011 #ifndef MAKEDEPEND
    00012 # include <string>
    00013 #endif
    00014
    00015 namespace XmlRpc {
    00016
    00017   // Representation of a parameter or result value
    00018   class XmlRpcValue;
    00019
    00020   // The XmlRpcServer processes client requests to call RPCs
    00021   class XmlRpcServer;
    00022
    00024   class XmlRpcServerMethod {
    00025   public:
    00027     XmlRpcServerMethod(std::string const& name, XmlRpcServer* server = 0);
    00029     virtual ~XmlRpcServerMethod();
    00030
    00032     std::string& name() { return _name; }
    00033
    00035     virtual void execute(XmlRpcValue& params, XmlRpcValue& result) = 0;
    00036
    00039     virtual std::string help() { return std::string(); }
    00040
    00041   protected:
    00042     std::string _name;
    00043     XmlRpcServer* _server;
    00044   };
    00045 } // namespace XmlRpc
    00046
    00047 #endif // _XMLRPCSERVERMETHOD_H_