~ci-train-bot/mcloud/mcloud-ubuntu-artful-2884

« back to all changes in this revision

Viewing changes to include/mcloud/api/clouditem.h

  • Committer: Gary.Wang
  • Date: 2016-04-20 04:19:28 UTC
  • Revision ID: gary.wang@canonical.com-20160420041928-kdie1pmxxopre8qi
1.remove owner id filed for upload since it's cloud owner if it's empty
2.access token fetched work-flow in compliance with mcloud qml plugin(using refresh token)
3.throw except(domain error) when net error occurs during  http stream upload and download
4.add debian files

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2016 Canonical, Ltd.
3
 
 *
4
 
 * This library is free software; you can redistribute it and/or modify it under
5
 
 * the terms of version 3 of the GNU Lesser General Public License as published
6
 
 * by the Free Software Foundation.
7
 
 *
8
 
 * This library is distributed in the hope that it will be useful, but WITHOUT
9
 
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10
 
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
11
 
 * 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
 
 * Author: Gary Wang  <gary.wang@canonical.com>
17
 
 */
18
 
 
19
 
#ifndef MCLOUD_API_VIDEO_H_
20
 
#define MCLOUD_API_VIDEO_H_
21
 
 
22
 
#include <mcloud/api/resource.h>
23
 
 
24
 
#include <memory>
25
 
#include <string>
26
 
#include <ctime>
27
 
 
28
 
namespace Json {
29
 
class Value;
30
 
}
31
 
 
32
 
namespace mcloud {
33
 
namespace api {
34
 
 
35
 
class CloudItem: public Resource {
36
 
public:
37
 
    typedef std::shared_ptr<CloudItem> Ptr;
38
 
 
39
 
    Video(const Json::Value &data);
40
 
 
41
 
    virtual ~Video() = default;
42
 
 
43
 
    const std::string & id() const override;
44
 
 
45
 
    const std::string & name() const override;
46
 
 
47
 
    const std::string & suffix() const override;
48
 
 
49
 
    const Type content_type() const override;
50
 
 
51
 
    const int64_t content_size() const override;
52
 
 
53
 
    const std::time_t & updatedate() const override;
54
 
 
55
 
    const std::string & thumbnail_url() const override;
56
 
 
57
 
    const std::string & big_thumbnail_url() const override;
58
 
 
59
 
    const std::string & parent_catalog_id() const;
60
 
 
61
 
    bool is_shared() const;
62
 
 
63
 
    Kind kind() const override;
64
 
 
65
 
protected:
66
 
    std::string id_;
67
 
 
68
 
    std::string name_;
69
 
 
70
 
    std::string suffix_;
71
 
 
72
 
    Type        content_type_;
73
 
 
74
 
    int64_t     content_size_;
75
 
 
76
 
    std::time_t updatedate_;
77
 
 
78
 
    std::string thumbnail_url_;
79
 
 
80
 
    std::string big_thumbnail_url_;
81
 
 
82
 
    std::string parent_catalog_id_;
83
 
 
84
 
    bool        is_shared_;
85
 
 
86
 
};
87
 
 
88
 
}
89
 
}
90
 
 
91
 
#endif // YOUTUBE_API_VIDEO_H_