Google APIs Client Library for C++
CredentialStoreFactory Class Reference

Creates a CredentialStore. More...

#include "client/auth/credential_store.h"

+ Inheritance diagram for CredentialStoreFactory:

List of all members.

Public Member Functions

 CredentialStoreFactory ()
 Standard constructor.
virtual ~CredentialStoreFactory ()
 Standard destructor.
void set_codec_factory (CodecFactory *codec_factory)
 Sets a factory for creating the codec to assign to new instances.
CodecFactorycodec_factory () const
 Returns the codec_factory for this factory.
virtual CredentialStoreNewCredentialStore (const string &client_id, util::Status *status) const =0
 Creates a new CredentialStore instance.

Detailed Description

Creates a CredentialStore.

Implements a Factory Pattern to create a credential store. This is used to inject a credential store where lazy initialization might be required.

CredentialStore class instances are scoped to an individual client_id.


Constructor & Destructor Documentation

Standard constructor.

virtual ~CredentialStoreFactory ( ) [virtual]

Standard destructor.


Member Function Documentation

CodecFactory* codec_factory ( ) const [inline]

Returns the codec_factory for this factory.

virtual CredentialStore* NewCredentialStore ( const string &  client_id,
util::Status status 
) const [pure virtual]

Creates a new CredentialStore instance.

Parameters:
[in]client_idThe client ID to scope the store to.
[out]statusThe reason for failrue if NULL is returned.
Returns:
new store instance on success or NULL on failure.

Implemented in FileCredentialStoreFactory.

void set_codec_factory ( CodecFactory codec_factory)

Sets a factory for creating the codec to assign to new instances.

Parameters:
codec_factoryNULL means do not set a codec on new instances. otherwise the factory is used to create new codec instances to bind to new store instances created by this factory.

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