mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
adds documentation and removes unused parameters references #376
This commit is contained in:
@@ -53,7 +53,15 @@ class disabled {
|
||||
typedef std::pair<lib::error_code,std::string> err_str_pair;
|
||||
|
||||
public:
|
||||
err_str_pair negotiate(http::attribute_list const & attributes) {
|
||||
/// Negotiate extension
|
||||
/**
|
||||
* The disabled extension always fails the negotiation with a disabled
|
||||
* error.
|
||||
*
|
||||
* @param offer Attribute from client's offer
|
||||
* @return Status code and value to return to remote endpoint
|
||||
*/
|
||||
err_str_pair negotiate(http::attribute_list const &) {
|
||||
return make_pair(make_error_code(error::disabled),std::string());
|
||||
}
|
||||
|
||||
@@ -69,17 +77,24 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
lib::error_code compress(std::string const & in, std::string & out) {
|
||||
/// Compress bytes
|
||||
/**
|
||||
* @param [in] in String to compress
|
||||
* @param [out] out String to append compressed bytes to
|
||||
* @return Error or status code
|
||||
*/
|
||||
lib::error_code compress(std::string const &, std::string &) {
|
||||
return make_error_code(error::disabled);
|
||||
}
|
||||
|
||||
lib::error_code decompress(uint8_t const * buf, size_t len,
|
||||
std::string & out)
|
||||
{
|
||||
return make_error_code(error::disabled);
|
||||
}
|
||||
|
||||
lib::error_code decompress(std::string const & in, std::string & out) {
|
||||
/// Decompress bytes
|
||||
/**
|
||||
* @param buf Byte buffer to decompress
|
||||
* @param len Length of buf
|
||||
* @param out String to append decompressed bytes to
|
||||
* @return Error or status code
|
||||
*/
|
||||
lib::error_code decompress(uint8_t const *, size_t, std::string &) {
|
||||
return make_error_code(error::disabled);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -77,7 +77,7 @@ public:
|
||||
*
|
||||
* @return true if the message was successfully recycled, false otherwse.
|
||||
*/
|
||||
bool recycle(message * msg) {
|
||||
bool recycle(message *) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -323,11 +323,11 @@ public:
|
||||
*
|
||||
* TODO: candidate for protected status
|
||||
*
|
||||
* @param t Pointer to the timer in question
|
||||
* @param post_timer Pointer to the timer in question
|
||||
* @param callback The function to call back
|
||||
* @param ec The status code
|
||||
*/
|
||||
void handle_timer(timer_ptr t, timer_handler callback,
|
||||
void handle_timer(timer_ptr, timer_handler callback,
|
||||
boost::system::error_code const & ec)
|
||||
{
|
||||
if (ec) {
|
||||
@@ -502,7 +502,16 @@ protected:
|
||||
);
|
||||
}
|
||||
|
||||
void handle_post_init_timeout(timer_ptr post_timer, init_handler callback,
|
||||
/// Post init timeout callback
|
||||
/**
|
||||
* The timer pointer is included to ensure the timer isn't destroyed until
|
||||
* after it has expired.
|
||||
*
|
||||
* @param post_timer Pointer to the timer in question
|
||||
* @param callback The function to call back
|
||||
* @param ec The status code
|
||||
*/
|
||||
void handle_post_init_timeout(timer_ptr, init_handler callback,
|
||||
lib::error_code const & ec)
|
||||
{
|
||||
lib::error_code ret_ec;
|
||||
@@ -529,6 +538,15 @@ protected:
|
||||
callback(ret_ec);
|
||||
}
|
||||
|
||||
/// Post init timeout callback
|
||||
/**
|
||||
* The timer pointer is included to ensure the timer isn't destroyed until
|
||||
* after it has expired.
|
||||
*
|
||||
* @param post_timer Pointer to the timer in question
|
||||
* @param callback The function to call back
|
||||
* @param ec The status code
|
||||
*/
|
||||
void handle_post_init(timer_ptr post_timer, init_handler callback,
|
||||
lib::error_code const & ec)
|
||||
{
|
||||
@@ -693,8 +711,14 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
/// Proxy read callback
|
||||
/**
|
||||
* @param init_handler The function to call back
|
||||
* @param ec The status code
|
||||
* @param bytes_transferred The number of bytes read
|
||||
*/
|
||||
void handle_proxy_read(init_handler callback,
|
||||
boost::system::error_code const & ec, size_t bytes_transferred)
|
||||
boost::system::error_code const & ec, size_t)
|
||||
{
|
||||
if (m_alog.static_test(log::alevel::devel)) {
|
||||
m_alog.write(log::alevel::devel,
|
||||
@@ -901,9 +925,12 @@ protected:
|
||||
);
|
||||
}
|
||||
|
||||
void handle_async_write(boost::system::error_code const & ec,
|
||||
size_t bytes_transferred)
|
||||
{
|
||||
/// Async write callback
|
||||
/**
|
||||
* @param ec The status code
|
||||
* @param bytes_transferred The number of bytes read
|
||||
*/
|
||||
void handle_async_write(boost::system::error_code const & ec, size_t) {
|
||||
m_bufs.clear();
|
||||
lib::error_code tec;
|
||||
if (ec) {
|
||||
@@ -999,8 +1026,14 @@ protected:
|
||||
);
|
||||
}
|
||||
|
||||
void handle_async_shutdown_timeout(timer_ptr shutdown_timer, init_handler
|
||||
callback, lib::error_code const & ec)
|
||||
/// Async shutdown timeout handler
|
||||
/**
|
||||
* @param shutdown_timer A pointer to the timer to keep it in scope
|
||||
* @param callback The function to call back
|
||||
* @param ec The status code
|
||||
*/
|
||||
void handle_async_shutdown_timeout(timer_ptr, init_handler callback,
|
||||
lib::error_code const & ec)
|
||||
{
|
||||
lib::error_code ret_ec;
|
||||
|
||||
|
||||
@@ -304,7 +304,7 @@ public:
|
||||
* @return A handle that can be used to cancel the timer if it is no longer
|
||||
* needed.
|
||||
*/
|
||||
timer_ptr set_timer(long duration, timer_handler handler) {
|
||||
timer_ptr set_timer(long, timer_handler) {
|
||||
return timer_ptr();
|
||||
}
|
||||
protected:
|
||||
|
||||
@@ -140,7 +140,7 @@ protected:
|
||||
* @param u A URI pointer to the URI to connect to.
|
||||
* @param cb The function to call back with the results when complete.
|
||||
*/
|
||||
void async_connect(transport_con_ptr tcon, uri_ptr u, connect_handler cb) {
|
||||
void async_connect(transport_con_ptr, uri_ptr, connect_handler cb) {
|
||||
cb(lib::error_code());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user