mcloud  1.0.0
MCloud API library for cmcc cloud service
cloudresource.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_CLOUDRESOURCE_H_
20 #define MCLOUD_API_CLOUDRESOURCE_H_
21 
22 #include <memory>
23 #include <string>
24 #include <ctime>
25 
26 namespace mcloud {
27 namespace api {
28 
35  public:
36  typedef std::shared_ptr<CloudResource> Ptr;
37 
38  enum class Property {
39  Content,
40  Folder
41  };
42 
43  virtual ~CloudResource() = default;
44 
45  virtual const std::string &id() const = 0;
46 
47  virtual const std::string &name() const = 0;
48 
49  virtual const std::time_t &created_date() const = 0;
50 
51  virtual const std::time_t &updated_date() const = 0;
52 
53  virtual const std::string &parent_catalog_id() const = 0;
54 
55  virtual const std::string &etag() const = 0;
56 
57  virtual const std::string &owner() const = 0;
58 
59  virtual Property property() const = 0;
60 };
61 
62 }
63 }
64 
65 #endif // MCLOUD_API_CLOUDRESOURCE_H_
CloudResource is an abstract object that provides common interfaces for CloudContent and CloudFolder...
Definition: cloudresource.h:34
virtual const std::string & parent_catalog_id() const =0
virtual const std::string & id() const =0
virtual const std::string & owner() const =0
virtual ~CloudResource()=default
virtual Property property() const =0
virtual const std::time_t & updated_date() const =0
virtual const std::time_t & created_date() const =0
Definition: client.h:37
virtual const std::string & etag() const =0
virtual const std::string & name() const =0
std::shared_ptr< CloudResource > Ptr
Definition: cloudresource.h:36