typedef struct NotiData
{
- const char* title;
- const char* content;
- const char* icon;
+ String title;
+ String content;
+ String icon;
String launch_app;
int noti_id;
} NotificationData;
#ifdef HAVE_NOTIFICATION
static NotificationData hwkbd_module_noti = {"Input detected from hardware keyboard", "Tap to use virtual keyboard", ISF_KEYBOARD_ICON_FILE, "", 0};
-static NotificationData ise_selector_module_noti = {"Select input method", NULL, "", "", 0};
+static NotificationData ise_selector_module_noti = {"Select input method", "", "", "", 0};
#endif
#if ISF_BUILD_CANDIDATE_UI
if (notification != NULL) {
notification_set_pkgname (notification, "isf-panel-efl");
notification_set_layout (notification, NOTIFICATION_LY_ONGOING_EVENT);
- if (noti_data->icon)
- notification_set_image (notification, NOTIFICATION_IMAGE_TYPE_ICON, noti_data->icon);
-
- if (noti_data->title)
- notification_set_text (notification, NOTIFICATION_TEXT_TYPE_TITLE, _(noti_data->title), NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
-
- if (noti_data->content)
- notification_set_text (notification, NOTIFICATION_TEXT_TYPE_CONTENT, _(noti_data->content), NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
-
+ notification_set_image (notification, NOTIFICATION_IMAGE_TYPE_ICON, noti_data->icon.c_str());
+ notification_set_text (notification, NOTIFICATION_TEXT_TYPE_TITLE, _(noti_data->title.c_str()), NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+ notification_set_text (notification, NOTIFICATION_TEXT_TYPE_CONTENT, _(noti_data->content.c_str ()), NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
notification_set_display_applist (notification, NOTIFICATION_DISPLAY_APP_NOTIFICATION_TRAY);
app_control_h service = NULL;
}
else {
ime_db.mode = TOOLBAR_HELPER_MODE;
- if (ime_db.pkgtype.compare ("rpm") == 0) //1 Inhouse Helper ISE(IME)
+ if (ime_db.pkgtype.compare ("rpm") == 0 && path) //1 Inhouse Helper ISE(IME)
{
if (_TV)
ime_db.options = SCIM_HELPER_STAND_ALONE | SCIM_HELPER_NEED_SCREEN_INFO | SCIM_HELPER_AUTO_RESTART | ISM_HELPER_PROCESS_KEYBOARD_KEYEVENT;
LOGD("IME selector icon path : %s", noti_icon_path.c_str ());
- ise_selector_module_noti.icon = noti_icon_path.c_str ();
- ise_selector_module_noti.content = ise_name.c_str ();
+ ise_selector_module_noti.icon = noti_icon_path;
+ ise_selector_module_noti.content = ise_name;
/* Find IME Selector appid for notification */
if (ime_selector_app.length () < 1) {
static bool focus_flag;
struct _remote_control_client {
- RemoteInputClient remote_client;
- GIOChannel *remote_client_iochannel = NULL;
+ RemoteInputClient *remote_client;
+ GIOChannel *remote_client_iochannel;
guint remote_client_iochannel_read;
guint remote_client_iochannel_err;
guint remote_client_iochannel_hup;
int remote_client_id;
- remote_control_focus_in_cb focus_in_cb = NULL;
+ remote_control_focus_in_cb focus_in_cb;
void* focus_in_cb_user_data;
- remote_control_focus_out_cb focus_out_cb = NULL;
+ remote_control_focus_out_cb focus_out_cb;
void* focus_out_cb_user_data;
- remote_control_entry_metadata_cb metadata_cb = NULL;
+ remote_control_entry_metadata_cb metadata_cb;
void* metadata_cb_user_data;
- remote_control_text_updated_cb text_updated_cb = NULL;
+ remote_control_text_updated_cb text_updated_cb;
void* text_updated_cb_user_data;
- remote_control_input_resource_changed_cb input_resource_changed_cb = NULL;
+ remote_control_input_resource_changed_cb input_resource_changed_cb;
void* input_resource_changed_cb_user_data;
+
+ _remote_control_client() : remote_client(NULL),
+ remote_client_iochannel(NULL),
+ remote_client_iochannel_read(0),
+ remote_client_iochannel_err(0),
+ remote_client_iochannel_hup(0),
+ remote_client_id(0),
+ focus_in_cb(NULL),
+ focus_in_cb_user_data(NULL),
+ focus_out_cb(NULL),
+ focus_out_cb_user_data(NULL),
+ metadata_cb(NULL),
+ metadata_cb_user_data(NULL),
+ text_updated_cb(NULL),
+ text_updated_cb_user_data(NULL),
+ input_resource_changed_cb(NULL),
+ input_resource_changed_cb_user_data(NULL)
+ {
+ }
};
static gboolean
{
if (condition == G_IO_IN) {
remote_control_client *client = static_cast<remote_control_client*>(user_data);
- if (client->remote_client.has_pending_event()) {
- switch (client->remote_client.recv_callback_message()) {
+ if (client->remote_client->has_pending_event()) {
+ switch (client->remote_client->recv_callback_message()) {
case REMOTE_CONTROL_CALLBACK_FOCUS_IN:
{
LOGD ("REMOTE_CONTROL_CALLBACK_FOCUS_IN");
remote_control_entry_metadata_s *data = new remote_control_entry_metadata_s;
int hint = 0, layout = 0, variation = 0, autocapital_type = 0, return_key_disabled = 0;
- client->remote_client.get_entry_metadata (&hint, &layout, &variation, &autocapital_type, &return_key_disabled);
+ client->remote_client->get_entry_metadata (&hint, &layout, &variation, &autocapital_type, &return_key_disabled);
data->hint = static_cast<Ecore_IMF_Input_Hints> (hint);
data->layout = static_cast<Ecore_IMF_Input_Panel_Layout> (layout);
data->variation = variation;
String surrounding_text;
int cursor = -1;
- client->remote_client.get_surrounding_text (surrounding_text, &cursor);
+ client->remote_client->get_surrounding_text (surrounding_text, &cursor);
SECURE_LOGD ("REMOTE_CONTROL_CALLBACK_TEXT_UPDATED: %d \"%s\"", cursor, surrounding_text.c_str ());
if (client->text_updated_cb)
if (focus_flag) {
int resource = 0;
- client->remote_client.get_input_resource (&resource);
+ client->remote_client->get_input_resource (&resource);
LOGD ("REMOTE_CONTROL_CALLBACK_INPUT_RESOURCE: %s", (resource ? "REMOTE" : "LOCAL"));
if (client->input_resource_changed_cb)
focus_flag = false;
if (client) {
- RemoteInputClient *remote_client = new RemoteInputClient;
- client->remote_client = *remote_client;
- if (!client->remote_client.open_connection()) {
+ client->remote_client = new RemoteInputClient;
+
+ if (!client->remote_client) {
+ LOGE ("Failed to generate remote_client");
+ goto cleanup;
+ }
+
+ if (!client->remote_client->open_connection()) {
LOGE ("REMOTE_CONTROL_REPLY_TIMEOUT");
goto cleanup;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
goto cleanup;
}
- client->remote_client_id = client->remote_client.get_panel2remote_connection_number();
+ client->remote_client_id = client->remote_client->get_panel2remote_connection_number();
if (client->remote_client_id >= 0) {
client->remote_client_iochannel = g_io_channel_unix_new(client->remote_client_id);
return client;
cleanup:
+ if (client->remote_client)
+ delete client->remote_client;
+
if (client)
delete client;
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
client->remote_client_iochannel_err = 0;
client->remote_client_iochannel_hup = 0;
- client->remote_client.close_connection();
+ client->remote_client->close_connection();
LOGD ("%p", client);
+ if (client->remote_client)
+ delete client->remote_client;
+
delete client;
client = NULL;
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
String command = String ("|plain|send_key_event|") + String (key_str) + String ("|");
if (focus_flag) {
- error_e = (remote_control_error_e)client->remote_client.send_remote_input_message(command.c_str ());
+ error_e = (remote_control_error_e)client->remote_client->send_remote_input_message(command.c_str ());
if (!error_e)
SECURE_LOGD ("%p, key=%d", client, key);
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
String command = String ("|plain|commit_string|") + String (text) + String ("|");
if (focus_flag) {
- error_e = (remote_control_error_e)client->remote_client.send_remote_input_message(command.c_str ());
+ error_e = (remote_control_error_e)client->remote_client->send_remote_input_message(command.c_str ());
if (!error_e)
SECURE_LOGD ("%p, \"%s\"", client, text);
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
String command = String ("|plain|update_preedit_string|") + String (text) + String ("|") + String (cursor_position) + String ("|");
if (focus_flag) {
- error_e = (remote_control_error_e)client->remote_client.send_remote_input_message(command.c_str ());
+ error_e = (remote_control_error_e)client->remote_client->send_remote_input_message(command.c_str ());
if (!error_e)
SECURE_LOGD ("%p, %d, \"%s\"", client, cursor_pos, text);
return REMOTE_CONTROL_INVALID_PARAMETER;
}
- remote_control_error_e error_e = (remote_control_error_e)client->remote_client.check_privilege();
+ remote_control_error_e error_e = (remote_control_error_e)client->remote_client->check_privilege();
if (error_e) {
LOGE ("REMOTE_CONTROL_PERMISSION_DENIED");
return error_e;
}
if (focus_flag) {
- error_e = (remote_control_error_e)client->remote_client.delete_surrounding_text(offset, len);
+ error_e = (remote_control_error_e)client->remote_client->delete_surrounding_text(offset, len);
if (!error_e)
LOGD ("%p, (%d, %d)", client, offset, len);
LOGE ("REMOTE_CONTROL_INVALID_OPERATION");
return REMOTE_CONTROL_INVALID_OPERATION;
}
-