QXmlRPC  1.1
Public Member Functions | List of all members
xmlrpc::ServerIntrospection Class Reference

ServerIntrospection class implements introspection functionality to the xmlrpc::Server. More...

#include <serverintrospection.h>

Public Member Functions

void registerMethod (QString methodName, QVariant::Type returnType, QList< QVariant::Type > parameterTypes)
 
void setMethodHelpText (QString methodName, QString helpText)
 
void clear ()
 
bool isEmpty () const
 
bool isMethodSupported (QString methodName) const
 
bool checkMethodParameters (QString methodName, const QList< xmlrpc::Variant > &parameters, QVariant::Type *returnType=0) const
 
QStringList listMethods () const
 
QStringList methodSignatures (QString methodName) const
 
QString methodHelp (QString methodName)
 

Detailed Description

ServerIntrospection class implements introspection functionality to the xmlrpc::Server.

It provides information about methods of the xmlrpc server to clients and allows to perform method name and parameters type checks on the server before calling user code.

ServerIntrospection is usually not used directly but from the xmlrpc::Server.

Check http://scripts.incutio.com/xmlrpc/introspection.html for more information about XML-RPC introspection.

Member Function Documentation

◆ checkMethodParameters()

bool ServerIntrospection::checkMethodParameters ( QString  methodName,
const QList< xmlrpc::Variant > &  parameters,
QVariant::Type *  returnType = 0 
) const

Returns true if types of parameters correspond to at least one method methodName signature. If returnType != 0 it will be filled with expected return value type for this method and parameters.

◆ clear()

void ServerIntrospection::clear ( )

Clear methods signatures and help data

◆ isEmpty()

bool ServerIntrospection::isEmpty ( ) const

Returns true if the object contains no items; otherwise returns false.

◆ isMethodSupported()

bool ServerIntrospection::isMethodSupported ( QString  methodName) const

Returns true if the method methodName is registered; otherwise returns false.

◆ listMethods()

QStringList ServerIntrospection::listMethods ( ) const

Return list of registered methods. This method is intended to be used for "system.listMethods" XML-RPC call.

◆ methodHelp()

QString ServerIntrospection::methodHelp ( QString  methodName)

Returns a documentation string describing the use of method methodName. If no such string is available, an empty string is returned. The documentation string may contain HTML markup.

This method is intended to be used for "system.methodHelp" XML-RPC call.

◆ methodSignatures()

QStringList ServerIntrospection::methodSignatures ( QString  methodName) const

Return list of registered method signatures for method methodName. This method is intended to be used for "system.methodSignature" XML-RPC call.

Signatures themselves are restricted to the top level parameters expected by a method. For instance if a method expects one array of structs as a parameter, and it returns a string, its signature is simply "string, array". If it expects three integers, its signature is "string, int, int, int".

◆ registerMethod()

void ServerIntrospection::registerMethod ( QString  methodName,
QVariant::Type  returnType,
QList< QVariant::Type >  parameterTypes 
)

Register method methodName

See also
xmlrpc::Server::registerMethod()

◆ setMethodHelpText()

void ServerIntrospection::setMethodHelpText ( QString  methodName,
QString  helpText 
)

Register help message for method methonName.

See also
methodHelp()

The documentation for this class was generated from the following files: