diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-04-07 13:51:07 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2014-04-07 13:51:07 +0100 |
commit | 63916d1d5cf9bc89ffa8237ef99b523a726645fd (patch) | |
tree | a60cd08f894cbe5fa7a70f2983229d71c96b56dd | |
parent | c6671f8409071b7a820927a27d7e24f4ef892b9d (diff) |
Change terminology from handle type to entity typenext-handle-type
In the process, pick up a new constants.py from MC.
-rw-r--r-- | src/idle-handles.c | 4 | ||||
-rw-r--r-- | src/idle-im-manager.c | 2 | ||||
-rw-r--r-- | src/idle-muc-manager.c | 6 | ||||
-rw-r--r-- | tests/twisted/constants.py | 8 |
4 files changed, 14 insertions, 6 deletions
diff --git a/src/idle-handles.c b/src/idle-handles.c index 9b72e43..834b999 100644 --- a/src/idle-handles.c +++ b/src/idle-handles.c @@ -164,13 +164,13 @@ void idle_handle_repos_init(TpHandleRepoIface **handles) { g_assert(handles != NULL); handles[TP_ENTITY_TYPE_CONTACT] = (TpHandleRepoIface *) g_object_new(TP_TYPE_DYNAMIC_HANDLE_REPO, - "handle-type", TP_ENTITY_TYPE_CONTACT, + "entity-type", TP_ENTITY_TYPE_CONTACT, "normalize-function", _nick_normalize_func, "default-normalize-context", NULL, NULL); handles[TP_ENTITY_TYPE_ROOM] = (TpHandleRepoIface *) g_object_new(TP_TYPE_DYNAMIC_HANDLE_REPO, - "handle-type", TP_ENTITY_TYPE_ROOM, + "entity-type", TP_ENTITY_TYPE_ROOM, "normalize-function", _channel_normalize_func, "default-normalize-context", NULL, NULL); diff --git a/src/idle-im-manager.c b/src/idle-im-manager.c index 45d1744..6984484 100644 --- a/src/idle-im-manager.c +++ b/src/idle-im-manager.c @@ -76,7 +76,7 @@ static void connection_status_changed_cb (IdleConnection* conn, guint status, gu static void _im_manager_foreach(TpChannelManager *manager, TpExportableChannelFunc func, gpointer user_data); static void _im_manager_type_foreach_class (GType type, TpChannelManagerTypeChannelClassFunc func, gpointer user_data); -//static TpChannelManagerRequestStatus _iface_request(TpChannelFactoryIface *iface, const gchar *chan_type, TpEntityType handle_type, guint handle, gpointer request, TpChannelIface **new_chan, GError **error); +//static TpChannelManagerRequestStatus _iface_request(TpChannelFactoryIface *iface, const gchar *chan_type, TpEntityType entity_type, guint handle, gpointer request, TpChannelIface **new_chan, GError **error); static gboolean _im_manager_create_channel(TpChannelManager *manager, TpChannelManagerRequest *request, GHashTable *request_properties); static gboolean _im_manager_ensure_channel(TpChannelManager *manager, TpChannelManagerRequest *request, GHashTable *request_properties); diff --git a/src/idle-muc-manager.c b/src/idle-muc-manager.c index c3e490b..29f8ed9 100644 --- a/src/idle-muc-manager.c +++ b/src/idle-muc-manager.c @@ -763,7 +763,7 @@ _muc_manager_request ( TpHandleRepoIface *room_repo = tp_base_connection_get_handles (base_conn, TP_ENTITY_TYPE_ROOM); GError *error = NULL; - TpEntityType handle_type; + TpEntityType entity_type; TpHandle handle; const gchar *channel_type; IdleMUCChannel *channel; @@ -774,10 +774,10 @@ _muc_manager_request ( if (tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TEXT)) return FALSE; - handle_type = tp_asv_get_uint32 (request_properties, + entity_type = tp_asv_get_uint32 (request_properties, TP_PROP_CHANNEL_TARGET_ENTITY_TYPE, NULL); - switch (handle_type) + switch (entity_type) { case TP_ENTITY_TYPE_ROOM: handle = tp_asv_get_uint32 (request_properties, diff --git a/tests/twisted/constants.py b/tests/twisted/constants.py index 9c12bd1..8272a67 100644 --- a/tests/twisted/constants.py +++ b/tests/twisted/constants.py @@ -63,6 +63,8 @@ CHANNEL_TYPE_SERVER_TLS_CONNECTION = \ CHANNEL + ".Type.ServerTLSConnection1" CHANNEL_TYPE = CHANNEL + '.ChannelType' +TARGET_ENTITY_TYPE = CHANNEL + '.TargetEntityType' +# let's leave this as a synonym to reduce tests' diff churn in CMs TARGET_HANDLE_TYPE = CHANNEL + '.TargetEntityType' TARGET_HANDLE = CHANNEL + '.TargetHandle' TARGET_ID = CHANNEL + '.TargetID' @@ -590,3 +592,9 @@ TEST_DBUS_ACCOUNT_SERVICE_IFACE = TEST_DBUS_ACCOUNT_SERVICE TEST_DBUS_ACCOUNT_PLUGIN_PATH = TESTSLASH + "DBusAccountPlugin" TEST_DBUS_ACCOUNT_PLUGIN_IFACE = TESTDOT + "DBusAccountPlugin" + +class StorageRestrictionFlags(object): + CANNOT_SET_PARAMETERS = 1 + CANNOT_SET_ENABLED = 2 + CANNOT_SET_PRESENCE = 4 + CANNOT_SET_SERVICE = 8 |