* Dbus Client-Daemon Server
*/
+static void __sttd_dbus_server_dbus_connection_send(DBusConnection* conn, DBusMessage* reply)
+{
+ if (!dbus_connection_send(conn, reply, NULL)) {
+ SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Out Of Memory!");
+ }
+
+ dbus_connection_flush(conn);
+ dbus_message_unref(reply);
+ return;
+}
+
int sttd_dbus_server_hello(DBusConnection* conn, DBusMessage* msg)
{
SLOG(LOG_DEBUG, TAG_STTD, ">>>>> STT Hello");
DBusMessage* reply;
reply = dbus_message_new_method_return(msg);
if (NULL != reply) {
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Out Of Memory!");
- }
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
+ __sttd_dbus_server_dbus_connection_send(conn, reply);
} else {
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Fail to create reply message!!");
}
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Result(%d)", ret);
}
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Out Of Memory!");
- }
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
+ __sttd_dbus_server_dbus_connection_send(conn, reply);
} else {
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Fail to create reply message!!");
}
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Result(%d)", ret);
}
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Out Of Memory!");
- }
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
+ __sttd_dbus_server_dbus_connection_send(conn, reply);
} else {
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Fail to create reply message!!");
}
__sttd_dbus_server_send_method_return(conn, msg, ret);
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Result(%d)", ret);
}
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Out Of Memory!");
- }
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
+ __sttd_dbus_server_dbus_connection_send(conn, reply);
} else {
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Fail to create reply message!!");
}
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Result(%d) ", ret);
}
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Out Of Memory!");
- }
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
+ __sttd_dbus_server_dbus_connection_send(conn, reply);
} else {
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Fail to create reply message!!");
}
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Result(%d)", ret);
}
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Out Of Memory!");
- }
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
+ __sttd_dbus_server_dbus_connection_send(conn, reply);
} else {
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Fail to create reply message!!");
}
if (NULL != engine) free(engine);
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Result(%d)", ret);
}
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Out Of Memory!");
- }
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
+ __sttd_dbus_server_dbus_connection_send(conn, reply);
} else {
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Fail to create reply message!!");
}
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Result(%d)", ret);
}
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Out Of Memory!");
- }
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
+ __sttd_dbus_server_dbus_connection_send(conn, reply);
} else {
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Fail to create reply message!!");
}
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Result(%d)", ret);
}
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Out Of Memory!");
- }
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
+ __sttd_dbus_server_dbus_connection_send(conn, reply);
} else {
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Fail to create reply message!!");
}
if (NULL != lang) free(lang);
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
__sttd_dbus_server_send_method_return(conn, msg, ret);
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Result(%d)", ret);
}
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Out Of Memory!");
- }
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
+ __sttd_dbus_server_dbus_connection_send(conn, reply);
} else {
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Fail to create reply message!!");
}
if (NULL != data) free(data);
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Result(%d)", ret);
}
- if (!dbus_connection_send(conn, reply, NULL)) {
- SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Out Of Memory!");
- }
-
- dbus_connection_flush(conn);
- dbus_message_unref(reply);
+ __sttd_dbus_server_dbus_connection_send(conn, reply);
} else {
SLOG(LOG_ERROR, TAG_STTD, "[OUT ERROR] Fail to create reply message!!");
}
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
__sttd_dbus_server_send_method_return(conn, msg, ret);
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
__sttd_dbus_server_send_method_return(conn, msg, ret);
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
__sttd_dbus_server_send_method_return(conn, msg, ret);
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
__sttd_dbus_server_send_method_return(conn, msg, ret);
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
}
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
}
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
}
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
}
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}
}
}
SLOG(LOG_DEBUG, TAG_STTD, "<<<<<");
- SLOG(LOG_DEBUG, TAG_STTD, " ");
-
return 0;
}