Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/protocol.h
// Copyright (c) 2010 Satoshi Nakamoto | // Copyright (c) 2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_RPCPROTOCOL_H | #ifndef BITCOIN_RPCPROTOCOL_H | ||||
#define BITCOIN_RPCPROTOCOL_H | #define BITCOIN_RPCPROTOCOL_H | ||||
#include <boost/filesystem.hpp> | #include "fs.h" | ||||
#include <cstdint> | #include <cstdint> | ||||
#include <list> | #include <list> | ||||
#include <map> | #include <map> | ||||
#include <string> | #include <string> | ||||
#include <univalue.h> | #include <univalue.h> | ||||
//! HTTP status codes | //! HTTP status codes | ||||
▲ Show 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | UniValue JSONRPCRequestObj(const std::string &strMethod, const UniValue ¶ms, | ||||
const UniValue &id); | const UniValue &id); | ||||
UniValue JSONRPCReplyObj(const UniValue &result, const UniValue &error, | UniValue JSONRPCReplyObj(const UniValue &result, const UniValue &error, | ||||
const UniValue &id); | const UniValue &id); | ||||
std::string JSONRPCReply(const UniValue &result, const UniValue &error, | std::string JSONRPCReply(const UniValue &result, const UniValue &error, | ||||
const UniValue &id); | const UniValue &id); | ||||
UniValue JSONRPCError(int code, const std::string &message); | UniValue JSONRPCError(int code, const std::string &message); | ||||
/** Get name of RPC authentication cookie file */ | /** Get name of RPC authentication cookie file */ | ||||
boost::filesystem::path GetAuthCookieFile(); | fs::path GetAuthCookieFile(); | ||||
/** Generate a new RPC authentication cookie and write it to disk */ | /** Generate a new RPC authentication cookie and write it to disk */ | ||||
bool GenerateAuthCookie(std::string *cookie_out); | bool GenerateAuthCookie(std::string *cookie_out); | ||||
/** Read the RPC authentication cookie from disk */ | /** Read the RPC authentication cookie from disk */ | ||||
bool GetAuthCookie(std::string *cookie_out); | bool GetAuthCookie(std::string *cookie_out); | ||||
/** Delete RPC authentication cookie from disk */ | /** Delete RPC authentication cookie from disk */ | ||||
void DeleteAuthCookie(); | void DeleteAuthCookie(); | ||||
#endif // BITCOIN_RPCPROTOCOL_H | #endif // BITCOIN_RPCPROTOCOL_H |