IoTivity C++ SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RCSResourceContainer.h
Go to the documentation of this file.
1 //******************************************************************
2 //
3 // Copyright 2015 Samsung Electronics All Rights Reserved.
4 //
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 //
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 // http://www.apache.org/licenses/LICENSE-2.0
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20 
27 #ifndef RCSRESOURCECONTAINER_H_
28 #define RCSRESOURCECONTAINER_H_
29 
30 #include <string>
31 #include <vector>
32 #include <map>
33 #include <list>
34 #include <memory>
35 
36 #include "RCSBundleInfo.h"
37 
38 namespace OIC
39 {
40  namespace Service
41  {
42 
49  {
50  public:
59  virtual void startContainer(const std::string &configFile) = 0;
63  virtual void stopContainer() = 0;
64 
65  // list of bundle ids
74  virtual std::list<std::unique_ptr<RCSBundleInfo>> listBundles() = 0;
81  virtual void startBundle(const std::string &bundleId) = 0;
88  virtual void stopBundle(const std::string &bundleId) = 0;
89 
90  // dynamic configuration
101  virtual void addBundle(const std::string &bundleId, const std::string &bundleUri,
102  const std::string &bundlePath, const std::string &activator,
103  std::map<std::string, std::string> params) = 0;
110  virtual void removeBundle(const std::string &bundleId) = 0;
111 
120  virtual void addResourceConfig(const std::string &bundleId, const std::string &resourceUri,
121  std::map<std::string, std::string> params) = 0;
129  virtual void removeResourceConfig(const std::string &bundleId, const std::string &resourceUri) = 0;
130 
137  virtual std::list<std::string> listBundleResources(const std::string &bundleId) = 0;
138 
146 
147  protected:
149  virtual ~RCSResourceContainer();
150 
151  RCSResourceContainer(const RCSResourceContainer &) = delete;
153  RCSResourceContainer &operator=(const RCSResourceContainer &) const = delete;
155  };
156  }
157 }
158 
159 #endif /* RCSRESOURCECONTAINER_H_ */
virtual void startBundle(const std::string &bundleId)=0
API for starting the bundle.
RCSResourceContainer & operator=(const RCSResourceContainer &) const =delete
This class provides APIs for managing the container and bundles in the container. ...
Definition: RCSResourceContainer.h:48
virtual void stopBundle(const std::string &bundleId)=0
API for Stopping the bundle.
virtual void addResourceConfig(const std::string &bundleId, const std::string &resourceUri, std::map< std::string, std::string > params)=0
API for adding the Resource configuration information to the bundle.
static RCSResourceContainer * getInstance()
API for getting the Instance of ResourceContainer class.
virtual void stopContainer()=0
API for stopping the Container.
virtual void addBundle(const std::string &bundleId, const std::string &bundleUri, const std::string &bundlePath, const std::string &activator, std::map< std::string, std::string > params)=0
API for adding the bundle to the Container.
This file contains RCSBundleInfo class, which provides APIs related to Bundle information.
virtual std::list< std::unique_ptr< RCSBundleInfo > > listBundles()=0
API for getting the list of all bundles in the container.
virtual void removeBundle(const std::string &bundleId)=0
API for removing the bundle from the container.
virtual std::list< std::string > listBundleResources(const std::string &bundleId)=0
API for getting the list of Bundle Resources.
virtual void removeResourceConfig(const std::string &bundleId, const std::string &resourceUri)=0
API for removing the Resource configuration information from the bundle.
virtual void startContainer(const std::string &configFile)=0
API for starting the Container.