ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/ermyth/modules/rpc/include/json/rpc.h
Revision: 1.3
Committed: Wed Sep 5 11:23:15 2007 UTC (19 years, 1 month ago) by pippijn
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +2 -2 lines
Log Message:
removed GPLed code and put license back to BSD

File Contents

# User Rev Content
1 pippijn 1.2 /*
2     * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team
3 pippijn 1.3 * Rights to this code are as documented in doc/pod/license.pod.
4 pippijn 1.2 *
5     * JSON-RPC for Ermyth
6     *
7 pippijn 1.3 * $Id: rpc.h,v 1.2 2007-08-28 17:08:12 pippijn Exp $
8 pippijn 1.2 */
9    
10 pippijn 1.1 #ifndef JSONRPC_H
11     #define JSONRPC_H
12    
13     /*
14     * JSON-RPC implementation in C++
15     *
16     * See the rpctest example for reference.
17     */
18    
19     #include <stddef.h>
20    
21     #include "json/json.h"
22    
23     namespace json
24     {
25     struct jsonrpc_event
26     {
27     long id;
28     char *type;
29     time_t tm;
30     Value data;
31     };
32    
33     typedef void (*jsonrpc_method) (void *userdata, Value &request, Value &response);
34 pippijn 1.2 extern void jsonrpc_add_method (char const * const name, jsonrpc_method method);
35 pippijn 1.1 extern void jsonrpc_service (void *userdata, Value &request, Value &response);
36     extern void jsonrpc_process (void *userdata, char *response, char const *request, size_t response_len);
37     }
38    
39     #endif