IoTivity C++ SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ResourceContainerBundleAPI.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 
28 #ifndef RESOURCECONTAINERBUNDLEAPI_H_
29 #define RESOURCECONTAINERBUNDLEAPI_H_
30 
31 #include "Configuration.h"
32 #include "NotificationReceiver.h"
33 #include "BundleResource.h"
34 
35 using namespace OIC::Service;
36 
37 namespace OIC
38 {
39  namespace Service
40  {
41 
49  {
50  public:
62  virtual int registerResource(BundleResource::Ptr resource) = 0;
63 
72  virtual void unregisterResource(BundleResource::Ptr resource) = 0;
73 
83  virtual void getBundleConfiguration(const std::string &bundleId, configInfo *configOutput) = 0;
84 
94  virtual void getResourceConfiguration(const std::string &bundleId,
95  std::vector< resourceInfo > *configOutput) = 0;
96 
102  static ResourceContainerBundleAPI *getInstance();
103 
104  protected:
106  virtual ~ResourceContainerBundleAPI();
107 
110  ResourceContainerBundleAPI &operator=(const ResourceContainerBundleAPI &) const = delete;
111  ResourceContainerBundleAPI &operator=(ResourceContainerBundleAPI &&) const = delete;
112  };
113  }
114 }
115 
116 #endif
std::shared_ptr< BundleResource > Ptr
Definition: BundleResource.h:50
OCStackResult unregisterResource(const OCResourceHandle &resourceHandle)
This API unregisters a resource with the server.
This class represents Notification Receiver to get notification from bundle resources if there's any ...
Definition: NotificationReceiver.h:37
This class provides APIs for retrieving bundle and resource configuration and registering/unregisteri...
Definition: ResourceContainerBundleAPI.h:48
OCStackResult registerResource(OCResourceHandle &resourceHandle, std::string &resourceURI, const std::string &resourceTypeName, const std::string &resourceInterface, EntityHandler entityHandler, uint8_t resourceProperty)
This API registers a resource with the server.