1 | /************************************************************************* |
2 | * libjson-rpc-cpp |
3 | ************************************************************************* |
4 | * @file batchcall.h |
5 | * @date 15.10.2013 |
6 | * @author Peter Spiess-Knafl <dev@spiessknafl.at> |
7 | * @license See attached LICENSE.txt |
8 | ************************************************************************/ |
9 | |
10 | #ifndef JSONRPC_CPP_BATCHCALL_H |
11 | #define JSONRPC_CPP_BATCHCALL_H |
12 | |
13 | #include <jsonrpccpp/common/jsonparser.h> |
14 | |
15 | namespace jsonrpc { |
16 | class BatchCall { |
17 | public: |
18 | BatchCall(); |
19 | |
20 | /** |
21 | * @brief addCall |
22 | * @param methodname |
23 | * @param params |
24 | * @param isNotification |
25 | * @return the id of the geneared request inside the batchcall |
26 | */ |
27 | int addCall(const std::string &methodname, const Json::Value ¶ms, bool isNotification = false); |
28 | std::string toString(bool fast = true) const; |
29 | |
30 | private: |
31 | Json::Value result; |
32 | int id; |
33 | }; |
34 | } // namespace jsonrpc |
35 | |
36 | #endif // JSONRPC_CPP_BATCHCALL_H |
37 | |