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/public-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 * (NB filename extension may be used to disambiguate script language)
64 virtual void ExecuteBuffer( const std::string& buffer, const std::string& filename );
67 * @brief execture the file as a script
68 * @param [in] filename the filename to read and execute
70 virtual void ExecuteFile( const std::string& fileName );
73 * @brief check if the plugin is initialized
74 * @return true if it's initialized
76 bool IsInitialized() const;
80 * @brief Dynamically loads the script plugin.
85 * @brief Unloads the script plugin.
92 ScriptPlugin::Create* mCreatePluginFunctionPtr;
93 ScriptPlugin::Destroy* mDestroyPluginFunctionPtr;
94 ScriptPlugin* mScriptingPlugin;
95 std::string mSharedObjectName;
100 } // namespace Adaptor
102 } // namespace Internal
106 #endif // __DALI_INTERNAL_SCRIPT_PLUGIN_PROXY_H__