#include <list>
#include <map>
#include <stdint.h>
#include <string>
#include <boost/iostreams/concepts.hpp>
#include <boost/iostreams/stream.hpp>
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
#include "json/json_spirit_reader_template.h"
#include "json/json_spirit_utils.h"
#include "json/json_spirit_writer_template.h"
Go to the source code of this file.
|
enum | HTTPStatusCode {
HTTP_OK = 200,
HTTP_BAD_REQUEST = 400,
HTTP_UNAUTHORIZED = 401,
HTTP_FORBIDDEN = 403,
HTTP_NOT_FOUND = 404,
HTTP_INTERNAL_SERVER_ERROR = 500
} |
|
enum | RPCErrorCode {
RPC_INVALID_REQUEST = -32600,
RPC_METHOD_NOT_FOUND = -32601,
RPC_INVALID_PARAMS = -32602,
RPC_INTERNAL_ERROR = -32603,
RPC_PARSE_ERROR = -32700,
RPC_MISC_ERROR = -1,
RPC_FORBIDDEN_BY_SAFE_MODE = -2,
RPC_TYPE_ERROR = -3,
RPC_INVALID_ADDRESS_OR_KEY = -5,
RPC_OUT_OF_MEMORY = -7,
RPC_INVALID_PARAMETER = -8,
RPC_DATABASE_ERROR = -20,
RPC_DESERIALIZATION_ERROR = -22,
RPC_TRANSACTION_ERROR = -25,
RPC_TRANSACTION_REJECTED = -26,
RPC_TRANSACTION_ALREADY_IN_CHAIN = -27,
RPC_CLIENT_NOT_CONNECTED = -9,
RPC_CLIENT_IN_INITIAL_DOWNLOAD = -10,
RPC_CLIENT_NODE_ALREADY_ADDED = -23,
RPC_CLIENT_NODE_NOT_ADDED = -24,
RPC_WALLET_ERROR = -4,
RPC_WALLET_INSUFFICIENT_FUNDS = -6,
RPC_WALLET_INVALID_ACCOUNT_NAME = -11,
RPC_WALLET_KEYPOOL_RAN_OUT = -12,
RPC_WALLET_UNLOCK_NEEDED = -13,
RPC_WALLET_PASSPHRASE_INCORRECT = -14,
RPC_WALLET_WRONG_ENC_STATE = -15,
RPC_WALLET_ENCRYPTION_FAILED = -16,
RPC_WALLET_ALREADY_UNLOCKED = -17
} |
|
|
std::string | HTTPPost (const std::string &strMsg, const std::map< std::string, std::string > &mapRequestHeaders) |
|
std::string | HTTPReply (int nStatus, const std::string &strMsg, bool keepalive) |
|
bool | ReadHTTPRequestLine (std::basic_istream< char > &stream, int &proto, std::string &http_method, std::string &http_uri) |
|
int | ReadHTTPStatus (std::basic_istream< char > &stream, int &proto) |
|
int | ReadHTTPHeaders (std::basic_istream< char > &stream, std::map< std::string, std::string > &mapHeadersRet) |
|
int | ReadHTTPMessage (std::basic_istream< char > &stream, std::map< std::string, std::string > &mapHeadersRet, std::string &strMessageRet, int nProto) |
|
std::string | JSONRPCRequest (const std::string &strMethod, const json_spirit::Array ¶ms, const json_spirit::Value &id) |
|
json_spirit::Object | JSONRPCReplyObj (const json_spirit::Value &result, const json_spirit::Value &error, const json_spirit::Value &id) |
|
std::string | JSONRPCReply (const json_spirit::Value &result, const json_spirit::Value &error, const json_spirit::Value &id) |
|
json_spirit::Object | JSONRPCError (int code, const std::string &message) |
|
Enumerator |
---|
HTTP_OK |
|
HTTP_BAD_REQUEST |
|
HTTP_UNAUTHORIZED |
|
HTTP_FORBIDDEN |
|
HTTP_NOT_FOUND |
|
HTTP_INTERNAL_SERVER_ERROR |
|
Definition at line 24 of file rpcprotocol.h.
Enumerator |
---|
RPC_INVALID_REQUEST |
|
RPC_METHOD_NOT_FOUND |
|
RPC_INVALID_PARAMS |
|
RPC_INTERNAL_ERROR |
|
RPC_PARSE_ERROR |
|
RPC_MISC_ERROR |
|
RPC_FORBIDDEN_BY_SAFE_MODE |
|
RPC_TYPE_ERROR |
|
RPC_INVALID_ADDRESS_OR_KEY |
|
RPC_OUT_OF_MEMORY |
|
RPC_INVALID_PARAMETER |
|
RPC_DATABASE_ERROR |
|
RPC_DESERIALIZATION_ERROR |
|
RPC_TRANSACTION_ERROR |
|
RPC_TRANSACTION_REJECTED |
|
RPC_TRANSACTION_ALREADY_IN_CHAIN |
|
RPC_CLIENT_NOT_CONNECTED |
|
RPC_CLIENT_IN_INITIAL_DOWNLOAD |
|
RPC_CLIENT_NODE_ALREADY_ADDED |
|
RPC_CLIENT_NODE_NOT_ADDED |
|
RPC_WALLET_ERROR |
|
RPC_WALLET_INSUFFICIENT_FUNDS |
|
RPC_WALLET_INVALID_ACCOUNT_NAME |
|
RPC_WALLET_KEYPOOL_RAN_OUT |
|
RPC_WALLET_UNLOCK_NEEDED |
|
RPC_WALLET_PASSPHRASE_INCORRECT |
|
RPC_WALLET_WRONG_ENC_STATE |
|
RPC_WALLET_ENCRYPTION_FAILED |
|
RPC_WALLET_ALREADY_UNLOCKED |
|
Definition at line 35 of file rpcprotocol.h.
std::string HTTPPost |
( |
const std::string & |
strMsg, |
|
|
const std::map< std::string, std::string > & |
mapRequestHeaders |
|
) |
| |
std::string HTTPReply |
( |
int |
nStatus, |
|
|
const std::string & |
strMsg, |
|
|
bool |
keepalive |
|
) |
| |
json_spirit::Object JSONRPCError |
( |
int |
code, |
|
|
const std::string & |
message |
|
) |
| |
std::string JSONRPCReply |
( |
const json_spirit::Value & |
result, |
|
|
const json_spirit::Value & |
error, |
|
|
const json_spirit::Value & |
id |
|
) |
| |
json_spirit::Object JSONRPCReplyObj |
( |
const json_spirit::Value & |
result, |
|
|
const json_spirit::Value & |
error, |
|
|
const json_spirit::Value & |
id |
|
) |
| |
std::string JSONRPCRequest |
( |
const std::string & |
strMethod, |
|
|
const json_spirit::Array & |
params, |
|
|
const json_spirit::Value & |
id |
|
) |
| |
int ReadHTTPHeaders |
( |
std::basic_istream< char > & |
stream, |
|
|
std::map< std::string, std::string > & |
mapHeadersRet |
|
) |
| |
int ReadHTTPMessage |
( |
std::basic_istream< char > & |
stream, |
|
|
std::map< std::string, std::string > & |
mapHeadersRet, |
|
|
std::string & |
strMessageRet, |
|
|
int |
nProto |
|
) |
| |
bool ReadHTTPRequestLine |
( |
std::basic_istream< char > & |
stream, |
|
|
int & |
proto, |
|
|
std::string & |
http_method, |
|
|
std::string & |
http_uri |
|
) |
| |
int ReadHTTPStatus |
( |
std::basic_istream< char > & |
stream, |
|
|
int & |
proto |
|
) |
| |