</pkginfo>
<filedef name="__TCF_TIZEN_CONFIG_FW_EXTERNAL_H__"/>
+ <dependancy>
+ <require name="capi-system-info"/>
+ </dependancy>
+
<build>
<directory name="plugin_model"/>
</build>
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(EXEC_PREFIX "\${prefix}")
-SET(PKG_CONFIG_REQUIRES "dlog vconf")
SET(PKG_CONFIG_INCLUDEDIR "/usr/include/${fw_name}")
SET(PKG_CONFIG_LIBDIR "${CMAKE_LIBDIR}")
SET(PKG_CONFIG_CFLAGS -I\${PKG_CONFIG_INCLUDEDIR}/system)
INCLUDE(FindPkgConfig)
-pkg_check_modules(${fw_name} REQUIRED ${PKG_CONFIG_REQUIRES})
+pkg_check_modules(${fw_name} REQUIRED dlog vconf <xsl:apply-templates select="configlist/dependancy"></xsl:apply-templates>)
FOREACH(flag ${${fw_name}_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
</xsl:template>
<!--BEGIN /////////////////////////////////////////// config/file ///////////////////////////////////////////////-->
+<xsl:template match="configlist/dependancy">
+ <xsl:apply-templates select="require"> </xsl:apply-templates>
+</xsl:template>
+<xsl:template match="require"><xsl:value-of select="./@name"/><xsl:text>
</xsl:text>
+</xsl:template>
+
<!-- TEMPLATE config -->
<xsl:template match="configlist/config">
<xsl:apply-templates select="install"> </xsl:apply-templates>
BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(vconf)
+<xsl:apply-templates select="configlist/dependancy"></xsl:apply-templates>
Requires: findutils
-
-
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%files
%manifest default_template.manifest
%{_libdir}/lib*.so.*
+%{_libdir}/lib*.so
/opt/usr/*.sh
<xsl:apply-templates select="configlist/config"> </xsl:apply-templates>
</xsl:template>
<!--BEGIN /////////////////////////////////////////// config/file ///////////////////////////////////////////////-->
+<xsl:template match="configlist/dependancy">
+ <xsl:apply-templates select="require"> </xsl:apply-templates>
+</xsl:template>
+
+<xsl:template match="require">BuildRequires: pkgconfig(<xsl:value-of select="./@name"/>)<xsl:text> </xsl:text></xsl:template>
+
<xsl:template match="configlist/install/file">
<xsl:value-of select="./@path"/><xsl:text> </xsl:text>
</xsl:template>
ADD_SUBDIRECTORY(./plugin1) #CMakeLists.txt
ADD_SUBDIRECTORY(./plugin2) #CMakeLists.txt
ADD_SUBDIRECTORY(./plugin3) #CMakeLists.txt
+ADD_SUBDIRECTORY(./plugin_hello) #CMakeLists.txt
#-----------------------------------------------------------------------------------
# config manager
-all: allheader allimpl libplugin1.so libplugin2.so libplugin3.so plugin_client
+#all: allheader allimpl libplugin1.so libplugin2.so libplugin3.so plugin_client
+all: allheader allimpl
allheader: $(shell find . -name "*.xml" | sed 's/xml/h/')
export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH ; ./plugin_client
clean:
- @rm *.o *.so *.so.* plugin_client
+ @rm config_system_table.c config_system_table.h config_table.c config_table.h
+ #@rm *.o *.so *.so.* plugin_client
+
#include "config_table.h"
#include "config_manager.h"
#include "plugin1.h"
-
-#ifndef EXPORT_CONFIG_PUBLIC
-#define EXPORT_CONFIG_PUBLIC __attribute__ ((visibility ("default")))
-#endif
-
-EXPORT_CONFIG_PUBLIC char* airplane_mode_on_plugin_path()
+char* airplane_mode_on_plugin_path()
{
return "/usr/lib/libplugin3.so";
}
-EXPORT_CONFIG_PUBLIC char* airplane_mode_on_get(char* key)
+char* airplane_mode_on_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(airplane_mode_on_plugin_path(), "get_plugin_net_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* airplane_mode_on_set(char* key, char* value)
+char* airplane_mode_on_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(airplane_mode_on_plugin_path(), "get_plugin_net_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* wifi_static_dns1_plugin_path()
+char* wifi_static_dns1_plugin_path()
{
return "/usr/lib/libplugin3.so";
}
-EXPORT_CONFIG_PUBLIC char* wifi_static_dns1_get(char* key)
+char* wifi_static_dns1_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(wifi_static_dns1_plugin_path(), "get_plugin_net_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* wifi_static_dns1_set(char* key, char* value)
+char* wifi_static_dns1_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(wifi_static_dns1_plugin_path(), "get_plugin_net_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* wifi_static_dns2_plugin_path()
+char* wifi_static_dns2_plugin_path()
{
return "/usr/lib/libplugin3.so";
}
-EXPORT_CONFIG_PUBLIC char* wifi_static_dns2_get(char* key)
+char* wifi_static_dns2_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(wifi_static_dns2_plugin_path(), "get_plugin_net_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* wifi_static_dns2_set(char* key, char* value)
+char* wifi_static_dns2_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(wifi_static_dns2_plugin_path(), "get_plugin_net_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* screen_off_timeout_plugin_path()
+char* screen_off_timeout_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* screen_off_timeout_get(char* key)
+char* screen_off_timeout_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(screen_off_timeout_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* screen_off_timeout_set(char* key, char* value)
+char* screen_off_timeout_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(screen_off_timeout_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* screen_brightness_mode_plugin_path()
+char* screen_brightness_mode_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* screen_brightness_mode_get(char* key)
+char* screen_brightness_mode_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(screen_brightness_mode_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* screen_brightness_mode_set(char* key, char* value)
+char* screen_brightness_mode_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(screen_brightness_mode_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* ringtone_plugin_path()
+char* ringtone_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* ringtone_get(char* key)
+char* ringtone_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(ringtone_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* ringtone_set(char* key, char* value)
+char* ringtone_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(ringtone_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* alarm_alert_plugin_path()
+char* alarm_alert_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* alarm_alert_get(char* key)
+char* alarm_alert_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(alarm_alert_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* alarm_alert_set(char* key, char* value)
+char* alarm_alert_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(alarm_alert_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* time_12_24_plugin_path()
+char* time_12_24_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* time_12_24_get(char* key)
+char* time_12_24_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(time_12_24_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* time_12_24_set(char* key, char* value)
+char* time_12_24_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(time_12_24_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* text_auto_replace_plugin_path()
+char* text_auto_replace_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* text_auto_replace_get(char* key)
+char* text_auto_replace_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(text_auto_replace_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* text_auto_replace_set(char* key, char* value)
+char* text_auto_replace_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(text_auto_replace_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* text_auto_functuate_plugin_path()
+char* text_auto_functuate_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* text_auto_functuate_get(char* key)
+char* text_auto_functuate_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(text_auto_functuate_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* text_auto_functuate_set(char* key, char* value)
+char* text_auto_functuate_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(text_auto_functuate_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* text_show_password_plugin_path()
+char* text_show_password_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* text_show_password_get(char* key)
+char* text_show_password_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(text_show_password_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* text_show_password_set(char* key, char* value)
+char* text_show_password_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(text_show_password_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* text_auto_caps_plugin_path()
+char* text_auto_caps_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* text_auto_caps_get(char* key)
+char* text_auto_caps_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(text_auto_caps_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* text_auto_caps_set(char* key, char* value)
+char* text_auto_caps_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(text_auto_caps_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* content_uri_plugin_path()
+char* content_uri_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* content_uri_get(char* key)
+char* content_uri_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(content_uri_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* content_uri_set(char* key, char* value)
+char* content_uri_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(content_uri_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* default_alram_alert_uri_plugin_path()
+char* default_alram_alert_uri_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* default_alram_alert_uri_get(char* key)
+char* default_alram_alert_uri_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(default_alram_alert_uri_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* default_alram_alert_uri_set(char* key, char* value)
+char* default_alram_alert_uri_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(default_alram_alert_uri_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* default_ringtone_uri_plugin_path()
+char* default_ringtone_uri_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* default_ringtone_uri_get(char* key)
+char* default_ringtone_uri_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(default_ringtone_uri_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* default_ringtone_uri_set(char* key, char* value)
+char* default_ringtone_uri_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(default_ringtone_uri_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* auto_time_plugin_path()
+char* auto_time_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* auto_time_get(char* key)
+char* auto_time_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(auto_time_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* auto_time_set(char* key, char* value)
+char* auto_time_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(auto_time_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* auto_time_zone_plugin_path()
+char* auto_time_zone_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* auto_time_zone_get(char* key)
+char* auto_time_zone_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(auto_time_zone_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* auto_time_zone_set(char* key, char* value)
+char* auto_time_zone_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(auto_time_zone_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* bluetooth_on_plugin_path()
+char* bluetooth_on_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* bluetooth_on_get(char* key)
+char* bluetooth_on_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(bluetooth_on_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* bluetooth_on_set(char* key, char* value)
+char* bluetooth_on_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(bluetooth_on_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* data_roaming_plugin_path()
+char* data_roaming_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* data_roaming_get(char* key)
+char* data_roaming_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(data_roaming_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* data_roaming_set(char* key, char* value)
+char* data_roaming_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(data_roaming_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* debug_app_plugin_path()
+char* debug_app_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* debug_app_get(char* key)
+char* debug_app_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(debug_app_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* debug_app_set(char* key, char* value)
+char* debug_app_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(debug_app_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* development_setting_enabled_plugin_path()
+char* development_setting_enabled_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* development_setting_enabled_get(char* key)
+char* development_setting_enabled_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(development_setting_enabled_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* development_setting_enabled_set(char* key, char* value)
+char* development_setting_enabled_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(development_setting_enabled_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* use_google_mail_plugin_path()
+char* use_google_mail_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* use_google_mail_get(char* key)
+char* use_google_mail_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(use_google_mail_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* use_google_mail_set(char* key, char* value)
+char* use_google_mail_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(use_google_mail_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* wifi_network_available_notification_on_plugin_path()
+char* wifi_network_available_notification_on_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* wifi_network_available_notification_on_get(char* key)
+char* wifi_network_available_notification_on_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(wifi_network_available_notification_on_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* wifi_network_available_notification_on_set(char* key, char* value)
+char* wifi_network_available_notification_on_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(wifi_network_available_notification_on_plugin_path(), "get_plugin_complex_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* wifi_num_open_networks_kept_plugin_path()
+char* wifi_num_open_networks_kept_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* wifi_num_open_networks_kept_get(char* key)
+char* wifi_num_open_networks_kept_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(wifi_num_open_networks_kept_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* wifi_num_open_networks_kept_set(char* key, char* value)
+char* wifi_num_open_networks_kept_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(wifi_num_open_networks_kept_plugin_path(), "get_plugin_complex_object");
config_manager_close();
return NULL;
}
-
#include "config_table.h"
#include "config_manager.h"
#include "plugin1.h"
-
-#ifndef EXPORT_CONFIG_PUBLIC
-#define EXPORT_CONFIG_PUBLIC __attribute__ ((visibility ("default")))
-#endif
-
-EXPORT_CONFIG_PUBLIC char* get_complex_string_plugin_path()
+char* get_complex_string_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* get_complex_string_get(char* key)
+char* get_complex_string_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(get_complex_string_plugin_path(), "get_plugin_complex_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* get_simple_text_plugin_path()
+char* get_simple_text_plugin_path()
{
return "/usr/lib/libplugin1.so";
}
-EXPORT_CONFIG_PUBLIC char* get_simple_text_get(char* key)
+char* get_simple_text_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(get_simple_text_plugin_path(), "get_plugin_simple_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* get_sw_version_plugin_path()
+char* get_sw_version_plugin_path()
{
return "/usr/lib/libplugin2.so";
}
-EXPORT_CONFIG_PUBLIC int get_sw_version_init()
-{
- return 0;
-}
-
-EXPORT_CONFIG_PUBLIC char* get_sw_version_get(char* key)
+char* get_sw_version_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(get_sw_version_plugin_path(), "get_plugin_ini_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* get_sw_version_set(char* key, char* value)
-{
- PluginTizenConfig* (*fn)(int *);
- fn = config_manager(get_sw_version_plugin_path(), "get_plugin_ini_object");
- config_manager_set(fn, key, value);
- config_manager_close();
- return NULL;
-}
-
-EXPORT_CONFIG_PUBLIC int get_sw_version_destroy()
-{
- return 0;
-}
-
-EXPORT_CONFIG_PUBLIC char* get_info_from_xml_plugin_path()
+char* get_info_from_xml_plugin_path()
{
return "/usr/lib/libplugin2.so";
}
-EXPORT_CONFIG_PUBLIC char* get_info_from_xml_get(char* key)
+char* get_info_from_xml_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(get_info_from_xml_plugin_path(), "get_plugin_xml_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* get_info_from_xml_set(char* key, char* value)
+char* get_info_from_xml_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(get_info_from_xml_plugin_path(), "get_plugin_xml_object");
return NULL;
}
-EXPORT_CONFIG_PUBLIC char* get_info_from_dbus_plugin_path()
+char* get_info_from_dbus_plugin_path()
{
return "/usr/lib/libplugin2.so";
}
-EXPORT_CONFIG_PUBLIC char* get_info_from_dbus_get(char* key)
+char* get_info_from_dbus_get(char* key)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(get_info_from_dbus_plugin_path(), "get_plugin_dbus_object");
return val;
}
-EXPORT_CONFIG_PUBLIC char* get_info_from_dbus_set(char* key, char* value)
+char* get_info_from_dbus_set(char* key, char* value)
{
PluginTizenConfig* (*fn)(int *);
fn = config_manager(get_info_from_dbus_plugin_path(), "get_plugin_dbus_object");
char* get_simple_text_plugin_path();
char* get_simple_text_get(char* key);
char* get_sw_version_plugin_path();
-int get_sw_version_init();
char* get_sw_version_get(char* key);
-char* get_sw_version_set(char* key, char* value);
-int get_sw_version_destroy();
char* get_info_from_xml_plugin_path();
char* get_info_from_xml_get(char* key);
char* get_info_from_xml_set(char* key, char* value);
<config name="get_sw_version" type="string">
<plugin name="get_plugin_ini_object" path="/usr/lib/libplugin2.so">
- <function type="init"/>
+ <!--<plugin name="get_plugin_helloworld_object" path="/usr/lib/libhelloworld_plugin.so">-->
<function type="get"/>
- <function type="set"/>
- <function type="destroy"/>
</plugin>
<desc>ini plugin example</desc>
</config>
+ <!--
+ <config name="get_helloworld" type="string">
+ <plugin name="get_plugin_helloworld_object" path="/usr/lib/libhelloworld_plugin.so">
+ <function type="get"/>
+ </plugin>
+ <desc>helloworld plugin example</desc>
+ </config>
+ -->
+
<config name="get_info_from_xml" type="string">
<plugin name="get_plugin_xml_object" path="/usr/lib/libplugin2.so">
<function type="get"/>
#-----------------------------------------------------------------------------------
# plugin code 1
#-----------------------------------------------------------------------------------
+
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(pkgs_plugin1 REQUIRED)
+
+FOREACH(flag ${pkgs_plugin1_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Werror-implicit-function-declaration")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+
ADD_LIBRARY(plugin1 SHARED simple_plugin.c complex_plugin.c)
SET(PLUGIN1_VERSION_MAJOR 1)
SET(PLUGIN1_VERSION_MINOR 1)
#-----------------------------------------------------------------------------------
# plugin code 2
#-----------------------------------------------------------------------------------
+
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(pkgs_plugin2 REQUIRED capi-system-info)
+
+FOREACH(flag ${pkgs_plugin2_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Werror-implicit-function-declaration")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+
+
+
ADD_LIBRARY(plugin2 SHARED config_ini_plugin.c config_xml_plugin.c config_dbus_plugin.c)
SET(PLUGIN2_VERSION_MAJOR 1)
SET(PLUGIN2_VERSION_MINOR 1)
SET(PLUGIN2_VERSION_PATCH 0)
SET(PLUGIN2_VERSION_STR ${PLUGIN2_VERSION_MAJOR}.${PLUGIN2_VERSION_MINOR}.${PLUGIN2_VERSION_PATCH})
SET_TARGET_PROPERTIES(plugin2 PROPERTIES VERSOIN ${PLUGIN2_VERSION_STR} SOVERSION ${PLUGIN2_VERSION_STR})
+TARGET_LINK_LIBRARIES(plugin2 ${pkgs_plugin2_LDFLAGS})
+
INSTALL(TARGETS plugin2 DESTINATION ${DEST_PATH})
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <system_info.h>
#include "plugin1.h"
+#define __FREE(del, arg) do { \
+ if(arg) { \
+ del((void *)(arg)); /*cast any argument to (void*) to avoid build warring*/\
+ arg = NULL; \
+ } \
+ } while (0);
+#define FREE(arg) __FREE(free, arg)
+#define G_FREE(arg) __FREE(g_free, arg)
+
static int config_ini_plugin_init()
{
return 0;
}
+/**
+ * @brief get software version.
+ *
+ * @param szStr the buffer for store SW version
+ * @param nSize buffer size
+ */
static char* config_ini_plugin_get(char* key)
{
printf("config_ini_plugin_get : %s \n", key);
- return key;
+ //return key;
+
+ char szStr[256];
+ int nSize = 256;
+ char *version = NULL;
+ int ret = system_info_get_platform_string("http://tizen.org/feature/platform.version", &version);
+ if (ret != SYSTEM_INFO_ERROR_NONE) {
+ //SETTING_TRACE_ERROR("fail to call system_info_get_platform_string");
+ FREE(version);
+ snprintf(szStr, nSize, "%s", "IDS_ST_HEADER_UNAVAILABLE");
+ return strdup(szStr);
+ }
+
+ char *build_info = NULL;
+ ret = system_info_get_platform_string("http://tizen.org/system/build.string", &build_info);
+ if (ret != SYSTEM_INFO_ERROR_NONE) {
+ //SETTING_TRACE_ERROR("fail to call system_info_get_platform_string");
+ FREE(version);
+ FREE(build_info);
+ snprintf(szStr, nSize, "%s", "IDS_ST_HEADER_UNAVAILABLE");
+ return strdup(szStr);
+ }
+
+ snprintf(szStr, nSize, "TIZEN %s", version);
+
+ FREE(version);
+ FREE(build_info);
+
+ return strdup(szStr);
}
static int config_ini_plugin_set(char* key, char* value)
#-----------------------------------------------------------------------------------
# plugin code 3
#-----------------------------------------------------------------------------------
+
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(pkgs_plugin3 REQUIRED)
+
+FOREACH(flag ${pkgs_plugin3_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Werror-implicit-function-declaration")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+
ADD_LIBRARY(plugin3 SHARED config_net_plugin.c)
SET(PLUGIN3_VERSION_MAJOR 1)
SET(PLUGIN3_VERSION_MINOR 1)
--- /dev/null
+#-----------------------------------------------------------------------------------
+# plugin helloworld
+#-----------------------------------------------------------------------------------
+
+INCLUDE(FindPkgConfig)
+PKG_CHECK_MODULES(pkgs_helloworld_plugin REQUIRED)
+
+FOREACH(flag ${pkgs_helloworld_plugin_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Werror-implicit-function-declaration")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+
+ADD_LIBRARY(helloworld_plugin SHARED helloworld_plugin.c)
+SET(PLUGIN1_VERSION_MAJOR 1)
+SET(PLUGIN1_VERSION_MINOR 1)
+SET(PLUGIN1_VERSION_PATCH 0)
+
+SET (LIBNAME_MAJOR_MINOR_PATCH "libhelloworld_plugin.so.${PLUGIN1_VERSION_MAJOR}.${PLUGIN1_VERSION_MINOR}.${PLUGIN1_VERSION_PATCH}")
+SET (LIBNAME_MAJOR_MINOR "libhelloworld_plugin.so.${PLUGIN1_VERSION_MAJOR}.${PLUGIN1_VERSION_MINOR}")
+SET (LIBNAME_MAJOR "libhelloworld_plugin.so.${PLUGIN1_VERSION_MAJOR}")
+SET (LIBNAME "libhelloworld_plugin.so")
+
+SET(PLUGIN1_VERSION_STR ${PLUGIN1_VERSION_MAJOR}.${PLUGIN1_VERSION_MINOR}.${PLUGIN1_VERSION_PATCH})
+SET_TARGET_PROPERTIES(helloworld_plugin PROPERTIES VERSOIN ${PLUGIN1_VERSION_STR} SOVERSION ${PLUGIN1_VERSION_STR})
+INSTALL(TARGETS helloworld_plugin DESTINATION ${DEST_PATH})
--- /dev/null
+# CMAKE generated file: DO NOT EDIT!
+# Generated by "Unix Makefiles" Generator, CMake Version 2.8
+
+# Default target executed when no arguments are given to make.
+default_target: all
+.PHONY : default_target
+
+#=============================================================================
+# Special targets provided by cmake.
+
+# Disable implicit rules so canonical targets will work.
+.SUFFIXES:
+
+# Remove some rules from gmake that .SUFFIXES does not remove.
+SUFFIXES =
+
+.SUFFIXES: .hpux_make_needs_suffix_list
+
+# Suppress display of executed commands.
+$(VERBOSE).SILENT:
+
+# A target that is always out of date.
+cmake_force:
+.PHONY : cmake_force
+
+#=============================================================================
+# Set environment variables for the build.
+
+# The shell in which to execute make rules.
+SHELL = /bin/sh
+
+# The CMake executable.
+CMAKE_COMMAND = /usr/bin/cmake
+
+# The command to remove a file.
+RM = /usr/bin/cmake -E remove -f
+
+# Escaping for special characters.
+EQUALS = =
+
+# The top-level source directory on which CMake was run.
+CMAKE_SOURCE_DIR = /home/mjpark/scp-image/cprog/libdl_plugin_test
+
+# The top-level build directory on which CMake was run.
+CMAKE_BINARY_DIR = /home/mjpark/scp-image/cprog/libdl_plugin_test
+
+#=============================================================================
+# Targets provided globally by CMake.
+
+# Special rule for the target edit_cache
+edit_cache:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running interactive CMake command-line interface..."
+ /usr/bin/cmake -i .
+.PHONY : edit_cache
+
+# Special rule for the target edit_cache
+edit_cache/fast: edit_cache
+.PHONY : edit_cache/fast
+
+# Special rule for the target install
+install: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
+ /usr/bin/cmake -P cmake_install.cmake
+.PHONY : install
+
+# Special rule for the target install
+install/fast: preinstall/fast
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
+ /usr/bin/cmake -P cmake_install.cmake
+.PHONY : install/fast
+
+# Special rule for the target install/local
+install/local: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
+ /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
+.PHONY : install/local
+
+# Special rule for the target install/local
+install/local/fast: install/local
+.PHONY : install/local/fast
+
+# Special rule for the target install/strip
+install/strip: preinstall
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
+ /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
+.PHONY : install/strip
+
+# Special rule for the target install/strip
+install/strip/fast: install/strip
+.PHONY : install/strip/fast
+
+# Special rule for the target list_install_components
+list_install_components:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
+.PHONY : list_install_components
+
+# Special rule for the target list_install_components
+list_install_components/fast: list_install_components
+.PHONY : list_install_components/fast
+
+# Special rule for the target rebuild_cache
+rebuild_cache:
+ @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
+ /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
+.PHONY : rebuild_cache
+
+# Special rule for the target rebuild_cache
+rebuild_cache/fast: rebuild_cache
+.PHONY : rebuild_cache/fast
+
+# The main all target
+all: cmake_check_build_system
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(CMAKE_COMMAND) -E cmake_progress_start /home/mjpark/scp-image/cprog/libdl_plugin_test/CMakeFiles /home/mjpark/scp-image/cprog/libdl_plugin_test/plugin1/CMakeFiles/progress.marks
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(MAKE) -f CMakeFiles/Makefile2 plugin1/all
+ $(CMAKE_COMMAND) -E cmake_progress_start /home/mjpark/scp-image/cprog/libdl_plugin_test/CMakeFiles 0
+.PHONY : all
+
+# The main clean target
+clean:
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(MAKE) -f CMakeFiles/Makefile2 plugin1/clean
+.PHONY : clean
+
+# The main clean target
+clean/fast: clean
+.PHONY : clean/fast
+
+# Prepare targets for installation.
+preinstall: all
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(MAKE) -f CMakeFiles/Makefile2 plugin1/preinstall
+.PHONY : preinstall
+
+# Prepare targets for installation.
+preinstall/fast:
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(MAKE) -f CMakeFiles/Makefile2 plugin1/preinstall
+.PHONY : preinstall/fast
+
+# clear depends
+depend:
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
+.PHONY : depend
+
+# Convenience name for target.
+plugin1/CMakeFiles/plugin1.dir/rule:
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(MAKE) -f CMakeFiles/Makefile2 plugin1/CMakeFiles/plugin1.dir/rule
+.PHONY : plugin1/CMakeFiles/plugin1.dir/rule
+
+# Convenience name for target.
+plugin1: plugin1/CMakeFiles/plugin1.dir/rule
+.PHONY : plugin1
+
+# fast build rule for target.
+plugin1/fast:
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(MAKE) -f plugin1/CMakeFiles/plugin1.dir/build.make plugin1/CMakeFiles/plugin1.dir/build
+.PHONY : plugin1/fast
+
+complex_plugin.o: complex_plugin.c.o
+.PHONY : complex_plugin.o
+
+# target to build an object file
+complex_plugin.c.o:
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(MAKE) -f plugin1/CMakeFiles/plugin1.dir/build.make plugin1/CMakeFiles/plugin1.dir/complex_plugin.c.o
+.PHONY : complex_plugin.c.o
+
+complex_plugin.i: complex_plugin.c.i
+.PHONY : complex_plugin.i
+
+# target to preprocess a source file
+complex_plugin.c.i:
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(MAKE) -f plugin1/CMakeFiles/plugin1.dir/build.make plugin1/CMakeFiles/plugin1.dir/complex_plugin.c.i
+.PHONY : complex_plugin.c.i
+
+complex_plugin.s: complex_plugin.c.s
+.PHONY : complex_plugin.s
+
+# target to generate assembly for a file
+complex_plugin.c.s:
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(MAKE) -f plugin1/CMakeFiles/plugin1.dir/build.make plugin1/CMakeFiles/plugin1.dir/complex_plugin.c.s
+.PHONY : complex_plugin.c.s
+
+simple_plugin.o: simple_plugin.c.o
+.PHONY : simple_plugin.o
+
+# target to build an object file
+simple_plugin.c.o:
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(MAKE) -f plugin1/CMakeFiles/plugin1.dir/build.make plugin1/CMakeFiles/plugin1.dir/simple_plugin.c.o
+.PHONY : simple_plugin.c.o
+
+simple_plugin.i: simple_plugin.c.i
+.PHONY : simple_plugin.i
+
+# target to preprocess a source file
+simple_plugin.c.i:
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(MAKE) -f plugin1/CMakeFiles/plugin1.dir/build.make plugin1/CMakeFiles/plugin1.dir/simple_plugin.c.i
+.PHONY : simple_plugin.c.i
+
+simple_plugin.s: simple_plugin.c.s
+.PHONY : simple_plugin.s
+
+# target to generate assembly for a file
+simple_plugin.c.s:
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(MAKE) -f plugin1/CMakeFiles/plugin1.dir/build.make plugin1/CMakeFiles/plugin1.dir/simple_plugin.c.s
+.PHONY : simple_plugin.c.s
+
+# Help Target
+help:
+ @echo "The following are some of the valid targets for this Makefile:"
+ @echo "... all (the default if no target is provided)"
+ @echo "... clean"
+ @echo "... depend"
+ @echo "... edit_cache"
+ @echo "... install"
+ @echo "... install/local"
+ @echo "... install/strip"
+ @echo "... list_install_components"
+ @echo "... plugin1"
+ @echo "... rebuild_cache"
+ @echo "... complex_plugin.o"
+ @echo "... complex_plugin.i"
+ @echo "... complex_plugin.s"
+ @echo "... simple_plugin.o"
+ @echo "... simple_plugin.i"
+ @echo "... simple_plugin.s"
+.PHONY : help
+
+
+
+#=============================================================================
+# Special targets to cleanup operation of make.
+
+# Special rule to run CMake to check the build system integrity.
+# No rule that depends on this can have commands that come from listfiles
+# because they might be regenerated.
+cmake_check_build_system:
+ cd /home/mjpark/scp-image/cprog/libdl_plugin_test && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
+.PHONY : cmake_check_build_system
+
--- /dev/null
+#include <stdio.h>
+#include <plugin1.h>
+
+static int helloworld_init()
+{
+ printf("helloworld_init \n");
+ return 0;
+}
+
+static char* helloworld_get_config(char* key)
+{
+ printf("helloworld_get_config : %s \n", key);
+ return key;
+}
+
+static int helloworld_set_config(char* key, char* value)
+{
+ printf("helloworld_set_config key : %s, value : %s \n", key, value);
+ return 0;
+}
+
+static int helloworld_destroy()
+{
+ printf("helloworld_destroy \n");
+ return 0;
+}
+
+
+
+static PluginTizenConfig config = {
+ .init = helloworld_init,
+ .get_config = helloworld_get_config,
+ .set_config = helloworld_set_config,
+ .destroy = helloworld_destroy
+};
+
+PluginTizenConfig* get_plugin_helloworld_object()
+{
+ return &config;
+}