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 #include "BundleInfoInternal.h"
28 BundleInfoInternal::BundleInfoInternal()
30 m_activator = nullptr;
31 m_deactivator = nullptr;
32 m_resourceCreator = nullptr;
33 m_resourceDestroyer = nullptr;
34 m_bundleHandle = nullptr;
38 m_java_bundle = false;
42 BundleInfoInternal::~BundleInfoInternal()
44 m_activator = nullptr;
45 m_deactivator = nullptr;
46 m_resourceCreator = nullptr;
47 m_resourceDestroyer = nullptr;
48 m_bundleHandle = nullptr;
51 void BundleInfoInternal::setID(const std::string &id)
56 const std::string &BundleInfoInternal::getID()
61 void BundleInfoInternal::setPath( const std::string &path)
65 const std::string &BundleInfoInternal::getPath()
70 void BundleInfoInternal::setVersion( const std::string &version)
75 const std::string &BundleInfoInternal::getVersion()
80 void BundleInfoInternal::setLoaded(bool loaded)
85 bool BundleInfoInternal::isLoaded()
90 void BundleInfoInternal::setActivated(bool activated)
92 m_activated = activated;
95 bool BundleInfoInternal::isActivated()
100 void BundleInfoInternal::setBundleActivator(activator_t *activator)
102 m_activator = activator;
105 activator_t *BundleInfoInternal::getBundleActivator()
110 void BundleInfoInternal::setBundleDeactivator(deactivator_t *deactivator)
112 m_deactivator = deactivator;
115 deactivator_t *BundleInfoInternal::getBundleDeactivator()
117 return m_deactivator;
120 void BundleInfoInternal::setResourceCreator(resourceCreator_t *resourceCreator)
122 m_resourceCreator = resourceCreator;
125 resourceCreator_t *BundleInfoInternal::getResourceCreator()
127 return m_resourceCreator;
130 void BundleInfoInternal::setResourceDestroyer(resourceDestroyer_t *resourceDestroyer)
132 m_resourceDestroyer = resourceDestroyer;
135 resourceDestroyer_t *BundleInfoInternal::getResourceDestroyer()
137 return m_resourceDestroyer;
140 void BundleInfoInternal::setBundleHandle(void *handle)
142 m_bundleHandle = handle;
145 void *BundleInfoInternal::getBundleHandle()
147 return m_bundleHandle;
150 void BundleInfoInternal::setJavaBundle(bool javaBundle)
152 m_java_bundle = javaBundle;
155 bool BundleInfoInternal::getJavaBundle()
157 return m_java_bundle;
160 void BundleInfoInternal::setActivatorName( const std::string &activatorName)
162 m_activator_name = activatorName;
165 const std::string &BundleInfoInternal::getActivatorName()
167 return m_activator_name;
170 void BundleInfoInternal::setLibraryPath( const std::string &libpath)
172 m_library_path = libpath;
175 const std::string &BundleInfoInternal::getLibraryPath()
177 return m_library_path;
181 void BundleInfoInternal::setJavaBundleActivatorMethod(jmethodID javaBundleActivator)
183 m_java_activator = javaBundleActivator;
186 jmethodID BundleInfoInternal::getJavaBundleActivatorMethod()
188 return m_java_activator;
191 void BundleInfoInternal::setJavaBundleDeactivatorMethod(jmethodID javaBundleActivator)
193 m_java_deactivator = javaBundleActivator;
196 jmethodID BundleInfoInternal::getJavaBundleDeactivatorMethod()
198 return m_java_deactivator;
201 void BundleInfoInternal::setJavaBundleActivatorObject(jobject activator_object)
203 m_java_activator_object = activator_object;
206 jobject BundleInfoInternal::getJavaBundleActivatorObject()
208 return m_java_activator_object;
212 void BundleInfoInternal::setBundleInfo(RCSBundleInfo *bundleInfo)
214 BundleInfoInternal *source = (BundleInfoInternal *)bundleInfo;
215 m_ID = source->getID();
216 m_path = source->getPath();
217 m_version = source->getVersion();
218 m_loaded = source->isLoaded();
219 m_activated = source->isActivated();
220 m_java_bundle = source->getJavaBundle();
221 m_activator = source->getBundleActivator();
222 m_bundleHandle = source->getBundleHandle();