1 //******************************************************************
3 // Copyright 2014 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 /// @file FelixAdapter.cpp
25 #include "FelixAdapter.h"
29 FelixAdapter *FelixAdapter::s_pinstance;
31 FelixAdapter::FelixAdapter()
33 config = Config::Getinstance();
34 std::string pluginpath = config->getPluginPath();
37 printf("Current path is %s\n", pluginpath.c_str());
41 fprintf(stderr, "Pluing path is not exist\n");
44 registerAllPlugin(pluginpath);
47 FelixAdapter::~FelixAdapter(void)
49 s_pinstance->deleteinstance();
52 int FelixAdapter::installPlugin(const std::string path)
57 int FelixAdapter::findPluginRecursive(const std::string path)
62 int FelixAdapter::loadPluginInfoToManager(const std::string path)
67 int FelixAdapter::registerPlugin(const std::string path)
72 int FelixAdapter::registerAllPlugin(const std::string path)
77 int FelixAdapter::unregisterPlugin(Plugin *const plugin)
82 int FelixAdapter::unregisterAllPlugin(void)
87 std::vector<Plugin> &FelixAdapter::getAllPlugins(void)
92 std::vector<Plugin> *FelixAdapter::findPlugins(const std::string key, const std::string value)
97 Plugin *FelixAdapter::getPlugin(const std::string plugID)
102 bool FelixAdapter::getFileList(File_list &list, const std::string strDir)
108 void FelixAdapter::printPluginList(cp_plugin_info_t **plugins)
113 int FelixAdapter::start(Plugin *const plugin, void *const arg)
118 int FelixAdapter::stop(Plugin *const plugin)
123 bool FelixAdapter::isStarted(Plugin *plugin)
128 void FelixAdapter::observePluginPath(void *str)
133 const std::string FelixAdapter::getState(const std::string plugID)