[telepathy-mission-control/master] mcd_channel_new_request: pass use_existing as a parameter rather than changing it later
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Apr 3 06:02:53 PDT 2009
---
src/mcd-account-requests.c | 3 +--
src/mcd-channel.c | 23 +++--------------------
src/mcd-channel.h | 6 ++----
3 files changed, 6 insertions(+), 26 deletions(-)
diff --git a/src/mcd-account-requests.c b/src/mcd-account-requests.c
index 31144ea..85504d9 100644
--- a/src/mcd-account-requests.c
+++ b/src/mcd-account-requests.c
@@ -176,9 +176,8 @@ create_request (McdAccount *account, GHashTable *properties,
* free it */
props = _mcd_deepcopy_asv (properties);
channel = mcd_channel_new_request (account, dgc, props, user_time,
- preferred_handler);
+ preferred_handler, use_existing);
g_hash_table_unref (props);
- _mcd_channel_set_request_use_existing (channel, use_existing);
/* we use connect_after, to make sure that other signals (such as
* RemoveFailedRequest) are emitted before the Failed signal */
diff --git a/src/mcd-channel.c b/src/mcd-channel.c
index 2503ead..bdc55c2 100644
--- a/src/mcd-channel.c
+++ b/src/mcd-channel.c
@@ -1105,7 +1105,8 @@ mcd_channel_new_request (McdAccount *account,
DBusGConnection *dgc,
GHashTable *properties,
gint64 user_time,
- const gchar *preferred_handler)
+ const gchar *preferred_handler,
+ gboolean use_existing)
{
McdChannel *channel;
McdChannelRequestData *crd;
@@ -1123,6 +1124,7 @@ mcd_channel_new_request (McdAccount *account,
crd->properties = g_hash_table_ref (properties);
crd->user_time = user_time;
crd->preferred_handler = g_strdup (preferred_handler);
+ crd->use_existing = use_existing;
channel->priv->request_data = crd;
channel->priv->satisfied_requests = g_list_prepend (NULL,
g_strdup (crd->path));
@@ -1224,25 +1226,6 @@ _mcd_channel_get_request_preferred_handler (McdChannel *channel)
}
/*
- * _mcd_channel_set_request_use_existing:
- * @channel: the #McdChannel.
- * @use_existing: %TRUE if @channel must be requested via EnsureChannel.
- *
- * Sets the use_existing flag on @channel request.
- */
-void
-_mcd_channel_set_request_use_existing (McdChannel *channel,
- gboolean use_existing)
-{
- McdChannelRequestData *crd;
-
- g_return_if_fail (MCD_IS_CHANNEL (channel));
- crd = channel->priv->request_data;
- if (G_UNLIKELY (!crd)) return;
- crd->use_existing = use_existing;
-}
-
-/*
* _mcd_channel_get_request_use_existing:
* @channel: the #McdChannel.
*
diff --git a/src/mcd-channel.h b/src/mcd-channel.h
index e933f78..4281ed8 100644
--- a/src/mcd-channel.h
+++ b/src/mcd-channel.h
@@ -101,7 +101,8 @@ McdChannel *mcd_channel_new_request (McdAccount *account,
DBusGConnection *dgc,
GHashTable *properties,
gint64 user_time,
- const gchar *preferred_handler);
+ const gchar *preferred_handler,
+ gboolean use_existing);
G_GNUC_INTERNAL
gboolean _mcd_channel_create_proxy (McdChannel *channel,
@@ -159,9 +160,6 @@ guint64 _mcd_channel_get_request_user_action_time (McdChannel *channel);
G_GNUC_INTERNAL
const gchar *_mcd_channel_get_request_preferred_handler (McdChannel *channel);
G_GNUC_INTERNAL
-void _mcd_channel_set_request_use_existing (McdChannel *channel,
- gboolean use_existing);
-G_GNUC_INTERNAL
gboolean _mcd_channel_get_request_use_existing (McdChannel *channel);
G_GNUC_INTERNAL
--
1.5.6.5
More information about the telepathy-commits
mailing list