mcloud  1.0.0
MCloud API library for cmcc cloud service
cloudfolder.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_CLOUDFOLDER_H_
20 #define MCLOUD_API_CLOUDFOLDER_H_
21 
23 #include <mcloud/api/visibility.h>
24 
25 namespace tinyxml2 {
26  class XMLElement;
27 }
28 
29 namespace mcloud {
30 namespace api {
31 
38 public:
39  enum class Type {
40  Normal = 0,
41  Pictures,
42  Music,
43  Videos,
44  Message,
45  Docs,
46  App,
47  Sync,
48  };
49 
50  typedef std::shared_ptr<CloudFolder> Ptr;
51 
52  virtual ~CloudFolder() = default;
53 
57  const std::string &id() const override;
58 
62  const std::string &name() const override;
63 
67  const std::time_t &created_date() const override;
68 
72  const std::time_t &updated_date() const override;
73 
77  const std::string &parent_catalog_id() const override;
78 
82  const std::string &etag() const override;
83 
87  const std::string &owner() const override;
88 
93  CloudResource::Property property() const override;
94 
99  Type folder_type() const;
100 
104  const std::string &folder_path() const;
105 
106 private:
107  CloudFolder(const tinyxml2::XMLElement *root);
108 
109  friend class ClientPriv;
110 
111  class Priv;
112  std::shared_ptr<Priv> p_;
113 };
114 
115 }
116 }
117 
118 #endif // MCLOUD_API_CLOUDFOLDER_H_
CloudResource is an abstract object that provides common interfaces for CloudContent and CloudFolder...
Definition: cloudresource.h:34
std::shared_ptr< CloudFolder > Ptr
Definition: cloudfolder.h:50
Definition: client.h:37
CloudFolder represents a folder object on mcloud.
Definition: cloudfolder.h:37
#define MCLOUD_API_DLL_PUBLIC
Definition: visibility.h:26