Imported Upstream version 0.9.2
[platform/upstream/iotivity.git] / service / protocol-plugin / plugin-manager / src / FelixAdapter.h
index 7f03f7f..c19f458 100644 (file)
@@ -24,7 +24,9 @@
 
 #ifndef __FELIXADAPTER_H__
 #define __FELIXADAPTER_H__
+#ifndef DLOPEN_POSIX
 #define DLOPEN_POSIX
+#endif
 
 #include <vector>
 #include <dirent.h>
@@ -32,9 +34,8 @@
 #include <errno.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include <boost/thread.hpp>
-#include <boost/bind.hpp>
 #include <internal.h>
+#include <jni.h>
 
 #include "Plugin.h"
 #include "Config.h"
@@ -166,11 +167,11 @@ namespace OIC
             *
             * @return OICPluginManager pointer Address.
             */
-            static FelixAdapter *Getinstance()
+            static FelixAdapter *Getinstance(void *args = NULL)
             {
                 if (NULL == s_pinstance)
                 {
-                    s_pinstance = new FelixAdapter();
+                    s_pinstance = new FelixAdapter((JavaVM *)args);
                 }
 
                 return s_pinstance;
@@ -179,18 +180,11 @@ namespace OIC
 
 
         private:
+            JavaVM *jvm;
             Config *config;
             typedef std::map<std::string, bool> File_list;
             std::vector<Plugin> m_plugins;
-            boost::thread m_file_detect_thread;
-            /*
-            cp_context_t *m_context;
-            cp_status_t m_status;
-            cp_plugin_info_t **m_cp_plugins;
-            cp_plugin_info_t *m_plugin;
-            boost::thread_group m_thread_g;
-            std::string m_path;
-            */
+
             static FelixAdapter *s_pinstance;
 
             /**
@@ -198,7 +192,7 @@ namespace OIC
             * During construction time, all plugins under the root plugin path will be loaded.
             *
             */
-            FelixAdapter();
+            FelixAdapter(JavaVM *);
 
             /**
             * Virtual destructor