Google APIs Client Library for C++
HttpTransportLayerConfig Class Reference

Specifies the implementation components for the TransportLayer. More...

#include "client/transport/http_transport.h"

List of all members.

Public Member Functions

 HttpTransportLayerConfig ()
 Standard constructor does not bind a default HttpTransportFactory.
virtual ~HttpTransportLayerConfig ()
 Standard destructor.
void ResetDefaultTransportFactory (HttpTransportFactory *factory)
 Sets the default transport factory.
HttpTransportFactorydefault_transport_factory () const
 Returns the default transport factory, if one was set.
const HttpTransportOptionsdefault_transport_options () const
 Returns the default HttpTransport options for this configuration.
HttpTransportOptionsmutable_default_transport_options ()
 Returns a modifiable instance for changing the default HttpTransport options.
HttpTransportNewDefaultTransport (util::Status *status) const
 Returns a new transport using the default transport factory with the default user agent set.
HttpTransportNewDefaultTransportOrDie () const
 Create a new transport or terminate the program on failure.
void ResetDefaultErrorHandler (HttpTransportErrorHandler *error_handler)
 Resets the error handler used by the default options, passing ownership.
void ResetDefaultExecutor (thread::Executor *executor)
 Resets the executor used by the default options, passing ownership.

Detailed Description

Specifies the implementation components for the TransportLayer.


Constructor & Destructor Documentation

Standard constructor does not bind a default HttpTransportFactory.

The default configuration does not bind a specific transport factory so you must add one yourself. For the application name and SSL certificate validation see the static methods that determine the default values for more details.

See also:
DetermineDefaultCaCertsPath();
DetermineDefaultApplicationName();
virtual ~HttpTransportLayerConfig ( ) [virtual]

Standard destructor.


Member Function Documentation

Returns the default transport factory, if one was set.

Warning:
There is no default transport factory. You must explicitly set it.
Returns:
The configuration maintains ownership. NULL is returned if there is no factory set.

Returns the default HttpTransport options for this configuration.

The returned options can be copied and modified for each transport independently.

Returns a modifiable instance for changing the default HttpTransport options.

Returns a new transport using the default transport factory with the default user agent set.

Parameters:
[out]statusReason for failure if NULL is returned
Returns:
New transport instance created by the default transport factory.

This method requires that ResetDefaultTransportFactory was called or it will return NULL and set an error status.

See also:
ResetDefaultTransportFactory

Create a new transport or terminate the program on failure.

Similar to NewDefaultTransport but will CHECK-fail rather than returning NULL if there is not default transport factory to use.

See also:
ResetDefaultTransportFactory

Resets the error handler used by the default options, passing ownership.

The HttpTransportOptions does not own its error handler. This method changes the error handler in the default transport options but passes ownership of that handler to this configuration. Otherwise the caller would need to take responsibility for it if it set the handler directly in the mutable_default_transport_options.

This method will destroy any previous default error handler that was owned by this configuration. If there were other HttpTransportOptions previously using it then they will become corrupted with an invalid pointer to the old (deleted) handler.

Parameters:
[in]error_handlerOwnership is passed to the configuration. NULL will unset the default error handler in the options as well.
void ResetDefaultExecutor ( thread::Executor executor)

Resets the executor used by the default options, passing ownership.

The HttpTransportOptions does not own its executor. This method changes the executor in the default transport options but passes ownership of that handler to this configuration. Otherwise the caller would need to take responsibility for it if it set the handler directly in the mutable_default_transport_options.

This method will destroy any previous default executor that was owned by this configuration. If there were other HttpTransportOptions previously using it then they will become corrupted with an invalid pointer to the old (deleted) handler.

Parameters:
[in]executorOwnership is passed to the configuration. NULL will unset the default executor in the options as well.

Sets the default transport factory.

Parameters:
[in]factoryOwnership is passed to the configuration. NULL will unset the default factory.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines