Skip to content

Commit

Permalink
fix all warnings/errors for doxygen documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtazz committed Jan 31, 2016
1 parent cf51909 commit 1d70443
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 26 deletions.
58 changes: 43 additions & 15 deletions include/restclient-cpp/connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,36 +31,64 @@ class Connection {
* @struct RequestInfo
* @brief holds some diagnostics information
* about a request
* @var RequestInfo::totalTime
* Member 'totalTime' contains the total time of the last request in
* seconds Total time of previous transfer. See CURLINFO_TOTAL_TIME
* @var RequestInfo::nameLookupTime
* Member 'nameLookupTime' contains the time spent in DNS lookup in
* seconds Time from start until name resolving completed. See
* CURLINFO_NAMELOOKUP_TIME
* @var RequestInfo::connectTime
* Member 'connectTime' contains the time it took until Time from start
* until remote host or proxy completed. See CURLINFO_CONNECT_TIME
* @var RequestInfo::appConnectTime
* Member 'appConnectTime' contains the time from start until SSL/SSH
* handshake completed. See CURLINFO_APPCONNECT_TIME
* @var RequestInfo::preTransferTime
* Member 'preTransferTime' contains the total time from start until
* just before the transfer begins. See CURLINFO_PRETRANSFER_TIME
* @var RequestInfo::startTransferTime
* Member 'startTransferTime' contains the total time from start until
* just when the first byte is received. See CURLINFO_STARTTRANSFER_TIME
* @var RequestInfo::redirectTime
* Member 'redirectTime' contains the total time taken for all redirect
* steps before the final transfer. See CURLINFO_REDIRECT_TIME
* @var RequestInfo::redirectCount
* Member 'redirectCount' contains the number of redirects followed. See
* CURLINFO_REDIRECT_COUNT
*/
typedef struct {
// total time of the last request in seconds Total time of previous
// transfer. See CURLINFO_TOTAL_TIME
double totalTime;
// time spent in DNS lookup in seconds Time from start until name
// resolving completed. See CURLINFO_NAMELOOKUP_TIME
double nameLookupTime;
// time it took until Time from start until remote host or proxy
// completed. See CURLINFO_CONNECT_TIME
double connectTime;
// Time from start until SSL/SSH handshake completed. See
// CURLINFO_APPCONNECT_TIME
double appConnectTime;
// Time from start until just before the transfer begins. See
// CURLINFO_PRETRANSFER_TIME
double preTransferTime;
// Time from start until just when the first byte is received. See
// CURLINFO_STARTTRANSFER_TIME
double startTransferTime;
// Time taken for all redirect steps before the final transfer. See
// CURLINFO_REDIRECT_TIME
double redirectTime;
// number of redirects followed. See CURLINFO_REDIRECT_COUNT
int redirectCount;
} RequestInfo;
/**
* @struct Info
* @brief holds some diagnostics information
* about the connection object it came from
* @var Info::baseUrl
* Member 'baseUrl' contains the base URL for the connection object
* @var Info::headers
* Member 'headers' contains the HeaderFields map
* @var Info::timeout
* Member 'timeout' contains the configured timeout
* @var Info::followRedirects
* Member 'followRedirects' contains whether or not to follow redirects
* @var Info::basicAuth
* Member 'basicAuth' contains information about basic auth
* @var basicAuth::username
* Member 'username' contains the basic auth username
* @var basicAuth::password
* Member 'password' contains the basic auth password
* @var Info::customUserAgent
* Member 'customUserAgent' contains the custom user agent
* @var Info::lastRequest
* Member 'lastRequest' contains metrics about the last request
*/
typedef struct {
std::string baseUrl;
Expand Down
6 changes: 3 additions & 3 deletions include/restclient-cpp/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ namespace RestClient {
*/
namespace Helpers {

/** @struct upload_object
/** @struct UploadObject
* @brief This structure represents the payload to upload on POST
* requests
* @var upload_object::data
* @var UploadObject::data
* Member 'data' contains the data to upload
* @var upload_object::length
* @var UploadObject::length
* Member 'length' contains the length of the data to upload
*/
typedef struct {
Expand Down
8 changes: 4 additions & 4 deletions include/restclient-cpp/restclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ namespace RestClient {
*/
typedef std::map<std::string, std::string> HeaderFields;

/** @struct response
/** @struct Response
* @brief This structure represents the HTTP response data
* @var response::code
* @var Response::code
* Member 'code' contains the HTTP response code
* @var response::body
* @var Response::body
* Member 'body' contains the HTTP response body
* @var response::headers
* @var Response::headers
* Member 'headers' contains the HTTP response headers
*/
typedef struct {
Expand Down
10 changes: 7 additions & 3 deletions source/connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
#include "restclient-cpp/helpers.h"
#include "restclient-cpp/version.h"

/**
* @brief constructor for the Connection object
*
* @param baseUrl - base URL for the connection to use
*
*/
RestClient::Connection::Connection(const std::string baseUrl)
: lastRequest(), headerFields() {
this->curlHandle = curl_easy_init();
Expand Down Expand Up @@ -128,7 +134,7 @@ RestClient::Connection::GetUserAgent() {
/**
* @brief set timeout for connection
*
* @param timeout in seconds
* @param seconds - timeout in seconds
*
*/
void
Expand Down Expand Up @@ -270,7 +276,6 @@ RestClient::Connection::get(const std::string& url) {
* @brief HTTP POST method
*
* @param url to query
* @param ctype content type as string
* @param data HTTP POST body
*
* @return response struct
Expand All @@ -290,7 +295,6 @@ RestClient::Connection::post(const std::string& url,
* @brief HTTP PUT method
*
* @param url to query
* @param ctype content type as string
* @param data HTTP PUT body
*
* @return response struct
Expand Down
2 changes: 1 addition & 1 deletion source/helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ size_t RestClient::Helpers::header_callback(void *data, size_t size,
/**
* @brief read callback function for libcurl
*
* @param pointer of max size (size*nmemb) to write data to
* @param data pointer of max size (size*nmemb) to write data to
* @param size size parameter
* @param nmemb memblock parameter
* @param userdata pointer to user data to read data from
Expand Down

0 comments on commit 1d70443

Please sign in to comment.