diff options
author | Pekka Pessi <Pekka.Pessi@nokia.com> | 2010-05-27 19:12:45 +0300 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-05-27 13:07:15 -0500 |
commit | a97a97147d8523cd54be8cd6ddbf16e321b2b133 (patch) | |
tree | d990295054d0e5ef154947129336b150bd0537c0 /gisi/pipe.c | |
parent | 8001338da7e5242360c2138cb3b48189cf453b3a (diff) | |
download | ofono-a97a97147d8523cd54be8cd6ddbf16e321b2b133.tar.gz |
Eliminated bool, true and false from gisi
Diffstat (limited to 'gisi/pipe.c')
-rw-r--r-- | gisi/pipe.c | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/gisi/pipe.c b/gisi/pipe.c index 0e7698d2..55852b18 100644 --- a/gisi/pipe.c +++ b/gisi/pipe.c @@ -26,7 +26,6 @@ #endif #include <stdint.h> -#include <stdbool.h> #include <errno.h> #include <glib.h> #include "client.h" @@ -125,8 +124,8 @@ struct _GIsiPipe { void *opaque; int error; uint8_t handle; - bool enabled; - bool enabling; + gboolean enabled; + gboolean enabling; }; static int g_isi_pipe_error(uint8_t code) @@ -163,16 +162,16 @@ static void g_isi_pipe_handle_error(GIsiPipe *pipe, uint8_t code) pipe->error_handler(pipe); } -static bool g_isi_pipe_created(GIsiClient *client, - const void *restrict data, size_t len, - uint16_t object, void *opaque) +static gboolean g_isi_pipe_created(GIsiClient *client, + const void *restrict data, size_t len, + uint16_t object, void *opaque) { GIsiPipe *pipe = opaque; const isi_pipe_resp_t *resp = data; if (len < 5 || resp->cmd != PNS_PIPE_CREATE_RESP) - return false; + return FALSE; if (resp->pipe_handle != PN_PIPE_INVALID_HANDLE) { pipe->handle = resp->pipe_handle; @@ -182,7 +181,7 @@ static bool g_isi_pipe_created(GIsiClient *client, pipe->handler(pipe); } else g_isi_pipe_handle_error(pipe, resp->error_code); - return true; + return TRUE; } /** @@ -220,8 +219,8 @@ GIsiPipe *g_isi_pipe_create(GIsiModem *modem, void (*created)(GIsiPipe *), pipe->handler = created; pipe->error_handler = NULL; pipe->error = 0; - pipe->enabling = false; - pipe->enabled = false; + pipe->enabling = FALSE; + pipe->enabled = FALSE; pipe->handle = PN_PIPE_INVALID_HANDLE; if (pipe->client == NULL || @@ -250,22 +249,22 @@ g_isi_pipe_check_resp(const GIsiPipe *pipe, uint8_t cmd, return resp; } -static bool g_isi_pipe_enabled(GIsiClient *client, - const void *restrict data, size_t len, - uint16_t object, void *opaque) +static gboolean g_isi_pipe_enabled(GIsiClient *client, + const void *restrict data, size_t len, + uint16_t object, void *opaque) { GIsiPipe *pipe = opaque; const isi_pipe_resp_t *resp; resp = g_isi_pipe_check_resp(pipe, PNS_PIPE_ENABLE_RESP, data, len); if (!resp) - return false; + return FALSE; g_isi_pipe_handle_error(pipe, resp->error_code); - pipe->enabling = false; + pipe->enabling = FALSE; if (!pipe->error) - pipe->enabled = true; - return true; + pipe->enabled = TRUE; + return TRUE; } static GIsiRequest *g_isi_pipe_enable(GIsiPipe *pipe) @@ -295,26 +294,26 @@ int g_isi_pipe_start(GIsiPipe *pipe) if (pipe->handle != PN_PIPE_INVALID_HANDLE) g_isi_pipe_enable(pipe); else - pipe->enabling = true; + pipe->enabling = TRUE; return 0; } /* Not very useful, it will never have time to trigger */ -static bool g_isi_pipe_removed(GIsiClient *client, - const void *restrict data, size_t len, - uint16_t object, void *opaque) +static gboolean g_isi_pipe_removed(GIsiClient *client, + const void *restrict data, size_t len, + uint16_t object, void *opaque) { GIsiPipe *pipe = opaque; const isi_pipe_resp_t *resp; resp = g_isi_pipe_check_resp(pipe, PNS_PIPE_REMOVE_RESP, data, len); if (!resp) - return false; + return FALSE; pipe->handle = PN_PIPE_INVALID_HANDLE; pipe->error = -EPIPE; - return true; + return TRUE; } |