Corrected @file tags and restored 'Files' section.
[platform/upstream/iotivity.git] / service / protocol-plugin / plugin-manager / src / PluginManagerImpl.h
index f42236a..553944b 100644 (file)
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-/// @file PluginManagerImpl.h
-
-/// @brief
+/**
+ * @file
+ *
+ */
 
 #ifndef __PLUGINMANAGERIMPL_H__
 #define __PLUGINMANAGERIMPL_H__
 
 #include "Plugin.h"
 #include "CpluffAdapter.h"
-#include "FelixAdapter.h"
+
+#ifdef ANDROID
+    #include "FelixAdapter.h"
+#endif
 
 namespace OIC
 {
@@ -40,7 +44,7 @@ namespace OIC
             * During construction time, all plugins under the root plugin path will be loaded.
             *
             */
-            PluginManagerImpl();
+            PluginManagerImpl(void* args);
 
             /**
             * Virtual destructor
@@ -120,7 +124,7 @@ namespace OIC
             * @param Plugin ID
             * @return Plugin state.
             */
-            std::string getState(const std::string plugID);
+            virtual std::string getState(const std::string plugID);
 
             /**
             * Start  plugins by resource type
@@ -145,7 +149,7 @@ namespace OIC
             * @param Plugin
             * @return int, 1 is success, 0 is fail.
             */
-            virtual int startPlugins(Plugin *const plugin);
+            int startPlugins(Plugin *const plugin);
 
 
             /**
@@ -155,7 +159,16 @@ namespace OIC
             * @param Plugin
             * @return int, 1 is success, 0 is fail.
             */
-            virtual int stopPlugins(Plugin *const plugin);
+            int stopPlugins(Plugin *const plugin);
+
+            /**
+            * Rescan Plugin.
+            * This function will call rescan function of plugins in the configuration folder
+            *
+            * @param Plugin
+            * @return int, 1 is success, 0 is fail.
+            */
+            virtual int rescanPlugin();
 
             /**
             * get all plugins which currently registered.
@@ -165,11 +178,11 @@ namespace OIC
             */
             virtual std::vector<Plugin> &getAllPlugins(void);
 
-            static PluginManagerImpl *Getinstance()
+            static PluginManagerImpl *Getinstance(void *arg)
             {
                 if (NULL == s_pinstance)
                 {
-                    s_pinstance = new PluginManagerImpl();
+                    s_pinstance = new PluginManagerImpl(arg);
                 }
 
                 return s_pinstance;
@@ -178,7 +191,9 @@ namespace OIC
         private:
 
             CpluffAdapter *cppm;
-            FelixAdapter *javappm;
+            #ifdef ANDROID
+                FelixAdapter *javappm;
+            #endif
 
             std::vector<Plugin> m_plugins;
             static PluginManagerImpl *s_pinstance;
@@ -220,4 +235,4 @@ namespace OIC
     };
 }
 
-#endif //__PLUGINMANAGERIMPL_H__
\ No newline at end of file
+#endif //__PLUGINMANAGERIMPL_H__