2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.tizenopensource.org/license
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include <setting-connectivity-usb-help.h>
20 #define HELP_MGS_BUF_LEN 256
22 static int setting_connectivity_usb_help_create(void *cb);
23 static int setting_connectivity_usb_help_destroy(void *cb);
24 static int setting_connectivity_usb_help_update(void *cb);
25 static int setting_connectivity_usb_help_cleanup(void *cb);
27 setting_view setting_view_connectivity_usb_help = {
28 .create = setting_connectivity_usb_help_create,
29 .destroy = setting_connectivity_usb_help_destroy,
30 .update = setting_connectivity_usb_help_update,
31 .cleanup = setting_connectivity_usb_help_cleanup,
34 /* **************************************************
38 ***************************************************/
40 static int setting_connectivity_usb_help_create(void *cb)
42 retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
44 SettingConnectivityUG *ad = (SettingConnectivityUG *) cb;
46 char usb_debugging_help_msg[HELP_MGS_BUF_LEN];
48 setting_push_layout_navi_bar_genlist(ad->win_main_layout,
50 _("IDS_COM_BODY_HELP"),
51 _("IDS_COM_BODY_BACK"),
53 setting_connectivity_usb_help_click_back_cb,
57 snprintf(usb_debugging_help_msg, HELP_MGS_BUF_LEN, "<b>%s</b><br>""%s",
58 _("IDS_ST_BODY_USB_DEBUGGING"),
59 _("IDS_ST_BODY_THIS_MODE_IS_FOR_APPLICATION_DEVELOPERS_YOU_CAN_TEST_AND_DEVELOP_SOFTWARE"));
61 setting_create_Gendial_field_def(genlist, &(ad->itc_help_style),
63 ad, SWALLOW_Type_LAYOUT_SPECIALIZTION_X, NULL, NULL,
64 0, usb_debugging_help_msg, NULL,
67 setting_view_connectivity_usb_help.is_create = 1;
69 return SETTING_RETURN_SUCCESS;
72 static int setting_connectivity_usb_help_destroy(void *cb)
75 retv_if(cb == NULL, SETTING_GENERAL_ERR_NULL_DATA_PARAMETER);
77 SettingConnectivityUG *ad = (SettingConnectivityUG *) cb;
79 elm_naviframe_item_pop(ad->navi_bar);
80 setting_view_connectivity_usb_help.is_create = 0;
82 return SETTING_RETURN_SUCCESS;
85 static int setting_connectivity_usb_help_update(void *cb)
87 return SETTING_RETURN_SUCCESS;
90 static int setting_connectivity_usb_help_cleanup(void *cb)
92 return setting_connectivity_usb_help_destroy(cb);
95 /* ***************************************************
99 ***************************************************/
102 setting_connectivity_usb_help_click_back_cb(void *data, Evas_Object *obj,
106 setting_retm_if(data == NULL, " Data parameter is NULL");
108 SettingConnectivityUG *ad = (SettingConnectivityUG *) data;
109 setting_view_change(&setting_view_connectivity_usb_help,
110 &setting_view_connectivity_usb, ad);