- sys_conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, NULL);
- if (sys_conn == NULL) {
- fprintf(stdout,"ERROR: Can't get on system bus");
- return;
- }
-
- obex_proxy = __bluetooth_create_obex_proxy(sys_conn);
- if (!obex_proxy){
- fprintf(stdout,"create new obex_proxy failed\n");
- return;
- }
-
- __display_notification( __notify_push_authorize_request_accept_cb, __notify_push_authorize_request_cancel_cb,obex_proxy);
- } else if (!strcasecmp(event_type, "confirm-overwrite-request")) {
- /* Not implemented */
- fprintf(stdout," Not implemented\n");
-
- } else if (!strcasecmp(event_type, "keyboard-passkey-request")) {
- /* Not implemented */
- fprintf(stdout," Not implemented\n");
-
- } else if (!strcasecmp(event_type, "bt-information")) {
- /* Not implemented */
- fprintf(stdout," Not implemented\n");
-
- } else if (!strcasecmp(event_type, "exchange-request")) {
- device_name = (gchar*) bundle_get_val(user_data, "device-name");
- agent_path = bundle_get_val(user_data, "agent-path");
-
- sys_conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, NULL);
- if (sys_conn == NULL) {
- fprintf(stdout,"ERROR: Can't get on system bus");
- return;
- }
-
- agent_proxy = __bluetooth_create_agent_proxy(sys_conn, agent_path);
- if (!agent_proxy){
- fprintf(stdout,"create new agent_proxy failed\n");
- return;
- }
-
- __display_notification( __notify_authorize_request_accept_cb, __notify_authorize_request_cancel_cb,agent_proxy);
- } else if (!strcasecmp(event_type, "phonebook-request")) {
- device_name = bundle_get_val(user_data, "device-name");
- agent_path = bundle_get_val(user_data, "agent-path");
-
- sys_conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, NULL);
- if (sys_conn == NULL) {
- fprintf(stdout,"ERROR: Can't get on system bus");
- return;
- }
-
- agent_proxy = __bluetooth_create_agent_proxy(sys_conn, agent_path);
- if (!agent_proxy){
- fprintf(stdout,"create new agent_proxy failed\n");
- return;
- }
-
- __display_notification( __notify_authorize_request_accept_cb, __notify_authorize_request_cancel_cb,agent_proxy);
- } else if (!strcasecmp(event_type, "message-request")) {
- device_name = bundle_get_val(user_data, "device-name");
- agent_path = bundle_get_val(user_data, "agent-path");
-
- sys_conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, NULL);
- if (sys_conn == NULL) {
- fprintf(stdout,"ERROR: Can't get on system bus");
- return;
- }
-
- agent_proxy = __bluetooth_create_agent_proxy(sys_conn, agent_path);
- if (!agent_proxy){
- fprintf(stdout,"create new agent_proxy failed\n");
- return;
- }
-
- __display_notification( __notify_authorize_request_accept_cb, __notify_authorize_request_cancel_cb,agent_proxy);