Google APIs Client Library for C++
Platform Layer - General Programming Support

These are generic utility classes and functions within the Platform Layer. More...

Classes

class  DateTime
 Represents a date convertable among various standard date represenations including RFC 3339 used by JSON encodings. More...

Functions

util::error::Code ErrnoCodeToStatusEnum (int errno_code)
 Determine status error::Code to use from a standard Posix errno code.
util::Status StatusFromErrno (int errno_code, const StringPiece &msg="")
 Create a status from a standard Posix errno code.
util::error::Code HttpCodeToStatusEnum (int http_code)
 Determine status error::Code to use from a standard HTTP response status code.
const string HttpCodeToHttpErrorMessage (int http_code)
 Determine the standard HTTP error message for a given code.
util::Status StatusFromHttp (int http_code, const StringPiece &msg="")
 Create a status from a standard HTTP response status code.

Detailed Description

These are generic utility classes and functions within the Platform Layer.


Function Documentation

util::error::Code googleapis::client::ErrnoCodeToStatusEnum ( int  errno_code)

Determine status error::Code to use from a standard Posix errno code.

This is more a suggestion than a definitive mapping.

Parameters:
[in]errno_codeA posix errno.
Returns:
error code to use when creating a status for the Posix error.
const string googleapis::client::HttpCodeToHttpErrorMessage ( int  http_code)

Determine the standard HTTP error message for a given code.

Parameters:
[in]http_codeAn HTTP response status code.
Returns:
short capitalized error phrase.
util::error::Code googleapis::client::HttpCodeToStatusEnum ( int  http_code)

Determine status error::Code to use from a standard HTTP response status code.

This is more a suggestion than a definitive mapping.

Parameters:
[in]http_codeAn HTTP response status code.
Returns:
error code to use when creating a status for the HTTP status code.
util::Status googleapis::client::StatusFromErrno ( int  errno_code,
const StringPiece &  msg = "" 
)

Create a status from a standard Posix errno code.

Parameters:
[in]errno_codeA posix errno.
[in]msgA detailed message explanation can be empty to use a generic explanation based on the errno_code.
Returns:
The status returned will be ok for errno_code 0, otherwise, it will be some form of failure.
util::Status googleapis::client::StatusFromHttp ( int  http_code,
const StringPiece &  msg = "" 
)

Create a status from a standard HTTP response status code.

Parameters:
[in]http_codeAn HTTP status response code.
[in]msgA detailed message explanation can be empty to use a generic explanation based on the http_code.
Returns:
The status returned will be ok for 2xx series responses, otherwise, it will be some form of failure.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines