telepathy-mission-control: McdConnection: remove virtual methods
Simon McVittie
smcv at kemper.freedesktop.org
Tue Jul 31 03:41:17 PDT 2012
Module: telepathy-mission-control
Branch: master
Commit: b7e524b85b37f913431856514310a9e7749fddac
URL: http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=b7e524b85b37f913431856514310a9e7749fddac
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Mon May 14 17:06:00 2012 +0100
McdConnection: remove virtual methods
Now that embedding and old-style plugins have been abolished, nothing
can override them.
https://bugs.freedesktop.org/show_bug.cgi?id=52305
---
src/mcd-connection.c | 19 +++++++++++--------
src/mcd-connection.h | 9 ---------
2 files changed, 11 insertions(+), 17 deletions(-)
diff --git a/src/mcd-connection.c b/src/mcd-connection.c
index 166f9de..d71c5f5 100644
--- a/src/mcd-connection.c
+++ b/src/mcd-connection.c
@@ -1171,6 +1171,10 @@ connect_cb (TpConnection *tp_conn, const GError *error,
}
}
+static gboolean
+_mcd_connection_request_channel (McdConnection *connection,
+ McdChannel *channel);
+
static void
request_unrequested_channels (McdConnection *connection)
{
@@ -1216,6 +1220,9 @@ mcd_connection_find_channel_by_path (McdConnection *connection,
return NULL;
}
+static gboolean mcd_connection_need_dispatch (McdConnection *connection,
+ const GPtrArray *channels);
+
static void
on_new_channels (TpConnection *proxy, const GPtrArray *channels,
gpointer user_data, GObject *weak_object)
@@ -1256,8 +1263,7 @@ on_new_channels (TpConnection *proxy, const GPtrArray *channels,
* FALSE: they'll also be in Channels in the GetAll(Requests) result */
if (!priv->dispatched_initial_channels) return;
- only_observe = ! MCD_CONNECTION_GET_CLASS (connection)->need_dispatch (
- connection, channels);
+ only_observe = !mcd_connection_need_dispatch (connection, channels);
sp_timestamp ("NewChannels received");
for (i = 0; i < channels->len; i++)
@@ -2205,7 +2211,8 @@ _mcd_connection_target_handle_is_urgent (McdConnection *self, guint handle)
}
static gboolean
-_mcd_connection_request_channel (McdConnection *connection, McdChannel *channel)
+_mcd_connection_request_channel (McdConnection *connection,
+ McdChannel *channel)
{
McdConnectionPrivate *priv = MCD_CONNECTION_PRIV (connection);
gboolean ret;
@@ -2253,9 +2260,6 @@ mcd_connection_class_init (McdConnectionClass * klass)
object_class->set_property = _mcd_connection_set_property;
object_class->get_property = _mcd_connection_get_property;
- klass->need_dispatch = mcd_connection_need_dispatch;
- klass->request_channel = _mcd_connection_request_channel;
-
_mcd_ext_register_dbus_glib_marshallers ();
tp_connection_init_known_interfaces ();
@@ -2479,8 +2483,7 @@ mcd_connection_request_channel (McdConnection *connection,
mcd_operation_take_mission (MCD_OPERATION (connection),
MCD_MISSION (channel));
- return MCD_CONNECTION_GET_CLASS (connection)->request_channel (connection,
- channel);
+ return _mcd_connection_request_channel (connection, channel);
}
void
diff --git a/src/mcd-connection.h b/src/mcd-connection.h
index 6ea414b..8f450b9 100644
--- a/src/mcd-connection.h
+++ b/src/mcd-connection.h
@@ -55,15 +55,6 @@ struct _McdConnection
struct _McdConnectionClass
{
McdOperationClass parent_class;
- gboolean (*need_dispatch) (McdConnection *connection,
- const GPtrArray *channels);
- void (*_mc_reserved2) (void);
- gboolean (*request_channel) (McdConnection *connection,
- McdChannel *channel);
- void (*_mc_reserved3) (void);
- void (*_mc_reserved4) (void);
- void (*_mc_reserved5) (void);
- void (*_mc_reserved6) (void);
};
#include "mcd-dispatcher.h"
More information about the telepathy-commits
mailing list