Google APIs Client Library for C++
MediaUploadSpec Class Reference

Specifie the media upload interface for an endpoint. More...

#include "client/service/media_uploader.h"

List of all members.

Public Member Functions

 MediaUploadSpec ()
 Constructs a default spec for hand-populating.
 MediaUploadSpec (const StringPiece &protocol, const StringPiece &path_template, bool multipart)
 Standard constructor for this spec information.
virtual ~MediaUploadSpec ()
 Standard destructor.
const StringPiece & path_template () const
 Returns the path template for the specification.
void set_path_template (const StringPiece &path_template)
 Changes template path.
const StringPiece & protocol () const
 Returns a standard protocol name like "simple" or "resumable".
void set_protocol (const StringPiece &protocol)
 Changes the protocol used by this specification instance.
bool is_multipart () const
 Determine if multipart forms are supported by this specification or not.
void set_multipart (bool multipart)
 Use multipart upload.

Detailed Description

Specifie the media upload interface for an endpoint.

The MediaUploadSpec captures the information in the discovery document "MediaUpload/protocols" section for how to utilize a given protocol.

The spec is given to a MediaUploader in order to configure it for the current use case.

This class only uses StringPiece for storage so that it can be used to create instances as constant global or class variables.

See also:
MediaUploader

Constructor & Destructor Documentation

Constructs a default spec for hand-populating.

MediaUploadSpec ( const StringPiece &  protocol,
const StringPiece &  path_template,
bool  multipart 
)

Standard constructor for this spec information.

Parameters:
[in]protocolType type of media upload. "simple", "resuanble", "dirct"
[in]path_templateThe default path template to use for the upload if media upload were not actualy use.
[in]multipartTrue if multipart content types are supported.
virtual ~MediaUploadSpec ( ) [virtual]

Standard destructor.


Member Function Documentation

bool is_multipart ( ) const [inline]

Determine if multipart forms are supported by this specification or not.

Returns:
if can perform multipart uploads, false if not.
const StringPiece& path_template ( ) const [inline]

Returns the path template for the specification.

const StringPiece& protocol ( ) const [inline]

Returns a standard protocol name like "simple" or "resumable".

void set_multipart ( bool  multipart) [inline]

Use multipart upload.

void set_path_template ( const StringPiece &  path_template) [inline]

Changes template path.

void set_protocol ( const StringPiece &  protocol) [inline]

Changes the protocol used by this specification instance.


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