mcloud
1.0.0
MCloud API library for cmcc cloud service
cloudcontent.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2016 Canonical Ltd.
3
*
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License version 3,
6
* as published by the Free Software Foundation.
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
12
*
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* Authored by: Gary Wang <gary.wang@canonical.com>
17
*/
18
19
#ifndef MCLOUD_API_CLOUDCONTENT_H_
20
#define MCLOUD_API_CLOUDCONTENT_H_
21
22
#include <
mcloud/api/cloudresource.h
>
23
#include <
mcloud/api/visibility.h
>
24
25
namespace
tinyxml2
{
26
class
XMLElement;
27
}
28
29
namespace
mcloud
{
30
namespace
api {
31
38
class
MCLOUD_API_DLL_PUBLIC
CloudContent
:
public
CloudResource
{
39
public
:
40
typedef
std::shared_ptr<CloudContent>
Ptr
;
41
45
enum class
Type
{
46
All,
47
Image,
48
Audio,
49
Video,
50
Other,
51
Doc,
52
Speadsheet,
53
PPT
54
};
55
56
virtual
~
CloudContent
() =
default
;
57
61
const
std::string &id()
const override
;
62
66
const
std::string &name()
const override
;
67
71
const
std::time_t &created_date()
const override
;
72
76
const
std::time_t &updated_date()
const override
;
77
81
const
std::string &parent_catalog_id()
const override
;
82
86
const
std::string &etag()
const override
;
87
91
const
std::string &owner()
const override
;
92
96
CloudResource::Property
property()
const override
;
97
101
const
std::string &suffix()
const
;
102
106
Type
type()
const
;
107
111
int64_t content_size()
const
;
112
116
const
std::string &description()
const
;
117
122
const
std::string &thumbnail_url()
const
;
123
128
const
std::string &big_thumbnail_url()
const
;
129
134
const
std::string &present_url()
const
;
135
136
private
:
137
CloudContent
(
const
tinyxml2::XMLElement *root);
138
139
friend
class
ClientPriv;
140
141
class
Priv;
142
std::shared_ptr<Priv> p;
143
};
144
145
}
146
}
147
148
#endif // MCLOUD_API_CLOUDCONTENT_H_
mcloud::api::CloudResource
CloudResource is an abstract object that provides common interfaces for CloudContent and CloudFolder...
Definition:
cloudresource.h:34
cloudresource.h
mcloud::api::CloudResource::Property
Property
Definition:
cloudresource.h:38
tinyxml2
Definition:
cloudcontent.h:25
visibility.h
mcloud::api::CloudContent::Ptr
std::shared_ptr< CloudContent > Ptr
Definition:
cloudcontent.h:40
mcloud::api::CloudContent
CloudContent represents a content object on mcloud. the supported content type can be found...
Definition:
cloudcontent.h:38
mcloud
Definition:
client.h:37
mcloud::api::CloudContent::Type
Type
All Content type .
Definition:
cloudcontent.h:45
MCLOUD_API_DLL_PUBLIC
#define MCLOUD_API_DLL_PUBLIC
Definition:
visibility.h:26
include
mcloud
api
cloudcontent.h
Generated on Mon Nov 7 2016 02:02:55 for mcloud by
1.8.12