SET(SETTING_FONT setting-font)
SET(SETTING_STORAGE setting-storage)
SET(SETTING_FILEVIEW setting-fileview)
-SET(SETTING_TEST setting-test)
+SET(SETTING_PLUGIN setting-plugin)
SET(SETTING_PROFILE_UG ug-setting-profile-efl)
SET(SETTING_DEVELOPEROPTION_UG ug-setting-developeroption-efl)
SET(SETTING_POWERSAVING_UG ug-setting-powersaving-efl)
SET(SETTING_FONT_UG ug-setting-font-efl)
SET(SETTING_STORAGE_UG ug-setting-storage-efl)
-SET(SETTING_TEST_UG ug-setting-test-efl)
+SET(SETTING_PLUGIN_UG ug-setting-plugin-efl)
SET(LIB_SETTING_COMMON setting-common)
#setting main view build start
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include)
-
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_COMMON})
+ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_PLUGIN})
#ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_STORAGE})
#ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_PHONE})
ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_CONNECTIVITY})
#ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_POWERSAVING})
#ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_FONT})
#ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_FILEVIEW})
-ADD_SUBDIRECTORY(${CMAKE_SOURCE_DIR}/${SETTING_TEST})
ADD_SUBDIRECTORY(src)
{
"key_name" : "Test plugin",
"icon_path" : "/usr/apps/org.tizen.setting/res/icons/A01-1_icon_Wi-Fi.png",
- "ug_args" : "setting-test-efl",
+ "ug_args" : "setting-plugin-efl",
"pos" : 0,
"click_times" : 0,
"is_resetable" : 1
./src/setting-common-draw-naviframe.c
./src/setting-common-draw-genlist.c
./src/setting-common-general-func.c
- ./src/setting-plugin.c
+ ./src/setting-common-plugin.c
./src/setting-cfg.c
)
*/
-#include <setting-plugin.h>
+#include <setting-common-plugin.h>
#include <unistd.h>
#include <eina_list.h>
#include <glib.h>
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include)
INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs_test REQUIRED elementary ecore ecore-x edje evas appcore-common appcore-efl ui-gadget-1 capi-appfw-application dlog capi-system-device mdm libxml-2.0)
+pkg_check_modules(pkgs_plugin REQUIRED elementary ecore ecore-x edje evas appcore-common appcore-efl ui-gadget-1 capi-appfw-application dlog capi-system-device mdm libxml-2.0)
-FOREACH(flag ${pkgs_test_CFLAGS})
+FOREACH(flag ${pkgs_plugin_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
-ADD_LIBRARY(${SETTING_TEST_UG} SHARED
- ./src/setting-test.c
- ./src/setting-test-main.c
+ADD_LIBRARY(${SETTING_PLUGIN_UG} SHARED
+ ./src/setting-plugin.c
+ ./src/setting-plugin-main.c
)
-TARGET_LINK_LIBRARIES(${SETTING_TEST_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common)
-TARGET_LINK_LIBRARIES(${SETTING_TEST_UG} ${pkgs_test_LDFLAGS})
+TARGET_LINK_LIBRARIES(${SETTING_PLUGIN_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common)
+TARGET_LINK_LIBRARIES(${SETTING_PLUGIN_UG} ${pkgs_plugin_LDFLAGS})
-INSTALL(TARGETS ${SETTING_TEST_UG} DESTINATION /usr/ug/lib)
+INSTALL(TARGETS ${SETTING_PLUGIN_UG} DESTINATION /usr/ug/lib)
* limitations under the License.
*
*/
-#ifndef __SETTING_TEST_MAIN_H__
-#define __SETTING_TEST_MAIN_H__
+#ifndef __SETTING_PLUGIN_MAIN_H__
+#define __SETTING_PLUGIN_MAIN_H__
-#include <setting-test.h>
+#include <setting-plugin.h>
-#endif /* __SETTING_TEST_MAIN_H__ */
+#endif /* __SETTING_PLUGIN_MAIN_H__ */
* limitations under the License.
*
*/
-#ifndef __SETTING_TEST_H__
-#define __SETTING_TEST_H__
+#ifndef __SETTING_PLUGIN_H__
+#define __SETTING_PLUGIN_H__
#include <stdio.h>
#include <string.h>
#include <Elementary.h>
-
-
#include <glib-object.h>
#include <setting-common-draw-widget.h>
#include <setting-common-view.h>
-#include <setting-plugin.h>
+#include <setting-common-plugin.h>
#include <device.h>
-typedef struct _SettingTestUG SettingTestUG;
+typedef struct _SettingPluginUG SettingPluginUG;
/**
- * Setting Test UG context
- * all UG function has void* as an agument. this is casted back to SettingTestUG
+ * Setting Plugin UG context
+ * all UG function has void* as an agument. this is casted back to SettingPluginUG
* and the functions access app context.
*/
-struct _SettingTestUG {
+struct _SettingPluginUG {
ui_gadget_h ug;
/* add more variables here (move your appdata to here) */
PluginNode* plugin_node;
};
-extern setting_view setting_view_test_main;
+extern setting_view setting_view_plugin_main;
-void setting_test_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv);
+void setting_plugin_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode, void *priv);
-#endif /* __SETTING_TEST_H__ */
+#endif /* __SETTING_PLUGIN_H__ */
* limitations under the License.
*
*/
-#include <setting-test-main.h>
+#include <setting-plugin-main.h>
#include <Ecore_X.h>
-static int setting_test_main_create(void *cb);
-static int setting_test_main_destroy(void *cb);
-static int setting_test_main_update(void *cb);
-static int setting_test_main_cleanup(void *cb);
+static int setting_plugin_main_create(void *cb);
+static int setting_plugin_main_destroy(void *cb);
+static int setting_plugin_main_update(void *cb);
+static int setting_plugin_main_cleanup(void *cb);
-setting_view setting_view_test_main = {
- .create = setting_test_main_create,
- .destroy = setting_test_main_destroy,
- .update = setting_test_main_update,
- .cleanup = setting_test_main_cleanup,
+setting_view setting_view_plugin_main = {
+ .create = setting_plugin_main_create,
+ .destroy = setting_plugin_main_destroy,
+ .update = setting_plugin_main_update,
+ .cleanup = setting_plugin_main_cleanup,
};
-static void setting_test_main_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info);
+static void setting_plugin_main_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info);
/* ***************************************************
*basic func
*
***************************************************/
-static int setting_test_main_create(void *cb)
+static int setting_plugin_main_create(void *cb)
{
SETTING_TRACE_BEGIN;
/* error check */
retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
- SettingTestUG *ad = (SettingTestUG *) cb;
+ SettingPluginUG *ad = (SettingPluginUG *) cb;
Evas_Object *scroller = NULL;
ad->win_get,
"TEST", setBtnStr,
NULL,
- setting_test_main_click_softkey_back_cb,
+ setting_plugin_main_click_softkey_back_cb,
NULL, ad, &scroller,
&(ad->navi_bar));
#endif
ad->plugin_node = plugin_node; // the selected plugin name
#endif
- setting_view_test_main.is_create = 1;
+ setting_view_plugin_main.is_create = 1;
return SETTING_RETURN_SUCCESS;
}
-static int setting_test_main_destroy(void *cb)
+static int setting_plugin_main_destroy(void *cb)
{
SETTING_TRACE_BEGIN;
/* error check */
retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
- SettingTestUG *ad = (SettingTestUG *) cb;
+ SettingPluginUG *ad = (SettingPluginUG *) cb;
setting_dbus_handler_fini();
//if (ad->ly_main != NULL) {
// evas_object_del(ad->ly_main);
- setting_view_test_main.is_create = 0;
+ setting_view_plugin_main.is_create = 0;
//}
return SETTING_RETURN_SUCCESS;
}
-static int setting_test_main_update(void *cb)
+static int setting_plugin_main_update(void *cb)
{
SETTING_TRACE_BEGIN;
/* error check */
retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
- SettingTestUG *ad = (SettingTestUG *) cb;
+ SettingPluginUG *ad = (SettingPluginUG *) cb;
if (ad->ly_main != NULL) {
evas_object_show(ad->ly_main);
return SETTING_RETURN_SUCCESS;
}
-static int setting_test_main_cleanup(void *cb)
+static int setting_plugin_main_cleanup(void *cb)
{
SETTING_TRACE_BEGIN;
return SETTING_RETURN_SUCCESS;
*
***************************************************/
-static void setting_test_main_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info)
+static void setting_plugin_main_click_softkey_back_cb(void *data, Evas_Object *obj, void *event_info)
{
SETTING_TRACE_BEGIN;
/* error check */
setting_retm_if(data == NULL,
- "[Setting > Test] Data parameter is NULL");
+ "[Setting > Plugin] Data parameter is NULL");
- SettingTestUG *ad = (SettingTestUG *) data;
+ SettingPluginUG *ad = (SettingPluginUG *) data;
/* Send destroy request */
ug_destroy_me(ad->ug);
*
*/
-#include <setting-test.h>
+#include <setting-plugin.h>
#include <Ecore_X.h>
#define SETTING_BRIGHTNESS_LEVEL_FOR_EMUL 24
#define UG_MODULE_API __attribute__ ((visibility("default")))
#endif
-static void setting_test_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
+static void setting_plugin_ug_cb_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
- SettingTestUG *ad = (SettingTestUG *) data;
+ SettingPluginUG *ad = (SettingPluginUG *) data;
setting_view_update(ad->view_to_load, ad);
}
static void _init_itc(void* data)
{
- SettingTestUG *testUG = (SettingTestUG *)data;
+ SettingPluginUG *pluginUG = (SettingPluginUG *)data;
//----------------------------------------------------------------
// dialogue/separator/21/with_line
//----------------------------------------------------------------
- testUG->itc_seperator.item_style = "dialogue/separator";
- testUG->itc_seperator.func.text_get = NULL;
- testUG->itc_seperator.func.content_get = NULL;
- testUG->itc_seperator.func.state_get = NULL;
- testUG->itc_seperator.func.del = NULL;
+ pluginUG->itc_seperator.item_style = "dialogue/separator";
+ pluginUG->itc_seperator.func.text_get = NULL;
+ pluginUG->itc_seperator.func.content_get = NULL;
+ pluginUG->itc_seperator.func.state_get = NULL;
+ pluginUG->itc_seperator.func.del = NULL;
//----------------------------------------------------------------
// dialogue/1icon
// add genlist
//----------------------------------------------------------------
- testUG->itc_layout.item_style = "dialogue/1icon";
- testUG->itc_layout.func.text_get = _gl_text_handler;
- testUG->itc_layout.func.content_get = _gl_content_handler;
- testUG->itc_layout.func.state_get = NULL;
- testUG->itc_layout.func.del = _gl_del_handler;
+ pluginUG->itc_layout.item_style = "dialogue/1icon";
+ pluginUG->itc_layout.func.text_get = _gl_text_handler;
+ pluginUG->itc_layout.func.content_get = _gl_content_handler;
+ pluginUG->itc_layout.func.state_get = NULL;
+ pluginUG->itc_layout.func.del = _gl_del_handler;
}
-static void *setting_test_ug_on_create(ui_gadget_h ug,
+static void *setting_plugin_ug_on_create(ui_gadget_h ug,
enum ug_mode mode, service_h service,
void *priv)
{
setting_retvm_if((!priv), NULL, "!priv");
- SettingTestUG *testUG = priv;
- testUG->ug = ug;
+ SettingPluginUG *pluginUG = priv;
+ pluginUG->ug = ug;
setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
- testUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug);
- testUG->win_get = (Evas_Object *) ug_get_window();
- evas_object_show(testUG->win_main_layout);
+ pluginUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug);
+ pluginUG->win_get = (Evas_Object *) ug_get_window();
+ evas_object_show(pluginUG->win_main_layout);
- testUG->evas = evas_object_evas_get(testUG->win_main_layout);
+ pluginUG->evas = evas_object_evas_get(pluginUG->win_main_layout);
- setting_retvm_if(testUG->win_main_layout == NULL, NULL, "cannot get main window ");
+ setting_retvm_if(pluginUG->win_main_layout == NULL, NULL, "cannot get main window ");
/* register view node table */
// init ITC for Gen-List
_init_itc(testUG);
- return testUG->ly_main;
+ return pluginUG->ly_main;
}
-static void setting_test_ug_on_start(ui_gadget_h ug, service_h service,
+static void setting_plugin_ug_on_start(ui_gadget_h ug, service_h service,
void *priv)
{
}
-static void setting_test_ug_on_pause(ui_gadget_h ug, service_h service,
+static void setting_plugin_ug_on_pause(ui_gadget_h ug, service_h service,
void *priv)
{
}
-static void setting_test_ug_on_resume(ui_gadget_h ug, service_h service,
+static void setting_plugin_ug_on_resume(ui_gadget_h ug, service_h service,
void *priv)
{
}
-static void setting_test_ug_on_destroy(ui_gadget_h ug, service_h service,
+static void setting_plugin_ug_on_destroy(ui_gadget_h ug, service_h service,
void *priv)
{
SETTING_TRACE_BEGIN;
setting_retm_if((!priv), "!priv");
- SettingTestUG *testUG = priv;
+ SettingPluginUG *pluginUG = priv;
/* fix flash issue for gallery */
- evas_object_event_callback_del(testUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_test_ug_cb_resize);
- testUG->ug = ug;
+ evas_object_event_callback_del(pluginUG->win_main_layout, EVAS_CALLBACK_RESIZE, setting_plugin_ug_cb_resize);
+ pluginUG->ug = ug;
/* called when this shared gadget is terminated. similar with app_exit */
- if (&setting_view_test_main == testUG->view_to_load) {
- setting_view_destroy(&setting_view_test_main, testUG);
+ if (&setting_view_plugin_main == pluginUG->view_to_load) {
+ setting_view_destroy(&setting_view_plugin_main, pluginUG);
}
- if (NULL != ug_get_layout(testUG->ug)) {
- evas_object_hide((Evas_Object *) ug_get_layout(testUG->ug));
- evas_object_del((Evas_Object *) ug_get_layout(testUG->ug));
+ if (NULL != ug_get_layout(pluginUG->ug)) {
+ evas_object_hide((Evas_Object *) ug_get_layout(pluginUG->ug));
+ evas_object_del((Evas_Object *) ug_get_layout(pluginUG->ug));
}
SETTING_TRACE_END;
}
-static void setting_test_ug_on_message(ui_gadget_h ug, service_h msg,
+static void setting_plugin_ug_on_message(ui_gadget_h ug, service_h msg,
service_h service, void *priv)
{
SETTING_TRACE_BEGIN;
}
-static void setting_test_ug_on_event(ui_gadget_h ug,
+static void setting_plugin_ug_on_event(ui_gadget_h ug,
enum ug_event event, service_h service,
void *priv)
{
}
}
-static void setting_test_ug_on_key_event(ui_gadget_h ug,
+static void setting_plugin_ug_on_key_event(ui_gadget_h ug,
enum ug_key_event event,
service_h service, void *priv)
{
SETTING_TRACE_BEGIN;
- SettingTestUG *ad = (SettingTestUG *) priv;
+ SettingPluginUG *ad = (SettingPluginUG *) priv;
switch (event) {
case UG_KEY_EVENT_END:
UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
{
SETTING_TRACE_BEGIN;
- SettingTestUG *testUG = calloc(1, sizeof(SettingTestUG));
- setting_retvm_if(!testUG, -1, "Create SettingTestUG obj failed");
-
- ops->create = setting_test_ug_on_create;
- ops->start = setting_test_ug_on_start;
- ops->pause = setting_test_ug_on_pause;
- ops->resume = setting_test_ug_on_resume;
- ops->destroy = setting_test_ug_on_destroy;
- ops->message = setting_test_ug_on_message;
- ops->event = setting_test_ug_on_event;
- ops->key_event = setting_test_ug_on_key_event;
- ops->priv = testUG;
+ SettingPluginUG *pluginUG = calloc(1, sizeof(SettingPluginUG));
+ setting_retvm_if(!pluginUG, -1, "Create SettingPluginUG obj failed");
+
+ ops->create = setting_plugin_ug_on_create;
+ ops->start = setting_plugin_ug_on_start;
+ ops->pause = setting_plugin_ug_on_pause;
+ ops->resume = setting_plugin_ug_on_resume;
+ ops->destroy = setting_plugin_ug_on_destroy;
+ ops->message = setting_plugin_ug_on_message;
+ ops->event = setting_plugin_ug_on_event;
+ ops->key_event = setting_plugin_ug_on_key_event;
+ ops->priv = pluginUG;
ops->opt = UG_OPT_INDICATOR_ENABLE;
return 0;
UG_MODULE_API void UG_MODULE_EXIT(struct ug_module_ops *ops)
{
SETTING_TRACE_BEGIN;
- struct SettingTestUG *testUG;
+ struct SettingPluginUG *pluginUG;
setting_retm_if(!ops, "ops == NULL");
- testUG = ops->priv;
- if (testUG) {
- FREE(testUG);
+ pluginUG = ops->priv;
+ if (pluginUG) {
+ FREE(pluginUG);
}
}
*
***************************************************/
-void setting_test_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode,
+void setting_plugin_layout_ug_cb(ui_gadget_h ug, enum ug_mode mode,
void *priv)
{
- SettingTestUG *ad = (SettingTestUG *) priv;
+ SettingPluginUG *ad = (SettingPluginUG *) priv;
Evas_Object *base;
if (!priv)
#include <bluetooth.h>
#include <nfc.h>
-#include <setting-plugin.h>
+#include <setting-common-plugin.h>
#define PLUGIN_PREFIX "/opt"
#include <Ecore_X.h>
#include <sensor.h>
#include <aul.h>
-#include "setting-plugin.h"
+#include "setting-common-plugin.h"
#include "setting-main.h"
#include <elm_object.h>
#include <appsvc.h>