1 #ifndef __DALI_INTERNAL_SCRIPT_PLUGIN_PROXY_H__
2 #define __DALI_INTERNAL_SCRIPT_PLUGIN_PROXY_H__
5 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
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.
21 #include <dali-toolkit/devel-api/scripting/script-plugin.h>
33 * @brief Proxy class to dynamically load, use and unload script plugin.
37 class ScriptPluginProxy : public ScriptPlugin
43 * @param sharedObjectName so file to load
45 ScriptPluginProxy( const std::string& sharedObjectName);
50 virtual ~ScriptPluginProxy();
53 * Set engine configuration flags
54 * @param [in] flags string. Format dependent on the scripting engine.
56 virtual void SetFlags( const std::string& flags );
59 * @brief Exececute the buffer contents as a script
60 * @param [in] buffer script file contents
61 * @param [in] filename a nominal name for the buffer contents.
62 * @note filename extension may be used to disambiguate script language
63 * @return true on success, false on failure
66 virtual bool ExecuteBuffer( const std::string& buffer, const std::string& filename );
69 * @brief execture the file as a script
70 * @param [in] filename the filename to read and execute
71 * @return true on success, false on failure
73 virtual bool ExecuteFile( const std::string& fileName );
76 * @brief check if the plugin is initialized
77 * @return true if it's initialized
79 bool IsInitialized() const;
83 * @brief Dynamically loads the script plugin.
88 * @brief Unloads the script plugin.
95 ScriptPlugin::Create* mCreatePluginFunctionPtr;
96 ScriptPlugin::Destroy* mDestroyPluginFunctionPtr;
97 ScriptPlugin* mScriptingPlugin;
98 std::string mSharedObjectName;
103 } // namespace Adaptor
105 } // namespace Internal
109 #endif // __DALI_INTERNAL_SCRIPT_PLUGIN_PROXY_H__