Google APIs Client Library for C++
|
Specifie the media upload interface for an endpoint. More...
#include "client/service/media_uploader.h"
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. |
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.
MediaUploadSpec | ( | ) |
Constructs a default spec for hand-populating.
MediaUploadSpec | ( | const StringPiece & | protocol, |
const StringPiece & | path_template, | ||
bool | multipart | ||
) |
Standard constructor for this spec information.
[in] | protocol | Type type of media upload. "simple", "resuanble", "dirct" |
[in] | path_template | The default path template to use for the upload if media upload were not actualy use. |
[in] | multipart | True if multipart content types are supported. |
virtual ~MediaUploadSpec | ( | ) | [virtual] |
Standard destructor.
bool is_multipart | ( | ) | const [inline] |
Determine if multipart forms are supported by this specification or 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.