From: Zhenhua Zhang <zhenhua.zhang@intel.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH V2 1/2] btio: Replace void * with gpointer
Date: Mon, 13 Sep 2010 16:04:01 +0800 [thread overview]
Message-ID: <1284365042-7526-2-git-send-email-zhenhua.zhang@intel.com> (raw)
In-Reply-To: <1284365042-7526-1-git-send-email-zhenhua.zhang@intel.com>
To make it consistent with bluez btio.c.
---
src/btio.c | 24 ++++++++++++------------
src/btio.h | 10 +++++-----
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/btio.c b/src/btio.c
index 42a3bcd..8b273ca 100644
--- a/src/btio.c
+++ b/src/btio.c
@@ -62,20 +62,20 @@ struct set_opts {
struct connect {
BtIOConnect connect;
- void *user_data;
+ gpointer user_data;
GDestroyNotify destroy;
};
struct accept {
BtIOConnect connect;
- void *user_data;
+ gpointer user_data;
GDestroyNotify destroy;
};
struct server {
BtIOConnect connect;
BtIOConfirm confirm;
- void *user_data;
+ gpointer user_data;
GDestroyNotify destroy;
};
@@ -115,7 +115,7 @@ static gboolean check_nval(GIOChannel *io)
}
static gboolean accept_cb(GIOChannel *io, GIOCondition cond,
- void *user_data)
+ gpointer user_data)
{
struct accept *accept = user_data;
GError *err = NULL;
@@ -136,7 +136,7 @@ static gboolean accept_cb(GIOChannel *io, GIOCondition cond,
}
static gboolean connect_cb(GIOChannel *io, GIOCondition cond,
- void *user_data)
+ gpointer user_data)
{
struct connect *conn = user_data;
GError *gerr = NULL;
@@ -169,7 +169,7 @@ static gboolean connect_cb(GIOChannel *io, GIOCondition cond,
}
static gboolean server_cb(GIOChannel *io, GIOCondition cond,
- void *user_data)
+ gpointer user_data)
{
struct server *server = user_data;
int srv_sock, cli_sock;
@@ -201,7 +201,7 @@ static gboolean server_cb(GIOChannel *io, GIOCondition cond,
}
static void server_add(GIOChannel *io, BtIOConnect connect,
- BtIOConfirm confirm, void *user_data,
+ BtIOConfirm confirm, gpointer user_data,
GDestroyNotify destroy)
{
struct server *server;
@@ -219,7 +219,7 @@ static void server_add(GIOChannel *io, BtIOConnect connect,
}
static void connect_add(GIOChannel *io, BtIOConnect connect,
- void *user_data, GDestroyNotify destroy)
+ gpointer user_data, GDestroyNotify destroy)
{
struct connect *conn;
GIOCondition cond;
@@ -234,7 +234,7 @@ static void connect_add(GIOChannel *io, BtIOConnect connect,
(GDestroyNotify) connect_remove);
}
-static void accept_add(GIOChannel *io, BtIOConnect connect, void *user_data,
+static void accept_add(GIOChannel *io, BtIOConnect connect, gpointer user_data,
GDestroyNotify destroy)
{
struct accept *accept;
@@ -1046,7 +1046,7 @@ static gboolean get_valist(GIOChannel *io, BtIOType type, GError **err,
return FALSE;
}
-gboolean bt_io_accept(GIOChannel *io, BtIOConnect connect, void *user_data,
+gboolean bt_io_accept(GIOChannel *io, BtIOConnect connect, gpointer user_data,
GDestroyNotify destroy, GError **err)
{
int sock;
@@ -1195,7 +1195,7 @@ failed:
}
GIOChannel *bt_io_connect(BtIOType type, BtIOConnect connect,
- void *user_data, GDestroyNotify destroy,
+ gpointer user_data, GDestroyNotify destroy,
GError **gerr, BtIOOption opt1, ...)
{
GIOChannel *io;
@@ -1249,7 +1249,7 @@ GIOChannel *bt_io_connect(BtIOType type, BtIOConnect connect,
}
GIOChannel *bt_io_listen(BtIOType type, BtIOConnect connect,
- BtIOConfirm confirm, void *user_data,
+ BtIOConfirm confirm, gpointer user_data,
GDestroyNotify destroy, GError **err,
BtIOOption opt1, ...)
{
diff --git a/src/btio.h b/src/btio.h
index e9dcc9f..d373ed1 100644
--- a/src/btio.h
+++ b/src/btio.h
@@ -72,11 +72,11 @@ typedef enum {
BT_IO_SEC_HIGH,
} BtIOSecLevel;
-typedef void (*BtIOConfirm)(GIOChannel *io, void *user_data);
+typedef void (*BtIOConfirm)(GIOChannel *io, gpointer user_data);
-typedef void (*BtIOConnect)(GIOChannel *io, GError *err, void *user_data);
+typedef void (*BtIOConnect)(GIOChannel *io, GError *err, gpointer user_data);
-gboolean bt_io_accept(GIOChannel *io, BtIOConnect connect, void *user_data,
+gboolean bt_io_accept(GIOChannel *io, BtIOConnect connect, gpointer user_data,
GDestroyNotify destroy, GError **err);
gboolean bt_io_set(GIOChannel *io, BtIOType type, GError **err,
@@ -86,11 +86,11 @@ gboolean bt_io_get(GIOChannel *io, BtIOType type, GError **err,
BtIOOption opt1, ...);
GIOChannel *bt_io_connect(BtIOType type, BtIOConnect connect,
- void *user_data, GDestroyNotify destroy,
+ gpointer user_data, GDestroyNotify destroy,
GError **err, BtIOOption opt1, ...);
GIOChannel *bt_io_listen(BtIOType type, BtIOConnect connect,
- BtIOConfirm confirm, void *user_data,
+ BtIOConfirm confirm, gpointer user_data,
GDestroyNotify destroy, GError **err,
BtIOOption opt1, ...);
--
1.7.0.4
next prev parent reply other threads:[~2010-09-13 8:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-13 8:04 [PATCH V2 0/2] cleanup btio library Zhenhua Zhang
2010-09-13 8:04 ` Zhenhua Zhang [this message]
2010-09-13 8:04 ` [PATCH V2 2/2] btio: Seperate btio.[ch] into btio directory Zhenhua Zhang
2010-09-13 8:16 ` [PATCH V2 0/2] cleanup btio library Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1284365042-7526-2-git-send-email-zhenhua.zhang@intel.com \
--to=zhenhua.zhang@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).