Imported Upstream version 0.9.2
[platform/upstream/iotivity.git] / service / resource-encapsulation / include / RCSBundleInfo.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 /**
22  * @file
23  *
24  * This file contains RCSBundleInfo class, which provides APIs related to Bundle information.
25  */
26
27 #ifndef BUNDLEINFO_H_
28 #define BUNDLEINFO_H_
29
30 #include <string>
31
32 namespace OIC
33 {
34     namespace Service
35     {
36
37         /**
38         * @class  RCSBundleInfo
39         * @brief   This class provides APIs for creating, getting and setting the Bundle Information
40         *
41         */
42         class RCSBundleInfo
43         {
44             public:
45                 RCSBundleInfo();
46                 virtual ~RCSBundleInfo();
47
48                 /**
49                 * API for setting the Id of the bundle
50                 *
51                 * @param name - Id of the bundle in string form
52                 *
53                 */
54                 virtual void setID(const std::string &name) = 0;
55
56                 /**
57                 * API for getting the Id of the bundle
58                 *
59                 * @return string - Id of the bundle
60                 *
61                 */
62                 virtual const std::string &getID() = 0;
63
64                 /**
65                 * API for setting the path of the bundle
66                 *
67                 * @param path - path of the bundle in string form
68                 *
69                 */
70                 virtual void setPath(const std::string &path) = 0;
71
72                 /**
73                 * API for getting the path of the bundle
74                 *
75                 * @return path - path of the bundle
76                 *
77                 */
78                 virtual const std::string &getPath() = 0;
79
80                 /**
81                 * API for setting the Activator name for the bundle
82                 *
83                 * @param activator - Activator name in string form
84                 *
85                 */
86                 virtual void setActivatorName(const std::string &activator) = 0;
87
88                 /**
89                 * API for setting the Activator name for the bundle
90                 *
91                 * @return string - Name of the activator
92                 *
93                 */
94                 virtual const std::string &getActivatorName() = 0;
95
96                 /**
97                 * API for setting the library path for the bundle
98                 *
99                 * @param libpath - Library path in string form
100                 *
101                 */
102                 virtual void setLibraryPath(const std::string &libpath) = 0;
103
104                 /**
105                 * API for getting the library path for the bundle
106                 *
107                 * @return string - Library path  in string form
108                 *
109                 */
110                 virtual const std::string& getLibraryPath() = 0;
111
112                 /**
113                 * API for setting the version of the bundle
114                 *
115                 * @param version - version of the bundle in string form
116                 *
117                 */
118                 virtual void setVersion(const std::string &version) = 0;
119
120                 /**
121                 * API for getting the version of the bundle
122                 *
123                 * @return string - version of the bundle
124                 *
125                 */
126                 virtual const std::string &getVersion() = 0;
127
128                 /**
129                  * API for creating new bundle information
130                  *
131                  * @return  RCSBundleInfo - RCSBundleInfo pointer.
132                  *
133                  */
134                 static RCSBundleInfo *build();
135             protected:
136                 std::string m_ID, m_path, m_version;
137         };
138     }
139 }
140
141 #endif /* BUNDLEINFO_H_ */