1 //******************************************************************
3 // Copyright 2015 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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
11 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 #ifndef BUNDLEACTIVATOR_H_
22 #define BUNDLEACTIVATOR_H_
24 #include "ResourceContainerBundleAPI.h"
26 using namespace OIC::Service;
34 * @class BundleActivator
35 * @brief This class represents Bundle to be activated by container
44 * Constructor for BundleActivator
49 * Virtual destructor for BundleActivator
51 virtual ~BundleActivator();
54 * Activate the Bundle to make bundle work and create bundle resources
56 * @param resourceContainer ResourceContainer which registers the bundle
58 * @param bundleId Assigned id for the bundle
62 virtual void activateBundle(ResourceContainerBundleAPI *resourceContainer,
63 std::string bundleId);
66 * Deactivate the Bundle to stop working and destroy bundle resources
70 virtual void deactivateBundle();
73 * Create Bundle Resource instance and register the resource in the container
75 * @param resourceInfo Information of the bundle resource to be created
79 virtual void createResource(resourceInfo resourceInfo) = 0;
82 * Destroy Bundle Resource instance and register the resource in the container
84 * @param pBundleResource Bundle resource to be destroyed
88 virtual void destroyResource(BundleResource::Ptr pBundleResource) = 0;
93 #endif /* RESOURCEBUNDLE_H_ */