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 BUNDLEINFOINTERNAL_H_
22 #define BUNDLEINFOINTERNAL_H_
25 #include "BundleInfo.h"
26 #include "ResourceContainerBundleAPI.h"
30 using namespace OIC::Service;
35 typedef void activator_t(ResourceContainerBundleAPI *, std::string bundleId);
36 typedef void deactivator_t(void);
38 class BundleInfoInternal: public BundleInfo
42 BundleInfoInternal(BundleInfo *info);
43 virtual ~BundleInfoInternal();
44 void setID(string id);
46 void setPath(string path);
48 void setVersion(string version);
51 void setLoaded(bool loaded);
53 void setActivated(bool activated);
56 virtual void setLibraryPath(string libpath);
57 virtual string getLibraryPath();
59 void setActivatorName(string activatorName);
60 string getActivatorName();
62 void setJavaBundleActivatorMethod(jmethodID activator);
63 jmethodID getJavaBundleActivatorMethod();
64 void setJavaBundleDeactivatorMethod(jmethodID deactivator);
65 jmethodID getJavaBundleDeactivatorMethod();
67 void setJavaBundleActivatorObject(jobject);
68 jobject getJavaBundleActivatorObject();
70 void setBundleActivator(activator_t *);
71 activator_t *getBundleActivator();
73 void setBundleDeactivator(deactivator_t *);
74 deactivator_t *getBundleDeactivator();
76 void setBundleHandle(void *);
77 void *getBundleHandle();
79 void setJavaBundle(bool javaBundle);
82 void setBundleInfo(BundleInfo* bundleInfo);
85 bool m_loaded, m_activated, m_java_bundle;
87 activator_t *m_activator;
88 deactivator_t *m_deactivator;
90 string m_activator_name;
91 jmethodID m_java_activator, m_java_deactivator;
92 jobject m_java_activator_object;
93 string m_library_path;
98 #endif /* BUNDLEINFOINTERNAL_H_ */