TestBase64 Class Reference

Inheritance diagram for TestBase64:

XmlRpc::XmlRpcServerMethod List of all members.

Public Member Functions

 TestBase64 (XmlRpcServer *s)
void execute (XmlRpcValue &params, XmlRpcValue &result)
 Execute the method. Subclasses must provide a definition for this method.
std::stringname ()
 Returns the name of the method.
virtual std::string help ()

Protected Attributes

std::string _name
XmlRpcServer * _server

Detailed Description

Definition at line 22 of file TestBase64Server.cpp.


Constructor & Destructor Documentation

TestBase64::TestBase64 ( XmlRpcServer s  )  [inline]

Definition at line 25 of file TestBase64Server.cpp.

00025 : XmlRpcServerMethod("TestBase64", s) {}


Member Function Documentation

void TestBase64::execute ( XmlRpcValue params,
XmlRpcValue result 
) [inline, virtual]

Execute the method. Subclasses must provide a definition for this method.

Implements XmlRpc::XmlRpcServerMethod.

Definition at line 27 of file TestBase64Server.cpp.

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   }

virtual std::string XmlRpc::XmlRpcServerMethod::help (  )  [inline, virtual, inherited]

Returns a help string for the method. Subclasses should define this method if introspection is being used.

Reimplemented in ListMethods, MethodHelp, and Hello.

Definition at line 39 of file XmlRpcServerMethod.h.

References deljobs::string.

Referenced by MethodHelp::execute().

00039 { return std::string(); }

std::string& XmlRpc::XmlRpcServerMethod::name ( void   )  [inline, inherited]

Returns the name of the method.

Definition at line 32 of file XmlRpcServerMethod.h.

References XmlRpc::XmlRpcServerMethod::_name.

Referenced by XmlRpc::XmlRpcServer::addMethod(), and XmlRpc::XmlRpcServer::removeMethod().

00032 { return _name; }


Member Data Documentation

std::string XmlRpc::XmlRpcServerMethod::_name [protected, inherited]

Definition at line 42 of file XmlRpcServerMethod.h.

Referenced by XmlRpc::XmlRpcServerMethod::name(), and XmlRpc::XmlRpcServerMethod::XmlRpcServerMethod().

XmlRpcServer* XmlRpc::XmlRpcServerMethod::_server [protected, inherited]

Definition at line 43 of file XmlRpcServerMethod.h.

Referenced by XmlRpc::XmlRpcServerMethod::XmlRpcServerMethod(), and XmlRpc::XmlRpcServerMethod::~XmlRpcServerMethod().


Generated on Tue Nov 29 23:35:59 2016 for BOSS_7.0.2 by  doxygen 1.4.7