mcloud  1.0.0
MCloud API library for cmcc cloud service
mcloud::api::CloudContent Class Reference

CloudContent represents a content object on mcloud. the supported content type can be found. More...

#include <cloudcontent.h>

+ Inheritance diagram for mcloud::api::CloudContent:
+ Collaboration diagram for mcloud::api::CloudContent:

Public Types

enum  Type {
  Type::All,
  Type::Image,
  Type::Audio,
  Type::Video,
  Type::Other,
  Type::Doc,
  Type::Speadsheet,
  Type::PPT
}
 All Content type . More...
 
typedef std::shared_ptr< CloudContentPtr
 
- Public Types inherited from mcloud::api::CloudResource
enum  Property {
  Property::Content,
  Property::Folder
}
 
typedef std::shared_ptr< CloudResourcePtr
 

Public Member Functions

virtual ~CloudContent ()=default
 
const std::string & id () const override
 Returns a unique id of cloud content object. More...
 
const std::string & name () const override
 Returns the name of cloud content object. More...
 
const std::time_t & created_date () const override
 Returns the datetime when content was created. More...
 
const std::time_t & updated_date () const override
 Returns the datetime when content was updated. More...
 
const std::string & parent_catalog_id () const override
 Returns a unique parent folder id of cloud content object. More...
 
const std::string & etag () const override
 Returns etag of a content object. More...
 
const std::string & owner () const override
 Returns owner id of a content object. More...
 
CloudResource::Property property () const override
 Returns resource type of an object. More...
 
const std::string & suffix () const
 Returns extension of a content object. More...
 
Type type () const
 Returns content type of an object. More...
 
int64_t content_size () const
 Returns content size of an object in bytes. More...
 
const std::string & description () const
 Returns the description of a content object. More...
 
const std::string & thumbnail_url () const
 Returns thumbnail link of a content object. It will be empty if there is no such a field in response. More...
 
const std::string & big_thumbnail_url () const
 Returns big thumbnail link of a content object, It will be empty if there is no such a field in response. More...
 
const std::string & present_url () const
 Returns a external playable link of a media content object, It will be empty if there is no such a field in response. More...
 
- Public Member Functions inherited from mcloud::api::CloudResource
virtual ~CloudResource ()=default
 

Friends

class ClientPriv
 

Detailed Description

CloudContent represents a content object on mcloud. the supported content type can be found.

See also
CloudContent::Type

Definition at line 38 of file cloudcontent.h.

Member Typedef Documentation

typedef std::shared_ptr<CloudContent> mcloud::api::CloudContent::Ptr

Definition at line 40 of file cloudcontent.h.

Member Enumeration Documentation

All Content type .

Enumerator
All 

all kinds of content type

Image 

png, gif, jpg content

Audio 

mp3, ogg, wav content

Video 

mp4, avi, rmvb, mkv content

Other 

except explicit declared content type in this enum

Doc 

doc, dox content

Speadsheet 

xls, xlsx content

PPT 

ppt content

Definition at line 45 of file cloudcontent.h.

Constructor & Destructor Documentation

virtual mcloud::api::CloudContent::~CloudContent ( )
virtualdefault

Member Function Documentation

const std::string& mcloud::api::CloudContent::big_thumbnail_url ( ) const

Returns big thumbnail link of a content object, It will be empty if there is no such a field in response.

int64_t mcloud::api::CloudContent::content_size ( ) const

Returns content size of an object in bytes.

const std::time_t& mcloud::api::CloudContent::created_date ( ) const
overridevirtual

Returns the datetime when content was created.

Implements mcloud::api::CloudResource.

const std::string& mcloud::api::CloudContent::description ( ) const

Returns the description of a content object.

const std::string& mcloud::api::CloudContent::etag ( ) const
overridevirtual

Returns etag of a content object.

Implements mcloud::api::CloudResource.

const std::string& mcloud::api::CloudContent::id ( ) const
overridevirtual

Returns a unique id of cloud content object.

Implements mcloud::api::CloudResource.

const std::string& mcloud::api::CloudContent::name ( ) const
overridevirtual

Returns the name of cloud content object.

Implements mcloud::api::CloudResource.

const std::string& mcloud::api::CloudContent::owner ( ) const
overridevirtual

Returns owner id of a content object.

Implements mcloud::api::CloudResource.

const std::string& mcloud::api::CloudContent::parent_catalog_id ( ) const
overridevirtual

Returns a unique parent folder id of cloud content object.

Implements mcloud::api::CloudResource.

const std::string& mcloud::api::CloudContent::present_url ( ) const

Returns a external playable link of a media content object, It will be empty if there is no such a field in response.

CloudResource::Property mcloud::api::CloudContent::property ( ) const
overridevirtual

Returns resource type of an object.

Implements mcloud::api::CloudResource.

const std::string& mcloud::api::CloudContent::suffix ( ) const

Returns extension of a content object.

const std::string& mcloud::api::CloudContent::thumbnail_url ( ) const

Returns thumbnail link of a content object. It will be empty if there is no such a field in response.

Type mcloud::api::CloudContent::type ( ) const

Returns content type of an object.

const std::time_t& mcloud::api::CloudContent::updated_date ( ) const
overridevirtual

Returns the datetime when content was updated.

Implements mcloud::api::CloudResource.

Friends And Related Function Documentation

friend class ClientPriv
friend

Definition at line 139 of file cloudcontent.h.


The documentation for this class was generated from the following file: