Resource container update
[platform/upstream/iotivity.git] / service / basis / resourceContainer / include / ResourceContainer.h
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
21 #ifndef RESOURCECONTAINER_H_
22 #define RESOURCECONTAINER_H_
23
24 #include <iostream>
25 #include <string>
26 #include <vector>
27 #include <map>
28
29 #include "BundleInfo.h"
30
31 #include "rapidxml/rapidxml.hpp"
32 #include "rapidxml/rapidxml_print.hpp"
33
34 using namespace std;
35
36 namespace RC
37 {
38
39     // placeholder
40     class Resource
41     {
42
43     };
44
45     class ResourceContainer
46     {
47     public:
48         ResourceContainer();
49         virtual ~ResourceContainer();
50         virtual void init() = 0;
51         virtual void init(string configFile) = 0;
52         virtual void registerBundle(BundleInfo* bundleinfo) = 0;
53         virtual void unregisterBundle(BundleInfo* bundleinfo) = 0;
54         virtual void unregisterBundle(int id) = 0;
55         virtual void activateBundle(int id) = 0;
56         virtual void deactivateBundle(int id) = 0;
57         virtual void activateBundleByName(string name) = 0;
58         virtual void deactivateBundleByName(string id) = 0;
59         virtual void activateBundle(BundleInfo* bundleInfo) = 0;
60         virtual void deactivateBundle(BundleInfo* bundleInfo) = 0;
61         virtual vector< Resource * > listBundleResources(string id) = 0;
62
63         static ResourceContainer* getInstance();
64     };
65 }
66
67 #endif /* RESOURCECONTAINER_H_ */