return;
}
+static void
+_e_info_client_log_control(int argc, char **argv)
+{
+ const char *type;
+ Eldbus_Message *msg;
+ Eldbus_Message_Iter *itr;
+ Eldbus_Pending *p;
+ uint32_t onoff;
+
+ if (argc < 4)
+ {
+ printf("Error Check Args (Need more arguments)\n");
+ printf(": enlightenment_info -log [type] [1:on, 0:off]\n");
+ return;
+ }
+
+ onoff = atoi(argv[3]);
+ if ((onoff != 0) && (onoff != 1))
+ {
+ printf("Error Check Args (Allowed 0 or 1)\n");
+ printf(": enlightenment_info -log [type] [1:on, 0:off]\n");
+ return;
+ }
+
+ type = argv[2];
+ if (eina_streq(type, "key_input_ttrace_enable") ||
+ eina_streq(type, "input_log_enable"))
+ {
+ msg = eldbus_proxy_method_call_new(e_info_client.proxy, "log_control");
+ itr = eldbus_message_iter_get(msg);
+ eldbus_message_iter_basic_append(itr, 's', type);
+ eldbus_message_iter_basic_append(itr, 'i', onoff);
+
+ p = eldbus_proxy_send(e_info_client.proxy, msg,
+ _e_info_client_eldbus_message_cb,
+ NULL, -1);
+ if (!p)
+ {
+ printf("Failed to call eldbus_proxy_send");
+ return;
+ }
+
+ ecore_main_loop_begin();
+ }
+ else
+ {
+ // not supported log
+ printf("Error Check Args (Not supported log type)\n");
+ printf(": enlightenment_info -log [type] [1:on, 0:off]\n");
+ }
+}
+
typedef struct _ProcInfo
{
const char *option;
"Set/Unset transparent of the kvm service window",
_e_info_client_proc_kvm_transparent_set
},
+ {
+ "log",
+ USAGE_LOG_CONTROL,
+ "Enable/Disable specific log",
+ _e_info_client_log_control
+ },
};
ProcInfo procs_to_input[] =
return reply;
}
+static Eldbus_Message *
+_e_info_server_cb_log_control(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
+{
+ Eldbus_Message *reply = eldbus_message_method_return_new(msg);
+ const char *type;
+ uint32_t onoff;
+
+ if (!eldbus_message_arguments_get(msg, "si", &type, &onoff))
+ {
+ ERR("Error getting arguments.");
+ return reply;
+ }
+
+ if (!e_util_strcmp("key_input_ttrace_enable", type))
+ {
+ e_config->key_input_ttrace_enable = onoff;
+ }
+ else if (!e_util_strcmp("input_log_enable", type))
+ {
+ e_info_server_input_log_enable_set(onoff);
+ }
+
+ return reply;
+}
+
//{ "method_name", arguments_from_client, return_values_to_client, _method_cb, ELDBUS_METHOD_FLAG },
static const Eldbus_Method methods[] = {
{ "get_window_info", NULL, ELDBUS_ARGS({"iiiiisiiia("VALUE_TYPE_FOR_TOPVWINS")", "array of ec"}), _e_info_server_cb_window_info_get, 0 },
{ "prop_set", ELDBUS_ARGS({"s","window id" }, {"s", "property"}, {"i", "set value"}), NULL, _e_info_server_cb_prop_set, 0},
{ "input_subtype_set", ELDBUS_ARGS({"ss", "set input device's subtype(subclas)"}), ELDBUS_ARGS({"s", "result message"}), _e_info_server_cb_input_subtype_set, 0 },
{ "kvm_transparent", ELDBUS_ARGS({"i", "set kvm service window to transparent"}), NULL, _e_info_server_cb_kvm_transparent_set, 0 },
+ { "log_control", ELDBUS_ARGS({"s","log type" }, {"i", "enable"}), NULL, _e_info_server_cb_log_control, 0},
{ NULL, NULL, NULL, NULL, 0 }
};
"\twinfo -quickpanel 3 : unset scoll_lock for quickpanel service\n" \
"\twinfo -quickpanel 1 0x0a710a07 : show the specific quickpanel service\n"
+#define USAGE_LOG_CONTROL \
+ "{log type} (1 | 0) \n" \
+ "\tlog type : log type to enable/disable\n" \
+ "\t input_log_enable\n" \
+ "\t key_input_ttrace_enable\n" \
+ "Example:\n" \
+ "\twinfo -log input_log_enable 1\n" \
+ "\twinfo -log key_input_ttrace_enable 1\n"
+
#endif /* end of _E_INFO_SHARED_TYPES_ */