2
* Copyright © 2016 Canonical Ltd.
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.
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.
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/>.
16
* Authored by: Gary Wang <gary.wang@canonical.com>
19
#include <boost/algorithm/string.hpp>
20
#include <mcloud/api/clouditem.h>
22
#include <json/json.h>
24
using namespace mcloud::api;
27
CloudItem::CloudItem(const json::Value &data) : {
30
const string & CloudItem::id() const {
34
const string & CloudItem::name() const {
38
const string & CloudItem::suffix() const {
42
const Resource::Type & CloudItem::content_type() const {
46
const string & CloudItem::content_size() const {
50
const std::time_t & CloudItem::updatedate() const {
54
const string & CloudItem::thumbnail() const {
55
return thumbnail_url_;
58
const string & CloudItem::big_thumbnail() const {
59
return big_thumbnail_url_;
62
const string & CloudItem::parent_catalog_Id() const {
63
return parent_catalog_id_;
66
bool CloudItem::is_shared() const {
70
Resource::Kind CloudItem::kind() const {
71
return Resource::Kind::cloud_content;