summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2011-03-18 14:35:21 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2011-03-18 14:35:21 +0000
commit054d9162eac73bc218277bb8d2723080ea629662 (patch)
tree1ad6e852558417d05dcd83b1251e895cfdcd253a
parent60cabc58f4a23a9494f875fc5bc8536f6da06f10 (diff)
downloadtelepathy-mission-control-054d9162eac73bc218277bb8d2723080ea629662.tar.gz
ChannelDispatcher: implement SupportsRequestHints
-rw-r--r--src/mcd-dispatcher.c12
-rw-r--r--tests/twisted/dispatcher/create-hints.py6
2 files changed, 15 insertions, 3 deletions
diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 1add101e..e5f31322 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -178,6 +178,7 @@ enum
PROP_DBUS_DAEMON,
PROP_MCD_MASTER,
PROP_INTERFACES,
+ PROP_SUPPORTS_REQUEST_HINTS,
PROP_DISPATCH_OPERATIONS,
};
@@ -515,6 +516,10 @@ _mcd_dispatcher_get_property (GObject * obj, guint prop_id,
g_value_set_static_boxed (val, interfaces);
break;
+ case PROP_SUPPORTS_REQUEST_HINTS:
+ g_value_set_boolean (val, TRUE);
+ break;
+
case PROP_DISPATCH_OPERATIONS:
{
GList *iter;
@@ -866,6 +871,7 @@ mcd_dispatcher_class_init (McdDispatcherClass * klass)
{
static TpDBusPropertiesMixinPropImpl cd_props[] = {
{ "Interfaces", "interfaces", NULL },
+ { "SupportsRequestHints", "supports-request-hints", NULL },
{ NULL }
};
static TpDBusPropertiesMixinPropImpl op_list_props[] = {
@@ -913,6 +919,12 @@ mcd_dispatcher_class_init (McdDispatcherClass * klass)
G_TYPE_STRV,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+ g_object_class_install_property (
+ object_class, PROP_SUPPORTS_REQUEST_HINTS,
+ g_param_spec_boolean ("supports-request-hints", "SupportsRequestHints",
+ "Yes, we support CreateChannelWithHints etc.",
+ TRUE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
g_object_class_install_property
(object_class, PROP_DISPATCH_OPERATIONS,
g_param_spec_boxed ("dispatch-operations",
diff --git a/tests/twisted/dispatcher/create-hints.py b/tests/twisted/dispatcher/create-hints.py
index 9894276a..8ff380c2 100644
--- a/tests/twisted/dispatcher/create-hints.py
+++ b/tests/twisted/dispatcher/create-hints.py
@@ -27,7 +27,7 @@ from servicetest import EventPattern, tp_name_prefix, tp_path_prefix, \
call_async, assertEquals
from mctest import exec_test, SimulatedConnection, SimulatedClient, \
create_fakecm_account, enable_fakecm_account, SimulatedChannel, \
- expect_client_setup
+ expect_client_setup, ChannelDispatcher
import constants as cs
def test(q, bus, mc):
@@ -60,8 +60,8 @@ def test_channel_creation(q, bus, account, client, conn,
if prefer is None:
prefer = client
- cd = bus.get_object(cs.CD, cs.CD_PATH)
- cd_props = dbus.Interface(cd, cs.PROPERTIES_IFACE)
+ cd = ChannelDispatcher(bus)
+ assert cd.Properties.Get(cs.CD, "SupportsRequestHints")
# chat UI calls ChannelDispatcher.EnsureChannelWithHints or
# CreateChannelWithHints