mmcli,call: minor alignment and message fixes

This commit is contained in:
Aleksander Morgado
2015-08-02 10:45:17 +02:00
parent f6779d60fe
commit c55fcab3b3

View File

@@ -61,12 +61,12 @@ static GOptionEntry entries[] = {
NULL, NULL,
}, },
{ "hangup", 0, 0, G_OPTION_ARG_NONE, &hangup_flag, { "hangup", 0, 0, G_OPTION_ARG_NONE, &hangup_flag,
"Hangup the call", "Hang up the call",
NULL, NULL,
}, },
{ "send-dtmf", 0, 0, G_OPTION_ARG_STRING, &dtmf_request, { "send-dtmf", 0, 0, G_OPTION_ARG_STRING, &dtmf_request,
"Send specified DTMF tone", "Send specified DTMF tone",
"[0-9A-D*#]" "[0-9A-D*#]"
}, },
{ NULL } { NULL }
}; };
@@ -165,7 +165,7 @@ print_call_info (MMCall *call)
static void static void
start_process_reply (gboolean result, start_process_reply (gboolean result,
const GError *error) const GError *error)
{ {
if (!result) { if (!result) {
g_printerr ("error: couldn't start the call: '%s'\n", g_printerr ("error: couldn't start the call: '%s'\n",
@@ -173,13 +173,13 @@ start_process_reply (gboolean result,
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
g_print ("successfully start the call\n"); g_print ("successfully started the call\n");
} }
static void static void
start_ready (MMCall *call, start_ready (MMCall *call,
GAsyncResult *result, GAsyncResult *result,
gpointer nothing) gpointer nothing)
{ {
gboolean operation_result; gboolean operation_result;
GError *error = NULL; GError *error = NULL;
@@ -192,7 +192,7 @@ start_ready (MMCall *call,
static void static void
accept_process_reply (gboolean result, accept_process_reply (gboolean result,
const GError *error) const GError *error)
{ {
if (!result) { if (!result) {
g_printerr ("error: couldn't accept the call: '%s'\n", g_printerr ("error: couldn't accept the call: '%s'\n",
@@ -205,8 +205,8 @@ accept_process_reply (gboolean result,
static void static void
accept_ready (MMCall *call, accept_ready (MMCall *call,
GAsyncResult *result, GAsyncResult *result,
gpointer nothing) gpointer nothing)
{ {
gboolean operation_result; gboolean operation_result;
GError *error = NULL; GError *error = NULL;
@@ -219,21 +219,21 @@ accept_ready (MMCall *call,
static void static void
hangup_process_reply (gboolean result, hangup_process_reply (gboolean result,
const GError *error) const GError *error)
{ {
if (!result) { if (!result) {
g_printerr ("error: couldn't hangup the call: '%s'\n", g_printerr ("error: couldn't hang up the call: '%s'\n",
error ? error->message : "unknown error"); error ? error->message : "unknown error");
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
g_print ("successfully hungup'd the call\n"); g_print ("successfully hung up the call\n");
} }
static void static void
hangup_ready (MMCall *call, hangup_ready (MMCall *call,
GAsyncResult *result, GAsyncResult *result,
gpointer nothing) gpointer nothing)
{ {
gboolean operation_result; gboolean operation_result;
GError *error = NULL; GError *error = NULL;
@@ -249,7 +249,7 @@ send_dtmf_process_reply (gboolean result,
const GError *error) const GError *error)
{ {
if (!result) { if (!result) {
g_printerr ("error: couldn't send_dtmf to call: '%s'\n", g_printerr ("error: couldn't send dtmf to call: '%s'\n",
error ? error->message : "unknown error"); error ? error->message : "unknown error");
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
} }
@@ -258,7 +258,7 @@ send_dtmf_process_reply (gboolean result,
} }
static void static void
send_dtmf_ready (MMCall *call, send_dtmf_ready (MMCall *call,
GAsyncResult *result, GAsyncResult *result,
gpointer nothing) gpointer nothing)
{ {
@@ -273,8 +273,8 @@ send_dtmf_ready (MMCall *call,
static void static void
get_call_ready (GObject *source, get_call_ready (GObject *source,
GAsyncResult *result, GAsyncResult *result,
gpointer none) gpointer none)
{ {
ctx->call = mmcli_get_call_finish (result, ctx->call = mmcli_get_call_finish (result,
&ctx->manager, &ctx->manager,
@@ -359,7 +359,7 @@ mmcli_call_run_synchronous (GDBusConnection *connection)
/* Setup operation timeout: 2 minutes */ /* Setup operation timeout: 2 minutes */
g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (ctx->call), 2 * 60 * 1000); g_dbus_proxy_set_default_timeout (G_DBUS_PROXY (ctx->call), 2 * 60 * 1000);
/* Request to get info from CALL? */ /* Request to get info from call? */
if (info_flag) { if (info_flag) {
g_debug ("Printing call info..."); g_debug ("Printing call info...");
print_call_info (ctx->call); print_call_info (ctx->call);