Inheritance diagram for TestBase64:
Public Member Functions | |
void | execute (XmlRpcValue ¶ms, XmlRpcValue &result) |
Execute the method. Subclasses must provide a definition for this method. | |
virtual std::string | help () |
std::string & | name () |
Returns the name of the method. | |
TestBase64 (XmlRpcServer *s) | |
Protected Attributes | |
std::string | _name |
XmlRpcServer * | _server |
|
00025 : XmlRpcServerMethod("TestBase64", s) {}
|
|
Execute the method. Subclasses must provide a definition for this method.
Implements XmlRpc::XmlRpcServerMethod. 00028 { 00029 std::ifstream infile("pngnow.png", std::ios::binary); 00030 if (infile.fail()) 00031 infile.open("../pngnow.png", std::ios::binary); 00032 if (infile.fail()) 00033 result = "Could not open file pngnow.png"; 00034 else { 00035 00036 XmlRpcValue::BinaryData& data = result; 00037 int n = 0; 00038 for (;; ++n) { 00039 char c = infile.get(); 00040 if (infile.eof()) break; 00041 data.push_back(c); 00042 } 00043 std::cerr << "Read " << n << " bytes from pngnow.png\n"; 00044 } 00045 }
|
|
Returns a help string for the method. Subclasses should define this method if introspection is being used. Reimplemented in ListMethods, MethodHelp, and Hello. 00039 { return std::string(); }
|
|
Returns the name of the method.
00032 { return _name; }
|
|
|
|
|