| 1 | /************************************************************************* |
| 2 | * libjson-rpc-cpp |
| 3 | ************************************************************************* |
| 4 | * @file specification.h |
| 5 | * @date 30.04.2013 |
| 6 | * @author Peter Spiess-Knafl <dev@spiessknafl.at> |
| 7 | * @license See attached LICENSE.txt |
| 8 | ************************************************************************/ |
| 9 | |
| 10 | #ifndef JSONRPC_CPP_SPECIFICATION_H |
| 11 | #define JSONRPC_CPP_SPECIFICATION_H |
| 12 | |
| 13 | #define KEY_SPEC_PROCEDURE_NAME "name" |
| 14 | #define KEY_SPEC_PROCEDURE_METHOD "method" // legacy format -> use name now |
| 15 | #define KEY_SPEC_PROCEDURE_NOTIFICATION "notification" // legacy format -> use name now |
| 16 | #define KEY_SPEC_PROCEDURE_PARAMETERS "params" |
| 17 | #define KEY_SPEC_RETURN_TYPE "returns" |
| 18 | |
| 19 | namespace jsonrpc { |
| 20 | /** |
| 21 | * This enum describes whether a Procdeure is a notification procdeure or a method procdeure |
| 22 | * @see http://groups.google.com/group/json-rpc/web/json-rpc-2-0 |
| 23 | */ |
| 24 | typedef enum { RPC_METHOD, RPC_NOTIFICATION } procedure_t; |
| 25 | |
| 26 | /** |
| 27 | * This enum represents all processable json Types of this framework. |
| 28 | */ |
| 29 | enum jsontype_t { JSON_STRING = 1, JSON_BOOLEAN = 2, JSON_INTEGER = 3, JSON_REAL = 4, JSON_OBJECT = 5, JSON_ARRAY = 6, JSON_NUMERIC = 7 }; |
| 30 | } // namespace jsonrpc |
| 31 | |
| 32 | #endif // JSONRPC_CPP_SPECIFICATION_H |
| 33 | |