Core: JsonRpc support

git-svn-id: svn://ultimatepp.org/upp/trunk@5164 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-07-10 11:55:33 +00:00
parent 3303819fc4
commit ab7e691cc6
9 changed files with 64 additions and 24 deletions

View file

@ -1,4 +1,4 @@
#include "XmlRpc.h"
#include "Rpc.h"
NAMESPACE_UPP

View file

@ -1,5 +1,5 @@
#ifndef _XmlRpc_XmlRpc_h
#define _XmlRpc_XmlRpc_h
#ifndef Rpc_Rpc_h
#define Rpc_Rpc_h
#include <Web/Web.h>
@ -334,6 +334,8 @@ void LogRpcRequests(bool b = true);
void SetRpcServerTrace(Stream& s, int level = 1);
#include "legacy.h"
END_UPP_NAMESPACE
#endif

View file

@ -4,7 +4,7 @@ uses
Web;
file
XmlRpc.h,
Rpc.h,
legacy.h,
Value.cpp,
Xml.cpp,

View file

@ -1,5 +1,4 @@
#include "XmlRpc.h"
#include "XmlRpc.h"
#include "Rpc.h"
#define LLOG(x) DLOG(x)

View file

@ -1,4 +1,4 @@
#include "XmlRpc.h"
#include "Rpc.h"
NAMESPACE_UPP

View file

@ -1,4 +1,4 @@
#include "XmlRpc.h"
#include "Rpc.h"
NAMESPACE_UPP

View file

@ -1,4 +1,4 @@
#ifndef _Core_XmlRpc_icpp_init_stub
#define _Core_XmlRpc_icpp_init_stub
#ifndef _Core_Rpc_icpp_init_stub
#define _Core_Rpc_icpp_init_stub
#include "Web/init"
#endif

53
uppsrc/Core/Rpc/legacy.h Normal file
View file

@ -0,0 +1,53 @@
#define XMLRPC_METHOD(x) RPC_METHOD(x)
#define XMLRPC_GMETHOD(x, group) RPC_GMETHOD(x, group)
typedef RpcError XmlRpcError;
inline
void SetXmlRpcMethodFilter(String (*filter)(const String& methodname))
{
SetRpcMethodFilter(filter);
}
inline
String XmlRpcExecute(const String& request, const char *group, const char *peeraddr)
{
RpcExecute(request, group, peeraddr);
}
inline
bool XmlRpcPerform(TcpSocket& http, const char *group)
{
RpcPerform(http, group);
}
inline
bool XmlRpcServerLoop(int port, const char *group = NULL)
{
RpcServerLoop(port, group);
}
inline
void ThrowXmlRpcError(int code, const char *s)
{
ThrowXmlRpcError(code, s);
}
inline
void ThrowXmlRpcError(const char *s)
{
ThrowXmlRpcError(s);
}
inline
void LogXmlRpcRequests(bool b = true)
{
LogRpcRequests(b);
}
inline
void SetXmlRpcServerTrace(Stream& s, int level = 1)
{
SetRpcServerTrace(s, level);
}

View file

@ -1,14 +0,0 @@
topic "";
[ $$0,0#00000000000000000000000000000000:Default]
[H6;0 $$1,0#05600065144404261032431302351956:begin]
[i448;a25;kKO9;2 $$2,0#37138531426314131252341829483370:codeitem]
[l288;2 $$3,0#27521748481378242620020725143825:desc]
[0 $$4,0#96390100711032703541132217272105:end]
[{_}%EN-US
[s1;%- &]
[s2;:WithHotSpot`(const Image`&`,int`,int`):%- [_^Image^ Image]_[* WithHotSpot]([@(0.0.255) c
onst]_[_^Image^ Image][@(0.0.255) `&]_[*@3 m], [@(0.0.255) int]_[*@3 x1],
[@(0.0.255) int]_[*@3 y1])&]
[s3; [%-*@3 m] [%-*@3 x1] [%-*@3 y1].&]
[s4; &]
[s0; ]