+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#ifndef __main_H__
#define __main_H__
CHANGE_LANGUAGE
} state_e;
-#define POWER_ON_SIGN_TEXT dgettext(PACKAGE, "CONV_SETTING_APP_POWER_ON")
-#define DEVICE_LIST_SELECT_POPUP_TITLE_TEXT dgettext(PACKAGE, "CONV_DEVICE_LIST_SELECT_POPUP_TITLE")
-#define DISCOVERED_LIST_SELECT_POPUP_CONTENT_TEXT dgettext(PACKAGE, "CONV_DISCOVERED_LIST_SELECT_POPUP_CONTENT")
-#define PERMITTED_LIST_SELECT_POPUP_CONTENT_TEXT dgettext(PACKAGE, "CONV_PERMITTED_LIST_SELECT_POPUP_CONTENT")
-#define DENIED_LIST_SELECT_POPUP_CONTENT_TEXT dgettext(PACKAGE, "CONV_DENIED_LIST_SELECT_POPUP_CONTENT")
-#define DEVICE_LIST_SELECT_POPUP_CANCEL_BUTTON_TEXT dgettext(PACKAGE, "CONV_DEVICE_LIST_SELECT_POPUP_CANCEL_BUTTON")
-#define DEVICE_LIST_SELECT_POPUP_PERMIT_BUTTON_TEXT dgettext(PACKAGE, "CONV_DEVICE_LIST_SELECT_POPUP_PERMIT_BUTTON")
-#define DEVICE_LIST_SELECT_POPUP_DENY_BUTTON_TEXT dgettext(PACKAGE, "CONV_DEVICE_LIST_SELECT_POPUP_DENY_BUTTON")
-#define DEVICE_LIST_SELECT_POPUP_REMOVE_BUTTON_TEXT dgettext(PACKAGE, "CONV_DEVICE_LIST_SELECT_POPUP_REMOVE_BUTTON")
+#define TITLE_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_TITLE_TEXT")
+#define ACCESS_CONTROL_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_ACCESS_CONTROL_TEXT")
+#define NOTICE_TITLE_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_NOTICE_TITLE_TEXT")
+#define POWER_ON_NOTICE_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_POWER_ON_NOTICE_TEXT")
+#define POWER_OFF_NOTICE_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_POWER_OFF_NOTICE_TEXT")
+#define ALLOWED_DEVICE_LIST_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_ALLOWED_DEVICE_LIST_TEXT")
+#define DENIED_DEVICE_LIST_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_DENIED_DEVICE_LIST_TEXT")
+#define AVAILABLE_DEVICE_LIST_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_AVAILABLE_DEVICE_LIST_TEXT")
+#define SCAN_BUTTON_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_SCAN_BUTTON_TEXT")
+#define STOP_BUTTON_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_STOP_BUTTON_TEXT")
+#define AVAILABLE_POPUP_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_AVAILABLE_POPUP_TEXT")
+#define ALLOWED_POPUP_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_ALLOWED_POPUP_TEXT")
+#define DENIED_POPUP_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_DENIED_POPUP_TEXT")
+#define CANCEL_BUTTON_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_CANCEL_BUTTON_TEXT")
+#define ALLOW_BUTTON_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_ALLOW_BUTTON_TEXT")
+#define DENY_BUTTON_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_DENY_BUTTON_TEXT")
+#define REMOVE_BUTTON_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_REMOVE_BUTTON_TEXT")
+#define REMOVE_BUTTON_TEXT dgettext(PACKAGE, "D2D_CONV_SETTING_M_REMOVE_BUTTON_TEXT")
/* state event lisetner */
typedef void (*event_listener)(state_e state);
msgid "CONV_DEVICE_LIST_SELECT_POPUP_REMOVE_BUTTON"
msgstr "Remove"
+
+
+
+
+msgid "D2D_CONV_SETTING_M_TITLE_TEXT"
+msgstr "Convergence"
+
+msgid "D2D_CONV_SETTING_M_ACCESS_CONTROL_TEXT"
+msgstr "Access Control"
+
+msgid "D2D_CONV_SETTING_M_NOTICE_TITLE_TEXT"
+msgstr "Notice"
+
+msgid "D2D_CONV_SETTING_M_POWER_ON_NOTICE_TEXT"
+msgstr "Now, you can experience a variety of convergence features! Please be aware that a remote device can launch an application on your device or access data in your application. A notice will appear when your device is accessed by remote devices. You can disable this feature by clicking the button again."
+
+msgid "D2D_CONV_SETTING_M_POWER_OFF_NOTICE_TEXT"
+msgstr "You can experience a variety of convergence feature, if you enable TIZEN Convergence an application on a separate device can be launched remotely, or communicate between applications on separate devices. Please be aware that remote device can launch an application on your device or access data in your application. A notice will appear when your device is accessed by remote devices."
+
+msgid "D2D_CONV_SETTING_M_ALLOWED_DEVICE_LIST_TEXT"
+msgstr "Allowed devices"
+
+msgid "D2D_CONV_SETTING_M_DENIED_DEVICE_LIST_TEXT"
+msgstr "Denied devices"
+
+msgid "D2D_CONV_SETTING_M_AVAILABLE_DEVICE_LIST_TEXT"
+msgstr "Available devices"
+
+msgid "D2D_CONV_SETTING_M_SCAN_BUTTON_TEXT"
+msgstr "Scan"
+
+msgid "D2D_CONV_SETTING_M_STOP_BUTTON_TEXT"
+msgstr "Stop"
+
+msgid "D2D_CONV_SETTING_M_AVAILABLE_POPUP_TEXT"
+msgstr "you can 'Allow' or 'Deny' to access without passkey."
+
+msgid "D2D_CONV_SETTING_M_ALLOWED_POPUP_TEXT"
+msgstr "you can 'Deny' to access without passkey, or 'Remove' from the list."
+
+msgid "D2D_CONV_SETTING_M_DENIED_POPUP_TEXT"
+msgstr "you can 'Allow' to access without passkey, or 'Remove' from the list."
+
+msgid "D2D_CONV_SETTING_M_CANCEL_BUTTON_TEXT"
+msgstr "Cancel"
+
+msgid "D2D_CONV_SETTING_M_ALLOW_BUTTON_TEXT"
+msgstr "Allow"
+
+msgid "D2D_CONV_SETTING_M_DENY_BUTTON_TEXT"
+msgstr "Deny"
+
+msgid "D2D_CONV_SETTING_M_REMOVE_BUTTON_TEXT"
+msgstr "Remove"
\ No newline at end of file
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "main.h"
static bool app_create(void *data)
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "main.h"
static int listener_num = 0;
create_setting_item_power(layout);
}
- Elm_Object_Item *menu = elm_naviframe_item_push(parent, "Convergence", NULL, NULL, background, NULL);
+ Elm_Object_Item *menu = elm_naviframe_item_push(parent, TITLE_TEXT, NULL, NULL, background, NULL);
elm_naviframe_item_pop_cb_set(menu, setting_menu_pop_cb, NULL);
}
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "main.h"
#define DISCOVERY_TIME 8
do_haptic(50);
char *button_name = (char *)data;
- dlog_print(DLOG_INFO, LOG_TAG, "Button Name : %s", button_name);
- if (!strcmp(DEVICE_LIST_SELECT_POPUP_PERMIT_BUTTON_TEXT, button_name)) {
+ if (!strcmp(ALLOW_BUTTON_TEXT, button_name)) {
conv_internal_set_acl_state(selected_device->mac_address, selected_device->type, selected_device->name, 0);
- } else if (!strcmp(DEVICE_LIST_SELECT_POPUP_DENY_BUTTON_TEXT, button_name)) {
+ } else if (!strcmp(DENY_BUTTON_TEXT, button_name)) {
conv_internal_set_acl_state(selected_device->mac_address, selected_device->type, selected_device->name, 1);
- } else if (!strcmp(DEVICE_LIST_SELECT_POPUP_REMOVE_BUTTON_TEXT, button_name)) {
+ } else if (!strcmp(REMOVE_BUTTON_TEXT, button_name)) {
conv_internal_remove_acl_device(selected_device->mac_address);
}
selected_device->type = info->type;
selected_device->mac_address = info->mac_address;
- char *title = DEVICE_LIST_SELECT_POPUP_TITLE_TEXT;
+ char *title = ACCESS_CONTROL_TEXT;
char content[1024];
char *left_button_text = NULL;
char *center_button_text = NULL;
char *right_button_text = NULL;
if (!strcmp(selected_device->list_type, LIST_TYPE_PERMITTED)) {
- snprintf(content, sizeof(content), "'%s'%s",selected_device->name ,PERMITTED_LIST_SELECT_POPUP_CONTENT_TEXT);
- left_button_text = DEVICE_LIST_SELECT_POPUP_CANCEL_BUTTON_TEXT;
- center_button_text = DEVICE_LIST_SELECT_POPUP_DENY_BUTTON_TEXT;
- right_button_text = DEVICE_LIST_SELECT_POPUP_REMOVE_BUTTON_TEXT;
+ snprintf(content, sizeof(content), "'%s', %s", selected_device->name, ALLOWED_POPUP_TEXT);
+ left_button_text = CANCEL_BUTTON_TEXT;
+ center_button_text = DENY_BUTTON_TEXT;
+ right_button_text = REMOVE_BUTTON_TEXT;
} else if (!strcmp(selected_device->list_type, LIST_TYPE_DENIED)) {
- snprintf(content, sizeof(content), "'%s'%s",selected_device->name ,DENIED_LIST_SELECT_POPUP_CONTENT_TEXT);
- left_button_text = DEVICE_LIST_SELECT_POPUP_CANCEL_BUTTON_TEXT;
- center_button_text = DEVICE_LIST_SELECT_POPUP_PERMIT_BUTTON_TEXT;
- right_button_text = DEVICE_LIST_SELECT_POPUP_REMOVE_BUTTON_TEXT;
+ snprintf(content, sizeof(content), "'%s', %s", selected_device->name, DENIED_POPUP_TEXT);
+ left_button_text = CANCEL_BUTTON_TEXT;
+ center_button_text = ALLOW_BUTTON_TEXT;
+ right_button_text = REMOVE_BUTTON_TEXT;
} else if (!strcmp(selected_device->list_type, LIST_TYPE_DISCOVERED)) {
- snprintf(content, sizeof(content), "'%s'%s",selected_device->name ,DISCOVERED_LIST_SELECT_POPUP_CONTENT_TEXT);
- left_button_text = DEVICE_LIST_SELECT_POPUP_CANCEL_BUTTON_TEXT;
- center_button_text = DEVICE_LIST_SELECT_POPUP_DENY_BUTTON_TEXT;
- right_button_text = DEVICE_LIST_SELECT_POPUP_PERMIT_BUTTON_TEXT;
+ snprintf(content, sizeof(content), "'%s', %s", selected_device->name, AVAILABLE_POPUP_TEXT);
+ left_button_text = CANCEL_BUTTON_TEXT;
+ center_button_text = DENY_BUTTON_TEXT;
+ right_button_text = ALLOW_BUTTON_TEXT;
}
show_device_list_selected_popup(title, content, left_button_text, center_button_text, right_button_text);
char *type = elm_object_item_data_get(it);
- if (!strcmp(LIST_TYPE_DISCOVERED, type)) {
+ if (!strcmp(AVAILABLE_DEVICE_LIST_TEXT, type)) {
for (index = 0; index <= discovered_devices_index; index++){
if (discovered_devices_info[index] != NULL) {
elm_genlist_item_append(list, device_item_builder, discovered_devices_info[index], it, ELM_GENLIST_ITEM_NONE, device_list_select_cb, discovered_devices_info[index]);
}
}
- } else if (!strcmp(LIST_TYPE_PERMITTED, type)) {
+ } else if (!strcmp(ALLOWED_DEVICE_LIST_TEXT, type)) {
for (index = 0; index <= permitted_devices_index; index++){
if (permitted_devices_info[index] != NULL) {
elm_genlist_item_append(list, device_item_builder, permitted_devices_info[index], it, ELM_GENLIST_ITEM_NONE, device_list_select_cb, discovered_devices_info[index]);
}
}
- } else if (!strcmp(LIST_TYPE_DENIED, type)) {
+ } else if (!strcmp(DENIED_DEVICE_LIST_TEXT, type)) {
for (index = 0; index <= denied_devices_index; index++){
if (denied_devices_info[index] != NULL) {
elm_genlist_item_append(list, device_item_builder, denied_devices_info[index], it, ELM_GENLIST_ITEM_NONE, device_list_select_cb, discovered_devices_info[index]);
static void acl_device_info(char *mac_address, char *device_type, char *device_name, int access_control_state, void *user_data)
{
- dlog_print(DLOG_ERROR, LOG_TAG, "Device_Type = %s", device_type);
-
if(access_control_state == 0) {
int index = ++permitted_devices_index;
permitted_devices_info[index] = (device_info_s *) calloc(sizeof(device_info_s), 1);
group_item_builder->func.text_get = group_title_text_cb;
}
- permitted_device_group = elm_genlist_item_append(group_list_item, group_item_builder, LIST_TYPE_PERMITTED, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
+ permitted_device_group = elm_genlist_item_append(group_list_item, group_item_builder, ALLOWED_DEVICE_LIST_TEXT, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
permitted_list = elm_object_item_widget_get(permitted_device_group);
- denied_device_group = elm_genlist_item_append(group_list_item, group_item_builder, LIST_TYPE_DENIED, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
+ denied_device_group = elm_genlist_item_append(group_list_item, group_item_builder, DENIED_DEVICE_LIST_TEXT, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
denied_list = elm_object_item_widget_get(denied_device_group);
- discovered_device_group = elm_genlist_item_append(group_list_item, group_item_builder, LIST_TYPE_DISCOVERED, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
+ discovered_device_group = elm_genlist_item_append(group_list_item, group_item_builder, AVAILABLE_DEVICE_LIST_TEXT, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
discovered_list = elm_object_item_widget_get(discovered_device_group);
elm_genlist_item_class_free(group_item_builder);
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "main.h"
static Evas_Object *discovery_button_item = NULL;
break;
case DISCOVERY_START :
discovery_state = DISCOVERY_START;
- elm_object_text_set(discovery_button_item, "Discovery Stop");
+ elm_object_text_set(discovery_button_item, STOP_BUTTON_TEXT);
break;
case DISCOVERY_STOP :
discovery_state = DISCOVERY_STOP;
- elm_object_text_set(discovery_button_item, "Discovery Start");
+ elm_object_text_set(discovery_button_item, SCAN_BUTTON_TEXT);
break;
default :
break;
discovery_button_item = elm_button_add(parent);
elm_object_style_set(discovery_button_item, "bottom");
- elm_object_text_set(discovery_button_item, "Discovery Start");
+ elm_object_text_set(discovery_button_item, SCAN_BUTTON_TEXT);
evas_object_smart_callback_add(discovery_button_item, "clicked", discovery_button_click_cb, NULL);
elm_grid_pack(parent, discovery_button_item, 0, 87, 100, 13);
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "main.h"
static Evas_Object *power_switch = NULL;
static char* text_get_cb(void *data, Evas_Object *obj, const char *part)
{
if (!strcmp("elm.text", part)) {
- return strdup("Convergence");
+ return strdup(TITLE_TEXT);
}
return NULL;
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "main.h"
static Evas_Object *sign_item = NULL;
static char* text_get_cb(void *data, Evas_Object *obj, const char *part)
{
if (!strcmp("elm.text.multiline", part)) {
- char *notice = POWER_ON_SIGN_TEXT;
char buf[1024];
- snprintf(buf, sizeof(buf), "<font color=#3DB9CCFF>Notice</font><br>%s", notice);
+ snprintf(buf, sizeof(buf), "<font color=#3DB9CCFF>%s</font><br>%s", NOTICE_TITLE_TEXT, POWER_OFF_NOTICE_TEXT);
return strdup(buf);
}
return NULL;
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
#include "main.h"
extern void do_haptic(int count)