summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac28
-rw-r--r--docs/reference/Makefile.am9
-rw-r--r--docs/reference/telepathy-glib-docs.sgml163
-rw-r--r--docs/reference/telepathy-glib-sections.txt2010
-rw-r--r--examples/client/Makefile.am4
-rw-r--r--examples/client/approver.c9
-rw-r--r--examples/client/contact-list.c12
-rw-r--r--examples/client/dbus-tubes/Makefile.am4
-rw-r--r--examples/client/dbus-tubes/accepter.c1
-rw-r--r--examples/client/dbus-tubes/offerer.c1
-rw-r--r--examples/client/extended-client.c3
-rw-r--r--examples/client/inspect-channel.c3
-rw-r--r--examples/client/inspect-connection.c10
-rw-r--r--examples/client/inspect-contact.c9
-rw-r--r--examples/client/media-observer.c4
-rw-r--r--examples/client/stream-tubes/Makefile.am9
-rw-r--r--examples/client/stream-tubes/accepter.c1
-rw-r--r--examples/client/stream-tubes/offerer.c1
-rw-r--r--examples/client/text-handler.c14
-rw-r--r--examples/cm/call/Makefile.am4
-rw-r--r--examples/cm/call/call-manager.c1
-rw-r--r--examples/cm/call/conn.c10
-rw-r--r--examples/cm/call/example_call.manager18
-rw-r--r--examples/cm/channelspecific/Makefile.am4
-rw-r--r--examples/cm/channelspecific/conn.c1
-rw-r--r--examples/cm/channelspecific/room-manager.c1
-rw-r--r--examples/cm/channelspecific/room.c45
-rw-r--r--examples/cm/contactlist/Makefile.am4
-rw-r--r--examples/cm/contactlist/conn.c45
-rw-r--r--examples/cm/contactlist/example_contact_list.manager14
-rw-r--r--examples/cm/echo-message-parts/Makefile.am4
-rw-r--r--examples/cm/echo-message-parts/chan.c15
-rw-r--r--examples/cm/echo-message-parts/conn.c1
-rw-r--r--examples/cm/echo-message-parts/im-manager.c1
-rw-r--r--examples/cm/echo-message-parts/protocol.c1
-rw-r--r--examples/cm/extended/Makefile.am4
-rw-r--r--examples/cm/extended/conn.c5
-rw-r--r--examples/cm/no-protocols/Makefile.am4
-rw-r--r--examples/extensions/Makefile.am5
-rw-r--r--next-NEWS48
-rw-r--r--spec/Account.xml76
-rw-r--r--spec/Account_Interface_Addressing1.xml (renamed from spec/Account_Interface_Addressing.xml)6
-rw-r--r--spec/Account_Interface_Avatar1.xml (renamed from spec/Account_Interface_Avatar.xml)6
-rw-r--r--spec/Account_Interface_External_Password_Storage1.xml (renamed from spec/Account_Interface_External_Password_Storage.xml)12
-rw-r--r--spec/Account_Interface_Hidden1.xml (renamed from spec/Account_Interface_Hidden.xml)10
-rw-r--r--spec/Account_Interface_Storage1.xml (renamed from spec/Account_Interface_Storage.xml)18
-rw-r--r--spec/Account_Manager.xml82
-rw-r--r--spec/Account_Manager_Interface_Hidden1.xml (renamed from spec/Account_Manager_Interface_Hidden.xml)38
-rw-r--r--spec/Authentication_TLS_Certificate.xml6
-rw-r--r--spec/Call1_Content.xml (renamed from spec/Call_Content.xml)36
-rw-r--r--spec/Call1_Content_Interface_Audio_Control1.xml (renamed from spec/Call_Content_Interface_Audio_Control.xml)6
-rw-r--r--spec/Call1_Content_Interface_DTMF1.xml (renamed from spec/Call_Content_Interface_DTMF.xml)22
-rw-r--r--spec/Call1_Content_Interface_Media.xml (renamed from spec/Call_Content_Interface_Media.xml)89
-rw-r--r--spec/Call1_Content_Interface_Video_Control1.xml (renamed from spec/Call_Content_Interface_Video_Control.xml)6
-rw-r--r--spec/Call1_Content_Media_Description.xml (renamed from spec/Call_Content_Media_Description.xml)20
-rw-r--r--spec/Call1_Content_Media_Description_Interface_RTCP_Extended_Reports1.xml (renamed from spec/Call_Content_Media_Description_Interface_RTCP_Extended_Reports.xml)6
-rw-r--r--spec/Call1_Content_Media_Description_Interface_RTCP_Feedback1.xml126
-rw-r--r--spec/Call1_Content_Media_Description_Interface_RTP_Header_Extensions1.xml (renamed from spec/Call_Content_Media_Description_Interface_RTP_Header_Extensions.xml)21
-rw-r--r--spec/Call1_Interface_Mute.xml (renamed from spec/Call_Interface_Mute.xml)18
-rw-r--r--spec/Call1_Stream.xml (renamed from spec/Call_Stream.xml)32
-rw-r--r--spec/Call1_Stream_Endpoint.xml (renamed from spec/Call_Stream_Endpoint.xml)16
-rw-r--r--spec/Call1_Stream_Interface_Media.xml (renamed from spec/Call_Stream_Interface_Media.xml)26
-rw-r--r--spec/Call_Content_Media_Description_Interface_RTCP_Feedback.xml60
-rw-r--r--spec/Channel.xml196
-rw-r--r--spec/Channel_Bundle.xml48
-rw-r--r--spec/Channel_Dispatch_Operation.xml117
-rw-r--r--spec/Channel_Dispatcher.xml322
-rw-r--r--spec/Channel_Dispatcher_Interface_Operation_List1.xml (renamed from spec/Channel_Dispatcher_Interface_Operation_List.xml)18
-rw-r--r--spec/Channel_Future.xml68
-rw-r--r--spec/Channel_Handler.xml78
-rw-r--r--spec/Channel_Interface_Addressing1.xml (renamed from spec/Channel_Interface_Addressing.xml)18
-rw-r--r--spec/Channel_Interface_Anonymity1.xml (renamed from spec/Channel_Interface_Anonymity.xml)8
-rw-r--r--spec/Channel_Interface_Call_State.xml147
-rw-r--r--spec/Channel_Interface_Captcha_Authentication1.xml (renamed from spec/Channel_Interface_Captcha_Authentication.xml)56
-rw-r--r--spec/Channel_Interface_Chat_State1.xml (renamed from spec/Channel_Interface_Chat_State.xml)32
-rw-r--r--spec/Channel_Interface_Conference1.xml (renamed from spec/Channel_Interface_Conference.xml)110
-rw-r--r--spec/Channel_Interface_Credentials_Storage1.xml (renamed from spec/Channel_Interface_Credentials_Storage.xml)12
-rw-r--r--spec/Channel_Interface_DTMF1.xml (renamed from spec/Channel_Interface_DTMF.xml)65
-rw-r--r--spec/Channel_Interface_Destroyable1.xml (renamed from spec/Channel_Interface_Destroyable.xml)14
-rw-r--r--spec/Channel_Interface_File_Transfer_Metadata1.xml (renamed from spec/Channel_Interface_File_Transfer_Metadata.xml)10
-rw-r--r--spec/Channel_Interface_Group1.xml (renamed from spec/Channel_Interface_Group.xml)603
-rw-r--r--spec/Channel_Interface_HTML1.xml (renamed from spec/Channel_Interface_HTML.xml)15
-rw-r--r--spec/Channel_Interface_Hold1.xml (renamed from spec/Channel_Interface_Hold.xml)19
-rw-r--r--spec/Channel_Interface_Media_Signalling.xml189
-rw-r--r--spec/Channel_Interface_Mergeable_Conference1.xml (renamed from spec/Channel_Interface_Mergeable_Conference.xml)24
-rw-r--r--spec/Channel_Interface_Messages.xml1484
-rw-r--r--spec/Channel_Interface_Password1.xml (renamed from spec/Channel_Interface_Password.xml)20
-rw-r--r--spec/Channel_Interface_Picture1.xml (renamed from spec/Channel_Interface_Picture.xml)16
-rw-r--r--spec/Channel_Interface_Room1.xml (renamed from spec/Channel_Interface_Room.xml)106
-rw-r--r--spec/Channel_Interface_Room_Config1.xml (renamed from spec/Channel_Interface_Room_Config.xml)26
-rw-r--r--spec/Channel_Interface_SASL_Authentication1.xml (renamed from spec/Channel_Interface_SASL_Authentication.xml)64
-rw-r--r--spec/Channel_Interface_SMS1.xml (renamed from spec/Channel_Interface_SMS.xml)52
-rw-r--r--spec/Channel_Interface_Securable1.xml (renamed from spec/Channel_Interface_Securable.xml)12
-rw-r--r--spec/Channel_Interface_Service_Point1.xml (renamed from spec/Channel_Interface_Service_Point.xml)4
-rw-r--r--spec/Channel_Interface_Splittable1.xml (renamed from spec/Channel_Interface_Splittable.xml)18
-rw-r--r--spec/Channel_Interface_Subject1.xml (renamed from spec/Channel_Interface_Subject.xml)12
-rw-r--r--spec/Channel_Interface_Transfer.xml53
-rw-r--r--spec/Channel_Interface_Tube1.xml (renamed from spec/Channel_Interface_Tube.xml)72
-rw-r--r--spec/Channel_Request.xml68
-rw-r--r--spec/Channel_Type_Call1.xml (renamed from spec/Channel_Type_Call.xml)205
-rw-r--r--spec/Channel_Type_Contact_List.xml107
-rw-r--r--spec/Channel_Type_Contact_Search1.xml (renamed from spec/Channel_Type_Contact_Search.xml)58
-rw-r--r--spec/Channel_Type_DBus_Tube1.xml (renamed from spec/Channel_Type_DBus_Tube.xml)20
-rw-r--r--spec/Channel_Type_File_Transfer1.xml (renamed from spec/Channel_Type_File_Transfer.xml)42
-rw-r--r--spec/Channel_Type_Room_List1.xml (renamed from spec/Channel_Type_Room_List.xml)42
-rw-r--r--spec/Channel_Type_Server_Authentication1.xml (renamed from spec/Channel_Type_Server_Authentication.xml)42
-rw-r--r--spec/Channel_Type_Server_TLS_Connection1.xml (renamed from spec/Channel_Type_Server_TLS_Connection.xml)24
-rw-r--r--spec/Channel_Type_Stream_Tube1.xml (renamed from spec/Channel_Type_Stream_Tube.xml)45
-rw-r--r--spec/Channel_Type_Streamed_Media.xml853
-rw-r--r--spec/Channel_Type_Text.xml1626
-rw-r--r--spec/Channel_Type_Tubes.xml615
-rw-r--r--spec/Client.xml14
-rw-r--r--spec/Client_Approver.xml30
-rw-r--r--spec/Client_Handler.xml69
-rw-r--r--spec/Client_Handler_Future.xml16
-rw-r--r--spec/Client_Interface_Requests.xml28
-rw-r--r--spec/Client_Observer.xml94
-rw-r--r--spec/Connection.xml640
-rw-r--r--spec/Connection_Future.xml12
-rw-r--r--spec/Connection_Interface_Addressing1.xml (renamed from spec/Connection_Interface_Addressing.xml)42
-rw-r--r--spec/Connection_Interface_Aliasing1.xml (renamed from spec/Connection_Interface_Aliasing.xml)35
-rw-r--r--spec/Connection_Interface_Anonymity1.xml (renamed from spec/Connection_Interface_Anonymity.xml)8
-rw-r--r--spec/Connection_Interface_Avatars1.xml (renamed from spec/Connection_Interface_Avatars.xml)186
-rw-r--r--spec/Connection_Interface_Balance1.xml (renamed from spec/Connection_Interface_Balance.xml)8
-rw-r--r--spec/Connection_Interface_Capabilities.xml254
-rw-r--r--spec/Connection_Interface_Cellular1.xml (renamed from spec/Connection_Interface_Cellular.xml)4
-rw-r--r--spec/Connection_Interface_Client_Types1.xml (renamed from spec/Connection_Interface_Client_Types.xml)20
-rw-r--r--spec/Connection_Interface_Communication_Policy1.xml (renamed from spec/Connection_Interface_Communication_Policy.xml)10
-rw-r--r--spec/Connection_Interface_Contact_Blocking1.xml (renamed from spec/Connection_Interface_Contact_Blocking.xml)25
-rw-r--r--spec/Connection_Interface_Contact_Capabilities1.xml (renamed from spec/Connection_Interface_Contact_Capabilities.xml)30
-rw-r--r--spec/Connection_Interface_Contact_Groups1.xml (renamed from spec/Connection_Interface_Contact_Groups.xml)98
-rw-r--r--spec/Connection_Interface_Contact_Info1.xml (renamed from spec/Connection_Interface_Contact_Info.xml)34
-rw-r--r--spec/Connection_Interface_Contact_List1.xml (renamed from spec/Connection_Interface_Contact_List.xml)140
-rw-r--r--spec/Connection_Interface_Contacts.xml29
-rw-r--r--spec/Connection_Interface_Forwarding1.xml (renamed from spec/Connection_Interface_Forwarding.xml)16
-rw-r--r--spec/Connection_Interface_Keepalive1.xml (renamed from spec/Connection_Interface_Keepalive.xml)10
-rw-r--r--spec/Connection_Interface_Location1.xml (renamed from spec/Connection_Interface_Location.xml)42
-rw-r--r--spec/Connection_Interface_Mail_Notification1.xml (renamed from spec/Connection_Interface_Mail_Notification.xml)24
-rw-r--r--spec/Connection_Interface_Power_Saving1.xml (renamed from spec/Connection_Interface_Power_Saving.xml)8
-rw-r--r--spec/Connection_Interface_Presence.xml346
-rw-r--r--spec/Connection_Interface_Presence1.xml (renamed from spec/Connection_Interface_Simple_Presence.xml)160
-rw-r--r--spec/Connection_Interface_Privacy.xml94
-rw-r--r--spec/Connection_Interface_Renaming1.xml (renamed from spec/Connection_Interface_Renaming.xml)23
-rw-r--r--spec/Connection_Interface_Requests.xml144
-rw-r--r--spec/Connection_Interface_Resources1.xml (renamed from spec/Connection_Interface_Resources.xml)18
-rw-r--r--spec/Connection_Interface_Service_Point1.xml (renamed from spec/Connection_Interface_Service_Point.xml)6
-rw-r--r--spec/Connection_Interface_Sidecars1.xml114
-rw-r--r--spec/Connection_Manager.xml198
-rw-r--r--spec/Connection_Manager_Interface_Account_Storage1.xml (renamed from spec/Connection_Manager_Interface_Account_Storage.xml)18
-rw-r--r--spec/Debug1.xml (renamed from spec/Debug.xml)6
-rw-r--r--spec/Makefile.am174
-rw-r--r--spec/Media_Session_Handler.xml81
-rw-r--r--spec/Media_Stream_Handler.xml906
-rw-r--r--spec/Properties_Interface.xml196
-rw-r--r--spec/Protocol.xml125
-rw-r--r--spec/Protocol_Interface_Addressing1.xml (renamed from spec/Protocol_Interface_Addressing.xml)44
-rw-r--r--spec/Protocol_Interface_Avatars1.xml (renamed from spec/Protocol_Interface_Avatars.xml)44
-rw-r--r--spec/Protocol_Interface_Presence1.xml (renamed from spec/Protocol_Interface_Presence.xml)22
-rw-r--r--spec/all.xml203
-rw-r--r--spec/errors.xml41
-rw-r--r--spec/generic-types.xml4
-rw-r--r--spec/template.xml4
-rw-r--r--telepathy-glib/Makefile.am161
-rw-r--r--telepathy-glib/TelepathyGLib-1.metadata (renamed from telepathy-glib/TelepathyGLib-0.12.metadata)0
-rw-r--r--telepathy-glib/TelepathyGLibDBus-1.metadata1
-rw-r--r--telepathy-glib/abi.am213
-rw-r--r--telepathy-glib/account-channel-request.c186
-rw-r--r--telepathy-glib/account-channel-request.h8
-rw-r--r--telepathy-glib/account-manager.c248
-rw-r--r--telepathy-glib/account-manager.h28
-rw-r--r--telepathy-glib/account-request.c19
-rw-r--r--telepathy-glib/account.c175
-rw-r--r--telepathy-glib/account.h19
-rw-r--r--telepathy-glib/account.xml6
-rw-r--r--telepathy-glib/automatic-client-factory-internal.h10
-rw-r--r--telepathy-glib/automatic-client-factory.c75
-rw-r--r--telepathy-glib/automatic-client-factory.h9
-rw-r--r--telepathy-glib/automatic-proxy-factory.c301
-rw-r--r--telepathy-glib/automatic-proxy-factory.h71
-rw-r--r--telepathy-glib/base-channel.c57
-rw-r--r--telepathy-glib/base-channel.h1
-rw-r--r--telepathy-glib/base-client.c488
-rw-r--r--telepathy-glib/base-client.h42
-rw-r--r--telepathy-glib/base-connection-manager.c102
-rw-r--r--telepathy-glib/base-connection-manager.h1
-rw-r--r--telepathy-glib/base-connection.c1065
-rw-r--r--telepathy-glib/base-connection.h14
-rw-r--r--telepathy-glib/base-contact-list-internal.h54
-rw-r--r--telepathy-glib/base-contact-list.c1670
-rw-r--r--telepathy-glib/base-contact-list.h12
-rw-r--r--telepathy-glib/base-protocol.c3
-rw-r--r--telepathy-glib/base-protocol.h1
-rw-r--r--telepathy-glib/basic-proxy-factory.c125
-rw-r--r--telepathy-glib/basic-proxy-factory.h71
-rw-r--r--telepathy-glib/call-channel.c9
-rw-r--r--telepathy-glib/call-content-media-description.xml8
-rw-r--r--telepathy-glib/call-content.c4
-rw-r--r--telepathy-glib/call-content.h2
-rw-r--r--telepathy-glib/call-content.xml10
-rw-r--r--telepathy-glib/call-misc.c4
-rw-r--r--telepathy-glib/call-misc.h3
-rw-r--r--telepathy-glib/call-stream-endpoint.c2
-rw-r--r--telepathy-glib/call-stream-endpoint.xml2
-rw-r--r--telepathy-glib/call-stream.c6
-rw-r--r--telepathy-glib/call-stream.h2
-rw-r--r--telepathy-glib/call-stream.xml4
-rw-r--r--telepathy-glib/channel-contacts.c1165
-rw-r--r--telepathy-glib/channel-dispatch-operation.c118
-rw-r--r--telepathy-glib/channel-dispatch-operation.h12
-rw-r--r--telepathy-glib/channel-dispatcher.c8
-rw-r--r--telepathy-glib/channel-dispatcher.h2
-rw-r--r--telepathy-glib/channel-dispatcher.xml2
-rw-r--r--telepathy-glib/channel-factory-iface.c338
-rw-r--r--telepathy-glib/channel-factory-iface.h236
-rw-r--r--telepathy-glib/channel-group.c1938
-rw-r--r--telepathy-glib/channel-internal.h49
-rw-r--r--telepathy-glib/channel-manager.c35
-rw-r--r--telepathy-glib/channel-manager.h4
-rw-r--r--telepathy-glib/channel-request.c161
-rw-r--r--telepathy-glib/channel-request.h9
-rw-r--r--telepathy-glib/channel.c1183
-rw-r--r--telepathy-glib/channel.h93
-rw-r--r--telepathy-glib/channel.xml60
-rw-r--r--telepathy-glib/cli-call.h35
-rw-r--r--telepathy-glib/cli-channel.c29
-rw-r--r--telepathy-glib/cli-channel.h30
-rw-r--r--telepathy-glib/cli-connection.c29
-rw-r--r--telepathy-glib/cli-connection.h52
-rw-r--r--telepathy-glib/cli-misc.c44
-rw-r--r--telepathy-glib/cli-misc.h51
-rw-r--r--telepathy-glib/client-channel-factory.c167
-rw-r--r--telepathy-glib/client-channel-factory.h81
-rw-r--r--telepathy-glib/client-factory-internal.h (renamed from telepathy-glib/simple-client-factory-internal.h)27
-rw-r--r--telepathy-glib/client-factory.c (renamed from telepathy-glib/simple-client-factory.c)456
-rw-r--r--telepathy-glib/client-factory.h162
-rw-r--r--telepathy-glib/client.c6
-rw-r--r--telepathy-glib/client.h2
-rw-r--r--telepathy-glib/cm-message-internal.h1
-rw-r--r--telepathy-glib/cm-message.c6
-rw-r--r--telepathy-glib/cm-message.h7
-rw-r--r--telepathy-glib/codegen.am111
-rw-r--r--telepathy-glib/connection-aliasing.c3
-rw-r--r--telepathy-glib/connection-avatars.c3
-rw-r--r--telepathy-glib/connection-contact-info.c4
-rw-r--r--telepathy-glib/connection-contact-list.c46
-rw-r--r--telepathy-glib/connection-handles.c235
-rw-r--r--telepathy-glib/connection-internal.h2
-rw-r--r--telepathy-glib/connection-manager.c358
-rw-r--r--telepathy-glib/connection-manager.h15
-rw-r--r--telepathy-glib/connection.c594
-rw-r--r--telepathy-glib/connection.h63
-rw-r--r--telepathy-glib/connection.xml38
-rw-r--r--telepathy-glib/contact-internal.h6
-rw-r--r--telepathy-glib/contact-list-channel.c498
-rw-r--r--telepathy-glib/contact-operations.c1
-rw-r--r--telepathy-glib/contact-search.c1
-rw-r--r--telepathy-glib/contact.c1485
-rw-r--r--telepathy-glib/contact.h73
-rw-r--r--telepathy-glib/contacts-mixin.c12
-rw-r--r--telepathy-glib/contacts-mixin.h4
-rw-r--r--telepathy-glib/core-dbus.c102
-rw-r--r--telepathy-glib/core-proxy.c174
-rw-r--r--telepathy-glib/dbus-daemon.c5
-rw-r--r--telepathy-glib/dbus-daemon.h2
-rw-r--r--telepathy-glib/dbus-internal.h3
-rw-r--r--telepathy-glib/dbus-properties-mixin-internal.h (renamed from telepathy-glib/deprecated-internal.h)27
-rw-r--r--telepathy-glib/dbus-properties-mixin.c61
-rw-r--r--telepathy-glib/dbus-tube-channel.c4
-rw-r--r--telepathy-glib/dbus.c98
-rw-r--r--telepathy-glib/dbus.h8
-rw-r--r--telepathy-glib/debug-ansi.h172
-rw-r--r--telepathy-glib/debug-client.c4
-rw-r--r--telepathy-glib/debug-client.h2
-rw-r--r--telepathy-glib/debug-sender.c3
-rw-r--r--telepathy-glib/debug-sender.h1
-rw-r--r--telepathy-glib/debug.c68
-rw-r--r--telepathy-glib/debug.h11
-rw-r--r--telepathy-glib/debug.xml2
-rw-r--r--telepathy-glib/defs.h123
-rw-r--r--telepathy-glib/enums.h25
-rw-r--r--telepathy-glib/errors.c127
-rw-r--r--telepathy-glib/errors.h11
-rw-r--r--telepathy-glib/extra-gtkdoc.h236
-rw-r--r--telepathy-glib/file-transfer-channel.c10
-rw-r--r--telepathy-glib/generic.xml2
-rw-r--r--telepathy-glib/group-mixin.c464
-rw-r--r--telepathy-glib/group-mixin.h7
-rw-r--r--telepathy-glib/gtypes.c4
-rw-r--r--telepathy-glib/handle.c4
-rw-r--r--telepathy-glib/interfaces.c132
-rw-r--r--telepathy-glib/interfaces.h13
-rw-r--r--telepathy-glib/introspection.am68
-rw-r--r--telepathy-glib/intset.c169
-rw-r--r--telepathy-glib/intset.h36
-rw-r--r--telepathy-glib/media-interfaces.c274
-rw-r--r--telepathy-glib/media-interfaces.h91
-rw-r--r--telepathy-glib/media-session-handler.xml9
-rw-r--r--telepathy-glib/media-stream-handler.xml9
-rw-r--r--telepathy-glib/message-mixin.c414
-rw-r--r--telepathy-glib/message-mixin.h5
-rw-r--r--telepathy-glib/message.c180
-rw-r--r--telepathy-glib/message.h19
-rw-r--r--telepathy-glib/presence-mixin.c749
-rw-r--r--telepathy-glib/presence-mixin.h6
-rw-r--r--telepathy-glib/properties-mixin.c1164
-rw-r--r--telepathy-glib/properties-mixin.h270
-rw-r--r--telepathy-glib/protocol.c7
-rw-r--r--telepathy-glib/protocol.h2
-rw-r--r--telepathy-glib/protocol.xml6
-rw-r--r--telepathy-glib/proxy-internal.h93
-rw-r--r--telepathy-glib/proxy-methods.c62
-rw-r--r--telepathy-glib/proxy-signals.c35
-rw-r--r--telepathy-glib/proxy-subclass.h2
-rw-r--r--telepathy-glib/proxy.c139
-rw-r--r--telepathy-glib/proxy.h9
-rw-r--r--telepathy-glib/reentrants.c15
-rw-r--r--telepathy-glib/reentrants.h19
-rw-r--r--telepathy-glib/room-list.c2
-rw-r--r--telepathy-glib/simple-approver.c62
-rw-r--r--telepathy-glib/simple-approver.h15
-rw-r--r--telepathy-glib/simple-client-factory.h194
-rw-r--r--telepathy-glib/simple-handler.c72
-rw-r--r--telepathy-glib/simple-handler.h17
-rw-r--r--telepathy-glib/simple-observer.c66
-rw-r--r--telepathy-glib/simple-observer.h16
-rw-r--r--telepathy-glib/stable-interfaces.xml2
-rw-r--r--telepathy-glib/stream-tube-channel.c70
-rw-r--r--telepathy-glib/stream-tube-connection.c2
-rw-r--r--telepathy-glib/svc-media-interfaces.h7
-rw-r--r--telepathy-glib/telepathy-glib-1-dbus-uninstalled.pc.in12
-rw-r--r--telepathy-glib/telepathy-glib-1-dbus.pc.in12
-rw-r--r--telepathy-glib/telepathy-glib-1-uninstalled.pc.in (renamed from telepathy-glib/telepathy-glib-uninstalled.pc.in)4
-rw-r--r--telepathy-glib/telepathy-glib-1.pc.in (renamed from telepathy-glib/telepathy-glib.pc.in)7
-rw-r--r--telepathy-glib/telepathy-glib-dbus.h3
-rw-r--r--telepathy-glib/telepathy-glib.h15
-rw-r--r--telepathy-glib/text-channel.c86
-rw-r--r--telepathy-glib/text-mixin.c719
-rw-r--r--telepathy-glib/text-mixin.h123
-rw-r--r--telepathy-glib/tls-certificate.c3
-rw-r--r--telepathy-glib/util-internal.h2
-rw-r--r--telepathy-glib/util.c66
-rw-r--r--telepathy-glib/util.h4
-rw-r--r--telepathy-glib/verify.h146
-rw-r--r--telepathy-glib/versions/0.11.0.abi13
-rw-r--r--telepathy-glib/versions/0.11.1.abi8
-rw-r--r--telepathy-glib/versions/0.11.11.abi53
-rw-r--r--telepathy-glib/versions/0.11.12.abi17
-rw-r--r--telepathy-glib/versions/0.11.13.abi7
-rw-r--r--telepathy-glib/versions/0.11.14.abi28
-rw-r--r--telepathy-glib/versions/0.11.15.abi11
-rw-r--r--telepathy-glib/versions/0.11.16.abi19
-rw-r--r--telepathy-glib/versions/0.11.3.abi58
-rw-r--r--telepathy-glib/versions/0.11.4.abi11
-rw-r--r--telepathy-glib/versions/0.11.5.abi43
-rw-r--r--telepathy-glib/versions/0.11.6.abi41
-rw-r--r--telepathy-glib/versions/0.11.7.abi46
-rw-r--r--telepathy-glib/versions/0.11.9.abi14
-rw-r--r--telepathy-glib/versions/0.13.0.abi131
-rw-r--r--telepathy-glib/versions/0.13.1.abi16
-rw-r--r--telepathy-glib/versions/0.13.10.abi29
-rw-r--r--telepathy-glib/versions/0.13.11.abi19
-rw-r--r--telepathy-glib/versions/0.13.12.abi9
-rw-r--r--telepathy-glib/versions/0.13.13.abi7
-rw-r--r--telepathy-glib/versions/0.13.14.abi20
-rw-r--r--telepathy-glib/versions/0.13.15.abi8
-rw-r--r--telepathy-glib/versions/0.13.16.abi11
-rw-r--r--telepathy-glib/versions/0.13.2.abi39
-rw-r--r--telepathy-glib/versions/0.13.3.abi40
-rw-r--r--telepathy-glib/versions/0.13.4.abi7
-rw-r--r--telepathy-glib/versions/0.13.5.abi5
-rw-r--r--telepathy-glib/versions/0.13.7.abi48
-rw-r--r--telepathy-glib/versions/0.13.8.abi18
-rw-r--r--telepathy-glib/versions/0.13.9.abi31
-rw-r--r--telepathy-glib/versions/0.14.1.abi17
-rw-r--r--telepathy-glib/versions/0.14.3.abi21
-rw-r--r--telepathy-glib/versions/0.14.4.abi5
-rw-r--r--telepathy-glib/versions/0.14.5.abi7
-rw-r--r--telepathy-glib/versions/0.15.0.abi18
-rw-r--r--telepathy-glib/versions/0.15.1.abi18
-rw-r--r--telepathy-glib/versions/0.15.2.abi14
-rw-r--r--telepathy-glib/versions/0.15.3.abi13
-rw-r--r--telepathy-glib/versions/0.15.5.abi90
-rw-r--r--telepathy-glib/versions/0.15.6.abi23
-rw-r--r--telepathy-glib/versions/0.15.8.abi25
-rw-r--r--telepathy-glib/versions/0.17.0.abi17
-rw-r--r--telepathy-glib/versions/0.17.1.abi14
-rw-r--r--telepathy-glib/versions/0.17.2.abi11
-rw-r--r--telepathy-glib/versions/0.17.3.abi6
-rw-r--r--telepathy-glib/versions/0.17.5.abi310
-rw-r--r--telepathy-glib/versions/0.7.0.abi396
-rw-r--r--telepathy-glib/versions/0.7.1.abi312
-rw-r--r--telepathy-glib/versions/0.7.10.abi10
-rw-r--r--telepathy-glib/versions/0.7.12.abi16
-rw-r--r--telepathy-glib/versions/0.7.13.abi22
-rw-r--r--telepathy-glib/versions/0.7.14.abi24
-rw-r--r--telepathy-glib/versions/0.7.15.abi39
-rw-r--r--telepathy-glib/versions/0.7.16.abi9
-rw-r--r--telepathy-glib/versions/0.7.17.abi13
-rw-r--r--telepathy-glib/versions/0.7.18.abi24
-rw-r--r--telepathy-glib/versions/0.7.19.abi9
-rw-r--r--telepathy-glib/versions/0.7.2.abi25
-rw-r--r--telepathy-glib/versions/0.7.20.abi20
-rw-r--r--telepathy-glib/versions/0.7.21.abi38
-rw-r--r--telepathy-glib/versions/0.7.23.abi21
-rw-r--r--telepathy-glib/versions/0.7.24.abi8
-rw-r--r--telepathy-glib/versions/0.7.26.abi27
-rw-r--r--telepathy-glib/versions/0.7.27.abi23
-rw-r--r--telepathy-glib/versions/0.7.28.abi6
-rw-r--r--telepathy-glib/versions/0.7.29.abi24
-rw-r--r--telepathy-glib/versions/0.7.3.abi9
-rw-r--r--telepathy-glib/versions/0.7.30.abi6
-rw-r--r--telepathy-glib/versions/0.7.31.abi35
-rw-r--r--telepathy-glib/versions/0.7.32.abi102
-rw-r--r--telepathy-glib/versions/0.7.34.abi18
-rw-r--r--telepathy-glib/versions/0.7.35.abi7
-rw-r--r--telepathy-glib/versions/0.7.36.abi14
-rw-r--r--telepathy-glib/versions/0.7.37.abi18
-rw-r--r--telepathy-glib/versions/0.7.5.abi6
-rw-r--r--telepathy-glib/versions/0.7.6.abi24
-rw-r--r--telepathy-glib/versions/0.7.7.abi6
-rw-r--r--telepathy-glib/versions/0.7.8.abi14
-rw-r--r--telepathy-glib/versions/0.7.9.abi21
-rw-r--r--telepathy-glib/versions/0.9.0.abi56
-rw-r--r--telepathy-glib/versions/0.9.2.abi6
-rw-r--r--telepathy-glib/versions/core-1.0.0.abi6
-rw-r--r--telepathy-glib/versions/dbus-1.0.0.abi6
-rw-r--r--telepathy-glib/versions/main-1.0.0.abi6
-rw-r--r--tests/Makefile.am22
-rw-r--r--tests/dbus/Makefile.am29
-rw-r--r--tests/dbus/account-channel-request.c35
-rw-r--r--tests/dbus/account-manager.c42
-rw-r--r--tests/dbus/account-request.c5
-rw-r--r--tests/dbus/account.c26
-rw-r--r--tests/dbus/base-client.c46
-rw-r--r--tests/dbus/call-cancellation.c1
-rw-r--r--tests/dbus/call-channel.c28
-rw-r--r--tests/dbus/channel-dispatch-operation.c44
-rw-r--r--tests/dbus/channel-introspect.c492
-rw-r--r--tests/dbus/channel-manager-request-properties.c15
-rw-r--r--tests/dbus/channel-request.c26
-rw-r--r--tests/dbus/channel.c57
-rw-r--r--tests/dbus/cli-group.c358
-rw-r--r--tests/dbus/client-channel-factory.c271
-rw-r--r--tests/dbus/client.c4
-rw-r--r--tests/dbus/cm-message.c5
-rw-r--r--tests/dbus/cm.c246
-rw-r--r--tests/dbus/connection-aliasing.c4
-rw-r--r--tests/dbus/connection-balance.c41
-rw-r--r--tests/dbus/connection-bug-18845.c38
-rw-r--r--tests/dbus/connection-error.c53
-rw-r--r--tests/dbus/connection-getinterfaces-failure.c142
-rw-r--r--tests/dbus/connection-handles.c187
-rw-r--r--tests/dbus/connection-inject-bug16307.c86
-rw-r--r--tests/dbus/connection-interests.c14
-rw-r--r--tests/dbus/connection.c167
-rw-r--r--tests/dbus/contact-list-client.c5
-rw-r--r--tests/dbus/contact-lists.c1214
-rw-r--r--tests/dbus/contacts-bug-19101.c38
-rw-r--r--tests/dbus/contacts-mixin.c46
-rw-r--r--tests/dbus/contacts-slow-path.c1300
-rw-r--r--tests/dbus/contacts.c472
-rw-r--r--tests/dbus/dbus-installed/services/spurious.service2
-rw-r--r--tests/dbus/dbus-tube.c8
-rw-r--r--tests/dbus/dbus-uninstalled/services/spurious.service2
-rw-r--r--tests/dbus/dbus.c3
-rw-r--r--tests/dbus/disconnection.c21
-rw-r--r--tests/dbus/example-no-protocols.c5
-rw-r--r--tests/dbus/file-transfer-channel.c4
-rw-r--r--tests/dbus/finalized-in-invalidated-handler.c39
-rw-r--r--tests/dbus/group-mixin.c261
-rw-r--r--tests/dbus/invalidated-while-invoking-signals.c9
-rw-r--r--tests/dbus/message-mixin.c445
-rw-r--r--tests/dbus/params-cm.c20
-rw-r--r--tests/dbus/properties.c3
-rw-r--r--tests/dbus/protocol-objects.c3
-rw-r--r--tests/dbus/proxy-preparation.c7
-rw-r--r--tests/dbus/room-list.c1
-rw-r--r--tests/dbus/self-handle.c156
-rw-r--r--tests/dbus/self-presence.c155
-rw-r--r--tests/dbus/simple-approver.c16
-rw-r--r--tests/dbus/simple-handler.c10
-rw-r--r--tests/dbus/simple-observer.c9
-rw-r--r--tests/dbus/stream-tube.c4
-rw-r--r--tests/dbus/telepathy/managers/test_manager_file.manager10
-rw-r--r--tests/dbus/text-channel.c40
-rw-r--r--tests/dbus/text-mixin.c325
-rw-r--r--tests/dbus/text-respawn.c188
-rw-r--r--tests/dbus/unsupported-interface.c12
-rw-r--r--tests/enums.c19
-rw-r--r--tests/intset.c24
-rw-r--r--tests/lib/Makefile.am25
-rw-r--r--tests/lib/broken-client-types-conn.c5
-rw-r--r--tests/lib/bug-19101-conn.c4
-rw-r--r--tests/lib/bug16307-conn.c222
-rw-r--r--tests/lib/bug16307-conn.h61
-rw-r--r--tests/lib/contact-list-manager.c140
-rw-r--r--tests/lib/contacts-conn.c400
-rw-r--r--tests/lib/contacts-conn.h73
-rw-r--r--tests/lib/dbus-tube-chan.c1
-rw-r--r--tests/lib/echo-chan.c106
-rw-r--r--tests/lib/echo-chan.h5
-rw-r--r--tests/lib/echo-channel-manager-conn.c105
-rw-r--r--tests/lib/echo-channel-manager-conn.h53
-rw-r--r--tests/lib/echo-conn.c158
-rw-r--r--tests/lib/echo-conn.h7
-rw-r--r--tests/lib/echo-im-manager.c1
-rw-r--r--tests/lib/file-transfer-chan.c1
-rw-r--r--tests/lib/room-list-chan.c1
-rw-r--r--tests/lib/simple-account-manager.c59
-rw-r--r--tests/lib/simple-account-manager.h2
-rw-r--r--tests/lib/simple-account.c24
-rw-r--r--tests/lib/simple-channel-dispatcher.c108
-rw-r--r--tests/lib/simple-channel-manager.c1
-rw-r--r--tests/lib/simple-channel-request.c33
-rw-r--r--tests/lib/simple-client.c13
-rw-r--r--tests/lib/simple-client.h9
-rw-r--r--tests/lib/simple-conn.c92
-rw-r--r--tests/lib/simple-conn.h6
-rw-r--r--tests/lib/stream-tube-chan.c8
-rw-r--r--tests/lib/textchan-group.c170
-rw-r--r--tests/lib/textchan-group.h5
-rw-r--r--tests/lib/textchan-null.c116
-rw-r--r--tests/lib/textchan-null.h10
-rw-r--r--tests/lib/tls-certificate.c5
-rw-r--r--tests/lib/util.c34
-rw-r--r--tests/lib/util.h6
-rw-r--r--tools/c-constants-gen.py8
-rw-r--r--tools/glib-client-gen.py564
-rw-r--r--tools/glib-ginterface-gen.py3
-rw-r--r--tools/glib-interfaces-gen.py26
-rw-r--r--tools/manager-file.py4
531 files changed, 11098 insertions, 40724 deletions
diff --git a/configure.ac b/configure.ac
index 9b6c60c78..3959dd5cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,7 @@ AC_PREREQ([2.59])
# set nano_version to 1
m4_define([tp_glib_major_version], [0])
-m4_define([tp_glib_minor_version], [19])
+m4_define([tp_glib_minor_version], [99])
m4_define([tp_glib_micro_version], [0])
m4_define([tp_glib_nano_version], [1])
@@ -21,14 +21,21 @@ m4_define([tp_glib_nano_version], [1])
# If interfaces have been removed since last release, set age to 0
#
# If interfaces have been added, release builds will fail unless you add a new
-# file like telepathy-glib/versions/0.7.3.abi to add them to the official ABI.
+# file like telepathy-glib/versions/1.1.0.abi to add them to the official ABI.
# This also forces binaries built against devel versions to be rebuilt
# (we don't guarantee that we won't add ABI then remove it again, if it was
# never seen in a release).
-m4_define([tp_glib_lt_current], [71])
+# These are shared by libtelepathy-glib-1 and libtelepathy-glib-1-core
+m4_define([tp_glib_lt_current], [0])
m4_define([tp_glib_lt_revision], [0])
-m4_define([tp_glib_lt_age], [71])
+m4_define([tp_glib_lt_age], [0])
+
+# The same, but for the generated code in libtelepathy-glib-1-dbus; this
+# breaks ABI more often
+m4_define([tp_glib_lt_dbus_current], [0])
+m4_define([tp_glib_lt_dbus_revision], [0])
+m4_define([tp_glib_lt_dbus_age], [0])
# Some magic
m4_define([tp_glib_base_version],
@@ -75,6 +82,13 @@ AC_SUBST([LT_CURRENT])
AC_SUBST([LT_REVISION])
AC_SUBST([LT_AGE])
+LT_DBUS_CURRENT=tp_glib_lt_dbus_current
+LT_DBUS_REVISION=tp_glib_lt_dbus_revision
+LT_DBUS_AGE=tp_glib_lt_dbus_age
+AC_SUBST([LT_DBUS_CURRENT])
+AC_SUBST([LT_DBUS_REVISION])
+AC_SUBST([LT_DBUS_AGE])
+
dnl optimizations, etc.
COMPILER_OPTIMISATIONS
COMPILER_COVERAGE
@@ -340,8 +354,10 @@ AC_OUTPUT( Makefile \
examples/extensions/Makefile \
spec/Makefile \
telepathy-glib/Makefile \
- telepathy-glib/telepathy-glib.pc \
- telepathy-glib/telepathy-glib-uninstalled.pc \
+ telepathy-glib/telepathy-glib-1-dbus.pc \
+ telepathy-glib/telepathy-glib-1-dbus-uninstalled.pc \
+ telepathy-glib/telepathy-glib-1.pc \
+ telepathy-glib/telepathy-glib-1-uninstalled.pc \
telepathy-glib/version.h \
tests/Makefile \
tests/lib/Makefile \
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 982359646..4f7b9a99b 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -84,8 +84,13 @@ expand_content_files=
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) @DBUS_CFLAGS@ @GLIB_CFLAGS@
-GTKDOC_LIBS=$(top_builddir)/telepathy-glib/libtelepathy-glib.la \
- @DBUS_LIBS@ @GLIB_LIBS@
+GTKDOC_LIBS = \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
+ $(DBUS_LIBS) \
+ $(GLIB_LIBS) \
+ $(NULL)
# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make
diff --git a/docs/reference/telepathy-glib-docs.sgml b/docs/reference/telepathy-glib-docs.sgml
index a59c1e20d..5e75db4e9 100644
--- a/docs/reference/telepathy-glib-docs.sgml
+++ b/docs/reference/telepathy-glib-docs.sgml
@@ -16,20 +16,15 @@
<chapter id="ch-dbus">
<title>General D-Bus support</title>
<xi:include href="xml/proxy.xml"/>
- <xi:include href="xml/proxy-dbus-core.xml"/>
- <xi:include href="xml/proxy-tp-properties.xml"/>
<xi:include href="xml/dbus.xml"/>
<xi:include href="xml/asv.xml"/>
<xi:include href="xml/proxy-subclass.xml"/>
</chapter>
<chapter id="ch-protocol">
<title>The Telepathy protocol</title>
- <xi:include href="xml/defs.xml"/>
<xi:include href="xml/handle.xml"/>
- <xi:include href="xml/interfaces.xml"/>
<xi:include href="xml/enums.xml"/>
<xi:include href="xml/errors.xml"/>
- <xi:include href="xml/gtypes.xml"/>
<xi:include href="xml/channel-iface.xml"/>
</chapter>
<chapter id="ch-client">
@@ -39,42 +34,9 @@
<xi:include href="xml/connection.xml"/>
<xi:include href="xml/contact.xml"/>
<xi:include href="xml/capabilities.xml"/>
- <xi:include href="xml/connection-aliasing.xml"/>
- <xi:include href="xml/connection-avatars.xml"/>
- <xi:include href="xml/connection-balance.xml"/>
- <xi:include href="xml/connection-client-types.xml"/>
- <xi:include href="xml/connection-contacts.xml"/>
- <xi:include href="xml/connection-contact-info.xml"/>
- <xi:include href="xml/connection-contact-list.xml"/>
- <xi:include href="xml/connection-caps.xml"/>
- <xi:include href="xml/connection-location.xml"/>
- <xi:include href="xml/connection-requests.xml"/>
- <xi:include href="xml/connection-simple-presence.xml"/>
- <xi:include href="xml/connection-presence.xml"/>
- <xi:include href="xml/connection-cellular.xml"/>
- <xi:include href="xml/connection-mail.xml"/>
- <xi:include href="xml/connection-powersaving.xml"/>
- <xi:include href="xml/connection-addressing.xml"/>
<xi:include href="xml/contact-search.xml"/>
<xi:include href="xml/contact-search-result.xml"/>
<xi:include href="xml/channel.xml"/>
- <xi:include href="xml/channel-group.xml"/>
- <xi:include href="xml/channel-room.xml"/>
- <xi:include href="xml/channel-text.xml"/>
- <xi:include href="xml/channel-media.xml"/>
- <xi:include href="xml/channel-file-transfer.xml"/>
- <xi:include href="xml/channel-tubes.xml"/>
- <xi:include href="xml/channel-tube.xml"/>
- <xi:include href="xml/channel-roomlist.xml"/>
- <xi:include href="xml/channel-contactsearch.xml"/>
- <xi:include href="xml/channel-auth.xml"/>
- <xi:include href="xml/cli-call-channel.xml"/>
- <xi:include href="xml/cli-call-content.xml"/>
- <xi:include href="xml/cli-call-stream.xml"/>
- <xi:include href="xml/cli-call-misc.xml"/>
- <xi:include href="xml/cli-anonymity.xml"/>
- <xi:include href="xml/cli-service-point.xml"/>
- <xi:include href="xml/media-interfaces.xml"/>
<xi:include href="xml/account-manager.xml"/>
<xi:include href="xml/account.xml"/>
<xi:include href="xml/account-request.xml"/>
@@ -86,10 +48,7 @@
<xi:include href="xml/stream-tube-channel.xml"/>
<xi:include href="xml/stream-tube-connection.xml"/>
<xi:include href="xml/dbus-tube-channel.xml"/>
- <xi:include href="xml/client-channel-factory.xml"/>
- <xi:include href="xml/basic-proxy-factory.xml"/>
- <xi:include href="xml/automatic-proxy-factory.xml"/>
- <xi:include href="xml/simple-client-factory.xml"/>
+ <xi:include href="xml/client-factory.xml"/>
<xi:include href="xml/automatic-client-factory.xml"/>
<xi:include href="xml/client-message.xml"/>
<xi:include href="xml/signalled-message.xml"/>
@@ -107,40 +66,6 @@
<xi:include href="xml/tls-certificate-rejection.xml"/>
</chapter>
- <chapter id="ch-service-dbus">
- <title>Service-side D-Bus interfaces</title>
- <xi:include href="tp-svc.xml"/>
- <xi:include href="xml/svc-generic.xml"/>
- <xi:include href="xml/svc-channel.xml"/>
- <xi:include href="xml/svc-channel-group.xml"/>
- <xi:include href="xml/svc-channel-room.xml"/>
- <xi:include href="xml/svc-channel-contactlist.xml"/>
- <xi:include href="xml/svc-channel-contactsearch.xml"/>
- <xi:include href="xml/svc-channel-text.xml"/>
- <xi:include href="xml/svc-channel-media.xml"/>
- <xi:include href="xml/svc-channel-file-transfer.xml"/>
- <xi:include href="xml/svc-channel-ft-metadata.xml"/>
- <xi:include href="xml/svc-channel-tubes.xml"/>
- <xi:include href="xml/svc-channel-tube.xml"/>
- <xi:include href="xml/svc-channel-roomlist.xml"/>
- <xi:include href="xml/svc-channel-auth.xml"/>
- <xi:include href="xml/svc-channel-securable.xml"/>
- <xi:include href="xml/svc-channel-call.xml"/>
- <xi:include href="xml/svc-debug.xml"/>
- <xi:include href="xml/svc-connection.xml"/>
- <xi:include href="xml/svc-anonymity.xml"/>
- <xi:include href="xml/svc-service-point.xml"/>
- <xi:include href="xml/svc-media-interfaces.xml"/>
- <xi:include href="xml/svc-connection-manager.xml"/>
- <xi:include href="xml/svc-protocol.xml"/>
- <xi:include href="xml/svc-account-manager.xml"/>
- <xi:include href="xml/svc-account.xml"/>
- <xi:include href="xml/svc-channel-dispatcher.xml"/>
- <xi:include href="xml/svc-channel-dispatch-operation.xml"/>
- <xi:include href="xml/svc-channel-request.xml"/>
- <xi:include href="xml/svc-client.xml"/>
- <xi:include href="xml/svc-tls.xml"/>
- </chapter>
<chapter id="ch-service-base">
<title>Service-side implementation</title>
<xi:include href="xml/run.xml"/>
@@ -154,7 +79,6 @@
<xi:include href="xml/exportable-channel.xml"/>
<xi:include href="xml/base-channel.xml"/>
<xi:include href="xml/presence-mixin.xml"/>
- <xi:include href="xml/properties-mixin.xml"/>
<xi:include href="xml/base-room-config.xml"/>
<xi:include href="xml/group-mixin.xml"/>
<xi:include href="xml/message-mixin.xml"/>
@@ -197,11 +121,86 @@
<xi:include href="xml/heap.xml"/>
</chapter>
- <chapter id="ch-obsolete">
- <title>Obsolete modules</title>
- <xi:include href="xml/channel-factory-iface.xml"/>
- <xi:include href="xml/debug-ansi.xml"/>
- <xi:include href="xml/text-mixin.xml"/>
+ <chapter id="ch-codegen">
+ <title>Low-level generated code - common</title>
+ <xi:include href="xml/gtypes.xml"/>
+ <xi:include href="xml/interfaces.xml"/>
+ </chapter>
+
+ <chapter id="ch-cli">
+ <title>Low-level generated code - client-side</title>
+ <xi:include href="xml/cli-channel.xml"/>
+ <xi:include href="xml/channel-group.xml"/>
+ <xi:include href="xml/channel-room.xml"/>
+ <xi:include href="xml/channel-text.xml"/>
+ <xi:include href="xml/channel-media.xml"/>
+ <xi:include href="xml/channel-file-transfer.xml"/>
+ <xi:include href="xml/channel-tube.xml"/>
+ <xi:include href="xml/channel-roomlist.xml"/>
+ <xi:include href="xml/channel-contactsearch.xml"/>
+ <xi:include href="xml/channel-auth.xml"/>
+ <xi:include href="xml/cli-call-channel.xml"/>
+ <xi:include href="xml/cli-call-content.xml"/>
+ <xi:include href="xml/cli-call-stream.xml"/>
+ <xi:include href="xml/cli-call-misc.xml"/>
+
+ <xi:include href="xml/cli-connection.xml"/>
+ <xi:include href="xml/connection-aliasing.xml"/>
+ <xi:include href="xml/connection-avatars.xml"/>
+ <xi:include href="xml/connection-balance.xml"/>
+ <xi:include href="xml/connection-client-types.xml"/>
+ <xi:include href="xml/connection-contacts.xml"/>
+ <xi:include href="xml/connection-contact-info.xml"/>
+ <xi:include href="xml/connection-contact-list.xml"/>
+ <xi:include href="xml/connection-caps.xml"/>
+ <xi:include href="xml/connection-location.xml"/>
+ <xi:include href="xml/connection-requests.xml"/>
+ <xi:include href="xml/connection-presence.xml"/>
+ <xi:include href="xml/connection-cellular.xml"/>
+ <xi:include href="xml/connection-mail.xml"/>
+ <xi:include href="xml/connection-powersaving.xml"/>
+ <xi:include href="xml/connection-addressing.xml"/>
+
+ <xi:include href="xml/proxy-dbus-core.xml"/>
+ <xi:include href="xml/cli-account-manager.xml"/>
+ <xi:include href="xml/cli-channel-dispatcher.xml"/>
+ <xi:include href="xml/cli-client.xml"/>
+ <xi:include href="xml/cli-connection-manager.xml"/>
+ <xi:include href="xml/cli-anonymity.xml"/>
+ <xi:include href="xml/cli-service-point.xml"/>
+ </chapter>
+
+ <chapter id="ch-service-dbus">
+ <title>Low-level generated code - service-side</title>
+ <xi:include href="tp-svc.xml"/>
+
+ <xi:include href="xml/svc-channel.xml"/>
+ <xi:include href="xml/svc-channel-group.xml"/>
+ <xi:include href="xml/svc-channel-room.xml"/>
+ <xi:include href="xml/svc-channel-contactsearch.xml"/>
+ <xi:include href="xml/svc-channel-text.xml"/>
+ <xi:include href="xml/svc-channel-file-transfer.xml"/>
+ <xi:include href="xml/svc-channel-ft-metadata.xml"/>
+ <xi:include href="xml/svc-channel-tube.xml"/>
+ <xi:include href="xml/svc-channel-roomlist.xml"/>
+ <xi:include href="xml/svc-channel-auth.xml"/>
+ <xi:include href="xml/svc-channel-securable.xml"/>
+ <xi:include href="xml/svc-channel-call.xml"/>
+
+ <xi:include href="xml/svc-generic.xml"/>
+ <xi:include href="xml/svc-connection.xml"/>
+ <xi:include href="xml/svc-debug.xml"/>
+ <xi:include href="xml/svc-anonymity.xml"/>
+ <xi:include href="xml/svc-service-point.xml"/>
+ <xi:include href="xml/svc-connection-manager.xml"/>
+ <xi:include href="xml/svc-protocol.xml"/>
+ <xi:include href="xml/svc-account-manager.xml"/>
+ <xi:include href="xml/svc-account.xml"/>
+ <xi:include href="xml/svc-channel-dispatcher.xml"/>
+ <xi:include href="xml/svc-channel-dispatch-operation.xml"/>
+ <xi:include href="xml/svc-channel-request.xml"/>
+ <xi:include href="xml/svc-client.xml"/>
+ <xi:include href="xml/svc-tls.xml"/>
</chapter>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index 5edf14c79..71cc91a9b 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -16,38 +16,18 @@ TpChannelPrivate
<SECTION>
<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
-<FILE>defs</FILE>
-<TITLE>defs</TITLE>
-TP_CM_BUS_NAME_BASE
-TP_CM_OBJECT_PATH_BASE
-TP_CONN_BUS_NAME_BASE
-TP_CONN_OBJECT_PATH_BASE
-TP_ACCOUNT_MANAGER_BUS_NAME
-TP_ACCOUNT_MANAGER_OBJECT_PATH
-TP_ACCOUNT_OBJECT_PATH_BASE
-TP_CHANNEL_DISPATCHER_BUS_NAME
-TP_CHANNEL_DISPATCHER_OBJECT_PATH
-TP_CLIENT_BUS_NAME_BASE
-TP_CLIENT_OBJECT_PATH_BASE
-TP_DEBUG_OBJECT_PATH
-TP_USER_ACTION_TIME_NOT_USER_ACTION
-TP_USER_ACTION_TIME_CURRENT_TIME
-</SECTION>
-
-<SECTION>
-<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
<FILE>version</FILE>
<TITLE>version</TITLE>
TP_MAJOR_VERSION
TP_MINOR_VERSION
TP_MICRO_VERSION
-TP_VERSION_0_16
-TP_VERSION_0_18
-TP_VERSION_0_20
+TP_VERSION_1_0
TP_VERSION_MIN_REQUIRED
TP_VERSION_MAX_ALLOWED
<SUBSECTION Private>
-TP_VERSION_1_0
+TP_VERSION_0_16
+TP_VERSION_0_18
+TP_VERSION_0_20
</SECTION>
<SECTION>
@@ -57,7 +37,6 @@ TP_VERSION_1_0
TP_INTERNAL_CONNECTION_STATUS_NEW
TpBaseConnection
TpBaseConnectionClass
-TpBaseConnectionCreateChannelFactoriesImpl
TpBaseConnectionCreateChannelManagersImpl
TpBaseConnectionCreateHandleReposImpl
TpBaseConnectionGetUniqueConnectionNameImpl
@@ -73,7 +52,6 @@ tp_base_connection_disconnect_with_dbus_error
tp_base_connection_disconnect_with_dbus_error_vardict
tp_base_connection_finish_shutdown
tp_base_connection_add_interfaces
-tp_base_connection_dbus_request_handles
TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED
tp_base_connection_register_with_contacts_mixin
tp_base_connection_add_possible_client_interest
@@ -122,32 +100,6 @@ TpBaseConnectionManagerPrivate
</SECTION>
<SECTION>
-<INCLUDE>telepathy-glib/channel-factory-iface.h</INCLUDE>
-<FILE>channel-factory-iface</FILE>
-TpChannelFactoryIfaceForeachImpl
-TpChannelFactoryIfaceProc
-TpChannelFactoryIfaceRequestImpl
-TpChannelFactoryRequestStatus
-<TITLE>TpChannelFactoryIface</TITLE>
-TpChannelFactoryIface
-TpChannelFactoryIfaceClass
-tp_channel_factory_iface_close_all
-tp_channel_factory_iface_connecting
-tp_channel_factory_iface_connected
-tp_channel_factory_iface_disconnected
-tp_channel_factory_iface_foreach
-tp_channel_factory_iface_request
-tp_channel_factory_iface_emit_new_channel
-tp_channel_factory_iface_emit_channel_error
-<SUBSECTION Standard>
-TP_CHANNEL_FACTORY_IFACE
-TP_IS_CHANNEL_FACTORY_IFACE
-TP_TYPE_CHANNEL_FACTORY_IFACE
-tp_channel_factory_iface_get_type
-TP_CHANNEL_FACTORY_IFACE_GET_CLASS
-</SECTION>
-
-<SECTION>
<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
<FILE>channel-manager</FILE>
TpChannelManagerChannelClassFunc
@@ -164,7 +116,6 @@ tp_channel_manager_create_channel
tp_channel_manager_emit_channel_closed
tp_channel_manager_emit_channel_closed_for_object
tp_channel_manager_emit_new_channel
-tp_channel_manager_emit_new_channels
tp_channel_manager_emit_request_already_satisfied
tp_channel_manager_emit_request_failed
tp_channel_manager_emit_request_failed_printf
@@ -328,8 +279,6 @@ TpSvcDBusIntrospectable
TpSvcDBusIntrospectableClass
TpSvcDBusProperties
TpSvcDBusPropertiesClass
-TpSvcPropertiesInterface
-TpSvcPropertiesInterfaceClass
tp_svc_dbus_introspectable_implement_introspect
tp_svc_dbus_introspectable_introspect_impl
tp_svc_dbus_introspectable_return_from_introspect
@@ -343,17 +292,6 @@ tp_svc_dbus_properties_return_from_get_all
tp_svc_dbus_properties_return_from_set
tp_svc_dbus_properties_set_impl
tp_svc_dbus_properties_emit_properties_changed
-tp_svc_properties_interface_get_properties_impl
-tp_svc_properties_interface_return_from_get_properties
-tp_svc_properties_interface_implement_get_properties
-tp_svc_properties_interface_list_properties_impl
-tp_svc_properties_interface_return_from_list_properties
-tp_svc_properties_interface_implement_list_properties
-tp_svc_properties_interface_set_properties_impl
-tp_svc_properties_interface_return_from_set_properties
-tp_svc_properties_interface_implement_set_properties
-tp_svc_properties_interface_emit_properties_changed
-tp_svc_properties_interface_emit_property_flags_changed
<SUBSECTION Standard>
tp_svc_dbus_introspectable_get_type
tp_svc_dbus_properties_get_type
@@ -381,15 +319,6 @@ TpSvcChannelClass
tp_svc_channel_close_impl
tp_svc_channel_implement_close
tp_svc_channel_return_from_close
-tp_svc_channel_get_channel_type_impl
-tp_svc_channel_implement_get_channel_type
-tp_svc_channel_return_from_get_channel_type
-tp_svc_channel_get_handle_impl
-tp_svc_channel_implement_get_handle
-tp_svc_channel_return_from_get_handle
-tp_svc_channel_get_interfaces_impl
-tp_svc_channel_implement_get_interfaces
-tp_svc_channel_return_from_get_interfaces
tp_svc_channel_emit_closed
<SUBSECTION>
TpSvcChannelInterfaceDestroyable
@@ -417,21 +346,14 @@ TP_TYPE_SVC_CHANNEL_INTERFACE_DESTROYABLE
TpSvcChannelTypeText
TpSvcChannelTypeTextClass
tp_svc_channel_type_text_acknowledge_pending_messages_impl
+tp_svc_channel_type_text_emit_message_received
+tp_svc_channel_type_text_emit_message_sent
+tp_svc_channel_type_text_emit_pending_messages_removed
tp_svc_channel_type_text_implement_acknowledge_pending_messages
+tp_svc_channel_type_text_implement_send_message
tp_svc_channel_type_text_return_from_acknowledge_pending_messages
-tp_svc_channel_type_text_get_message_types_impl
-tp_svc_channel_type_text_implement_get_message_types
-tp_svc_channel_type_text_return_from_get_message_types
-tp_svc_channel_type_text_list_pending_messages_impl
-tp_svc_channel_type_text_implement_list_pending_messages
-tp_svc_channel_type_text_return_from_list_pending_messages
-tp_svc_channel_type_text_send_impl
-tp_svc_channel_type_text_implement_send
-tp_svc_channel_type_text_return_from_send
-tp_svc_channel_type_text_emit_lost_message
-tp_svc_channel_type_text_emit_received
-tp_svc_channel_type_text_emit_send_error
-tp_svc_channel_type_text_emit_sent
+tp_svc_channel_type_text_return_from_send_message
+tp_svc_channel_type_text_send_message_impl
<SUBSECTION Standard>
TP_SVC_CHANNEL_TYPE_TEXT
TP_IS_SVC_CHANNEL_TYPE_TEXT
@@ -452,24 +374,6 @@ TP_TYPE_SVC_CHANNEL_INTERFACE_CHAT_STATE
tp_svc_channel_interface_chat_state_get_type
TP_SVC_CHANNEL_INTERFACE_CHAT_STATE_GET_CLASS
<SUBSECTION>
-TpSvcChannelInterfaceMessages
-TpSvcChannelInterfaceMessagesClass
-tp_svc_channel_interface_messages_emit_message_received
-tp_svc_channel_interface_messages_emit_message_sent
-tp_svc_channel_interface_messages_emit_pending_messages_removed
-tp_svc_channel_interface_messages_get_pending_message_content_impl
-tp_svc_channel_interface_messages_implement_get_pending_message_content
-tp_svc_channel_interface_messages_implement_send_message
-tp_svc_channel_interface_messages_return_from_get_pending_message_content
-tp_svc_channel_interface_messages_return_from_send_message
-tp_svc_channel_interface_messages_send_message_impl
-<SUBSECTION Standard>
-tp_svc_channel_interface_messages_get_type
-TP_IS_SVC_CHANNEL_INTERFACE_MESSAGES
-TP_SVC_CHANNEL_INTERFACE_MESSAGES
-TP_SVC_CHANNEL_INTERFACE_MESSAGES_GET_CLASS
-TP_TYPE_SVC_CHANNEL_INTERFACE_MESSAGES
-<SUBSECTION>
TpSvcChannelInterfacePassword
TpSvcChannelInterfacePasswordClass
tp_svc_channel_interface_password_get_password_flags_impl
@@ -565,59 +469,6 @@ TP_SVC_CHANNEL_TYPE_FILE_TRANSFER_GET_CLASS
<SECTION>
<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
-<TITLE>svc-channel-tubes</TITLE>
-<FILE>svc-channel-tubes</FILE>
-<SUBSECTION>
-TpSvcChannelTypeTubes
-TpSvcChannelTypeTubesClass
-tp_svc_channel_type_tubes_accept_d_bus_tube_impl
-tp_svc_channel_type_tubes_implement_accept_d_bus_tube
-tp_svc_channel_type_tubes_return_from_accept_d_bus_tube
-tp_svc_channel_type_tubes_accept_stream_tube_impl
-tp_svc_channel_type_tubes_implement_accept_stream_tube
-tp_svc_channel_type_tubes_return_from_accept_stream_tube
-tp_svc_channel_type_tubes_close_tube_impl
-tp_svc_channel_type_tubes_implement_close_tube
-tp_svc_channel_type_tubes_return_from_close_tube
-tp_svc_channel_type_tubes_get_available_stream_tube_types_impl
-tp_svc_channel_type_tubes_implement_get_available_stream_tube_types
-tp_svc_channel_type_tubes_return_from_get_available_stream_tube_types
-tp_svc_channel_type_tubes_get_available_tube_types_impl
-tp_svc_channel_type_tubes_implement_get_available_tube_types
-tp_svc_channel_type_tubes_return_from_get_available_tube_types
-tp_svc_channel_type_tubes_get_d_bus_names_impl
-tp_svc_channel_type_tubes_implement_get_d_bus_names
-tp_svc_channel_type_tubes_return_from_get_d_bus_names
-tp_svc_channel_type_tubes_get_d_bus_tube_address_impl
-tp_svc_channel_type_tubes_implement_get_d_bus_tube_address
-tp_svc_channel_type_tubes_return_from_get_d_bus_tube_address
-tp_svc_channel_type_tubes_get_stream_tube_socket_address_impl
-tp_svc_channel_type_tubes_implement_get_stream_tube_socket_address
-tp_svc_channel_type_tubes_return_from_get_stream_tube_socket_address
-tp_svc_channel_type_tubes_list_tubes_impl
-tp_svc_channel_type_tubes_implement_list_tubes
-tp_svc_channel_type_tubes_return_from_list_tubes
-tp_svc_channel_type_tubes_offer_d_bus_tube_impl
-tp_svc_channel_type_tubes_implement_offer_d_bus_tube
-tp_svc_channel_type_tubes_return_from_offer_d_bus_tube
-tp_svc_channel_type_tubes_offer_stream_tube_impl
-tp_svc_channel_type_tubes_implement_offer_stream_tube
-tp_svc_channel_type_tubes_return_from_offer_stream_tube
-tp_svc_channel_type_tubes_emit_d_bus_names_changed
-tp_svc_channel_type_tubes_emit_new_tube
-tp_svc_channel_type_tubes_emit_stream_tube_new_connection
-tp_svc_channel_type_tubes_emit_tube_closed
-tp_svc_channel_type_tubes_emit_tube_state_changed
-<SUBSECTION Standard>
-tp_svc_channel_type_tubes_get_type
-TP_SVC_CHANNEL_TYPE_TUBES
-TP_IS_SVC_CHANNEL_TYPE_TUBES
-TP_SVC_CHANNEL_TYPE_TUBES_GET_CLASS
-TP_TYPE_SVC_CHANNEL_TYPE_TUBES
-</SECTION>
-
-<SECTION>
-<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
<TITLE>svc-channel-tube</TITLE>
<FILE>svc-channel-tube</FILE>
TpSvcChannelInterfaceTube
@@ -687,20 +538,6 @@ TP_SVC_CHANNEL_TYPE_ROOM_LIST_GET_CLASS
</SECTION>
<SECTION>
-<FILE>svc-channel-contactlist</FILE>
-<TITLE>svc-channel-contactlist</TITLE>
-<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
-TpSvcChannelTypeContactList
-TpSvcChannelTypeContactListClass
-<SUBSECTION Standard>
-TP_SVC_CHANNEL_TYPE_CONTACT_LIST
-TP_IS_SVC_CHANNEL_TYPE_CONTACT_LIST
-TP_TYPE_SVC_CHANNEL_TYPE_CONTACT_LIST
-tp_svc_channel_type_contact_list_get_type
-TP_SVC_CHANNEL_TYPE_CONTACT_LIST_GET_CLASS
-</SECTION>
-
-<SECTION>
<FILE>svc-channel-group</FILE>
<TITLE>svc-channel-group</TITLE>
<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
@@ -709,41 +546,12 @@ TpSvcChannelInterfaceGroupClass
tp_svc_channel_interface_group_add_members_impl
tp_svc_channel_interface_group_implement_add_members
tp_svc_channel_interface_group_return_from_add_members
-tp_svc_channel_interface_group_get_all_members_impl
-tp_svc_channel_interface_group_implement_get_all_members
-tp_svc_channel_interface_group_return_from_get_all_members
-tp_svc_channel_interface_group_get_group_flags_impl
-tp_svc_channel_interface_group_implement_get_group_flags
-tp_svc_channel_interface_group_return_from_get_group_flags
-tp_svc_channel_interface_group_get_handle_owners_impl
-tp_svc_channel_interface_group_implement_get_handle_owners
-tp_svc_channel_interface_group_return_from_get_handle_owners
-tp_svc_channel_interface_group_get_local_pending_members_impl
-tp_svc_channel_interface_group_implement_get_local_pending_members
-tp_svc_channel_interface_group_return_from_get_local_pending_members
-tp_svc_channel_interface_group_get_local_pending_members_with_info_impl
-tp_svc_channel_interface_group_implement_get_local_pending_members_with_info
-tp_svc_channel_interface_group_return_from_get_local_pending_members_with_info
-tp_svc_channel_interface_group_get_members_impl
-tp_svc_channel_interface_group_implement_get_members
-tp_svc_channel_interface_group_return_from_get_members
-tp_svc_channel_interface_group_get_remote_pending_members_impl
-tp_svc_channel_interface_group_implement_get_remote_pending_members
-tp_svc_channel_interface_group_return_from_get_remote_pending_members
-tp_svc_channel_interface_group_get_self_handle_impl
-tp_svc_channel_interface_group_implement_get_self_handle
-tp_svc_channel_interface_group_return_from_get_self_handle
tp_svc_channel_interface_group_remove_members_impl
tp_svc_channel_interface_group_implement_remove_members
tp_svc_channel_interface_group_return_from_remove_members
tp_svc_channel_interface_group_emit_group_flags_changed
tp_svc_channel_interface_group_emit_members_changed
-tp_svc_channel_interface_group_emit_members_changed_detailed
-tp_svc_channel_interface_group_implement_remove_members_with_reason
-tp_svc_channel_interface_group_remove_members_with_reason_impl
-tp_svc_channel_interface_group_return_from_remove_members_with_reason
tp_svc_channel_interface_group_emit_handle_owners_changed
-tp_svc_channel_interface_group_emit_self_handle_changed
<SUBSECTION Standard>
TP_SVC_CHANNEL_INTERFACE_GROUP
TP_IS_SVC_CHANNEL_INTERFACE_GROUP
@@ -764,100 +572,6 @@ tp_svc_channel_interface_conference_get_type
</SECTION>
<SECTION>
-<FILE>svc-channel-media</FILE>
-<TITLE>svc-channel-media</TITLE>
-<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
-TpSvcChannelTypeStreamedMedia
-TpSvcChannelTypeStreamedMediaClass
-tp_svc_channel_type_streamed_media_list_streams_impl
-tp_svc_channel_type_streamed_media_implement_list_streams
-tp_svc_channel_type_streamed_media_return_from_list_streams
-tp_svc_channel_type_streamed_media_remove_streams_impl
-tp_svc_channel_type_streamed_media_implement_remove_streams
-tp_svc_channel_type_streamed_media_return_from_remove_streams
-tp_svc_channel_type_streamed_media_request_stream_direction_impl
-tp_svc_channel_type_streamed_media_implement_request_stream_direction
-tp_svc_channel_type_streamed_media_return_from_request_stream_direction
-tp_svc_channel_type_streamed_media_request_streams_impl
-tp_svc_channel_type_streamed_media_implement_request_streams
-tp_svc_channel_type_streamed_media_return_from_request_streams
-tp_svc_channel_type_streamed_media_emit_stream_added
-tp_svc_channel_type_streamed_media_emit_stream_direction_changed
-tp_svc_channel_type_streamed_media_emit_stream_error
-tp_svc_channel_type_streamed_media_emit_stream_removed
-tp_svc_channel_type_streamed_media_emit_stream_state_changed
-<SUBSECTION Standard>
-TP_SVC_CHANNEL_TYPE_STREAMED_MEDIA
-TP_IS_SVC_CHANNEL_TYPE_STREAMED_MEDIA
-TP_TYPE_SVC_CHANNEL_TYPE_STREAMED_MEDIA
-tp_svc_channel_type_streamed_media_get_type
-TP_SVC_CHANNEL_TYPE_STREAMED_MEDIA_GET_CLASS
-<SUBSECTION>
-TpSvcChannelInterfaceCallState
-TpSvcChannelInterfaceCallStateClass
-tp_svc_channel_interface_call_state_emit_call_state_changed
-tp_svc_channel_interface_call_state_get_call_states_impl
-tp_svc_channel_interface_call_state_implement_get_call_states
-tp_svc_channel_interface_call_state_return_from_get_call_states
-<SUBSECTION Standard>
-TP_IS_SVC_CHANNEL_INTERFACE_CALL_STATE
-TP_SVC_CHANNEL_INTERFACE_CALL_STATE
-TP_SVC_CHANNEL_INTERFACE_CALL_STATE_GET_CLASS
-TP_TYPE_SVC_CHANNEL_INTERFACE_CALL_STATE
-tp_svc_channel_interface_call_state_get_type
-<SUBSECTION>
-TpSvcChannelInterfaceDTMF
-TpSvcChannelInterfaceDTMFClass
-tp_svc_channel_interface_dtmf_implement_multiple_tones
-tp_svc_channel_interface_dtmf_implement_start_tone
-tp_svc_channel_interface_dtmf_implement_stop_tone
-tp_svc_channel_interface_dtmf_return_from_multiple_tones
-tp_svc_channel_interface_dtmf_return_from_start_tone
-tp_svc_channel_interface_dtmf_return_from_stop_tone
-tp_svc_channel_interface_dtmf_multiple_tones_impl
-tp_svc_channel_interface_dtmf_start_tone_impl
-tp_svc_channel_interface_dtmf_stop_tone_impl
-tp_svc_channel_interface_dtmf_emit_sending_tones
-tp_svc_channel_interface_dtmf_emit_stopped_tones
-tp_svc_channel_interface_dtmf_emit_tones_deferred
-<SUBSECTION Standard>
-TP_SVC_CHANNEL_INTERFACE_DTMF
-TP_IS_SVC_CHANNEL_INTERFACE_DTMF
-TP_TYPE_SVC_CHANNEL_INTERFACE_DTMF
-tp_svc_channel_interface_dtmf_get_type
-TP_SVC_CHANNEL_INTERFACE_DTMF_GET_CLASS
-<SUBSECTION>
-TpSvcChannelInterfaceHold
-TpSvcChannelInterfaceHoldClass
-tp_svc_channel_interface_hold_get_hold_state_impl
-tp_svc_channel_interface_hold_return_from_get_hold_state
-tp_svc_channel_interface_hold_implement_get_hold_state
-tp_svc_channel_interface_hold_request_hold_impl
-tp_svc_channel_interface_hold_return_from_request_hold
-tp_svc_channel_interface_hold_implement_request_hold
-tp_svc_channel_interface_hold_emit_hold_state_changed
-<SUBSECTION Standard>
-TP_IS_SVC_CHANNEL_INTERFACE_HOLD
-TP_SVC_CHANNEL_INTERFACE_HOLD
-TP_SVC_CHANNEL_INTERFACE_HOLD_GET_CLASS
-TP_TYPE_SVC_CHANNEL_INTERFACE_HOLD
-tp_svc_channel_interface_hold_get_type
-<SUBSECTION>
-TpSvcChannelInterfaceMediaSignalling
-TpSvcChannelInterfaceMediaSignallingClass
-tp_svc_channel_interface_media_signalling_get_session_handlers_impl
-tp_svc_channel_interface_media_signalling_implement_get_session_handlers
-tp_svc_channel_interface_media_signalling_return_from_get_session_handlers
-tp_svc_channel_interface_media_signalling_emit_new_session_handler
-<SUBSECTION Standard>
-TP_SVC_CHANNEL_INTERFACE_MEDIA_SIGNALLING
-TP_IS_SVC_CHANNEL_INTERFACE_MEDIA_SIGNALLING
-TP_TYPE_SVC_CHANNEL_INTERFACE_MEDIA_SIGNALLING
-tp_svc_channel_interface_media_signalling_get_type
-TP_SVC_CHANNEL_INTERFACE_MEDIA_SIGNALLING_GET_CLASS
-</SECTION>
-
-<SECTION>
<FILE>svc-channel-call</FILE>
<TITLE>svc-channel-call</TITLE>
<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
@@ -889,6 +603,43 @@ TP_SVC_CHANNEL_TYPE_CALL
TP_SVC_CHANNEL_TYPE_CALL_GET_CLASS
tp_svc_channel_type_call_get_type
<SUBSECTION>
+tp_svc_channel_interface_dtmf_emit_sending_tones
+tp_svc_channel_interface_dtmf_emit_stopped_tones
+tp_svc_channel_interface_dtmf_emit_tones_deferred
+tp_svc_channel_interface_dtmf_implement_multiple_tones
+tp_svc_channel_interface_dtmf_implement_start_tone
+tp_svc_channel_interface_dtmf_implement_stop_tone
+tp_svc_channel_interface_dtmf_multiple_tones_impl
+tp_svc_channel_interface_dtmf_return_from_multiple_tones
+tp_svc_channel_interface_dtmf_return_from_start_tone
+tp_svc_channel_interface_dtmf_return_from_stop_tone
+tp_svc_channel_interface_dtmf_start_tone_impl
+tp_svc_channel_interface_dtmf_stop_tone_impl
+<SUBSECTION Standard>
+TpSvcChannelInterfaceDTMF
+TpSvcChannelInterfaceDTMFClass
+TP_IS_SVC_CHANNEL_INTERFACE_DTMF
+TP_SVC_CHANNEL_INTERFACE_DTMF_GET_CLASS
+TP_TYPE_SVC_CHANNEL_INTERFACE_DTMF
+tp_svc_channel_interface_dtmf_get_type
+<SUBSECTION>
+tp_svc_channel_interface_hold_emit_hold_state_changed
+tp_svc_channel_interface_hold_get_hold_state_impl
+tp_svc_channel_interface_hold_implement_get_hold_state
+tp_svc_channel_interface_hold_implement_request_hold
+tp_svc_channel_interface_hold_request_hold_impl
+tp_svc_channel_interface_hold_return_from_get_hold_state
+tp_svc_channel_interface_hold_return_from_request_hold
+<SUBSECTION Standard>
+TpSvcChannelInterfaceHold
+TpSvcChannelInterfaceHoldClass
+TP_IS_SVC_CHANNEL_INTERFACE_HOLD
+TP_SVC_CHANNEL_INTERFACE_DTMF
+TP_SVC_CHANNEL_INTERFACE_HOLD
+TP_SVC_CHANNEL_INTERFACE_HOLD_GET_CLASS
+TP_TYPE_SVC_CHANNEL_INTERFACE_HOLD
+tp_svc_channel_interface_hold_get_type
+<SUBSECTION>
TpSvcCallContent
TpSvcCallContentClass
tp_svc_call_content_emit_streams_added
@@ -1164,41 +915,16 @@ TpSvcConnectionClass
tp_svc_connection_connect_impl
tp_svc_connection_implement_connect
tp_svc_connection_return_from_connect
+tp_svc_connection_return_from_inspect_handles
tp_svc_connection_disconnect_impl
tp_svc_connection_implement_disconnect
tp_svc_connection_return_from_disconnect
-tp_svc_connection_get_interfaces_impl
-tp_svc_connection_implement_get_interfaces
-tp_svc_connection_return_from_get_interfaces
-tp_svc_connection_get_protocol_impl
-tp_svc_connection_implement_get_protocol
-tp_svc_connection_return_from_get_protocol
-tp_svc_connection_get_self_handle_impl
-tp_svc_connection_implement_get_self_handle
-tp_svc_connection_return_from_get_self_handle
-tp_svc_connection_get_status_impl
-tp_svc_connection_implement_get_status
-tp_svc_connection_return_from_get_status
-tp_svc_connection_hold_handles_impl
-tp_svc_connection_implement_hold_handles
-tp_svc_connection_return_from_hold_handles
-tp_svc_connection_inspect_handles_impl
-tp_svc_connection_implement_inspect_handles
-tp_svc_connection_return_from_inspect_handles
-tp_svc_connection_list_channels_impl
-tp_svc_connection_implement_list_channels
-tp_svc_connection_return_from_list_channels
-tp_svc_connection_release_handles_impl
-tp_svc_connection_implement_release_handles
-tp_svc_connection_return_from_release_handles
-tp_svc_connection_request_channel_impl
-tp_svc_connection_implement_request_channel
-tp_svc_connection_return_from_request_channel
tp_svc_connection_request_handles_impl
tp_svc_connection_implement_request_handles
+tp_svc_connection_implement_inspect_handles
+tp_svc_connection_inspect_handles_impl
tp_svc_connection_return_from_request_handles
-tp_svc_connection_emit_new_channel
-tp_svc_connection_emit_self_handle_changed
+tp_svc_connection_emit_self_contact_changed
tp_svc_connection_emit_status_changed
tp_svc_connection_emit_connection_error
tp_svc_connection_add_client_interest_impl
@@ -1246,49 +972,22 @@ TP_SVC_CONNECTION_INTERFACE_REQUESTS_GET_CLASS
tp_svc_connection_interface_requests_get_type
TP_TYPE_SVC_CONNECTION_INTERFACE_REQUESTS
<SUBSECTION>
-TpSvcConnectionInterfaceSimplePresence
-TpSvcConnectionInterfaceSimplePresenceClass
-tp_svc_connection_interface_simple_presence_emit_presences_changed
-tp_svc_connection_interface_simple_presence_get_presences_impl
-tp_svc_connection_interface_simple_presence_implement_get_presences
-tp_svc_connection_interface_simple_presence_implement_set_presence
-tp_svc_connection_interface_simple_presence_return_from_get_presences
-tp_svc_connection_interface_simple_presence_return_from_set_presence
-tp_svc_connection_interface_simple_presence_set_presence_impl
-<SUBSECTION Standard>
-TP_TYPE_SVC_CONNECTION_INTERFACE_SIMPLE_PRESENCE
-TP_SVC_CONNECTION_INTERFACE_SIMPLE_PRESENCE
-TP_IS_SVC_CONNECTION_INTERFACE_SIMPLE_PRESENCE
-tp_svc_connection_interface_simple_presence_get_type
-TP_SVC_CONNECTION_INTERFACE_SIMPLE_PRESENCE_GET_CLASS
+<SUBSECTION Standard>
+TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE
+TP_SVC_CONNECTION_INTERFACE_PRESENCE
+TP_IS_SVC_CONNECTION_INTERFACE_PRESENCE
+tp_svc_connection_interface_presence_get_type
+TP_SVC_CONNECTION_INTERFACE_PRESENCE_GET_CLASS
<SUBSECTION>
TpSvcConnectionInterfacePresence
TpSvcConnectionInterfacePresenceClass
-tp_svc_connection_interface_presence_add_status_impl
-tp_svc_connection_interface_presence_implement_add_status
-tp_svc_connection_interface_presence_return_from_add_status
-tp_svc_connection_interface_presence_clear_status_impl
-tp_svc_connection_interface_presence_implement_clear_status
-tp_svc_connection_interface_presence_return_from_clear_status
-tp_svc_connection_interface_presence_get_presence_impl
-tp_svc_connection_interface_presence_implement_get_presence
-tp_svc_connection_interface_presence_return_from_get_presence
-tp_svc_connection_interface_presence_get_statuses_impl
-tp_svc_connection_interface_presence_implement_get_statuses
-tp_svc_connection_interface_presence_return_from_get_statuses
-tp_svc_connection_interface_presence_remove_status_impl
-tp_svc_connection_interface_presence_implement_remove_status
-tp_svc_connection_interface_presence_return_from_remove_status
-tp_svc_connection_interface_presence_request_presence_impl
-tp_svc_connection_interface_presence_implement_request_presence
-tp_svc_connection_interface_presence_return_from_request_presence
-tp_svc_connection_interface_presence_set_last_activity_time_impl
-tp_svc_connection_interface_presence_implement_set_last_activity_time
-tp_svc_connection_interface_presence_return_from_set_last_activity_time
-tp_svc_connection_interface_presence_set_status_impl
-tp_svc_connection_interface_presence_implement_set_status
-tp_svc_connection_interface_presence_return_from_set_status
-tp_svc_connection_interface_presence_emit_presence_update
+tp_svc_connection_interface_presence_emit_presences_changed
+tp_svc_connection_interface_presence_get_presences_impl
+tp_svc_connection_interface_presence_implement_get_presences
+tp_svc_connection_interface_presence_implement_set_presence
+tp_svc_connection_interface_presence_return_from_get_presences
+tp_svc_connection_interface_presence_return_from_set_presence
+tp_svc_connection_interface_presence_set_presence_impl
<SUBSECTION Standard>
TP_SVC_CONNECTION_INTERFACE_PRESENCE
TP_IS_SVC_CONNECTION_INTERFACE_PRESENCE
@@ -1301,15 +1000,6 @@ TpSvcConnectionInterfaceAvatarsClass
tp_svc_connection_interface_avatars_clear_avatar_impl
tp_svc_connection_interface_avatars_implement_clear_avatar
tp_svc_connection_interface_avatars_return_from_clear_avatar
-tp_svc_connection_interface_avatars_get_avatar_requirements_impl
-tp_svc_connection_interface_avatars_implement_get_avatar_requirements
-tp_svc_connection_interface_avatars_return_from_get_avatar_requirements
-tp_svc_connection_interface_avatars_get_avatar_tokens_impl
-tp_svc_connection_interface_avatars_implement_get_avatar_tokens
-tp_svc_connection_interface_avatars_return_from_get_avatar_tokens
-tp_svc_connection_interface_avatars_request_avatar_impl
-tp_svc_connection_interface_avatars_implement_request_avatar
-tp_svc_connection_interface_avatars_return_from_request_avatar
tp_svc_connection_interface_avatars_set_avatar_impl
tp_svc_connection_interface_avatars_implement_set_avatar
tp_svc_connection_interface_avatars_return_from_set_avatar
@@ -1360,22 +1050,6 @@ TP_TYPE_SVC_CONNECTION_INTERFACE_BALANCE
tp_svc_connection_interface_balance_get_type
TP_SVC_CONNECTION_INTERFACE_BALANCE_GET_CLASS
<SUBSECTION>
-TpSvcConnectionInterfaceCapabilities
-TpSvcConnectionInterfaceCapabilitiesClass
-tp_svc_connection_interface_capabilities_advertise_capabilities_impl
-tp_svc_connection_interface_capabilities_implement_advertise_capabilities
-tp_svc_connection_interface_capabilities_return_from_advertise_capabilities
-tp_svc_connection_interface_capabilities_get_capabilities_impl
-tp_svc_connection_interface_capabilities_implement_get_capabilities
-tp_svc_connection_interface_capabilities_return_from_get_capabilities
-tp_svc_connection_interface_capabilities_emit_capabilities_changed
-<SUBSECTION Standard>
-TP_SVC_CONNECTION_INTERFACE_CAPABILITIES
-TP_IS_SVC_CONNECTION_INTERFACE_CAPABILITIES
-TP_TYPE_SVC_CONNECTION_INTERFACE_CAPABILITIES
-tp_svc_connection_interface_capabilities_get_type
-TP_SVC_CONNECTION_INTERFACE_CAPABILITIES_GET_CLASS
-<SUBSECTION>
TpSvcConnectionInterfaceContactCapabilities
TpSvcConnectionInterfaceContactCapabilitiesClass
tp_svc_connection_interface_contact_capabilities_emit_contact_capabilities_changed
@@ -1474,7 +1148,6 @@ TpSvcConnectionInterfaceContactListClass
tp_svc_connection_interface_contact_list_authorize_publication_impl
tp_svc_connection_interface_contact_list_download_impl
tp_svc_connection_interface_contact_list_emit_contacts_changed
-tp_svc_connection_interface_contact_list_emit_contacts_changed_with_id
tp_svc_connection_interface_contact_list_emit_contact_list_state_changed
tp_svc_connection_interface_contact_list_get_contact_list_attributes_impl
tp_svc_connection_interface_contact_list_implement_authorize_publication
@@ -1585,108 +1258,11 @@ tp_svc_connection_interface_addressing_get_type
</SECTION>
<SECTION>
-<FILE>svc-media-interfaces</FILE>
-<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
-<TITLE>svc-media-interfaces</TITLE>
-<SUBSECTION>
-TpSvcMediaSessionHandler
-TpSvcMediaSessionHandlerClass
-tp_svc_media_session_handler_error_impl
-tp_svc_media_session_handler_implement_error
-tp_svc_media_session_handler_return_from_error
-tp_svc_media_session_handler_ready_impl
-tp_svc_media_session_handler_implement_ready
-tp_svc_media_session_handler_return_from_ready
-tp_svc_media_session_handler_emit_new_stream_handler
-<SUBSECTION Standard>
-TP_SVC_MEDIA_SESSION_HANDLER
-TP_IS_SVC_MEDIA_SESSION_HANDLER
-TP_TYPE_SVC_MEDIA_SESSION_HANDLER
-tp_svc_media_session_handler_get_type
-TP_SVC_MEDIA_SESSION_HANDLER_GET_CLASS
-<SUBSECTION>
-TpSvcMediaStreamHandler
-TpSvcMediaStreamHandlerClass
-tp_svc_media_stream_handler_codec_choice_impl
-tp_svc_media_stream_handler_implement_codec_choice
-tp_svc_media_stream_handler_return_from_codec_choice
-tp_svc_media_stream_handler_error_impl
-tp_svc_media_stream_handler_implement_error
-tp_svc_media_stream_handler_return_from_error
-tp_svc_media_stream_handler_native_candidates_prepared_impl
-tp_svc_media_stream_handler_implement_native_candidates_prepared
-tp_svc_media_stream_handler_return_from_native_candidates_prepared
-tp_svc_media_stream_handler_new_active_candidate_pair_impl
-tp_svc_media_stream_handler_implement_new_active_candidate_pair
-tp_svc_media_stream_handler_return_from_new_active_candidate_pair
-tp_svc_media_stream_handler_new_native_candidate_impl
-tp_svc_media_stream_handler_implement_new_native_candidate
-tp_svc_media_stream_handler_return_from_new_native_candidate
-tp_svc_media_stream_handler_ready_impl
-tp_svc_media_stream_handler_implement_ready
-tp_svc_media_stream_handler_return_from_ready
-tp_svc_media_stream_handler_set_local_codecs_impl
-tp_svc_media_stream_handler_implement_set_local_codecs
-tp_svc_media_stream_handler_return_from_set_local_codecs
-tp_svc_media_stream_handler_stream_state_impl
-tp_svc_media_stream_handler_implement_stream_state
-tp_svc_media_stream_handler_return_from_stream_state
-tp_svc_media_stream_handler_supported_codecs_impl
-tp_svc_media_stream_handler_implement_supported_codecs
-tp_svc_media_stream_handler_return_from_supported_codecs
-tp_svc_media_stream_handler_emit_add_remote_candidate
-tp_svc_media_stream_handler_emit_close
-tp_svc_media_stream_handler_emit_remove_remote_candidate
-tp_svc_media_stream_handler_emit_set_active_candidate_pair
-tp_svc_media_stream_handler_emit_set_remote_candidate_list
-tp_svc_media_stream_handler_emit_set_remote_codecs
-tp_svc_media_stream_handler_emit_set_stream_playing
-tp_svc_media_stream_handler_emit_set_stream_sending
-tp_svc_media_stream_handler_emit_start_telephony_event
-tp_svc_media_stream_handler_emit_stop_telephony_event
-tp_svc_media_stream_handler_emit_set_stream_held
-tp_svc_media_stream_handler_hold_state_impl
-tp_svc_media_stream_handler_implement_hold_state
-tp_svc_media_stream_handler_implement_unhold_failure
-tp_svc_media_stream_handler_return_from_hold_state
-tp_svc_media_stream_handler_return_from_unhold_failure
-tp_svc_media_stream_handler_unhold_failure_impl
-tp_svc_media_stream_handler_codecs_updated_impl
-tp_svc_media_stream_handler_implement_codecs_updated
-tp_svc_media_stream_handler_return_from_codecs_updated
-tp_svc_media_stream_handler_emit_start_named_telephony_event
-tp_svc_media_stream_handler_emit_start_sound_telephony_event
-tp_svc_media_stream_handler_implement_new_active_transport_pair
-tp_svc_media_stream_handler_new_active_transport_pair_impl
-tp_svc_media_stream_handler_return_from_new_active_transport_pair
-tp_svc_media_stream_handler_emit_set_remote_feedback_messages
-tp_svc_media_stream_handler_emit_set_remote_header_extensions
-tp_svc_media_stream_handler_implement_supported_feedback_messages
-tp_svc_media_stream_handler_implement_supported_header_extensions
-tp_svc_media_stream_handler_return_from_supported_feedback_messages
-tp_svc_media_stream_handler_return_from_supported_header_extensions
-tp_svc_media_stream_handler_supported_feedback_messages_impl
-tp_svc_media_stream_handler_supported_header_extensions_impl
-<SUBSECTION Standard>
-TP_SVC_MEDIA_STREAM_HANDLER
-TP_IS_SVC_MEDIA_STREAM_HANDLER
-TP_TYPE_SVC_MEDIA_STREAM_HANDLER
-tp_svc_media_stream_handler_get_type
-TP_SVC_MEDIA_STREAM_HANDLER_GET_CLASS
-</SECTION>
-
-<SECTION>
<FILE>svc-connection-manager</FILE>
<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
<TITLE>svc-connection-manager</TITLE>
TpSvcConnectionManager
TpSvcConnectionManagerClass
-tp_svc_connection_manager_get_parameters_impl
-tp_svc_connection_manager_implement_get_parameters
-tp_svc_connection_manager_return_from_get_parameters
-tp_svc_connection_manager_list_protocols_impl
-tp_svc_connection_manager_implement_list_protocols
-tp_svc_connection_manager_return_from_list_protocols
tp_svc_connection_manager_request_connection_impl
tp_svc_connection_manager_implement_request_connection
tp_svc_connection_manager_return_from_request_connection
@@ -1703,9 +1279,6 @@ TP_SVC_CONNECTION_MANAGER_GET_CLASS
<FILE>util</FILE>
<TITLE>util</TITLE>
<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
-tp_verify
-tp_verify_true
-tp_verify_statement
tp_g_hash_table_update
tp_g_ptr_array_contains
tp_g_ptr_array_extend
@@ -1787,6 +1360,7 @@ TP_STRUCT_TYPE_SOCKET_ADDRESS_IPV4
TP_STRUCT_TYPE_SOCKET_ADDRESS_IPV6
TP_STRUCT_TYPE_SOCKET_NETMASK_IPV4
TP_STRUCT_TYPE_SOCKET_NETMASK_IPV6
+TP_HASH_TYPE_SUPPORTED_SOCKET_MAP
TP_HASH_TYPE_OBJECT_IMMUTABLE_PROPERTIES_MAP
TP_ARRAY_TYPE_OBJECT_IMMUTABLE_PROPERTIES_MAP_LIST
<SUBSECTION>
@@ -1795,10 +1369,6 @@ TP_STRUCT_TYPE_PARAM_SPEC
TP_ARRAY_TYPE_PARAM_SPEC_LIST
TP_HASH_TYPE_PROTOCOL_PROPERTIES_MAP
<SUBSECTION>
-# Connection
-TP_STRUCT_TYPE_CHANNEL_INFO
-TP_ARRAY_TYPE_CHANNEL_INFO_LIST
-<SUBSECTION>
# Connection - Aliasing
TP_HASH_TYPE_ALIAS_MAP
TP_STRUCT_TYPE_ALIAS_PAIR
@@ -1816,14 +1386,6 @@ TP_ARRAY_TYPE_CONTACT_CAPABILITIES_MAP_LIST
TP_STRUCT_TYPE_HANDLER_CAPABILITIES
TP_ARRAY_TYPE_HANDLER_CAPABILITIES_LIST
<SUBSECTION>
-# Connection - Capabilities
-TP_STRUCT_TYPE_CAPABILITY_CHANGE
-TP_ARRAY_TYPE_CAPABILITY_CHANGE_LIST
-TP_STRUCT_TYPE_CAPABILITY_PAIR
-TP_ARRAY_TYPE_CAPABILITY_PAIR_LIST
-TP_STRUCT_TYPE_CONTACT_CAPABILITY
-TP_ARRAY_TYPE_CONTACT_CAPABILITY_LIST
-<SUBSECTION>
# Connection - Contacts
TP_HASH_TYPE_CONTACT_ATTRIBUTES_MAP
TP_HASH_TYPE_SINGLE_CONTACT_ATTRIBUTES_MAP
@@ -1836,20 +1398,12 @@ TP_ARRAY_TYPE_CHANNEL_DETAILS_LIST
TP_STRUCT_TYPE_REQUESTABLE_CHANNEL_CLASS
TP_ARRAY_TYPE_REQUESTABLE_CHANNEL_CLASS_LIST
<SUBSECTION>
-# Connection - SimplePresence and generic support for rich presence
-TP_HASH_TYPE_SIMPLE_CONTACT_PRESENCES
-TP_HASH_TYPE_SIMPLE_STATUS_SPEC_MAP
-TP_STRUCT_TYPE_SIMPLE_PRESENCE
-TP_STRUCT_TYPE_SIMPLE_STATUS_SPEC
-TP_STRUCT_TYPE_ACCESS_CONTROL
-TP_STRUCT_TYPE_RICH_PRESENCE_ACCESS_CONTROL
-<SUBSECTION>
-# Connection - Presence (0.16)
-TP_HASH_TYPE_CONTACT_PRESENCES
-TP_HASH_TYPE_MULTIPLE_STATUS_MAP
+# Connection - Presence
+TP_HASH_TYPE_CONTACT_PRESENCE_MAP
TP_HASH_TYPE_STATUS_SPEC_MAP
-TP_STRUCT_TYPE_LAST_ACTIVITY_AND_STATUSES
+TP_STRUCT_TYPE_PRESENCE
TP_STRUCT_TYPE_STATUS_SPEC
+TP_STRUCT_TYPE_ACCESS_CONTROL
<SUBSECTION>
# Connection - Location
TP_HASH_TYPE_LOCATION
@@ -1887,44 +1441,15 @@ TP_HASH_TYPE_HANDLE_OWNER_MAP
TP_HASH_TYPE_HANDLE_IDENTIFIER_MAP
TP_HASH_TYPE_CHANNEL_ORIGINATOR_MAP
<SUBSECTION>
-# Channel - Text and Messages
-TP_STRUCT_TYPE_PENDING_TEXT_MESSAGE
-TP_ARRAY_TYPE_PENDING_TEXT_MESSAGE_LIST
+# Channel - Text
TP_HASH_TYPE_MESSAGE_PART
TP_ARRAY_TYPE_MESSAGE_PART_LIST
-TP_HASH_TYPE_MESSAGE_PART_CONTENT_MAP
TP_HASH_TYPE_CHAT_STATE_MAP
<SUBSECTION>
-# Channel - Tubes
-TP_HASH_TYPE_SUPPORTED_SOCKET_MAP
-TP_STRUCT_TYPE_TUBE_INFO
-TP_ARRAY_TYPE_TUBE_INFO_LIST
-TP_STRUCT_TYPE_DBUS_TUBE_MEMBER
-TP_ARRAY_TYPE_DBUS_TUBE_MEMBER_LIST
-<SUBSECTION>
# Channel - DBusTube
TP_HASH_TYPE_DBUS_TUBE_PARTICIPANTS
<SUBSECTION>
-# Properties
-TP_STRUCT_TYPE_PROPERTY_SPEC
-TP_ARRAY_TYPE_PROPERTY_SPEC_LIST
-TP_STRUCT_TYPE_PROPERTY_FLAGS_CHANGE
-TP_ARRAY_TYPE_PROPERTY_FLAGS_CHANGE_LIST
-TP_STRUCT_TYPE_PROPERTY_VALUE
-TP_ARRAY_TYPE_PROPERTY_VALUE_LIST
-<SUBSECTION>
# Channel - Media-related
-TP_ARRAY_TYPE_MEDIA_SESSION_HANDLER_INFO_LIST
-TP_STRUCT_TYPE_MEDIA_SESSION_HANDLER_INFO
-TP_ARRAY_TYPE_MEDIA_STREAM_HANDLER_CANDIDATE_LIST
-TP_ARRAY_TYPE_MEDIA_STREAM_HANDLER_CODEC_LIST
-TP_ARRAY_TYPE_MEDIA_STREAM_HANDLER_TRANSPORT_LIST
-TP_STRUCT_TYPE_MEDIA_STREAM_HANDLER_CANDIDATE
-TP_STRUCT_TYPE_MEDIA_STREAM_HANDLER_CODEC
-TP_STRUCT_TYPE_MEDIA_STREAM_HANDLER_TRANSPORT
-TP_STRUCT_TYPE_MEDIA_STREAM_INFO
-TP_ARRAY_TYPE_MEDIA_STREAM_INFO_LIST
-TP_HASH_TYPE_CHANNEL_CALL_STATE_MAP
TP_ARRAY_TYPE_RTCP_FEEDBACK_MESSAGE_LIST
TP_ARRAY_TYPE_RTP_HEADER_EXTENSIONS_LIST
TP_HASH_TYPE_RTCP_FEEDBACK_MESSAGE_MAP
@@ -1944,7 +1469,6 @@ TP_STRUCT_TYPE_SERVICE_POINT_INFO
# Channel - Contact Search
TpChannelContactSearchState
TP_NUM_CHANNEL_CONTACT_SEARCH_STATES
-NUM_TP_CHANNEL_CONTACT_SEARCH_STATES
TP_HASH_TYPE_CONTACT_SEARCH_MAP
TP_HASH_TYPE_CONTACT_SEARCH_RESULT_MAP
<SUBSECTION>
@@ -2114,82 +1638,6 @@ tp_run_connection_manager
</SECTION>
<SECTION>
-<TITLE>debug-ansi</TITLE>
-<INCLUDE>telepathy-glib/debug-ansi.h</INCLUDE>
-<FILE>debug-ansi</FILE>
-TP_ANSI_RESET
-TP_ANSI_BOLD_ON
-TP_ANSI_INVERSE_ON
-TP_ANSI_BOLD_OFF
-TP_ANSI_FG_BLACK
-TP_ANSI_FG_RED
-TP_ANSI_FG_GREEN
-TP_ANSI_FG_YELLOW
-TP_ANSI_FG_BLUE
-TP_ANSI_FG_MAGENTA
-TP_ANSI_FG_CYAN
-TP_ANSI_FG_WHITE
-TP_ANSI_BG_RED
-TP_ANSI_BG_GREEN
-TP_ANSI_BG_YELLOW
-TP_ANSI_BG_BLUE
-TP_ANSI_BG_MAGENTA
-TP_ANSI_BG_CYAN
-TP_ANSI_BG_WHITE
-</SECTION>
-
-<SECTION>
-<FILE>properties-mixin</FILE>
-TpPropertySignature
-TpProperty
-TpPropertiesContext
-TpPropertiesSetFunc
-<TITLE>TpPropertiesMixin</TITLE>
-<INCLUDE>telepathy-glib/properties-mixin.h</INCLUDE>
-TpPropertiesMixin
-TpPropertiesMixinClass
-tp_properties_mixin_class_init
-tp_properties_mixin_init
-tp_properties_mixin_finalize
-tp_properties_mixin_list_properties
-tp_properties_mixin_get_properties
-tp_properties_mixin_set_properties
-tp_properties_mixin_has_property
-tp_properties_context_has
-tp_properties_context_has_other_than
-tp_properties_context_get
-tp_properties_context_get_value_count
-tp_properties_context_remove
-tp_properties_context_return
-tp_properties_context_return_if_done
-tp_properties_mixin_change_value
-tp_properties_mixin_change_flags
-tp_properties_mixin_emit_changed
-tp_properties_mixin_emit_flags
-tp_properties_mixin_is_readable
-tp_properties_mixin_is_writable
-tp_properties_mixin_iface_init
-TP_TYPE_PROPERTY_INFO_STRUCT
-TP_TYPE_PROPERTY_INFO_LIST
-TP_TYPE_PROPERTY_VALUE_STRUCT
-TP_TYPE_PROPERTY_VALUE_LIST
-TP_TYPE_PROPERTY_FLAGS_STRUCT
-TP_TYPE_PROPERTY_FLAGS_LIST
-<SUBSECTION Private>
-TP_PROPERTIES_MIXIN_CLASS_OFFSET_QUARK
-TP_PROPERTIES_MIXIN_CLASS_OFFSET
-TP_PROPERTIES_MIXIN_OFFSET_QUARK
-TP_PROPERTIES_MIXIN_OFFSET
-tp_properties_mixin_class_get_offset_quark
-tp_properties_mixin_get_offset_quark
-TpPropertiesMixinPrivate
-TpPropertiesMixinClassPrivate
-<SUBSECTION Standard>
-TP_PROPERTIES_MIXIN_CLASS
-TP_PROPERTIES_MIXIN
-</SECTION>
-
-<SECTION>
<FILE>base-room-config</FILE>
<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
<TITLE>TpBaseRoomConfig</TITLE>
@@ -2271,9 +1719,8 @@ tp_presence_mixin_finalize
tp_presence_mixin_emit_presence_update
tp_presence_mixin_emit_one_presence_update
tp_presence_mixin_iface_init
-tp_presence_mixin_simple_presence_iface_init
-tp_presence_mixin_simple_presence_init_dbus_properties
-tp_presence_mixin_simple_presence_register_with_contacts_mixin
+tp_presence_mixin_init_dbus_properties
+tp_presence_mixin_register_with_contacts_mixin
<SUBSECTION Private>
TP_PRESENCE_MIXIN_CLASS_OFFSET_QUARK
TP_PRESENCE_MIXIN_CLASS_OFFSET
@@ -2296,10 +1743,6 @@ tp_debug_set_flags
tp_debug_set_persistent
tp_debug_divert_messages
tp_debug_timestamped_log_handler
-<SUBSECTION>
-tp_debug_set_flags_from_string
-tp_debug_set_flags_from_env
-tp_debug_set_all_flags
</SECTION>
<SECTION>
@@ -2333,7 +1776,6 @@ tp_group_mixin_get_self_handle
tp_group_mixin_get_group_flags
tp_group_mixin_add_members
tp_group_mixin_remove_members
-tp_group_mixin_remove_members_with_reason
tp_group_mixin_get_members
tp_group_mixin_get_local_pending_members
tp_group_mixin_get_local_pending_members_with_info
@@ -2342,7 +1784,6 @@ tp_group_mixin_get_all_members
tp_group_mixin_get_handle_owners
tp_group_mixin_change_flags
tp_group_mixin_change_members
-tp_group_mixin_change_members_detailed
tp_group_mixin_add_handle_owner
tp_group_mixin_iface_init
tp_group_mixin_add_handle_owners
@@ -2400,11 +1841,6 @@ tp_intset_dump
TpIntsetFastIter
tp_intset_fast_iter_init
tp_intset_fast_iter_next
-TP_INTSET_ITER_INIT
-TpIntsetIter
-tp_intset_iter_init
-tp_intset_iter_next
-tp_intset_iter_reset
<SUBSECTION Standard>
tp_intset_get_type
<SUBSECTION Private>
@@ -2457,8 +1893,6 @@ tp_asv_dump
<TITLE>dbus</TITLE>
<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
tp_dbus_g_method_return_not_implemented
-tp_get_bus
-tp_get_bus_proxy
TpDBusNameType
TP_TYPE_DBUS_NAME_TYPE
tp_dbus_check_valid_bus_name
@@ -2487,61 +1921,6 @@ tp_dbus_daemon_request_name
tp_dbus_daemon_register_object
tp_dbus_daemon_unregister_object
tp_dbus_daemon_init_known_interfaces
-<SUBSECTION>
-tp_cli_dbus_daemon_call_add_match
-tp_cli_dbus_daemon_call_get_connection_se_linux_security_context
-tp_cli_dbus_daemon_call_get_connection_unix_process_id
-tp_cli_dbus_daemon_call_get_connection_unix_user
-tp_cli_dbus_daemon_call_get_id
-tp_cli_dbus_daemon_call_get_name_owner
-tp_cli_dbus_daemon_call_hello
-tp_cli_dbus_daemon_call_list_activatable_names
-tp_cli_dbus_daemon_call_list_names
-tp_cli_dbus_daemon_call_list_queued_owners
-tp_cli_dbus_daemon_call_name_has_owner
-tp_cli_dbus_daemon_call_release_name
-tp_cli_dbus_daemon_call_reload_config
-tp_cli_dbus_daemon_call_remove_match
-tp_cli_dbus_daemon_call_request_name
-tp_cli_dbus_daemon_call_start_service_by_name
-tp_cli_dbus_daemon_run_add_match
-tp_cli_dbus_daemon_run_get_connection_se_linux_security_context
-tp_cli_dbus_daemon_run_get_connection_unix_process_id
-tp_cli_dbus_daemon_run_get_connection_unix_user
-tp_cli_dbus_daemon_run_get_id
-tp_cli_dbus_daemon_run_get_name_owner
-tp_cli_dbus_daemon_run_hello
-tp_cli_dbus_daemon_run_list_activatable_names
-tp_cli_dbus_daemon_run_list_names
-tp_cli_dbus_daemon_run_list_queued_owners
-tp_cli_dbus_daemon_run_name_has_owner
-tp_cli_dbus_daemon_run_release_name
-tp_cli_dbus_daemon_run_reload_config
-tp_cli_dbus_daemon_run_remove_match
-tp_cli_dbus_daemon_run_request_name
-tp_cli_dbus_daemon_run_start_service_by_name
-tp_cli_dbus_daemon_callback_for_add_match
-tp_cli_dbus_daemon_callback_for_get_connection_se_linux_security_context
-tp_cli_dbus_daemon_callback_for_get_connection_unix_process_id
-tp_cli_dbus_daemon_callback_for_get_connection_unix_user
-tp_cli_dbus_daemon_callback_for_get_id
-tp_cli_dbus_daemon_callback_for_get_name_owner
-tp_cli_dbus_daemon_callback_for_hello
-tp_cli_dbus_daemon_callback_for_list_activatable_names
-tp_cli_dbus_daemon_callback_for_list_names
-tp_cli_dbus_daemon_callback_for_list_queued_owners
-tp_cli_dbus_daemon_callback_for_name_has_owner
-tp_cli_dbus_daemon_callback_for_release_name
-tp_cli_dbus_daemon_callback_for_reload_config
-tp_cli_dbus_daemon_callback_for_remove_match
-tp_cli_dbus_daemon_callback_for_request_name
-tp_cli_dbus_daemon_callback_for_start_service_by_name
-tp_cli_dbus_daemon_connect_to_name_acquired
-tp_cli_dbus_daemon_connect_to_name_lost
-tp_cli_dbus_daemon_connect_to_name_owner_changed
-tp_cli_dbus_daemon_signal_callback_name_acquired
-tp_cli_dbus_daemon_signal_callback_name_lost
-tp_cli_dbus_daemon_signal_callback_name_owner_changed
<SUBSECTION Standard>
tp_dbus_name_type_get_type
tp_dbus_daemon_get_type
@@ -2652,10 +2031,7 @@ TP_ERROR_STR_MEDIA_STREAMING_ERROR
TP_ERROR_STR_CAPTCHA_NOT_SUPPORTED
<SUBSECTION Standard>
tp_error_get_type
-tp_errors_quark
tp_error_quark
-<SUBSECTION Private>
-TP_ERRORS
</SECTION>
<SECTION>
@@ -2683,14 +2059,13 @@ tp_message_mixin_finalize
tp_message_mixin_implement_sending
tp_message_mixin_init
tp_message_mixin_init_dbus_properties
-tp_message_mixin_messages_iface_init
+tp_message_mixin_iface_init
tp_message_mixin_get_dbus_property
tp_message_mixin_sent
tp_message_mixin_set_rescued
tp_message_mixin_take_received
tp_message_mixin_has_pending_messages
tp_message_mixin_clear
-tp_message_mixin_text_iface_init
<SUBSECTION>
TpMessageMixinSendChatStateImpl
tp_message_mixin_chat_state_iface_init
@@ -2735,12 +2110,6 @@ tp_message_set_string_printf
tp_message_set_uint16
tp_message_set_uint32
tp_message_set_uint64
-<SUBSECTION>
-tp_message_new
-tp_message_destroy
-tp_message_ref_handle
-tp_message_set_handle
-tp_message_take_message
<SUBSECTION Standard>
TP_IS_MESSAGE
TP_IS_MESSAGE_CLASS
@@ -2773,226 +2142,138 @@ tp_cm_message_get_type
</SECTION>
<SECTION>
-<FILE>text-mixin</FILE>
-<INCLUDE>telepathy-glib/text-mixin.h</INCLUDE>
-<TITLE>TpTextMixin</TITLE>
-TpTextMixin
-TpTextMixinClass
-tp_text_mixin_class_get_offset_quark
-tp_text_mixin_get_offset_quark
-tp_text_mixin_class_init
-tp_text_mixin_init
-tp_text_mixin_set_message_types
-tp_text_mixin_finalize
-tp_text_mixin_receive_with_flags
-tp_text_mixin_receive
-tp_text_mixin_acknowledge_pending_messages
-tp_text_mixin_list_pending_messages
-tp_text_mixin_get_message_types
-tp_text_mixin_clear
-tp_text_mixin_has_pending_messages
-tp_text_mixin_set_rescued
-tp_text_mixin_iface_init
-<SUBSECTION Private>
-TP_TEXT_MIXIN_CLASS_OFFSET_QUARK
-TP_TEXT_MIXIN_CLASS_OFFSET
-TP_TEXT_MIXIN_OFFSET_QUARK
-TP_TEXT_MIXIN_OFFSET
-TpTextMixinPrivate
-TpTextMixinClassPrivate
-<SUBSECTION Standard>
-TP_TEXT_MIXIN_CLASS
-TP_TEXT_MIXIN
-</SECTION>
-
-<SECTION>
<FILE>enums</FILE>
<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
<TITLE>enums</TITLE>
+TP_USER_ACTION_TIME_NOT_USER_ACTION
+TP_USER_ACTION_TIME_CURRENT_TIME
TpHandleType
TP_NUM_HANDLE_TYPES
-NUM_TP_HANDLE_TYPES
TpConnMgrParamFlags
TpConnectionStatus
TP_NUM_CONNECTION_STATUSES
-NUM_TP_CONNECTION_STATUSES
TpConnectionStatusReason
TP_NUM_CONNECTION_STATUS_REASONS
-NUM_TP_CONNECTION_STATUS_REASONS
TpConnectionAliasFlags
-TpConnectionCapabilityFlags
TpConnectionPresenceType
TP_NUM_CONNECTION_PRESENCE_TYPES
-NUM_TP_CONNECTION_PRESENCE_TYPES
TpDTMFEvent
TP_NUM_DTMF_EVENTS
-NUM_TP_DTMF_EVENTS
tp_dtmf_event_to_char
-TpMediaStreamType
-NUM_TP_MEDIA_STREAM_TYPES
-TP_NUM_MEDIA_STREAM_TYPES
-TpMediaStreamState
-NUM_TP_MEDIA_STREAM_STATES
-TP_NUM_MEDIA_STREAM_STATES
-TpMediaStreamDirection
-NUM_TP_MEDIA_STREAM_DIRECTIONS
-TP_NUM_MEDIA_STREAM_DIRECTIONS
-TpMediaStreamPendingSend
-TpChannelMediaCapabilities
TpChannelTextSendError
TP_NUM_CHANNEL_TEXT_SEND_ERRORS
-NUM_TP_CHANNEL_TEXT_SEND_ERRORS
TpChannelTextMessageType
-NUM_TP_CHANNEL_TEXT_MESSAGE_TYPES
TP_NUM_CHANNEL_TEXT_MESSAGE_TYPES
-TpChannelTextMessageFlags
TpChannelChatState
-NUM_TP_CHANNEL_CHAT_STATES
TP_NUM_CHANNEL_CHAT_STATES
TpChannelGroupFlags
TpChannelGroupChangeReason
-NUM_TP_CHANNEL_GROUP_CHANGE_REASONS
TP_NUM_CHANNEL_GROUP_CHANGE_REASONS
TpChannelPasswordFlags
TpContactBlockingCapabilities
TpDeliveryReportingSupportFlags
-TpDeliveryStatus
-NUM_TP_DELIVERY_STATUSES
TP_NUM_DELIVERY_STATUSES
-TpMediaStreamError
-NUM_TP_MEDIA_STREAM_ERRORS
-TP_NUM_MEDIA_STREAM_ERRORS
-TpMediaStreamBaseProto
-NUM_TP_MEDIA_STREAM_BASE_PROTOS
-TP_NUM_MEDIA_STREAM_BASE_PROTOS
-TpMediaStreamTransportType
-NUM_TP_MEDIA_STREAM_TRANSPORT_TYPES
-TP_NUM_MEDIA_STREAM_TRANSPORT_TYPES
-TpPropertyFlags
+TpDeliveryStatus
TpMessagePartSupportFlags
TpMessageSendingFlags
-NUM_TP_SOCKET_ACCESS_CONTROLS
TP_NUM_SOCKET_ACCESS_CONTROLS
TpSocketAccessControl
-NUM_TP_SOCKET_ADDRESS_TYPES
TP_NUM_SOCKET_ADDRESS_TYPES
TpSocketAddressType
-NUM_TP_TUBE_STATES
-TP_NUM_TUBE_STATES
-TpTubeState
-NUM_TP_TUBE_TYPES
-TP_NUM_TUBE_TYPES
-TpTubeType
-TpChannelCallStateFlags
-NUM_TP_LOCAL_HOLD_STATES
TP_NUM_LOCAL_HOLD_STATES
TpLocalHoldState
-NUM_TP_LOCAL_HOLD_STATE_REASONS
TP_NUM_LOCAL_HOLD_STATE_REASONS
TpLocalHoldStateReason
TpAccessControlType
-NUM_TP_ACCESS_CONTROL_TYPES
TP_NUM_ACCESS_CONTROL_TYPES
-TpRichPresenceAccessControlType
-NUM_TP_RICH_PRESENCE_ACCESS_CONTROL_TYPES
-TP_NUM_RICH_PRESENCE_ACCESS_CONTROL_TYPES
TpFileHashType
-NUM_TP_FILE_HASH_TYPES
TP_NUM_FILE_HASH_TYPES
TpFileTransferState
-NUM_TP_FILE_TRANSFER_STATES
TP_NUM_FILE_TRANSFER_STATES
TpFileTransferStateChangeReason
-NUM_TP_FILE_TRANSFER_STATE_CHANGE_REASONS
TP_NUM_FILE_TRANSFER_STATE_CHANGE_REASONS
TpTubeChannelState
-NUM_TP_TUBE_CHANNEL_STATES
TP_NUM_TUBE_CHANNEL_STATES
TpDebugLevel
-NUM_TP_DEBUG_LEVELS
TP_NUM_DEBUG_LEVELS
TpContactInfoFlags
TpContactInfoFieldFlags
TpLocationFeatures
TpServicePointType
-NUM_TP_SERVICE_POINT_TYPES
TP_NUM_SERVICE_POINT_TYPES
TpAnonymityModeFlags
TpStorageRestrictionFlags
TpTLSCertificateRejectReason
-NUM_TP_TLS_CERTIFICATE_REJECT_REASONS
TP_NUM_TLS_CERTIFICATE_REJECT_REASONS
TpTLSCertificateState
-NUM_TP_TLS_CERTIFICATE_STATES
TP_NUM_TLS_CERTIFICATE_STATES
TpContactMetadataStorageType
-NUM_TP_CONTACT_METADATA_STORAGE_TYPES
TP_NUM_CONTACT_METADATA_STORAGE_TYPES
TpSubscriptionState
-NUM_TP_SUBSCRIPTION_STATES
TP_NUM_SUBSCRIPTION_STATES
TpContactListState
-NUM_TP_CONTACT_LIST_STATES
TP_NUM_CONTACT_LIST_STATES
TpHTTPMethod
-NUM_TP_HTTP_METHODS
TP_NUM_HTTP_METHODS
TpMailNotificationFlags
TpSASLAbortReason
-NUM_TP_SASL_ABORT_REASONS
TP_NUM_SASL_ABORT_REASONS
TpSASLStatus
-NUM_TP_SASL_STATUSES
TP_NUM_SASL_STATUSES
TpCaptchaStatus
-NUM_TP_CAPTCHA_STATUSES
TP_NUM_CAPTCHA_STATUSES
TpCaptchaCancelReason
-NUM_TP_CAPTCHA_CANCEL_REASONS
TP_NUM_CAPTCHA_CANCEL_REASONS
TpCaptchaFlags
TpCallContentDisposition
-NUM_TP_CALL_CONTENT_DISPOSITIONS
TP_NUM_CALL_CONTENT_DISPOSITIONS
TpCallContentPacketizationType
-NUM_TP_CALL_CONTENT_PACKETIZATION_TYPES
TP_NUM_CALL_CONTENT_PACKETIZATION_TYPES
TpCallState
-NUM_TP_CALL_STATES
TP_NUM_CALL_STATES
TpCallStateChangeReason
-NUM_TP_CALL_STATE_CHANGE_REASONS
TP_NUM_CALL_STATE_CHANGE_REASONS
TpCallStreamCandidateType
-NUM_TP_CALL_STREAM_CANDIDATE_TYPES
TP_NUM_CALL_STREAM_CANDIDATE_TYPES
TpRCPTXRRTTMode
-NUM_TP_RCPT_XR_RTT_MODES
TP_NUM_RCPT_XR_RTT_MODES
TpSendingState
-NUM_TP_SENDING_STATES
TP_NUM_SENDING_STATES
TpStreamComponent
-NUM_TP_STREAM_COMPONENTS
TP_NUM_STREAM_COMPONENTS
TpStreamEndpointState
-NUM_TP_STREAM_ENDPOINT_STATES
TP_NUM_STREAM_ENDPOINT_STATES
TpStreamFlowState
-NUM_TP_STREAM_FLOW_STATES
TP_NUM_STREAM_FLOW_STATES
TpStreamTransportType
-NUM_TP_STREAM_TRANSPORT_TYPES
TP_NUM_STREAM_TRANSPORT_TYPES
TpCallFlags
TpCallMemberFlags
TpRTCPXRStatisticsFlags
+TpMediaStreamBaseProto
+TP_NUM_MEDIA_STREAM_BASE_PROTOS
+TpMediaStreamDirection
+TP_NUM_MEDIA_STREAM_DIRECTIONS
+TpMediaStreamType
+TP_NUM_MEDIA_STREAM_TYPES
</SECTION>
<SECTION>
<FILE>interfaces</FILE>
<TITLE>interfaces</TITLE>
-<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
+<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
+TP_CM_BUS_NAME_BASE
+TP_CM_OBJECT_PATH_BASE
+TP_CONN_BUS_NAME_BASE
+TP_CONN_OBJECT_PATH_BASE
+TP_ACCOUNT_MANAGER_BUS_NAME
+TP_ACCOUNT_MANAGER_OBJECT_PATH
+TP_ACCOUNT_OBJECT_PATH_BASE
+TP_CHANNEL_DISPATCHER_BUS_NAME
+TP_CHANNEL_DISPATCHER_OBJECT_PATH
+TP_CLIENT_BUS_NAME_BASE
+TP_CLIENT_OBJECT_PATH_BASE
+TP_DEBUG_OBJECT_PATH
TP_IFACE_ACCOUNT
TP_IFACE_QUARK_ACCOUNT
TP_IFACE_ACCOUNT_INTERFACE_ADDRESSING
@@ -3037,8 +2318,6 @@ TP_IFACE_CONNECTION_INTERFACE_AVATARS
TP_IFACE_QUARK_CONNECTION_INTERFACE_AVATARS
TP_IFACE_CONNECTION_INTERFACE_BALANCE
TP_IFACE_QUARK_CONNECTION_INTERFACE_BALANCE
-TP_IFACE_CONNECTION_INTERFACE_CAPABILITIES
-TP_IFACE_QUARK_CONNECTION_INTERFACE_CAPABILITIES
TP_IFACE_CONNECTION_INTERFACE_CELLULAR
TP_IFACE_QUARK_CONNECTION_INTERFACE_CELLULAR
TP_IFACE_CONNECTION_INTERFACE_CLIENT_TYPES
@@ -3059,8 +2338,6 @@ TP_IFACE_CONNECTION_INTERFACE_CONTACTS
TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACTS
TP_IFACE_CONNECTION_INTERFACE_REQUESTS
TP_IFACE_QUARK_CONNECTION_INTERFACE_REQUESTS
-TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE
-TP_IFACE_QUARK_CONNECTION_INTERFACE_SIMPLE_PRESENCE
TP_IFACE_CONNECTION_INTERFACE_PRESENCE
TP_IFACE_QUARK_CONNECTION_INTERFACE_PRESENCE
TP_IFACE_CONNECTION_INTERFACE_LOCATION
@@ -3073,8 +2350,6 @@ TP_IFACE_CHANNEL
TP_IFACE_QUARK_CHANNEL
TP_IFACE_CHANNEL_TYPE_CALL
TP_IFACE_QUARK_CHANNEL_TYPE_CALL
-TP_IFACE_CHANNEL_TYPE_CONTACT_LIST
-TP_IFACE_QUARK_CHANNEL_TYPE_CONTACT_LIST
TP_IFACE_CHANNEL_TYPE_CONTACT_SEARCH
TP_IFACE_QUARK_CHANNEL_TYPE_CONTACT_SEARCH
TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER
@@ -3083,14 +2358,10 @@ TP_IFACE_CHANNEL_TYPE_SERVER_AUTHENTICATION
TP_IFACE_QUARK_CHANNEL_TYPE_SERVER_AUTHENTICATION
TP_IFACE_CHANNEL_TYPE_SERVER_TLS_CONNECTION
TP_IFACE_QUARK_CHANNEL_TYPE_SERVER_TLS_CONNECTION
-TP_IFACE_CHANNEL_TYPE_STREAMED_MEDIA
-TP_IFACE_QUARK_CHANNEL_TYPE_STREAMED_MEDIA
TP_IFACE_CHANNEL_TYPE_ROOM_LIST
TP_IFACE_QUARK_CHANNEL_TYPE_ROOM_LIST
TP_IFACE_CHANNEL_TYPE_TEXT
TP_IFACE_QUARK_CHANNEL_TYPE_TEXT
-TP_IFACE_CHANNEL_TYPE_TUBES
-TP_IFACE_QUARK_CHANNEL_TYPE_TUBES
TP_IFACE_CHANNEL_INTERFACE_TUBE
TP_IFACE_CHANNEL_TYPE_DBUS_TUBE
TP_IFACE_CHANNEL_TYPE_STREAM_TUBE
@@ -3099,8 +2370,6 @@ TP_IFACE_QUARK_CHANNEL_TYPE_DBUS_TUBE
TP_IFACE_QUARK_CHANNEL_TYPE_STREAM_TUBE
TP_IFACE_CHANNEL_INTERFACE_ANONYMITY
TP_IFACE_QUARK_CHANNEL_INTERFACE_ANONYMITY
-TP_IFACE_CHANNEL_INTERFACE_CALL_STATE
-TP_IFACE_QUARK_CHANNEL_INTERFACE_CALL_STATE
TP_IFACE_CHANNEL_INTERFACE_CAPTCHA_AUTHENTICATION
TP_IFACE_QUARK_CHANNEL_INTERFACE_CAPTCHA_AUTHENTICATION
TP_IFACE_CHANNEL_INTERFACE_CHAT_STATE
@@ -3131,10 +2400,6 @@ TP_IFACE_CHANNEL_INTERFACE_SMS
TP_IFACE_QUARK_CHANNEL_INTERFACE_SMS
TP_IFACE_CHANNEL_INTERFACE_SUBJECT
TP_IFACE_QUARK_CHANNEL_INTERFACE_SUBJECT
-TP_IFACE_CHANNEL_INTERFACE_MEDIA_SIGNALLING
-TP_IFACE_QUARK_CHANNEL_INTERFACE_MEDIA_SIGNALLING
-TP_IFACE_CHANNEL_INTERFACE_MESSAGES
-TP_IFACE_QUARK_CHANNEL_INTERFACE_MESSAGES
TP_IFACE_CHANNEL_INTERFACE_SERVICE_POINT
TP_IFACE_QUARK_CHANNEL_INTERFACE_SERVICE_POINT
TP_IFACE_CHANNEL_DISPATCHER
@@ -3145,12 +2410,6 @@ TP_IFACE_CHANNEL_DISPATCH_OPERATION
TP_IFACE_QUARK_CHANNEL_DISPATCH_OPERATION
TP_IFACE_CHANNEL_REQUEST
TP_IFACE_QUARK_CHANNEL_REQUEST
-TP_IFACE_MEDIA_SESSION_HANDLER
-TP_IFACE_QUARK_MEDIA_SESSION_HANDLER
-TP_IFACE_MEDIA_STREAM_HANDLER
-TP_IFACE_QUARK_MEDIA_STREAM_HANDLER
-TP_IFACE_PROPERTIES_INTERFACE
-TP_IFACE_QUARK_PROPERTIES_INTERFACE
TP_IFACE_CLIENT
TP_IFACE_QUARK_CLIENT
TP_IFACE_CLIENT_APPROVER
@@ -3206,16 +2465,16 @@ TP_PROP_ACCOUNT_INTERFACE_STORAGE_STORAGE_PROVIDER
TP_PROP_ACCOUNT_INTERFACE_STORAGE_STORAGE_RESTRICTIONS
TP_PROP_ACCOUNT_INTERFACE_STORAGE_STORAGE_SPECIFIC_INFORMATION
TP_PROP_ACCOUNT_MANAGER_INTERFACES
-TP_PROP_ACCOUNT_MANAGER_INVALID_ACCOUNTS
+TP_PROP_ACCOUNT_MANAGER_UNUSABLE_ACCOUNTS
TP_PROP_ACCOUNT_MANAGER_SUPPORTED_ACCOUNT_PROPERTIES
-TP_PROP_ACCOUNT_MANAGER_VALID_ACCOUNTS
+TP_PROP_ACCOUNT_MANAGER_USABLE_ACCOUNTS
TP_PROP_ACCOUNT_NICKNAME
TP_PROP_ACCOUNT_NORMALIZED_NAME
TP_PROP_ACCOUNT_PARAMETERS
TP_PROP_ACCOUNT_REQUESTED_PRESENCE
TP_PROP_ACCOUNT_SERVICE
TP_PROP_ACCOUNT_SUPERSEDES
-TP_PROP_ACCOUNT_VALID
+TP_PROP_ACCOUNT_USABLE
TP_PROP_AUTHENTICATION_TLS_CERTIFICATE_CERTIFICATE_CHAIN_DATA
TP_PROP_AUTHENTICATION_TLS_CERTIFICATE_CERTIFICATE_TYPE
TP_PROP_AUTHENTICATION_TLS_CERTIFICATE_REJECTIONS
@@ -3281,7 +2540,6 @@ TP_PROP_CALL_STREAM_REMOTE_MEMBER_IDENTIFIERS
TP_PROP_CHANNEL_CHANNEL_TYPE
TP_PROP_CHANNEL_DISPATCHER_INTERFACES
TP_PROP_CHANNEL_DISPATCHER_INTERFACE_OPERATION_LIST_DISPATCH_OPERATIONS
-TP_PROP_CHANNEL_DISPATCHER_SUPPORTS_REQUEST_HINTS
TP_PROP_CHANNEL_DISPATCH_OPERATION_ACCOUNT
TP_PROP_CHANNEL_DISPATCH_OPERATION_CHANNELS
TP_PROP_CHANNEL_DISPATCH_OPERATION_CONNECTION
@@ -3316,11 +2574,6 @@ TP_PROP_CHANNEL_INTERFACE_GROUP_MEMBERS
TP_PROP_CHANNEL_INTERFACE_GROUP_MEMBER_IDENTIFIERS
TP_PROP_CHANNEL_INTERFACE_GROUP_REMOTE_PENDING_MEMBERS
TP_PROP_CHANNEL_INTERFACE_GROUP_SELF_HANDLE
-TP_PROP_CHANNEL_INTERFACE_MESSAGES_DELIVERY_REPORTING_SUPPORT
-TP_PROP_CHANNEL_INTERFACE_MESSAGES_MESSAGE_PART_SUPPORT_FLAGS
-TP_PROP_CHANNEL_INTERFACE_MESSAGES_MESSAGE_TYPES
-TP_PROP_CHANNEL_INTERFACE_MESSAGES_PENDING_MESSAGES
-TP_PROP_CHANNEL_INTERFACE_MESSAGES_SUPPORTED_CONTENT_TYPES
TP_PROP_CHANNEL_INTERFACE_ROOM_CONFIG_ANONYMOUS
TP_PROP_CHANNEL_INTERFACE_ROOM_CONFIG_CAN_UPDATE_CONFIGURATION
TP_PROP_CHANNEL_INTERFACE_ROOM_CONFIG_CONFIGURATION_RETRIEVED
@@ -3411,11 +2664,13 @@ TP_PROP_CHANNEL_TYPE_ROOM_LIST_SERVER
TP_PROP_CHANNEL_TYPE_SERVER_TLS_CONNECTION_HOSTNAME
TP_PROP_CHANNEL_TYPE_SERVER_TLS_CONNECTION_REFERENCE_IDENTITIES
TP_PROP_CHANNEL_TYPE_SERVER_TLS_CONNECTION_SERVER_CERTIFICATE
-TP_PROP_CHANNEL_TYPE_STREAMED_MEDIA_IMMUTABLE_STREAMS
-TP_PROP_CHANNEL_TYPE_STREAMED_MEDIA_INITIAL_AUDIO
-TP_PROP_CHANNEL_TYPE_STREAMED_MEDIA_INITIAL_VIDEO
TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SERVICE
TP_PROP_CHANNEL_TYPE_STREAM_TUBE_SUPPORTED_SOCKET_TYPES
+TP_PROP_CHANNEL_TYPE_TEXT_DELIVERY_REPORTING_SUPPORT
+TP_PROP_CHANNEL_TYPE_TEXT_MESSAGE_PART_SUPPORT_FLAGS
+TP_PROP_CHANNEL_TYPE_TEXT_MESSAGE_TYPES
+TP_PROP_CHANNEL_TYPE_TEXT_PENDING_MESSAGES
+TP_PROP_CHANNEL_TYPE_TEXT_SUPPORTED_CONTENT_TYPES
TP_PROP_CLIENT_APPROVER_APPROVER_CHANNEL_FILTER
TP_PROP_CLIENT_HANDLER_BYPASS_APPROVAL
TP_PROP_CLIENT_HANDLER_CAPABILITIES
@@ -3425,7 +2680,7 @@ TP_PROP_CLIENT_INTERFACES
TP_PROP_CLIENT_OBSERVER_DELAY_APPROVERS
TP_PROP_CLIENT_OBSERVER_OBSERVER_CHANNEL_FILTER
TP_PROP_CLIENT_OBSERVER_RECOVER
-TP_PROP_CONNECTION_HAS_IMMORTAL_HANDLES
+TP_PROP_CONNECTION_PROTOCOL
TP_PROP_CONNECTION_INTERFACE_ANONYMITY_ANONYMITY_MANDATORY
TP_PROP_CONNECTION_INTERFACE_ANONYMITY_ANONYMITY_MODES
TP_PROP_CONNECTION_INTERFACE_ANONYMITY_SUPPORTED_ANONYMITY_MODES
@@ -3468,18 +2723,15 @@ TP_PROP_CONNECTION_INTERFACE_POWER_SAVING_POWER_SAVING_ACTIVE
TP_PROP_CONNECTION_INTERFACE_REQUESTS_CHANNELS
TP_PROP_CONNECTION_INTERFACE_REQUESTS_REQUESTABLE_CHANNEL_CLASSES
TP_PROP_CONNECTION_INTERFACE_SERVICE_POINT_KNOWN_SERVICE_POINTS
-TP_PROP_CONNECTION_INTERFACE_SIMPLE_PRESENCE_STATUSES
-TP_PROP_CONNECTION_INTERFACE_SIMPLE_PRESENCE_MAXIMUM_STATUS_MESSAGE_LENGTH
+TP_PROP_CONNECTION_INTERFACE_PRESENCE_STATUSES
+TP_PROP_CONNECTION_INTERFACE_PRESENCE_MAXIMUM_STATUS_MESSAGE_LENGTH
TP_PROP_CONNECTION_MANAGER_INTERFACES
TP_PROP_CONNECTION_MANAGER_PROTOCOLS
TP_PROP_CONNECTION_INTERFACES
TP_PROP_CONNECTION_SELF_HANDLE
+TP_PROP_CONNECTION_SELF_ID
TP_PROP_CONNECTION_STATUS
TP_PROP_DEBUG_ENABLED
-TP_PROP_MEDIA_STREAM_HANDLER_CREATED_LOCALLY
-TP_PROP_MEDIA_STREAM_HANDLER_NAT_TRAVERSAL
-TP_PROP_MEDIA_STREAM_HANDLER_RELAY_INFO
-TP_PROP_MEDIA_STREAM_HANDLER_STUN_SERVERS
TP_PROP_PROTOCOL_AUTHENTICATION_TYPES
TP_PROP_PROTOCOL_CONNECTION_INTERFACES
TP_PROP_PROTOCOL_ENGLISH_NAME
@@ -3504,7 +2756,6 @@ TP_TOKEN_CONNECTION_INTERFACE_ADDRESSING_ADDRESSES
TP_TOKEN_CONNECTION_INTERFACE_ADDRESSING_URIS
TP_TOKEN_CONNECTION_INTERFACE_ALIASING_ALIAS
TP_TOKEN_CONNECTION_INTERFACE_AVATARS_TOKEN
-TP_TOKEN_CONNECTION_INTERFACE_CAPABILITIES_CAPS
TP_TOKEN_CONNECTION_INTERFACE_CLIENT_TYPES_CLIENT_TYPES
TP_TOKEN_CONNECTION_INTERFACE_CONTACT_BLOCKING_BLOCKED
TP_TOKEN_CONNECTION_INTERFACE_CONTACT_CAPABILITIES_CAPABILITIES
@@ -3513,18 +2764,14 @@ TP_TOKEN_CONNECTION_INTERFACE_CONTACT_INFO_INFO
TP_TOKEN_CONNECTION_INTERFACE_CONTACT_LIST_PUBLISH
TP_TOKEN_CONNECTION_INTERFACE_CONTACT_LIST_PUBLISH_REQUEST
TP_TOKEN_CONNECTION_INTERFACE_CONTACT_LIST_SUBSCRIBE
-TP_TOKEN_CONNECTION_INTERFACE_SIMPLE_PRESENCE_PRESENCE
TP_TOKEN_CONNECTION_INTERFACE_LOCATION_LOCATION
+TP_TOKEN_CONNECTION_INTERFACE_PRESENCE_PRESENCE
TP_TOKEN_CHANNEL_TYPE_CALL_AUDIO
TP_TOKEN_CHANNEL_TYPE_CALL_GTALK_P2P
TP_TOKEN_CHANNEL_TYPE_CALL_ICE
TP_TOKEN_CHANNEL_TYPE_CALL_SHM
TP_TOKEN_CHANNEL_TYPE_CALL_VIDEO
TP_TOKEN_CHANNEL_TYPE_CALL_WLM_2009
-TP_TOKEN_CHANNEL_INTERFACE_MEDIA_SIGNALLING_GTALK_P2P
-TP_TOKEN_CHANNEL_INTERFACE_MEDIA_SIGNALLING_ICE_UDP
-TP_TOKEN_CHANNEL_INTERFACE_MEDIA_SIGNALLING_WLM_8_5
-TP_TOKEN_CHANNEL_INTERFACE_MEDIA_SIGNALLING_WLM_2009
<SUBSECTION Private>
tp_iface_quark_account
@@ -3545,8 +2792,6 @@ tp_iface_quark_channel_interface_dtmf
tp_iface_quark_channel_interface_file_transfer_metadata
tp_iface_quark_channel_interface_group
tp_iface_quark_channel_interface_hold
-tp_iface_quark_channel_interface_media_signalling
-tp_iface_quark_channel_interface_messages
tp_iface_quark_channel_interface_password
tp_iface_quark_channel_interface_room
tp_iface_quark_channel_interface_room_config
@@ -3554,14 +2799,11 @@ tp_iface_quark_channel_interface_sasl_authentication
tp_iface_quark_channel_interface_securable
tp_iface_quark_channel_interface_sms
tp_iface_quark_channel_interface_subject
-tp_iface_quark_channel_type_contact_list
tp_iface_quark_channel_type_contact_search
tp_iface_quark_channel_type_file_transfer
tp_iface_quark_channel_type_room_list
tp_iface_quark_channel_type_server_tls_connection
-tp_iface_quark_channel_type_streamed_media
tp_iface_quark_channel_type_text
-tp_iface_quark_channel_type_tubes
tp_iface_quark_channel_interface_tube
tp_iface_quark_channel_type_dbus_tube
tp_iface_quark_channel_type_server_authentication
@@ -3587,23 +2829,17 @@ tp_iface_quark_connection_interface_contact_capabilities
tp_iface_quark_connection_interface_contact_groups
tp_iface_quark_connection_interface_contact_info
tp_iface_quark_connection_interface_contact_list
-tp_iface_quark_connection_interface_capabilities
tp_iface_quark_connection_interface_mail_notification
tp_iface_quark_connection_interface_requests
tp_iface_quark_connection_interface_power_saving
-tp_iface_quark_connection_interface_simple_presence
tp_iface_quark_connection_interface_presence
tp_iface_quark_connection_interface_location
tp_iface_quark_connection_manager
tp_iface_quark_dbus_daemon
-tp_iface_quark_media_session_handler
-tp_iface_quark_media_stream_handler
-tp_iface_quark_properties_interface
tp_iface_quark_protocol
tp_iface_quark_protocol_interface_addressing
tp_iface_quark_protocol_interface_avatars
tp_iface_quark_protocol_interface_presence
-tp_iface_quark_channel_interface_call_state
tp_iface_quark_channel_interface_anonymity
tp_iface_quark_channel_interface_service_point
tp_iface_quark_connection_interface_anonymity
@@ -3652,7 +2888,6 @@ tp_proxy_get_invalidated
tp_proxy_dbus_error_to_gerror
TP_DBUS_ERRORS
TpDBusError
-NUM_TP_DBUS_ERRORS
TP_NUM_DBUS_ERRORS
TP_TYPE_DBUS_ERROR
<SUBSECTION Standard>
@@ -3670,49 +2905,66 @@ TpProxyFeaturePrivate
</SECTION>
<SECTION>
-<FILE>proxy-tp-properties</FILE>
-<TITLE>proxy-tp-properties</TITLE>
-<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
-tp_cli_properties_interface_callback_for_get_properties
-tp_cli_properties_interface_call_get_properties
-tp_cli_properties_interface_run_get_properties
-tp_cli_properties_interface_callback_for_list_properties
-tp_cli_properties_interface_call_list_properties
-tp_cli_properties_interface_run_list_properties
-tp_cli_properties_interface_callback_for_set_properties
-tp_cli_properties_interface_call_set_properties
-tp_cli_properties_interface_run_set_properties
-tp_cli_properties_interface_signal_callback_properties_changed
-tp_cli_properties_interface_connect_to_properties_changed
-tp_cli_properties_interface_signal_callback_property_flags_changed
-tp_cli_properties_interface_connect_to_property_flags_changed
-</SECTION>
-
-<SECTION>
<FILE>proxy-dbus-core</FILE>
<TITLE>proxy-dbus-core</TITLE>
<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
<SUBSECTION>
tp_cli_dbus_introspectable_call_introspect
tp_cli_dbus_introspectable_callback_for_introspect
-tp_cli_dbus_introspectable_run_introspect
tp_cli_dbus_peer_call_get_machine_id
tp_cli_dbus_peer_call_ping
tp_cli_dbus_peer_callback_for_get_machine_id
tp_cli_dbus_peer_callback_for_ping
-tp_cli_dbus_peer_run_get_machine_id
-tp_cli_dbus_peer_run_ping
tp_cli_dbus_properties_call_get
tp_cli_dbus_properties_call_get_all
tp_cli_dbus_properties_call_set
tp_cli_dbus_properties_callback_for_get
tp_cli_dbus_properties_callback_for_get_all
tp_cli_dbus_properties_callback_for_set
-tp_cli_dbus_properties_run_get
-tp_cli_dbus_properties_run_get_all
tp_cli_dbus_properties_signal_callback_properties_changed
tp_cli_dbus_properties_connect_to_properties_changed
-tp_cli_dbus_properties_run_set
+<SUBSECTION>
+tp_cli_dbus_daemon_call_add_match
+tp_cli_dbus_daemon_call_get_connection_se_linux_security_context
+tp_cli_dbus_daemon_call_get_connection_unix_process_id
+tp_cli_dbus_daemon_call_get_connection_unix_user
+tp_cli_dbus_daemon_call_get_id
+tp_cli_dbus_daemon_call_get_name_owner
+tp_cli_dbus_daemon_call_hello
+tp_cli_dbus_daemon_call_list_activatable_names
+tp_cli_dbus_daemon_call_list_names
+tp_cli_dbus_daemon_call_list_queued_owners
+tp_cli_dbus_daemon_call_name_has_owner
+tp_cli_dbus_daemon_call_release_name
+tp_cli_dbus_daemon_call_reload_config
+tp_cli_dbus_daemon_call_remove_match
+tp_cli_dbus_daemon_call_request_name
+tp_cli_dbus_daemon_call_start_service_by_name
+tp_cli_dbus_daemon_callback_for_add_match
+tp_cli_dbus_daemon_callback_for_get_connection_se_linux_security_context
+tp_cli_dbus_daemon_callback_for_get_connection_unix_process_id
+tp_cli_dbus_daemon_callback_for_get_connection_unix_user
+tp_cli_dbus_daemon_callback_for_get_id
+tp_cli_dbus_daemon_callback_for_get_name_owner
+tp_cli_dbus_daemon_callback_for_hello
+tp_cli_dbus_daemon_callback_for_list_activatable_names
+tp_cli_dbus_daemon_callback_for_list_names
+tp_cli_dbus_daemon_callback_for_list_queued_owners
+tp_cli_dbus_daemon_callback_for_name_has_owner
+tp_cli_dbus_daemon_callback_for_release_name
+tp_cli_dbus_daemon_callback_for_reload_config
+tp_cli_dbus_daemon_callback_for_remove_match
+tp_cli_dbus_daemon_callback_for_request_name
+tp_cli_dbus_daemon_callback_for_start_service_by_name
+tp_cli_dbus_daemon_connect_to_name_acquired
+tp_cli_dbus_daemon_connect_to_name_lost
+tp_cli_dbus_daemon_connect_to_name_owner_changed
+tp_cli_dbus_daemon_signal_callback_name_acquired
+tp_cli_dbus_daemon_signal_callback_name_lost
+tp_cli_dbus_daemon_signal_callback_name_owner_changed
+<SUBSECTION Standard>
+tp_cli_dbus_daemon_add_signals
+tp_cli_generic_add_signals
</SECTION>
<SECTION>
@@ -3746,14 +2998,9 @@ TpChannel
TpChannelClass
tp_channel_new
tp_channel_new_from_properties
-tp_channel_run_until_ready
-TpChannelWhenReadyCb
-tp_channel_call_when_ready
tp_channel_init_known_interfaces
-tp_channel_is_ready
<SUBSECTION>
TP_CHANNEL_FEATURE_CORE
-TP_CHANNEL_FEATURE_CONTACTS
tp_channel_borrow_connection
tp_channel_borrow_immutable_properties
tp_channel_get_channel_type
@@ -3762,8 +3009,6 @@ tp_channel_get_handle
tp_channel_get_identifier
tp_channel_get_target_contact
tp_channel_get_requested
-tp_channel_get_initiator_handle
-tp_channel_get_initiator_identifier
tp_channel_get_initiator_contact
tp_channel_join_async
tp_channel_join_finish
@@ -3785,18 +3030,12 @@ tp_channel_get_chat_state
<SUBSECTION>
TP_CHANNEL_FEATURE_GROUP
tp_channel_group_get_flags
-tp_channel_group_get_handle_owner
-tp_channel_group_get_contact_owner
-tp_channel_group_get_self_handle
tp_channel_group_get_self_contact
-tp_channel_group_get_members
-tp_channel_group_dup_members_contacts
-tp_channel_group_get_local_pending
-tp_channel_group_dup_local_pending_contacts
-tp_channel_group_get_remote_pending
-tp_channel_group_dup_remote_pending_contacts
+tp_channel_group_dup_members
+tp_channel_group_dup_local_pending
tp_channel_group_get_local_pending_info
-tp_channel_group_get_local_pending_contact_info
+tp_channel_group_dup_remote_pending
+tp_channel_group_get_contact_owner
TP_ERRORS_REMOVED_FROM_GROUP
<SUBSECTION>
TP_CHANNEL_FEATURE_PASSWORD
@@ -3812,79 +3051,40 @@ TP_CHANNEL_CLASS
TP_CHANNEL_GET_CLASS
TP_IS_CHANNEL
TP_IS_CHANNEL_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>cli-channel</FILE>
+<TITLE>cli-channel</TITLE>
+<INCLUDE>telepathy-glib/cli-channel.h</INCLUDE>
<SUBSECTION>
tp_cli_channel_call_close
-tp_cli_channel_call_get_channel_type
-tp_cli_channel_call_get_handle
-tp_cli_channel_call_get_interfaces
tp_cli_channel_callback_for_close
-tp_cli_channel_callback_for_get_channel_type
-tp_cli_channel_callback_for_get_handle
-tp_cli_channel_callback_for_get_interfaces
-tp_cli_channel_run_close
-tp_cli_channel_run_get_channel_type
-tp_cli_channel_run_get_handle
-tp_cli_channel_run_get_interfaces
tp_cli_channel_connect_to_closed
tp_cli_channel_signal_callback_closed
<SUBSECTION>
tp_cli_channel_interface_destroyable_call_destroy
tp_cli_channel_interface_destroyable_callback_for_destroy
-tp_cli_channel_interface_destroyable_run_destroy
+<SUBSECTION Standard>
+tp_cli_channel_add_signals
</SECTION>
<SECTION>
<FILE>channel-group</FILE>
<TITLE>channel-group</TITLE>
<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
-tp_cli_channel_interface_group_run_add_members
-tp_cli_channel_interface_group_run_get_all_members
-tp_cli_channel_interface_group_run_get_group_flags
-tp_cli_channel_interface_group_run_get_handle_owners
-tp_cli_channel_interface_group_run_get_local_pending_members
-tp_cli_channel_interface_group_run_get_local_pending_members_with_info
-tp_cli_channel_interface_group_run_get_members
-tp_cli_channel_interface_group_run_get_remote_pending_members
-tp_cli_channel_interface_group_run_get_self_handle
-tp_cli_channel_interface_group_run_remove_members
-tp_cli_channel_interface_group_run_remove_members_with_reason
tp_cli_channel_interface_group_call_add_members
-tp_cli_channel_interface_group_call_get_all_members
-tp_cli_channel_interface_group_call_get_group_flags
-tp_cli_channel_interface_group_call_get_handle_owners
-tp_cli_channel_interface_group_call_get_local_pending_members
-tp_cli_channel_interface_group_call_get_local_pending_members_with_info
-tp_cli_channel_interface_group_call_get_members
-tp_cli_channel_interface_group_call_get_remote_pending_members
-tp_cli_channel_interface_group_call_get_self_handle
tp_cli_channel_interface_group_call_remove_members
-tp_cli_channel_interface_group_call_remove_members_with_reason
tp_cli_channel_interface_group_callback_for_add_members
-tp_cli_channel_interface_group_callback_for_get_all_members
-tp_cli_channel_interface_group_callback_for_get_group_flags
-tp_cli_channel_interface_group_callback_for_get_handle_owners
-tp_cli_channel_interface_group_callback_for_get_local_pending_members
-tp_cli_channel_interface_group_callback_for_get_local_pending_members_with_info
-tp_cli_channel_interface_group_callback_for_get_members
-tp_cli_channel_interface_group_callback_for_get_remote_pending_members
-tp_cli_channel_interface_group_callback_for_get_self_handle
tp_cli_channel_interface_group_callback_for_remove_members
-tp_cli_channel_interface_group_callback_for_remove_members_with_reason
tp_cli_channel_interface_group_connect_to_group_flags_changed
tp_cli_channel_interface_group_connect_to_members_changed
-tp_cli_channel_interface_group_connect_to_members_changed_detailed
tp_cli_channel_interface_group_signal_callback_group_flags_changed
tp_cli_channel_interface_group_signal_callback_members_changed
-tp_cli_channel_interface_group_signal_callback_members_changed_detailed
tp_cli_channel_interface_group_connect_to_handle_owners_changed
-tp_cli_channel_interface_group_connect_to_self_handle_changed
tp_cli_channel_interface_group_signal_callback_handle_owners_changed
-tp_cli_channel_interface_group_signal_callback_self_handle_changed
-tp_cli_channel_interface_group_connect_to_handle_owners_changed_detailed
tp_cli_channel_interface_group_connect_to_self_contact_changed
-tp_cli_channel_interface_group_signal_callback_handle_owners_changed_detailed
tp_cli_channel_interface_group_signal_callback_self_contact_changed
-tp_svc_channel_interface_group_emit_handle_owners_changed_detailed
tp_svc_channel_interface_group_emit_self_contact_changed
<SUBSECTION>
@@ -3898,48 +3098,22 @@ tp_cli_channel_interface_conference_signal_callback_channel_removed
<FILE>channel-text</FILE>
<TITLE>channel-text</TITLE>
<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
-tp_cli_channel_type_text_run_acknowledge_pending_messages
-tp_cli_channel_type_text_run_get_message_types
-tp_cli_channel_type_text_run_list_pending_messages
-tp_cli_channel_type_text_run_send
tp_cli_channel_type_text_call_acknowledge_pending_messages
-tp_cli_channel_type_text_call_get_message_types
-tp_cli_channel_type_text_call_list_pending_messages
-tp_cli_channel_type_text_call_send
+tp_cli_channel_type_text_call_send_message
tp_cli_channel_type_text_callback_for_acknowledge_pending_messages
-tp_cli_channel_type_text_callback_for_get_message_types
-tp_cli_channel_type_text_callback_for_list_pending_messages
-tp_cli_channel_type_text_callback_for_send
-tp_cli_channel_type_text_connect_to_lost_message
-tp_cli_channel_type_text_connect_to_received
-tp_cli_channel_type_text_connect_to_send_error
-tp_cli_channel_type_text_connect_to_sent
-tp_cli_channel_type_text_signal_callback_lost_message
-tp_cli_channel_type_text_signal_callback_received
-tp_cli_channel_type_text_signal_callback_send_error
-tp_cli_channel_type_text_signal_callback_sent
-<SUBSECTION>
-tp_cli_channel_interface_messages_callback_for_get_pending_message_content
-tp_cli_channel_interface_messages_call_get_pending_message_content
-tp_cli_channel_interface_messages_run_get_pending_message_content
-tp_cli_channel_interface_messages_callback_for_send_message
-tp_cli_channel_interface_messages_call_send_message
-tp_cli_channel_interface_messages_run_send_message
-tp_cli_channel_interface_messages_signal_callback_message_received
-tp_cli_channel_interface_messages_connect_to_message_received
-tp_cli_channel_interface_messages_signal_callback_message_sent
-tp_cli_channel_interface_messages_connect_to_message_sent
-tp_cli_channel_interface_messages_signal_callback_pending_messages_removed
-tp_cli_channel_interface_messages_connect_to_pending_messages_removed
-<SUBSECTION>
-tp_cli_channel_interface_chat_state_run_set_chat_state
+tp_cli_channel_type_text_callback_for_send_message
+tp_cli_channel_type_text_connect_to_message_received
+tp_cli_channel_type_text_connect_to_message_sent
+tp_cli_channel_type_text_signal_callback_message_received
+tp_cli_channel_type_text_signal_callback_message_sent
+tp_cli_channel_type_text_connect_to_pending_messages_removed
+tp_cli_channel_type_text_signal_callback_pending_messages_removed
+<SUBSECTION>
tp_cli_channel_interface_chat_state_call_set_chat_state
tp_cli_channel_interface_chat_state_callback_for_set_chat_state
tp_cli_channel_interface_chat_state_connect_to_chat_state_changed
tp_cli_channel_interface_chat_state_signal_callback_chat_state_changed
<SUBSECTION>
-tp_cli_channel_interface_password_run_get_password_flags
-tp_cli_channel_interface_password_run_provide_password
tp_cli_channel_interface_password_call_get_password_flags
tp_cli_channel_interface_password_call_provide_password
tp_cli_channel_interface_password_callback_for_get_password_flags
@@ -3951,7 +3125,6 @@ tp_cli_channel_interface_sms_connect_to_sms_channel_changed
tp_cli_channel_interface_sms_signal_callback_sms_channel_changed
tp_cli_channel_interface_sms_call_get_sms_length
tp_cli_channel_interface_sms_callback_for_get_sms_length
-tp_cli_channel_interface_sms_run_get_sms_length
</SECTION>
<SECTION>
@@ -3978,8 +3151,6 @@ tp_cli_channel_type_file_transfer_connect_to_file_transfer_state_changed
tp_cli_channel_type_file_transfer_connect_to_initial_offset_defined
tp_cli_channel_type_file_transfer_connect_to_transferred_bytes_changed
tp_cli_channel_type_file_transfer_connect_to_uri_defined
-tp_cli_channel_type_file_transfer_run_accept_file
-tp_cli_channel_type_file_transfer_run_provide_file
tp_cli_channel_type_file_transfer_signal_callback_file_transfer_state_changed
tp_cli_channel_type_file_transfer_signal_callback_initial_offset_defined
tp_cli_channel_type_file_transfer_signal_callback_transferred_bytes_changed
@@ -3990,37 +3161,6 @@ tp_cli_channel_type_file_transfer_signal_callback_uri_defined
<FILE>channel-media</FILE>
<TITLE>channel-media</TITLE>
<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
-tp_cli_channel_type_streamed_media_call_list_streams
-tp_cli_channel_type_streamed_media_call_remove_streams
-tp_cli_channel_type_streamed_media_call_request_stream_direction
-tp_cli_channel_type_streamed_media_call_request_streams
-tp_cli_channel_type_streamed_media_callback_for_list_streams
-tp_cli_channel_type_streamed_media_callback_for_remove_streams
-tp_cli_channel_type_streamed_media_callback_for_request_stream_direction
-tp_cli_channel_type_streamed_media_callback_for_request_streams
-tp_cli_channel_type_streamed_media_run_list_streams
-tp_cli_channel_type_streamed_media_run_remove_streams
-tp_cli_channel_type_streamed_media_run_request_stream_direction
-tp_cli_channel_type_streamed_media_run_request_streams
-tp_cli_channel_type_streamed_media_connect_to_stream_added
-tp_cli_channel_type_streamed_media_connect_to_stream_direction_changed
-tp_cli_channel_type_streamed_media_connect_to_stream_error
-tp_cli_channel_type_streamed_media_connect_to_stream_removed
-tp_cli_channel_type_streamed_media_connect_to_stream_state_changed
-tp_cli_channel_type_streamed_media_signal_callback_stream_added
-tp_cli_channel_type_streamed_media_signal_callback_stream_direction_changed
-tp_cli_channel_type_streamed_media_signal_callback_stream_error
-tp_cli_channel_type_streamed_media_signal_callback_stream_removed
-tp_cli_channel_type_streamed_media_signal_callback_stream_state_changed
-<SUBSECTION>
-tp_cli_channel_interface_call_state_call_get_call_states
-tp_cli_channel_interface_call_state_callback_for_get_call_states
-tp_cli_channel_interface_call_state_connect_to_call_state_changed
-tp_cli_channel_interface_call_state_run_get_call_states
-tp_cli_channel_interface_call_state_signal_callback_call_state_changed
-<SUBSECTION>
-tp_cli_channel_interface_dtmf_run_start_tone
-tp_cli_channel_interface_dtmf_run_stop_tone
tp_cli_channel_interface_dtmf_call_start_tone
tp_cli_channel_interface_dtmf_call_stop_tone
tp_cli_channel_interface_dtmf_callback_for_start_tone
@@ -4036,69 +3176,10 @@ tp_cli_channel_interface_dtmf_signal_callback_tones_deferred
<SUBSECTION>
tp_cli_channel_interface_hold_callback_for_get_hold_state
tp_cli_channel_interface_hold_call_get_hold_state
-tp_cli_channel_interface_hold_run_get_hold_state
tp_cli_channel_interface_hold_callback_for_request_hold
tp_cli_channel_interface_hold_call_request_hold
-tp_cli_channel_interface_hold_run_request_hold
tp_cli_channel_interface_hold_signal_callback_hold_state_changed
tp_cli_channel_interface_hold_connect_to_hold_state_changed
-<SUBSECTION>
-tp_cli_channel_interface_media_signalling_run_get_session_handlers
-tp_cli_channel_interface_media_signalling_call_get_session_handlers
-tp_cli_channel_interface_media_signalling_callback_for_get_session_handlers
-tp_cli_channel_interface_media_signalling_connect_to_new_session_handler
-tp_cli_channel_interface_media_signalling_signal_callback_new_session_handler
-<SUBSECTION Private>
-tp_cli_channel_interface_dtmf_run_multiple_tones
-</SECTION>
-
-<SECTION>
-<FILE>channel-tubes</FILE>
-<TITLE>channel-tubes</TITLE>
-<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
-tp_cli_channel_type_tubes_run_accept_d_bus_tube
-tp_cli_channel_type_tubes_run_accept_stream_tube
-tp_cli_channel_type_tubes_run_close_tube
-tp_cli_channel_type_tubes_run_get_available_stream_tube_types
-tp_cli_channel_type_tubes_run_get_available_tube_types
-tp_cli_channel_type_tubes_run_get_d_bus_names
-tp_cli_channel_type_tubes_run_get_d_bus_tube_address
-tp_cli_channel_type_tubes_run_get_stream_tube_socket_address
-tp_cli_channel_type_tubes_run_list_tubes
-tp_cli_channel_type_tubes_run_offer_d_bus_tube
-tp_cli_channel_type_tubes_run_offer_stream_tube
-tp_cli_channel_type_tubes_call_accept_d_bus_tube
-tp_cli_channel_type_tubes_call_accept_stream_tube
-tp_cli_channel_type_tubes_call_close_tube
-tp_cli_channel_type_tubes_call_get_available_stream_tube_types
-tp_cli_channel_type_tubes_call_get_available_tube_types
-tp_cli_channel_type_tubes_call_get_d_bus_names
-tp_cli_channel_type_tubes_call_get_d_bus_tube_address
-tp_cli_channel_type_tubes_call_get_stream_tube_socket_address
-tp_cli_channel_type_tubes_call_list_tubes
-tp_cli_channel_type_tubes_call_offer_d_bus_tube
-tp_cli_channel_type_tubes_call_offer_stream_tube
-tp_cli_channel_type_tubes_callback_for_accept_d_bus_tube
-tp_cli_channel_type_tubes_callback_for_accept_stream_tube
-tp_cli_channel_type_tubes_callback_for_close_tube
-tp_cli_channel_type_tubes_callback_for_get_available_stream_tube_types
-tp_cli_channel_type_tubes_callback_for_get_available_tube_types
-tp_cli_channel_type_tubes_callback_for_get_d_bus_names
-tp_cli_channel_type_tubes_callback_for_get_d_bus_tube_address
-tp_cli_channel_type_tubes_callback_for_get_stream_tube_socket_address
-tp_cli_channel_type_tubes_callback_for_list_tubes
-tp_cli_channel_type_tubes_callback_for_offer_d_bus_tube
-tp_cli_channel_type_tubes_callback_for_offer_stream_tube
-tp_cli_channel_type_tubes_connect_to_d_bus_names_changed
-tp_cli_channel_type_tubes_connect_to_new_tube
-tp_cli_channel_type_tubes_connect_to_stream_tube_new_connection
-tp_cli_channel_type_tubes_connect_to_tube_closed
-tp_cli_channel_type_tubes_connect_to_tube_state_changed
-tp_cli_channel_type_tubes_signal_callback_d_bus_names_changed
-tp_cli_channel_type_tubes_signal_callback_new_tube
-tp_cli_channel_type_tubes_signal_callback_stream_tube_new_connection
-tp_cli_channel_type_tubes_signal_callback_tube_closed
-tp_cli_channel_type_tubes_signal_callback_tube_state_changed
</SECTION>
<SECTION>
@@ -4107,8 +3188,6 @@ tp_cli_channel_type_tubes_signal_callback_tube_state_changed
<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
tp_cli_channel_interface_tube_connect_to_tube_channel_state_changed
tp_cli_channel_interface_tube_signal_callback_tube_channel_state_changed
-tp_cli_channel_type_stream_tube_run_offer
-tp_cli_channel_type_stream_tube_run_accept
tp_cli_channel_type_stream_tube_call_offer
tp_cli_channel_type_stream_tube_call_accept
tp_cli_channel_type_stream_tube_callback_for_offer
@@ -4119,8 +3198,6 @@ tp_cli_channel_type_stream_tube_connect_to_connection_closed
tp_cli_channel_type_stream_tube_signal_callback_new_remote_connection
tp_cli_channel_type_stream_tube_signal_callback_new_local_connection
tp_cli_channel_type_stream_tube_signal_callback_connection_closed
-tp_cli_channel_type_dbus_tube_run_offer
-tp_cli_channel_type_dbus_tube_run_accept
tp_cli_channel_type_dbus_tube_call_offer
tp_cli_channel_type_dbus_tube_call_accept
tp_cli_channel_type_dbus_tube_callback_for_offer
@@ -4139,9 +3216,6 @@ tp_cli_channel_type_room_list_call_stop_listing
tp_cli_channel_type_room_list_callback_for_get_listing_rooms
tp_cli_channel_type_room_list_callback_for_list_rooms
tp_cli_channel_type_room_list_callback_for_stop_listing
-tp_cli_channel_type_room_list_run_get_listing_rooms
-tp_cli_channel_type_room_list_run_list_rooms
-tp_cli_channel_type_room_list_run_stop_listing
tp_cli_channel_type_room_list_connect_to_got_rooms
tp_cli_channel_type_room_list_connect_to_listing_rooms
tp_cli_channel_type_room_list_signal_callback_got_rooms
@@ -4186,10 +3260,6 @@ TP_CONNECTION_FEATURE_CONTACT_LIST_PROPERTIES
TP_CONNECTION_FEATURE_CONTACT_GROUPS
TP_CONNECTION_FEATURE_CONTACT_BLOCKING
TP_CONNECTION_FEATURE_ALIASING
-tp_connection_run_until_ready
-TpConnectionWhenReadyCb
-tp_connection_call_when_ready
-tp_connection_is_ready
tp_connection_disconnect_async
tp_connection_disconnect_finish
tp_connection_get_account
@@ -4197,15 +3267,8 @@ tp_connection_get_status
tp_connection_get_connection_manager_name
tp_connection_get_protocol_name
tp_connection_get_self_contact
-tp_connection_get_self_handle
-tp_connection_has_immortal_handles
TpConnectionRequestHandlesCb
tp_connection_request_handles
-TpConnectionHoldHandlesCb
-tp_connection_get_contact_attributes
-tp_connection_get_contact_list_attributes
-tp_connection_hold_handles
-tp_connection_unref_handles
tp_connection_init_known_interfaces
tp_connection_presence_type_cmp_availability
tp_connection_parse_object_path
@@ -4314,47 +3377,24 @@ tp_connection_can_report_abusive
tp_connection_get_blocked_contacts
<SUBSECTION aliasing>
tp_connection_can_set_contact_alias
-<SUBSECTION>
+</SECTION>
+
+<SECTION>
+<FILE>cli-connection</FILE>
+<TITLE>cli-connection</TITLE>
+<INCLUDE>telepathy-glib/cli-connection.h</INCLUDE>
+tp_connection_get_contact_attributes
+tp_connection_get_contact_list_attributes
tp_cli_connection_callback_for_connect
tp_cli_connection_call_connect
-tp_cli_connection_run_connect
tp_cli_connection_callback_for_disconnect
tp_cli_connection_call_disconnect
-tp_cli_connection_run_disconnect
-tp_cli_connection_callback_for_get_interfaces
-tp_cli_connection_call_get_interfaces
-tp_cli_connection_run_get_interfaces
-tp_cli_connection_callback_for_get_protocol
-tp_cli_connection_call_get_protocol
-tp_cli_connection_run_get_protocol
-tp_cli_connection_callback_for_get_self_handle
-tp_cli_connection_call_get_self_handle
-tp_cli_connection_run_get_self_handle
-tp_cli_connection_callback_for_get_status
-tp_cli_connection_call_get_status
-tp_cli_connection_run_get_status
-tp_cli_connection_callback_for_hold_handles
-tp_cli_connection_call_hold_handles
-tp_cli_connection_run_hold_handles
tp_cli_connection_callback_for_inspect_handles
tp_cli_connection_call_inspect_handles
-tp_cli_connection_run_inspect_handles
-tp_cli_connection_callback_for_list_channels
-tp_cli_connection_call_list_channels
-tp_cli_connection_run_list_channels
-tp_cli_connection_callback_for_release_handles
-tp_cli_connection_call_release_handles
-tp_cli_connection_run_release_handles
-tp_cli_connection_callback_for_request_channel
-tp_cli_connection_call_request_channel
-tp_cli_connection_run_request_channel
tp_cli_connection_callback_for_request_handles
tp_cli_connection_call_request_handles
-tp_cli_connection_run_request_handles
-tp_cli_connection_signal_callback_new_channel
-tp_cli_connection_connect_to_new_channel
-tp_cli_connection_signal_callback_self_handle_changed
-tp_cli_connection_connect_to_self_handle_changed
+tp_cli_connection_signal_callback_self_contact_changed
+tp_cli_connection_connect_to_self_contact_changed
tp_cli_connection_signal_callback_status_changed
tp_cli_connection_connect_to_status_changed
tp_cli_connection_signal_callback_connection_error
@@ -4363,19 +3403,14 @@ tp_cli_connection_call_add_client_interest
tp_cli_connection_call_remove_client_interest
tp_cli_connection_callback_for_add_client_interest
tp_cli_connection_callback_for_remove_client_interest
-<SUBSECTION Private>
-tp_cli_connection_run_add_client_interest
-tp_cli_connection_run_remove_client_interest
+<SUBSECTION Standard>
+tp_cli_connection_add_signals
</SECTION>
<SECTION>
<FILE>connection-aliasing</FILE>
<TITLE>connection-aliasing</TITLE>
<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
-tp_cli_connection_interface_aliasing_run_get_alias_flags
-tp_cli_connection_interface_aliasing_run_request_aliases
-tp_cli_connection_interface_aliasing_run_get_aliases
-tp_cli_connection_interface_aliasing_run_set_aliases
tp_cli_connection_interface_aliasing_call_get_alias_flags
tp_cli_connection_interface_aliasing_call_request_aliases
tp_cli_connection_interface_aliasing_call_get_aliases
@@ -4392,25 +3427,12 @@ tp_cli_connection_interface_aliasing_signal_callback_aliases_changed
<FILE>connection-avatars</FILE>
<TITLE>connection-avatars</TITLE>
<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
-tp_cli_connection_interface_avatars_run_clear_avatar
-tp_cli_connection_interface_avatars_run_get_avatar_requirements
-tp_cli_connection_interface_avatars_run_get_avatar_tokens
-tp_cli_connection_interface_avatars_run_get_known_avatar_tokens
-tp_cli_connection_interface_avatars_run_request_avatar
-tp_cli_connection_interface_avatars_run_request_avatars
-tp_cli_connection_interface_avatars_run_set_avatar
tp_cli_connection_interface_avatars_call_clear_avatar
-tp_cli_connection_interface_avatars_call_get_avatar_requirements
-tp_cli_connection_interface_avatars_call_get_avatar_tokens
tp_cli_connection_interface_avatars_call_get_known_avatar_tokens
-tp_cli_connection_interface_avatars_call_request_avatar
tp_cli_connection_interface_avatars_call_request_avatars
tp_cli_connection_interface_avatars_call_set_avatar
tp_cli_connection_interface_avatars_callback_for_clear_avatar
-tp_cli_connection_interface_avatars_callback_for_get_avatar_requirements
-tp_cli_connection_interface_avatars_callback_for_get_avatar_tokens
tp_cli_connection_interface_avatars_callback_for_get_known_avatar_tokens
-tp_cli_connection_interface_avatars_callback_for_request_avatar
tp_cli_connection_interface_avatars_callback_for_request_avatars
tp_cli_connection_interface_avatars_callback_for_set_avatar
tp_cli_connection_interface_avatars_connect_to_avatar_retrieved
@@ -4437,18 +3459,6 @@ tp_cli_connection_interface_contact_capabilities_callback_for_update_capabilitie
tp_cli_connection_interface_contact_capabilities_call_update_capabilities
tp_cli_connection_interface_contact_capabilities_signal_callback_contact_capabilities_changed
tp_cli_connection_interface_contact_capabilities_connect_to_contact_capabilities_changed
-<SUBSECTION Private>
-tp_cli_connection_interface_contact_capabilities_run_get_contact_capabilities
-tp_cli_connection_interface_contact_capabilities_run_update_capabilities
-tp_cli_connection_interface_capabilities_run_advertise_capabilities
-tp_cli_connection_interface_capabilities_run_get_capabilities
-<SUBSECTION>
-tp_cli_connection_interface_capabilities_call_advertise_capabilities
-tp_cli_connection_interface_capabilities_call_get_capabilities
-tp_cli_connection_interface_capabilities_callback_for_advertise_capabilities
-tp_cli_connection_interface_capabilities_callback_for_get_capabilities
-tp_cli_connection_interface_capabilities_connect_to_capabilities_changed
-tp_cli_connection_interface_capabilities_signal_callback_capabilities_changed
</SECTION>
<SECTION>
@@ -4462,9 +3472,6 @@ tp_cli_connection_interface_contact_blocking_callback_for_block_contacts
tp_cli_connection_interface_contact_blocking_callback_for_request_blocked_contacts
tp_cli_connection_interface_contact_blocking_callback_for_unblock_contacts
tp_cli_connection_interface_contact_blocking_connect_to_blocked_contacts_changed
-tp_cli_connection_interface_contact_blocking_run_block_contacts
-tp_cli_connection_interface_contact_blocking_run_request_blocked_contacts
-tp_cli_connection_interface_contact_blocking_run_unblock_contacts
tp_cli_connection_interface_contact_blocking_signal_callback_blocked_contacts_changed
tp_cli_connection_interface_contact_groups_call_add_to_group
tp_cli_connection_interface_contact_groups_call_remove_from_group
@@ -4499,8 +3506,6 @@ tp_cli_connection_interface_contact_list_callback_for_request_subscription
tp_cli_connection_interface_contact_list_callback_for_unpublish
tp_cli_connection_interface_contact_list_callback_for_unsubscribe
tp_cli_connection_interface_contact_list_connect_to_contacts_changed
-tp_cli_connection_interface_contact_list_signal_callback_contacts_changed_with_id
-tp_cli_connection_interface_contact_list_connect_to_contacts_changed_with_id
tp_cli_connection_interface_contact_list_signal_callback_contacts_changed
tp_cli_connection_interface_contact_list_connect_to_contact_list_state_changed
tp_cli_connection_interface_contact_list_signal_callback_contact_list_state_changed
@@ -4509,19 +3514,6 @@ tp_cli_connection_interface_contact_list_signal_callback_contact_list_state_chan
# tracking
tp_cli_connection_interface_contact_list_call_get_contact_list_attributes
tp_cli_connection_interface_contact_list_callback_for_get_contact_list_attributes
-# "undocumented" because they were already deprecated when introduced
-tp_cli_connection_interface_contact_list_run_get_contact_list_attributes
-tp_cli_connection_interface_contact_list_run_authorize_publication
-tp_cli_connection_interface_contact_list_run_remove_contacts
-tp_cli_connection_interface_contact_list_run_request_subscription
-tp_cli_connection_interface_contact_list_run_unpublish
-tp_cli_connection_interface_contact_list_run_unsubscribe
-tp_cli_connection_interface_contact_groups_run_add_to_group
-tp_cli_connection_interface_contact_groups_run_remove_from_group
-tp_cli_connection_interface_contact_groups_run_remove_group
-tp_cli_connection_interface_contact_groups_run_rename_group
-tp_cli_connection_interface_contact_groups_run_set_contact_groups
-tp_cli_connection_interface_contact_groups_run_set_group_members
</SECTION>
<SECTION>
@@ -4538,7 +3530,6 @@ tp_cli_connection_interface_cellular_signal_callback_imsi_changed
<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
tp_cli_connection_interface_contacts_call_get_contact_attributes
tp_cli_connection_interface_contacts_callback_for_get_contact_attributes
-tp_cli_connection_interface_contacts_run_get_contact_attributes
tp_cli_connection_interface_contacts_call_get_contact_by_id
tp_cli_connection_interface_contacts_callback_for_get_contact_by_id
</SECTION>
@@ -4556,10 +3547,6 @@ tp_cli_connection_interface_contact_info_callback_for_refresh_contact_info
tp_cli_connection_interface_contact_info_callback_for_request_contact_info
tp_cli_connection_interface_contact_info_callback_for_set_contact_info
tp_cli_connection_interface_contact_info_connect_to_contact_info_changed
-tp_cli_connection_interface_contact_info_run_get_contact_info
-tp_cli_connection_interface_contact_info_run_refresh_contact_info
-tp_cli_connection_interface_contact_info_run_request_contact_info
-tp_cli_connection_interface_contact_info_run_set_contact_info
tp_cli_connection_interface_contact_info_signal_callback_contact_info_changed
</SECTION>
@@ -4573,24 +3560,20 @@ tp_cli_connection_interface_requests_callback_for_create_channel
tp_cli_connection_interface_requests_callback_for_ensure_channel
tp_cli_connection_interface_requests_connect_to_channel_closed
tp_cli_connection_interface_requests_connect_to_new_channels
-tp_cli_connection_interface_requests_run_create_channel
-tp_cli_connection_interface_requests_run_ensure_channel
tp_cli_connection_interface_requests_signal_callback_channel_closed
tp_cli_connection_interface_requests_signal_callback_new_channels
</SECTION>
<SECTION>
-<FILE>connection-simple-presence</FILE>
-<TITLE>connection-simple-presence</TITLE>
+<FILE>connection-presence</FILE>
+<TITLE>connection-presence</TITLE>
<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
-tp_cli_connection_interface_simple_presence_run_get_presences
-tp_cli_connection_interface_simple_presence_run_set_presence
-tp_cli_connection_interface_simple_presence_call_get_presences
-tp_cli_connection_interface_simple_presence_call_set_presence
-tp_cli_connection_interface_simple_presence_callback_for_get_presences
-tp_cli_connection_interface_simple_presence_callback_for_set_presence
-tp_cli_connection_interface_simple_presence_connect_to_presences_changed
-tp_cli_connection_interface_simple_presence_signal_callback_presences_changed
+tp_cli_connection_interface_presence_call_get_presences
+tp_cli_connection_interface_presence_call_set_presence
+tp_cli_connection_interface_presence_callback_for_get_presences
+tp_cli_connection_interface_presence_callback_for_set_presence
+tp_cli_connection_interface_presence_connect_to_presences_changed
+tp_cli_connection_interface_presence_signal_callback_presences_changed
</SECTION>
<SECTION>
@@ -4605,43 +3588,6 @@ tp_cli_connection_interface_location_call_request_location
tp_cli_connection_interface_location_callback_for_request_location
tp_cli_connection_interface_location_call_set_location
tp_cli_connection_interface_location_callback_for_set_location
-<SUBSECTION Private>
-# Omit these from the docs as a mild form of deprecation...
-tp_cli_connection_interface_location_run_get_locations
-tp_cli_connection_interface_location_run_request_location
-tp_cli_connection_interface_location_run_set_location
-</SECTION>
-
-<SECTION>
-<FILE>connection-presence</FILE>
-<TITLE>connection-presence</TITLE>
-<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
-tp_cli_connection_interface_presence_run_add_status
-tp_cli_connection_interface_presence_run_clear_status
-tp_cli_connection_interface_presence_run_get_presence
-tp_cli_connection_interface_presence_run_get_statuses
-tp_cli_connection_interface_presence_run_remove_status
-tp_cli_connection_interface_presence_run_request_presence
-tp_cli_connection_interface_presence_run_set_last_activity_time
-tp_cli_connection_interface_presence_run_set_status
-tp_cli_connection_interface_presence_call_add_status
-tp_cli_connection_interface_presence_call_clear_status
-tp_cli_connection_interface_presence_call_get_presence
-tp_cli_connection_interface_presence_call_get_statuses
-tp_cli_connection_interface_presence_call_remove_status
-tp_cli_connection_interface_presence_call_request_presence
-tp_cli_connection_interface_presence_call_set_last_activity_time
-tp_cli_connection_interface_presence_call_set_status
-tp_cli_connection_interface_presence_callback_for_add_status
-tp_cli_connection_interface_presence_callback_for_clear_status
-tp_cli_connection_interface_presence_callback_for_get_presence
-tp_cli_connection_interface_presence_callback_for_get_statuses
-tp_cli_connection_interface_presence_callback_for_remove_status
-tp_cli_connection_interface_presence_callback_for_request_presence
-tp_cli_connection_interface_presence_callback_for_set_last_activity_time
-tp_cli_connection_interface_presence_callback_for_set_status
-tp_cli_connection_interface_presence_connect_to_presence_update
-tp_cli_connection_interface_presence_signal_callback_presence_update
</SECTION>
<SECTION>
@@ -4652,8 +3598,6 @@ tp_cli_connection_interface_power_saving_call_set_power_saving
tp_cli_connection_interface_power_saving_callback_for_set_power_saving
tp_cli_connection_interface_power_saving_connect_to_power_saving_changed
tp_cli_connection_interface_power_saving_signal_callback_power_saving_changed
-<SUBSECTION Private>
-tp_cli_connection_interface_power_saving_run_set_power_saving
</SECTION>
<SECTION>
@@ -4666,9 +3610,6 @@ tp_cli_connection_interface_client_types_callback_for_get_client_types
tp_cli_connection_interface_client_types_callback_for_request_client_types
tp_cli_connection_interface_client_types_connect_to_client_types_updated
tp_cli_connection_interface_client_types_signal_callback_client_types_updated
-<SUBSECTION Private>
-tp_cli_connection_interface_client_types_run_get_client_types
-tp_cli_connection_interface_client_types_run_request_client_types
</SECTION>
<SECTION>
@@ -4683,9 +3624,6 @@ tp_cli_connection_interface_mail_notification_connect_to_mails_received
tp_cli_connection_interface_mail_notification_connect_to_unread_mails_changed
tp_cli_connection_interface_mail_notification_signal_callback_mails_received
tp_cli_connection_interface_mail_notification_signal_callback_unread_mails_changed
-<SUBSECTION Private>
-tp_cli_connection_interface_mail_notification_run_request_inbox_url
-tp_cli_connection_interface_mail_notification_run_request_mail_url
</SECTION>
<SECTION>
@@ -4711,9 +3649,6 @@ TpConnectionManagerClass
tp_connection_manager_new
tp_connection_manager_get_name
TP_CONNECTION_MANAGER_FEATURE_CORE
-TpConnectionManagerWhenReadyCb
-tp_connection_manager_call_when_ready
-tp_connection_manager_is_ready
TpCMInfoSource
TP_TYPE_CM_INFO_SOURCE
tp_connection_manager_get_info_source
@@ -4760,18 +3695,28 @@ TP_IS_CONNECTION_MANAGER
TP_IS_CONNECTION_MANAGER_CLASS
TpConnectionManagerPrivate
tp_connection_manager_get_feature_quark_core
-<SUBSECTION>
-tp_cli_connection_manager_callback_for_get_parameters
-tp_cli_connection_manager_call_get_parameters
-tp_cli_connection_manager_run_get_parameters
-tp_cli_connection_manager_callback_for_list_protocols
-tp_cli_connection_manager_call_list_protocols
-tp_cli_connection_manager_run_list_protocols
+</SECTION>
+
+<SECTION>
+<FILE>cli-connection-manager</FILE>
+<TITLE>cli-connection-manager</TITLE>
+<INCLUDE>telepathy-glib/cli-misc.h</INCLUDE>
tp_cli_connection_manager_callback_for_request_connection
tp_cli_connection_manager_call_request_connection
-tp_cli_connection_manager_run_request_connection
tp_cli_connection_manager_signal_callback_new_connection
tp_cli_connection_manager_connect_to_new_connection
+<SUBSECTION>
+tp_cli_protocol_call_identify_account
+tp_cli_protocol_call_normalize_contact
+tp_cli_protocol_callback_for_identify_account
+tp_cli_protocol_callback_for_normalize_contact
+tp_cli_protocol_interface_addressing_call_normalize_contact_uri
+tp_cli_protocol_interface_addressing_call_normalize_vcard_address
+tp_cli_protocol_interface_addressing_callback_for_normalize_contact_uri
+tp_cli_protocol_interface_addressing_callback_for_normalize_vcard_address
+<SUBSECTION Standard>
+tp_cli_connection_manager_add_signals
+tp_cli_protocol_add_signals
</SECTION>
<SECTION>
@@ -4821,133 +3766,10 @@ TpContactSearchResultPrivate
</SECTION>
<SECTION>
-<FILE>media-interfaces</FILE>
-<TITLE>media-interfaces</TITLE>
-<INCLUDE>telepathy-glib/telepathy-glib-dbus.h</INCLUDE>
-<SUBSECTION Standard>
-TP_IS_MEDIA_SESSION_HANDLER
-TP_IS_MEDIA_SESSION_HANDLER_CLASS
-TP_IS_MEDIA_STREAM_HANDLER
-TP_IS_MEDIA_STREAM_HANDLER_CLASS
-TP_MEDIA_SESSION_HANDLER
-TP_MEDIA_SESSION_HANDLER_CLASS
-TP_MEDIA_SESSION_HANDLER_GET_CLASS
-TP_MEDIA_STREAM_HANDLER
-TP_MEDIA_STREAM_HANDLER_CLASS
-TP_MEDIA_STREAM_HANDLER_GET_CLASS
-TP_TYPE_MEDIA_SESSION_HANDLER
-TP_TYPE_MEDIA_STREAM_HANDLER
-tp_media_session_handler_get_type
-tp_media_stream_handler_get_type
-TpMediaSessionHandlerPrivate
-TpMediaStreamHandlerPrivate
-<SUBSECTION>
-tp_media_session_handler_new
-tp_media_session_handler_init_known_interfaces
-TpMediaSessionHandler
-TpMediaSessionHandlerClass
-<SUBSECTION>
-tp_media_stream_handler_new
-tp_media_stream_handler_init_known_interfaces
-TpMediaStreamHandler
-TpMediaStreamHandlerClass
-<SUBSECTION>
-tp_cli_media_session_handler_callback_for_error
-tp_cli_media_session_handler_call_error
-tp_cli_media_session_handler_run_error
-tp_cli_media_session_handler_callback_for_ready
-tp_cli_media_session_handler_call_ready
-tp_cli_media_session_handler_run_ready
-tp_cli_media_session_handler_signal_callback_new_stream_handler
-tp_cli_media_session_handler_connect_to_new_stream_handler
-<SUBSECTION>
-tp_cli_media_stream_handler_callback_for_codec_choice
-tp_cli_media_stream_handler_call_codec_choice
-tp_cli_media_stream_handler_run_codec_choice
-tp_cli_media_stream_handler_callback_for_error
-tp_cli_media_stream_handler_call_error
-tp_cli_media_stream_handler_run_error
-tp_cli_media_stream_handler_callback_for_native_candidates_prepared
-tp_cli_media_stream_handler_call_native_candidates_prepared
-tp_cli_media_stream_handler_run_native_candidates_prepared
-tp_cli_media_stream_handler_callback_for_new_active_candidate_pair
-tp_cli_media_stream_handler_call_new_active_candidate_pair
-tp_cli_media_stream_handler_run_new_active_candidate_pair
-tp_cli_media_stream_handler_callback_for_new_native_candidate
-tp_cli_media_stream_handler_call_new_native_candidate
-tp_cli_media_stream_handler_run_new_native_candidate
-tp_cli_media_stream_handler_callback_for_ready
-tp_cli_media_stream_handler_call_ready
-tp_cli_media_stream_handler_run_ready
-tp_cli_media_stream_handler_callback_for_set_local_codecs
-tp_cli_media_stream_handler_call_set_local_codecs
-tp_cli_media_stream_handler_run_set_local_codecs
-tp_cli_media_stream_handler_callback_for_stream_state
-tp_cli_media_stream_handler_call_stream_state
-tp_cli_media_stream_handler_run_stream_state
-tp_cli_media_stream_handler_callback_for_supported_codecs
-tp_cli_media_stream_handler_call_supported_codecs
-tp_cli_media_stream_handler_run_supported_codecs
-tp_cli_media_stream_handler_signal_callback_add_remote_candidate
-tp_cli_media_stream_handler_connect_to_add_remote_candidate
-tp_cli_media_stream_handler_signal_callback_close
-tp_cli_media_stream_handler_connect_to_close
-tp_cli_media_stream_handler_signal_callback_remove_remote_candidate
-tp_cli_media_stream_handler_connect_to_remove_remote_candidate
-tp_cli_media_stream_handler_signal_callback_set_active_candidate_pair
-tp_cli_media_stream_handler_connect_to_set_active_candidate_pair
-tp_cli_media_stream_handler_signal_callback_set_remote_candidate_list
-tp_cli_media_stream_handler_connect_to_set_remote_candidate_list
-tp_cli_media_stream_handler_signal_callback_set_remote_codecs
-tp_cli_media_stream_handler_connect_to_set_remote_codecs
-tp_cli_media_stream_handler_signal_callback_set_stream_playing
-tp_cli_media_stream_handler_connect_to_set_stream_playing
-tp_cli_media_stream_handler_signal_callback_set_stream_sending
-tp_cli_media_stream_handler_connect_to_set_stream_sending
-tp_cli_media_stream_handler_signal_callback_start_telephony_event
-tp_cli_media_stream_handler_connect_to_start_telephony_event
-tp_cli_media_stream_handler_signal_callback_stop_telephony_event
-tp_cli_media_stream_handler_connect_to_stop_telephony_event
-tp_cli_media_stream_handler_call_hold_state
-tp_cli_media_stream_handler_call_unhold_failure
-tp_cli_media_stream_handler_callback_for_hold_state
-tp_cli_media_stream_handler_callback_for_unhold_failure
-tp_cli_media_stream_handler_connect_to_set_stream_held
-tp_cli_media_stream_handler_run_hold_state
-tp_cli_media_stream_handler_run_unhold_failure
-tp_cli_media_stream_handler_signal_callback_set_stream_held
-tp_cli_media_stream_handler_call_codecs_updated
-tp_cli_media_stream_handler_callback_for_codecs_updated
-tp_cli_media_stream_handler_run_codecs_updated
-tp_cli_media_stream_handler_signal_callback_start_named_telephony_event
-tp_cli_media_stream_handler_connect_to_start_named_telephony_event
-tp_cli_media_stream_handler_signal_callback_start_sound_telephony_event
-tp_cli_media_stream_handler_connect_to_start_sound_telephony_event
-tp_cli_media_stream_handler_call_new_active_transport_pair
-tp_cli_media_stream_handler_callback_for_new_active_transport_pair
-tp_cli_media_stream_handler_run_new_active_transport_pair
-tp_cli_media_stream_handler_call_supported_feedback_messages
-tp_cli_media_stream_handler_call_supported_header_extensions
-tp_cli_media_stream_handler_callback_for_supported_feedback_messages
-tp_cli_media_stream_handler_callback_for_supported_header_extensions
-tp_cli_media_stream_handler_connect_to_set_remote_feedback_messages
-tp_cli_media_stream_handler_connect_to_set_remote_header_extensions
-tp_cli_media_stream_handler_run_supported_feedback_messages
-tp_cli_media_stream_handler_run_supported_header_extensions
-tp_cli_media_stream_handler_signal_callback_set_remote_feedback_messages
-tp_cli_media_stream_handler_signal_callback_set_remote_header_extensions
-</SECTION>
-
-<SECTION>
<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
<FILE>contact</FILE>
<TITLE>contact</TITLE>
TpContact
-TpContactFeature
-TP_CONTACT_FEATURE_INVALID
-NUM_TP_CONTACT_FEATURES
-TP_NUM_CONTACT_FEATURES
-TP_TYPE_CONTACT_FEATURE
TpConnectionContactsByHandleCb
tp_connection_dup_contact_if_possible
tp_connection_get_contacts_by_handle
@@ -4955,39 +3777,59 @@ TpConnectionContactsByIdCb
tp_connection_get_contacts_by_id
TpConnectionUpgradeContactsCb
tp_connection_upgrade_contacts
-tp_connection_refresh_contact_info
+<SUBSECTION>
+tp_contact_get_account
+tp_contact_get_connection
+tp_contact_get_handle
+tp_contact_get_identifier
+tp_contact_has_feature
+<SUBSECTION>
+TP_CONTACT_FEATURE_ALIAS
tp_contact_get_alias
+<SUBSECTION>
+TP_CONTACT_FEATURE_AVATAR_TOKEN
tp_contact_get_avatar_token
+<SUBSECTION>
+TP_CONTACT_FEATURE_AVATAR_DATA
tp_contact_get_avatar_file
tp_contact_get_avatar_mime_type
+<SUBSECTION>
+TP_CONTACT_FEATURE_CLIENT_TYPES
tp_contact_get_client_types
-tp_contact_get_account
-tp_contact_get_connection
-tp_contact_get_handle
-tp_contact_get_identifier
+<SUBSECTION>
+TP_CONTACT_FEATURE_PRESENCE
tp_contact_get_presence_message
tp_contact_get_presence_status
tp_contact_get_presence_type
+<SUBSECTION>
+TP_CONTACT_FEATURE_LOCATION
tp_contact_get_location
+<SUBSECTION>
+TP_CONTACT_FEATURE_CAPABILITIES
tp_contact_get_capabilities
+<SUBSECTION>
+TP_CONTACT_FEATURE_CONTACT_INFO
tp_contact_get_contact_info
-tp_contact_is_blocked
+tp_connection_refresh_contact_info
tp_contact_request_contact_info_async
tp_contact_request_contact_info_finish
+<SUBSECTION>
+TP_CONTACT_FEATURE_CONTACT_BLOCKING
+tp_contact_is_blocked
+tp_contact_block_async
+tp_contact_block_finish
+tp_contact_unblock_async
+tp_contact_unblock_finish
+<SUBSECTION>
+TP_CONTACT_FEATURE_SUBSCRIPTION_STATES
tp_contact_get_subscribe_state
tp_contact_get_publish_state
tp_contact_get_publish_request
-tp_contact_get_contact_groups
-tp_contact_set_contact_groups_async
-tp_contact_set_contact_groups_finish
-tp_contact_has_feature
-
<SUBSECTION>
tp_connection_dup_contact_by_id_async
tp_connection_dup_contact_by_id_finish
tp_connection_upgrade_contacts_async
tp_connection_upgrade_contacts_finish
-
<SUBSECTION operations>
tp_contact_request_subscription_async
tp_contact_request_subscription_finish
@@ -4999,16 +3841,27 @@ tp_contact_unsubscribe_async
tp_contact_unsubscribe_finish
tp_contact_unpublish_async
tp_contact_unpublish_finish
+<SUBSECTION>
+TP_CONTACT_FEATURE_CONTACT_GROUPS
+tp_contact_get_contact_groups
+tp_contact_set_contact_groups_async
+tp_contact_set_contact_groups_finish
tp_contact_add_to_group_async
tp_contact_add_to_group_finish
tp_contact_remove_from_group_async
tp_contact_remove_from_group_finish
-tp_contact_block_async
-tp_contact_block_finish
-tp_contact_unblock_async
-tp_contact_unblock_finish
<SUBSECTION Standard>
-tp_contact_feature_get_type
+tp_contact_get_feature_quark_alias
+tp_contact_get_feature_quark_avatar_data
+tp_contact_get_feature_quark_avatar_token
+tp_contact_get_feature_quark_capabilities
+tp_contact_get_feature_quark_client_types
+tp_contact_get_feature_quark_contact_blocking
+tp_contact_get_feature_quark_contact_groups
+tp_contact_get_feature_quark_contact_info
+tp_contact_get_feature_quark_location
+tp_contact_get_feature_quark_presence
+tp_contact_get_feature_quark_subscription_states
tp_contact_get_type
TP_CONTACT
TP_CONTACT_CLASS
@@ -5117,7 +3970,7 @@ tp_svc_account_interface_addressing_get_type
TpSvcAccountManager
TpSvcAccountManagerClass
tp_svc_account_manager_emit_account_removed
-tp_svc_account_manager_emit_account_validity_changed
+tp_svc_account_manager_emit_account_usability_changed
tp_svc_account_manager_create_account_impl
tp_svc_account_manager_return_from_create_account
tp_svc_account_manager_implement_create_account
@@ -5151,7 +4004,7 @@ tp_account_set_enabled_finish
tp_account_reconnect_async
tp_account_reconnect_finish
tp_account_is_enabled
-tp_account_is_valid
+tp_account_is_usable
tp_account_update_parameters_async
tp_account_update_parameters_finish
tp_account_update_parameters_vardict_async
@@ -5194,9 +4047,6 @@ tp_account_bind_connection_status_to_property
<SUBSECTION>
TP_ACCOUNT_FEATURE_CORE
TP_ACCOUNT_FEATURE_CONNECTION
-tp_account_is_prepared
-tp_account_prepare_async
-tp_account_prepare_finish
<SUBSECTION>
TP_ACCOUNT_FEATURE_ADDRESSING
tp_account_get_uri_schemes
@@ -5218,23 +4068,6 @@ tp_account_get_feature_quark_core
tp_account_get_feature_quark_connection
tp_account_get_feature_quark_addressing
tp_account_get_feature_quark_storage
-<SUBSECTION>
-tp_cli_account_callback_for_reconnect
-tp_cli_account_call_reconnect
-tp_cli_account_callback_for_remove
-tp_cli_account_call_remove
-tp_cli_account_callback_for_update_parameters
-tp_cli_account_call_update_parameters
-tp_cli_account_signal_callback_account_property_changed
-tp_cli_account_connect_to_account_property_changed
-tp_cli_account_signal_callback_removed
-tp_cli_account_connect_to_removed
-<SUBSECTION>
-tp_cli_account_interface_avatar_signal_callback_avatar_changed
-tp_cli_account_interface_avatar_connect_to_avatar_changed
-<SUBSECTION>
-tp_cli_account_interface_addressing_callback_for_set_uri_scheme_association
-tp_cli_account_interface_addressing_call_set_uri_scheme_association
<SUBSECTION Standard>
TP_ACCOUNT
TP_IS_ACCOUNT
@@ -5297,25 +4130,14 @@ tp_account_manager_set_default
tp_account_manager_dup
tp_account_manager_create_account_async
tp_account_manager_create_account_finish
-tp_account_manager_ensure_account
-tp_account_manager_get_valid_accounts
+tp_account_manager_get_usable_accounts
tp_account_manager_get_most_available_presence
tp_account_manager_set_all_requested_presences
tp_account_manager_enable_restart
<SUBSECTION>
TP_ACCOUNT_MANAGER_FEATURE_CORE
-tp_account_manager_is_prepared
-tp_account_manager_prepare_async
-tp_account_manager_prepare_finish
<SUBSECTION Private>
tp_account_manager_get_feature_quark_core
-<SUBSECTION>
-tp_cli_account_manager_callback_for_create_account
-tp_cli_account_manager_call_create_account
-tp_cli_account_manager_signal_callback_account_removed
-tp_cli_account_manager_connect_to_account_removed
-tp_cli_account_manager_signal_callback_account_validity_changed
-tp_cli_account_manager_connect_to_account_validity_changed
<SUBSECTION Standard>
TP_ACCOUNT_MANAGER
TP_IS_ACCOUNT_MANAGER
@@ -5329,6 +4151,38 @@ TpAccountManagerClassPrivate
</SECTION>
<SECTION>
+<FILE>cli-account-manager</FILE>
+<INCLUDE>telepathy-glib/cli-misc.h</INCLUDE>
+<TITLE>cli-account-manager</TITLE>
+tp_cli_account_manager_callback_for_create_account
+tp_cli_account_manager_call_create_account
+tp_cli_account_manager_signal_callback_account_removed
+tp_cli_account_manager_connect_to_account_removed
+tp_cli_account_manager_signal_callback_account_usability_changed
+tp_cli_account_manager_connect_to_account_usability_changed
+<SUBSECTION>
+tp_cli_account_callback_for_reconnect
+tp_cli_account_call_reconnect
+tp_cli_account_callback_for_remove
+tp_cli_account_call_remove
+tp_cli_account_callback_for_update_parameters
+tp_cli_account_call_update_parameters
+tp_cli_account_signal_callback_account_property_changed
+tp_cli_account_connect_to_account_property_changed
+tp_cli_account_signal_callback_removed
+tp_cli_account_connect_to_removed
+<SUBSECTION>
+tp_cli_account_interface_avatar_signal_callback_avatar_changed
+tp_cli_account_interface_avatar_connect_to_avatar_changed
+<SUBSECTION>
+tp_cli_account_interface_addressing_callback_for_set_uri_scheme_association
+tp_cli_account_interface_addressing_call_set_uri_scheme_association
+<SUBSECTION Standard>
+tp_cli_account_add_signals
+tp_cli_account_manager_add_signals
+</SECTION>
+
+<SECTION>
<FILE>channel-dispatcher</FILE>
<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
<TITLE>channel-dispatcher</TITLE>
@@ -5336,15 +4190,26 @@ TpChannelDispatcher
TpChannelDispatcherClass
tp_channel_dispatcher_new
tp_channel_dispatcher_init_known_interfaces
-<SUBSECTION>
+<SUBSECTION Standard>
+TP_CHANNEL_DISPATCHER
+TP_IS_CHANNEL_DISPATCHER
+TP_IS_CHANNEL_DISPATCHER_CLASS
+TP_TYPE_CHANNEL_DISPATCHER
+tp_channel_dispatcher_get_type
+TP_CHANNEL_DISPATCHER_CLASS
+TP_CHANNEL_DISPATCHER_GET_CLASS
+TpChannelDispatcherPrivate
+TpChannelDispatcherClassPrivate
+</SECTION>
+
+<SECTION>
+<FILE>cli-channel-dispatcher</FILE>
+<INCLUDE>telepathy-glib/cli-misc.h</INCLUDE>
+<TITLE>cli-channel-dispatcher</TITLE>
tp_cli_channel_dispatcher_callback_for_create_channel
tp_cli_channel_dispatcher_call_create_channel
-tp_cli_channel_dispatcher_callback_for_create_channel_with_hints
-tp_cli_channel_dispatcher_call_create_channel_with_hints
tp_cli_channel_dispatcher_callback_for_ensure_channel
tp_cli_channel_dispatcher_call_ensure_channel
-tp_cli_channel_dispatcher_callback_for_ensure_channel_with_hints
-tp_cli_channel_dispatcher_call_ensure_channel_with_hints
tp_cli_channel_dispatcher_call_delegate_channels
tp_cli_channel_dispatcher_call_present_channel
tp_cli_channel_dispatcher_callback_for_delegate_channels
@@ -5354,16 +4219,30 @@ tp_cli_channel_dispatcher_interface_operation_list_signal_callback_dispatch_oper
tp_cli_channel_dispatcher_interface_operation_list_connect_to_dispatch_operation_finished
tp_cli_channel_dispatcher_interface_operation_list_signal_callback_new_dispatch_operation
tp_cli_channel_dispatcher_interface_operation_list_connect_to_new_dispatch_operation
+<SUBSECTION>
+tp_cli_channel_request_callback_for_cancel
+tp_cli_channel_request_call_cancel
+tp_cli_channel_request_callback_for_proceed
+tp_cli_channel_request_call_proceed
+tp_cli_channel_request_signal_callback_failed
+tp_cli_channel_request_connect_to_failed
+tp_cli_channel_request_signal_callback_succeeded
+tp_cli_channel_request_connect_to_succeeded
+<SUBSECTION>
+tp_cli_channel_dispatch_operation_callback_for_claim
+tp_cli_channel_dispatch_operation_call_claim
+tp_cli_channel_dispatch_operation_callback_for_handle_with
+tp_cli_channel_dispatch_operation_call_handle_with
+tp_cli_channel_dispatch_operation_callback_for_handle_with_time
+tp_cli_channel_dispatch_operation_call_handle_with_time
+tp_cli_channel_dispatch_operation_signal_callback_channel_lost
+tp_cli_channel_dispatch_operation_connect_to_channel_lost
+tp_cli_channel_dispatch_operation_signal_callback_finished
+tp_cli_channel_dispatch_operation_connect_to_finished
<SUBSECTION Standard>
-TP_CHANNEL_DISPATCHER
-TP_IS_CHANNEL_DISPATCHER
-TP_IS_CHANNEL_DISPATCHER_CLASS
-TP_TYPE_CHANNEL_DISPATCHER
-tp_channel_dispatcher_get_type
-TP_CHANNEL_DISPATCHER_CLASS
-TP_CHANNEL_DISPATCHER_GET_CLASS
-TpChannelDispatcherPrivate
-TpChannelDispatcherClassPrivate
+tp_cli_channel_dispatcher_add_signals
+tp_cli_channel_dispatch_operation_add_signals
+tp_cli_channel_request_add_signals
</SECTION>
<SECTION>
@@ -5375,15 +4254,9 @@ TpSvcChannelDispatcherClass
tp_svc_channel_dispatcher_return_from_create_channel
tp_svc_channel_dispatcher_create_channel_impl
tp_svc_channel_dispatcher_implement_create_channel
-tp_svc_channel_dispatcher_return_from_create_channel_with_hints
-tp_svc_channel_dispatcher_create_channel_with_hints_impl
-tp_svc_channel_dispatcher_implement_create_channel_with_hints
tp_svc_channel_dispatcher_return_from_ensure_channel
tp_svc_channel_dispatcher_ensure_channel_impl
tp_svc_channel_dispatcher_implement_ensure_channel
-tp_svc_channel_dispatcher_return_from_ensure_channel_with_hints
-tp_svc_channel_dispatcher_ensure_channel_with_hints_impl
-tp_svc_channel_dispatcher_implement_ensure_channel_with_hints
tp_svc_channel_dispatcher_delegate_channels_impl
tp_svc_channel_dispatcher_implement_delegate_channels
tp_svc_channel_dispatcher_implement_present_channel
@@ -5417,16 +4290,6 @@ TpChannelDispatchOperationClass
tp_channel_dispatch_operation_new
tp_channel_dispatch_operation_init_known_interfaces
<SUBSECTION>
-tp_cli_channel_dispatch_operation_callback_for_claim
-tp_cli_channel_dispatch_operation_call_claim
-tp_cli_channel_dispatch_operation_callback_for_handle_with
-tp_cli_channel_dispatch_operation_call_handle_with
-tp_cli_channel_dispatch_operation_callback_for_handle_with_time
-tp_cli_channel_dispatch_operation_call_handle_with_time
-tp_cli_channel_dispatch_operation_signal_callback_channel_lost
-tp_cli_channel_dispatch_operation_connect_to_channel_lost
-tp_cli_channel_dispatch_operation_signal_callback_finished
-tp_cli_channel_dispatch_operation_connect_to_finished
TP_CHANNEL_DISPATCH_OPERATION_FEATURE_CORE
tp_channel_dispatch_operation_borrow_account
tp_channel_dispatch_operation_borrow_channels
@@ -5437,8 +4300,6 @@ tp_channel_dispatch_operation_handle_with_async
tp_channel_dispatch_operation_handle_with_finish
tp_channel_dispatch_operation_handle_with_time_async
tp_channel_dispatch_operation_handle_with_time_finish
-tp_channel_dispatch_operation_claim_async
-tp_channel_dispatch_operation_claim_finish
tp_channel_dispatch_operation_claim_with_async
tp_channel_dispatch_operation_claim_with_finish
tp_channel_dispatch_operation_close_channels_async
@@ -5467,23 +4328,11 @@ TpChannelRequest
TpChannelRequestClass
tp_channel_request_new
tp_channel_request_init_known_interfaces
-tp_channel_request_set_channel_factory
tp_channel_request_get_immutable_properties
tp_channel_request_get_account
tp_channel_request_get_user_action_time
tp_channel_request_get_preferred_handler
tp_channel_request_get_hints
-<SUBSECTION>
-tp_cli_channel_request_callback_for_cancel
-tp_cli_channel_request_call_cancel
-tp_cli_channel_request_callback_for_proceed
-tp_cli_channel_request_call_proceed
-tp_cli_channel_request_signal_callback_failed
-tp_cli_channel_request_connect_to_failed
-tp_cli_channel_request_signal_callback_succeeded
-tp_cli_channel_request_connect_to_succeeded
-tp_cli_channel_request_signal_callback_succeeded_with_channel
-tp_cli_channel_request_connect_to_succeeded_with_channel
<SUBSECTION Standard>
TP_CHANNEL_REQUEST
TP_CHANNEL_REQUEST_CLASS
@@ -5535,7 +4384,6 @@ tp_svc_channel_request_cancel_impl
tp_svc_channel_request_implement_cancel
tp_svc_channel_request_emit_failed
tp_svc_channel_request_emit_succeeded
-tp_svc_channel_request_emit_succeeded_with_channel
<SUBSECTION Standard>
tp_svc_channel_request_get_type
TP_IS_SVC_CHANNEL_REQUEST
@@ -5551,7 +4399,22 @@ TP_TYPE_SVC_CHANNEL_REQUEST
TpClient
TpClientClass
tp_client_init_known_interfaces
-<SUBSECTION>
+<SUBSECTION Standard>
+tp_client_get_type
+TP_CLIENT
+TP_CLIENT_CLASS
+TP_CLIENT_GET_CLASS
+TP_IS_CLIENT
+TP_IS_CLIENT_CLASS
+TP_TYPE_CLIENT
+TpClientClassPrivate
+TpClientPrivate
+</SECTION>
+
+<SECTION>
+<FILE>cli-client</FILE>
+<INCLUDE>telepathy-glib/cli-misc.h</INCLUDE>
+<TITLE>cli-client</TITLE>
tp_cli_client_observer_callback_for_observe_channels
tp_cli_client_observer_call_observe_channels
<SUBSECTION>
@@ -5565,15 +4428,7 @@ tp_cli_client_interface_requests_call_remove_request
tp_cli_client_approver_callback_for_add_dispatch_operation
tp_cli_client_approver_call_add_dispatch_operation
<SUBSECTION Standard>
-tp_client_get_type
-TP_CLIENT
-TP_CLIENT_CLASS
-TP_CLIENT_GET_CLASS
-TP_IS_CLIENT
-TP_IS_CLIENT_CLASS
-TP_TYPE_CLIENT
-TpClientClassPrivate
-TpClientPrivate
+tp_cli_client_add_signals
</SECTION>
<SECTION>
@@ -5701,12 +4556,6 @@ tp_base_client_take_handler_filter
tp_base_client_be_a_handler
TpBaseClientClassHandleChannelsImpl
tp_base_client_implement_handle_channels
-tp_base_client_add_account_features
-tp_base_client_add_account_features_varargs
-tp_base_client_add_connection_features
-tp_base_client_add_connection_features_varargs
-tp_base_client_add_channel_features
-tp_base_client_add_channel_features_varargs
tp_base_client_get_handled_channels
tp_base_client_is_handling_channel
tp_base_client_delegate_channels_async
@@ -5725,9 +4574,6 @@ tp_base_client_get_object_path
tp_base_client_get_dbus_daemon
tp_base_client_get_name
tp_base_client_get_uniquify_name
-tp_base_client_get_account_manager
-tp_base_client_set_channel_factory
-tp_base_client_get_channel_factory
<SUBSECTION Standard>
tp_base_client_get_type
TP_BASE_CLIENT
@@ -5770,7 +4616,6 @@ TpSimpleObserver
TpSimpleObserverObserveChannelsImpl
tp_simple_observer_new
tp_simple_observer_new_with_am
-tp_simple_observer_new_with_factory
<SUBSECTION Standard>
tp_simple_observer_get_type
TP_TYPE_SIMPLE_OBSERVER
@@ -5811,7 +4656,6 @@ TpSimpleApprover
TpSimpleApproverAddDispatchOperationImpl
tp_simple_approver_new
tp_simple_approver_new_with_am
-tp_simple_approver_new_with_factory
<SUBSECTION Standard>
tp_simple_approver_get_type
TP_TYPE_SIMPLE_APPROVER
@@ -5854,7 +4698,6 @@ TpSimpleHandler
TpSimpleHandlerHandleChannelsImpl
tp_simple_handler_new
tp_simple_handler_new_with_am
-tp_simple_handler_new_with_factory
<SUBSECTION Standard>
tp_simple_handler_get_type
TP_TYPE_SIMPLE_HANDLER
@@ -6032,15 +4875,6 @@ tp_protocol_get_icon_name
tp_protocol_get_vcard_field
tp_protocol_get_authentication_types
tp_protocol_get_avatar_requirements
-<SUBSECTION>
-tp_cli_protocol_call_identify_account
-tp_cli_protocol_call_normalize_contact
-tp_cli_protocol_callback_for_identify_account
-tp_cli_protocol_callback_for_normalize_contact
-tp_cli_protocol_interface_addressing_call_normalize_contact_uri
-tp_cli_protocol_interface_addressing_call_normalize_vcard_address
-tp_cli_protocol_interface_addressing_callback_for_normalize_contact_uri
-tp_cli_protocol_interface_addressing_callback_for_normalize_vcard_address
<SUBSECTION Standard>
tp_protocol_get_type
TP_PROTOCOL
@@ -6068,9 +4902,6 @@ tp_cli_channel_type_contact_search_callback_for_search
tp_cli_channel_type_contact_search_callback_for_stop
tp_cli_channel_type_contact_search_connect_to_search_result_received
tp_cli_channel_type_contact_search_connect_to_search_state_changed
-tp_cli_channel_type_contact_search_run_more
-tp_cli_channel_type_contact_search_run_search
-tp_cli_channel_type_contact_search_run_stop
tp_cli_channel_type_contact_search_signal_callback_search_result_received
tp_cli_channel_type_contact_search_signal_callback_search_state_changed
</SECTION>
@@ -6132,7 +4963,6 @@ tp_account_channel_request_create_and_observe_channel_async
tp_account_channel_request_create_and_observe_channel_finish
tp_account_channel_request_ensure_and_observe_channel_async
tp_account_channel_request_ensure_and_observe_channel_finish
-tp_account_channel_request_set_channel_factory
tp_account_channel_request_get_channel_request
tp_account_channel_request_set_hints
tp_account_channel_request_set_delegate_to_preferred_handler
@@ -6378,58 +5208,6 @@ tp_dbus_tube_channel_feature_quark_core
</SECTION>
<SECTION>
-<FILE>client-channel-factory</FILE>
-<TITLE>client-channel-factory</TITLE>
-<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
-TpClientChannelFactory
-TpClientChannelFactoryInterface
-tp_client_channel_factory_create_channel
-tp_client_channel_factory_dup_channel_features
-<SUBSECTION Standard>
-TP_CLIENT_CHANNEL_FACTORY
-TP_CLIENT_CHANNEL_FACTORY_GET_IFACE
-TP_IS_CLIENT_CHANNEL_FACTORY
-TP_TYPE_CLIENT_CHANNEL_FACTORY
-tp_client_channel_factory_get_type
-</SECTION>
-
-<SECTION>
-<FILE>basic-proxy-factory</FILE>
-<TITLE>basic-proxy-factory</TITLE>
-<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
-TpBasicProxyFactory
-TpBasicProxyFactoryClass
-tp_basic_proxy_factory_new
-tp_basic_proxy_factory_dup
-<SUBSECTION Standard>
-TP_BASIC_PROXY_FACTORY
-TP_BASIC_PROXY_FACTORY_GET_CLASS
-TP_IS_BASIC_PROXY_FACTORY
-TP_TYPE_BASIC_PROXY_FACTORY
-TP_BASIC_PROXY_FACTORY_CLASS
-TP_IS_BASIC_PROXY_FACTORY_CLASS
-tp_basic_proxy_factory_get_type
-</SECTION>
-
-<SECTION>
-<FILE>automatic-proxy-factory</FILE>
-<TITLE>automatic-proxy-factory</TITLE>
-<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
-TpAutomaticProxyFactory
-TpAutomaticProxyFactoryClass
-tp_automatic_proxy_factory_new
-tp_automatic_proxy_factory_dup
-<SUBSECTION Standard>
-TP_AUTOMATIC_PROXY_FACTORY
-TP_AUTOMATIC_PROXY_FACTORY_CLASS
-TP_AUTOMATIC_PROXY_FACTORY_GET_CLASS
-TP_IS_AUTOMATIC_PROXY_FACTORY
-TP_IS_AUTOMATIC_PROXY_FACTORY_CLASS
-TP_TYPE_AUTOMATIC_PROXY_FACTORY
-tp_automatic_proxy_factory_get_type
-</SECTION>
-
-<SECTION>
<FILE>dtmf</FILE>
<TITLE>dtmf</TITLE>
<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
@@ -6542,11 +5320,6 @@ tp_cli_channel_interface_sasl_authentication_callback_for_start_mechanism_with_d
tp_cli_channel_interface_sasl_authentication_connect_to_new_challenge
tp_cli_channel_interface_sasl_authentication_connect_to_sasl_status_changed
<SUBSECTION Private>
-tp_cli_channel_interface_sasl_authentication_run_abort_sasl
-tp_cli_channel_interface_sasl_authentication_run_accept_sasl
-tp_cli_channel_interface_sasl_authentication_run_respond
-tp_cli_channel_interface_sasl_authentication_run_start_mechanism
-tp_cli_channel_interface_sasl_authentication_run_start_mechanism_with_data
tp_cli_channel_interface_sasl_authentication_signal_callback_new_challenge
tp_cli_channel_interface_sasl_authentication_signal_callback_sasl_status_changed
<SUBSECTION>
@@ -6812,6 +5585,8 @@ tp_cli_call_content_interface_dtmf_connect_to_tones_deferred
tp_cli_call_content_interface_dtmf_signal_callback_sending_tones
tp_cli_call_content_interface_dtmf_signal_callback_stopped_tones
tp_cli_call_content_interface_dtmf_signal_callback_tones_deferred
+<SUBSECTION Standard>
+tp_cli_call_content_add_signals
</SECTION>
<SECTION>
@@ -6894,6 +5669,8 @@ tp_cli_call_stream_interface_media_signal_callback_relay_info_changed
tp_cli_call_stream_interface_media_signal_callback_sending_state_changed
tp_cli_call_stream_interface_media_signal_callback_server_info_retrieved
tp_cli_call_stream_interface_media_signal_callback_stun_servers_changed
+<SUBSECTION Standard>
+tp_cli_call_stream_add_signals
</SECTION>
<SECTION>
@@ -6955,6 +5732,9 @@ tp_cli_call_stream_endpoint_signal_callback_controlling_changed
tp_cli_call_stream_endpoint_signal_callback_endpoint_state_changed
tp_cli_call_stream_endpoint_signal_callback_remote_candidates_added
tp_cli_call_stream_endpoint_signal_callback_remote_credentials_set
+<SUBSECTION Standard>
+tp_cli_call_content_media_description_add_signals
+tp_cli_call_stream_endpoint_add_signals
</SECTION>
<SECTION>
@@ -6967,42 +5747,42 @@ tp_call_stream_endpoint_init_known_interfaces
</SECTION>
<SECTION>
-<FILE>simple-client-factory</FILE>
-<TITLE>simple-client-factory</TITLE>
+<FILE>client-factory</FILE>
+<TITLE>client-factory</TITLE>
<INCLUDE>telepathy-glib/telepathy-glib.h</INCLUDE>
-TpSimpleClientFactory
-TpSimpleClientFactoryClass
-tp_simple_client_factory_new
-tp_simple_client_factory_get_dbus_daemon
-<SUBSECTION>
-tp_simple_client_factory_ensure_account
-tp_simple_client_factory_dup_account_features
-tp_simple_client_factory_add_account_features
-tp_simple_client_factory_add_account_features_varargs
-<SUBSECTION>
-tp_simple_client_factory_ensure_connection
-tp_simple_client_factory_dup_connection_features
-tp_simple_client_factory_add_connection_features
-tp_simple_client_factory_add_connection_features_varargs
-<SUBSECTION>
-tp_simple_client_factory_ensure_channel
-tp_simple_client_factory_dup_channel_features
-tp_simple_client_factory_add_channel_features
-tp_simple_client_factory_add_channel_features_varargs
-<SUBSECTION>
-tp_simple_client_factory_ensure_contact
-tp_simple_client_factory_dup_contact_features
-tp_simple_client_factory_add_contact_features
-tp_simple_client_factory_add_contact_features_varargs
-<SUBSECTION Standard>
-TP_IS_SIMPLE_CLIENT_FACTORY
-TP_IS_SIMPLE_CLIENT_FACTORY_CLASS
-TP_SIMPLE_CLIENT_FACTORY
-TP_SIMPLE_CLIENT_FACTORY_CLASS
-TP_SIMPLE_CLIENT_FACTORY_GET_CLASS
-TP_TYPE_SIMPLE_CLIENT_FACTORY
-tp_simple_client_factory_get_type
-TpSimpleClientFactoryPrivate
+TpClientFactory
+TpClientFactoryClass
+tp_client_factory_new
+tp_client_factory_get_dbus_daemon
+<SUBSECTION>
+tp_client_factory_ensure_account
+tp_client_factory_dup_account_features
+tp_client_factory_add_account_features
+tp_client_factory_add_account_features_varargs
+<SUBSECTION>
+tp_client_factory_ensure_connection
+tp_client_factory_dup_connection_features
+tp_client_factory_add_connection_features
+tp_client_factory_add_connection_features_varargs
+<SUBSECTION>
+tp_client_factory_ensure_channel
+tp_client_factory_dup_channel_features
+tp_client_factory_add_channel_features
+tp_client_factory_add_channel_features_varargs
+<SUBSECTION>
+tp_client_factory_ensure_contact
+tp_client_factory_dup_contact_features
+tp_client_factory_add_contact_features
+tp_client_factory_add_contact_features_varargs
+<SUBSECTION Standard>
+TP_IS_CLIENT_FACTORY
+TP_IS_CLIENT_FACTORY_CLASS
+TP_CLIENT_FACTORY
+TP_CLIENT_FACTORY_CLASS
+TP_CLIENT_FACTORY_GET_CLASS
+TP_TYPE_CLIENT_FACTORY
+tp_client_factory_get_type
+TpClientFactoryPrivate
</SECTION>
<SECTION>
@@ -7278,10 +6058,6 @@ TpBaseMediaCallChannelPrivate
<SUBSECTION>
TpDebugClient
TpDebugClientClass
-tp_cli_debug_call_get_messages
-tp_cli_debug_callback_for_get_messages
-tp_cli_debug_connect_to_new_debug_message
-tp_cli_debug_signal_callback_new_debug_message
tp_debug_client_init_known_interfaces
tp_debug_client_new
tp_debug_client_set_enabled_async
@@ -7297,8 +6073,13 @@ TP_IS_DEBUG_CLIENT_CLASS
TP_TYPE_DEBUG_CLIENT
tp_debug_client_get_type
tp_debug_client_get_feature_quark_core
+tp_cli_debug_add_signals
<SUBSECTION Private>
TpDebugClientPrivate
+tp_cli_debug_call_get_messages
+tp_cli_debug_callback_for_get_messages
+tp_cli_debug_connect_to_new_debug_message
+tp_cli_debug_signal_callback_new_debug_message
</SECTION>
<SECTION>
@@ -7411,6 +6192,7 @@ tp_cli_authentication_tls_certificate_connect_to_accepted
tp_cli_authentication_tls_certificate_connect_to_rejected
tp_cli_authentication_tls_certificate_signal_callback_accepted
tp_cli_authentication_tls_certificate_signal_callback_rejected
+tp_cli_tls_cert_add_signals
<SUBSECTION Standard>
tp_tls_certificate_get_feature_quark_core
TP_IS_TLS_CERTIFICATE
diff --git a/examples/client/Makefile.am b/examples/client/Makefile.am
index bd1c80bfe..9e0987b00 100644
--- a/examples/client/Makefile.am
+++ b/examples/client/Makefile.am
@@ -50,7 +50,9 @@ endif
# Similarly, in an external project you'd put $(TP_GLIB_CFLAGS) at the end of
# AM_CPPFLAGS.
LDADD = \
- $(top_builddir)/telepathy-glib/libtelepathy-glib.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(NULL)
diff --git a/examples/client/approver.c b/examples/client/approver.c
index d92ee3448..0800fc3eb 100644
--- a/examples/client/approver.c
+++ b/examples/client/approver.c
@@ -14,6 +14,7 @@
#include <stdio.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
GMainLoop *mainloop = NULL;
@@ -139,15 +140,13 @@ int
main (int argc,
char **argv)
{
- TpAccountManager *manager;
GError *error = NULL;
TpBaseClient *approver;
g_type_init ();
tp_debug_set_flags (g_getenv ("EXAMPLE_DEBUG"));
- manager = tp_account_manager_dup ();
- approver = tp_simple_approver_new_with_am (manager, "ExampleApprover",
+ approver = tp_simple_approver_new (NULL, "ExampleApprover",
FALSE, add_dispatch_operation_cb, NULL, NULL);
/* contact text chat */
@@ -158,13 +157,14 @@ main (int argc,
TP_HANDLE_TYPE_CONTACT,
NULL));
- /* call */
+ /* call
tp_base_client_take_approver_filter (approver, tp_asv_new (
TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
TP_IFACE_CHANNEL_TYPE_CALL,
TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
TP_HANDLE_TYPE_CONTACT,
NULL));
+ */
/* room text chat */
tp_base_client_take_approver_filter (approver, tp_asv_new (
@@ -198,7 +198,6 @@ main (int argc,
g_main_loop_unref (mainloop);
out:
- g_object_unref (manager);
g_object_unref (approver);
return 0;
diff --git a/examples/client/contact-list.c b/examples/client/contact-list.c
index 825d8c686..ab34c4f32 100644
--- a/examples/client/contact-list.c
+++ b/examples/client/contact-list.c
@@ -28,7 +28,7 @@ account_manager_prepared_cb (GObject *object,
goto OUT;
}
- for (accounts = tp_account_manager_get_valid_accounts (manager);
+ for (accounts = tp_account_manager_get_usable_accounts (manager);
accounts != NULL; accounts = g_list_delete_link (accounts, accounts))
{
TpAccount *account = accounts->data;
@@ -70,7 +70,7 @@ main (int argc,
char **argv)
{
TpAccountManager *manager;
- TpSimpleClientFactory *factory;
+ TpClientFactory *factory;
GMainLoop *loop;
g_type_init ();
@@ -80,16 +80,16 @@ main (int argc,
manager = tp_account_manager_dup ();
factory = tp_proxy_get_factory (manager);
- tp_simple_client_factory_add_account_features_varargs (factory,
+ tp_client_factory_add_account_features_varargs (factory,
TP_ACCOUNT_FEATURE_CONNECTION,
0);
- tp_simple_client_factory_add_connection_features_varargs (factory,
+ tp_client_factory_add_connection_features_varargs (factory,
TP_CONNECTION_FEATURE_CONTACT_LIST,
0);
- tp_simple_client_factory_add_contact_features_varargs (factory,
+ tp_client_factory_add_contact_features_varargs (factory,
TP_CONTACT_FEATURE_ALIAS,
TP_CONTACT_FEATURE_CONTACT_GROUPS,
- TP_CONTACT_FEATURE_INVALID);
+ 0);
tp_proxy_prepare_async (manager, NULL, account_manager_prepared_cb, loop);
diff --git a/examples/client/dbus-tubes/Makefile.am b/examples/client/dbus-tubes/Makefile.am
index 90411ff32..d30b83b79 100644
--- a/examples/client/dbus-tubes/Makefile.am
+++ b/examples/client/dbus-tubes/Makefile.am
@@ -9,7 +9,9 @@ accepter_SOURCES = accepter.c constants.h
# In an external project you'd use $(TP_GLIB_LIBS) (obtained from
# pkg-config via autoconf) instead of the .la path
LDADD = \
- $(top_builddir)/telepathy-glib/libtelepathy-glib.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
@DBUS_LIBS@ \
@GLIB_LIBS@
diff --git a/examples/client/dbus-tubes/accepter.c b/examples/client/dbus-tubes/accepter.c
index e9c3835b1..0f334cffd 100644
--- a/examples/client/dbus-tubes/accepter.c
+++ b/examples/client/dbus-tubes/accepter.c
@@ -1,4 +1,5 @@
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include "constants.h"
static GMainLoop *loop = NULL;
diff --git a/examples/client/dbus-tubes/offerer.c b/examples/client/dbus-tubes/offerer.c
index 87ffbb9e0..3a26a4ee3 100644
--- a/examples/client/dbus-tubes/offerer.c
+++ b/examples/client/dbus-tubes/offerer.c
@@ -1,4 +1,5 @@
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include "constants.h"
static GMainLoop *loop = NULL;
diff --git a/examples/client/extended-client.c b/examples/client/extended-client.c
index 9231c0bf4..9caa0d567 100644
--- a/examples/client/extended-client.c
+++ b/examples/client/extended-client.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
/* Usually this'd be a top-level extensions/ directory in practice */
#include "examples/extensions/extensions.h"
@@ -177,7 +178,7 @@ conn_ready (GObject *source,
}
/* Get contact object for someone else */
- tp_connection_dup_contact_by_id_async (conn, "other@server", 0, NULL,
+ tp_connection_dup_contact_by_id_async (conn, "other@server", NULL,
contact_ready_cb, NULL);
}
diff --git a/examples/client/inspect-channel.c b/examples/client/inspect-channel.c
index b4492873b..fc4385050 100644
--- a/examples/client/inspect-channel.c
+++ b/examples/client/inspect-channel.c
@@ -14,6 +14,7 @@
#include <stdio.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
typedef struct {
int exit_status;
@@ -64,7 +65,7 @@ channel_ready_cb (GObject *source,
if (tp_proxy_has_interface_by_id (channel,
TP_IFACE_QUARK_CHANNEL_INTERFACE_GROUP))
{
- GPtrArray *members = tp_channel_group_dup_members_contacts (channel);
+ GPtrArray *members = tp_channel_group_dup_members (channel);
guint i;
printf ("Group members:\n");
diff --git a/examples/client/inspect-connection.c b/examples/client/inspect-connection.c
index edf0cfcc4..6c58332ac 100644
--- a/examples/client/inspect-connection.c
+++ b/examples/client/inspect-connection.c
@@ -14,12 +14,13 @@
#include <stdio.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
static int exit_status = 1;
static void
-got_channels (TpConnection *connection,
- const GPtrArray *channels,
+got_channels (TpProxy *connection,
+ const GValue *value,
const GError *error,
gpointer user_data,
GObject *weak_object)
@@ -28,6 +29,7 @@ got_channels (TpConnection *connection,
if (error == NULL)
{
+ GPtrArray *channels = g_value_get_boxed (value);
guint i;
for (i = 0; i < channels->len; i++)
@@ -71,8 +73,8 @@ connection_ready_cb (GObject *source,
printf ("Connection ready\n");
- tp_cli_connection_call_list_channels (connection, -1,
- /* If ListChannels() needed any arguments, they'd go here */
+ tp_cli_dbus_properties_call_get (connection, -1,
+ TP_IFACE_CONNECTION, "Channels",
got_channels, g_main_loop_ref (mainloop),
(GDestroyNotify) g_main_loop_unref, NULL);
}
diff --git a/examples/client/inspect-contact.c b/examples/client/inspect-contact.c
index 2b79da08a..9fe9681ee 100644
--- a/examples/client/inspect-contact.c
+++ b/examples/client/inspect-contact.c
@@ -110,10 +110,11 @@ connection_ready_cb (GObject *source,
GAsyncResult *result,
gpointer user_data)
{
- static TpContactFeature features[] = {
+ GQuark features[] = {
TP_CONTACT_FEATURE_ALIAS,
TP_CONTACT_FEATURE_AVATAR_TOKEN,
- TP_CONTACT_FEATURE_PRESENCE
+ TP_CONTACT_FEATURE_PRESENCE,
+ 0
};
InspectContactData *data = user_data;
TpConnection *connection = TP_CONNECTION (source);
@@ -134,7 +135,7 @@ connection_ready_cb (GObject *source,
tp_connection_upgrade_contacts_async (connection,
1, &self_contact,
- G_N_ELEMENTS (features), features,
+ features,
contacts_upgraded_cb,
data);
}
@@ -142,7 +143,7 @@ connection_ready_cb (GObject *source,
{
tp_connection_dup_contact_by_id_async (connection,
data->to_inspect,
- G_N_ELEMENTS (features), features,
+ features,
got_contacts_by_id,
data);
}
diff --git a/examples/client/media-observer.c b/examples/client/media-observer.c
index 0d9a6940d..464965887 100644
--- a/examples/client/media-observer.c
+++ b/examples/client/media-observer.c
@@ -48,9 +48,11 @@ observe_channels_cb (TpSimpleObserver *self,
TpChannel *channel = l->data;
gboolean requested;
+ /*
if (tp_strdiff (tp_channel_get_channel_type (channel),
TP_IFACE_CHANNEL_TYPE_CALL))
continue;
+ */
requested = tp_channel_get_requested (channel);
@@ -83,12 +85,14 @@ main (int argc,
observer = tp_simple_observer_new_with_am (manager, FALSE,
"ExampleMediaObserver", FALSE, observe_channels_cb, NULL, NULL);
+ /*
tp_base_client_take_observer_filter (observer, tp_asv_new (
TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
TP_IFACE_CHANNEL_TYPE_CALL,
TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT,
TP_HANDLE_TYPE_CONTACT,
NULL));
+ */
if (!tp_base_client_register (observer, &error))
{
diff --git a/examples/client/stream-tubes/Makefile.am b/examples/client/stream-tubes/Makefile.am
index fb2259d6b..5cc7340f6 100644
--- a/examples/client/stream-tubes/Makefile.am
+++ b/examples/client/stream-tubes/Makefile.am
@@ -7,11 +7,14 @@ offerer_SOURCES = offerer.c
accepter_SOURCES = accepter.c
# In an external project you'd use $(TP_GLIB_LIBS) (obtained from
-# pkg-config via autoconf) instead of the .la path
+# pkg-config via autoconf) instead of these .la paths
LDADD = \
- $(top_builddir)/telepathy-glib/libtelepathy-glib.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
@DBUS_LIBS@ \
- @GLIB_LIBS@
+ @GLIB_LIBS@ \
+ $(NULL)
AM_CFLAGS = \
$(ERROR_CFLAGS) \
diff --git a/examples/client/stream-tubes/accepter.c b/examples/client/stream-tubes/accepter.c
index 79e8eff80..f26e100d1 100644
--- a/examples/client/stream-tubes/accepter.c
+++ b/examples/client/stream-tubes/accepter.c
@@ -1,4 +1,5 @@
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
static GMainLoop *loop = NULL;
diff --git a/examples/client/stream-tubes/offerer.c b/examples/client/stream-tubes/offerer.c
index 3ba010623..8c263a48f 100644
--- a/examples/client/stream-tubes/offerer.c
+++ b/examples/client/stream-tubes/offerer.c
@@ -1,4 +1,5 @@
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
static GMainLoop *loop = NULL;
diff --git a/examples/client/text-handler.c b/examples/client/text-handler.c
index d2c0aa232..d8e602cd0 100644
--- a/examples/client/text-handler.c
+++ b/examples/client/text-handler.c
@@ -15,6 +15,7 @@
#include <glib.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
static void
echo_message (TpTextChannel *channel,
@@ -24,15 +25,9 @@ echo_message (TpTextChannel *channel,
gchar *text;
gchar *up;
TpMessage *reply;
- TpChannelTextMessageFlags flags;
const gchar *comment = "";
- text = tp_message_to_text (message, &flags);
-
- if (flags & TP_CHANNEL_TEXT_MESSAGE_FLAG_NON_TEXT_CONTENT)
- {
- comment = " (and some non-text content we don't understand)";
- }
+ text = tp_message_to_text (message);
if (pending)
g_print ("pending: '%s' %s\n", text, comment);
@@ -120,15 +115,13 @@ main (int argc,
char **argv)
{
GMainLoop *mainloop;
- TpAccountManager *manager;
GError *error = NULL;
TpBaseClient *handler;
g_type_init ();
tp_debug_set_flags (g_getenv ("EXAMPLE_DEBUG"));
- manager = tp_account_manager_dup ();
- handler = tp_simple_handler_new_with_am (manager, FALSE, FALSE,
+ handler = tp_simple_handler_new (NULL, FALSE, FALSE,
"ExampleHandler", FALSE, handle_channels_cb, NULL, NULL);
tp_base_client_take_handler_filter (handler, tp_asv_new (
@@ -155,7 +148,6 @@ main (int argc,
g_main_loop_unref (mainloop);
out:
- g_object_unref (manager);
g_object_unref (handler);
return 0;
diff --git a/examples/cm/call/Makefile.am b/examples/cm/call/Makefile.am
index 3b7ad1fac..c07aa99eb 100644
--- a/examples/cm/call/Makefile.am
+++ b/examples/cm/call/Makefile.am
@@ -54,7 +54,9 @@ clean-local:
# pkg-config via autoconf) instead of the .la path, and put it last; we use
# a different format here because we're part of the telepathy-glib source tree.
LDADD = \
- $(top_builddir)/telepathy-glib/libtelepathy-glib.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(NULL)
diff --git a/examples/cm/call/call-manager.c b/examples/cm/call/call-manager.c
index f637f2b41..242e5e562 100644
--- a/examples/cm/call/call-manager.c
+++ b/examples/cm/call/call-manager.c
@@ -29,6 +29,7 @@
#include <dbus/dbus-glib.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include "call-channel.h"
diff --git a/examples/cm/call/conn.c b/examples/cm/call/conn.c
index fbe885d75..c72b98a4e 100644
--- a/examples/cm/call/conn.c
+++ b/examples/cm/call/conn.c
@@ -26,6 +26,7 @@
#include <dbus/dbus-glib.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include "call-manager.h"
#include "protocol.h"
@@ -36,9 +37,7 @@ G_DEFINE_TYPE_WITH_CODE (ExampleCallConnection,
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACTS,
tp_contacts_mixin_iface_init);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE,
- tp_presence_mixin_iface_init);
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
- tp_presence_mixin_simple_presence_iface_init))
+ tp_presence_mixin_iface_init))
enum
{
@@ -226,7 +225,7 @@ constructed (GObject *object)
tp_presence_mixin_init (object,
G_STRUCT_OFFSET (ExampleCallConnection, presence_mixin));
- tp_presence_mixin_simple_presence_register_with_contacts_mixin (object);
+ tp_presence_mixin_register_with_contacts_mixin (object);
}
static gboolean
@@ -365,7 +364,6 @@ static const gchar *interfaces_always_present[] = {
TP_IFACE_CONNECTION_INTERFACE_CONTACTS,
TP_IFACE_CONNECTION_INTERFACE_PRESENCE,
TP_IFACE_CONNECTION_INTERFACE_REQUESTS,
- TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
NULL };
const gchar * const *
@@ -422,5 +420,5 @@ example_call_connection_class_init (
G_STRUCT_OFFSET (ExampleCallConnectionClass, presence_mixin),
status_available, get_contact_statuses, set_own_status,
presence_statuses);
- tp_presence_mixin_simple_presence_init_dbus_properties (object_class);
+ tp_presence_mixin_init_dbus_properties (object_class);
}
diff --git a/examples/cm/call/example_call.manager b/examples/cm/call/example_call.manager
index c832d0326..e1acc0e95 100644
--- a/examples/cm/call/example_call.manager
+++ b/examples/cm/call/example_call.manager
@@ -3,7 +3,7 @@ Interfaces=
[Protocol example]
Interfaces=
-ConnectionInterfaces=org.freedesktop.Telepathy.Connection.Interface.Requests;org.freedesktop.Telepathy.Connection.Interface.Contacts;org.freedesktop.Telepathy.Connection.Interface.Presence;org.freedesktop.Telepathy.Connection.Interface.SimplePresence;
+ConnectionInterfaces=im.telepathy1.Connection.Interface.Requests;im.telepathy1.Connection.Interface.Contacts;im.telepathy1.Connection.Interface.Presence;
param-account=s required register
param-simulation-delay=u
default-simulation-delay=1000
@@ -13,13 +13,13 @@ EnglishName=Example with Call channels
Icon=face-smile
[audio]
-org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Call1
-org.freedesktop.Telepathy.Channel.TargetHandleType u=1
-org.freedesktop.Telepathy.Channel.Type.Call1.InitialAudio b=1
-allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;org.freedesktop.Telepathy.Channel.Type.Call1.InitialVideo;
+im.telepathy1.Channel.ChannelType s=im.telepathy1.Channel.Type.Call1
+im.telepathy1.Channel.TargetHandleType u=1
+im.telepathy1.Channel.Type.Call1.InitialAudio b=1
+allowed=im.telepathy1.Channel.TargetHandle;im.telepathy1.Channel.TargetID;im.telepathy1.Channel.Type.Call1.InitialVideo;
[video]
-org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Call1
-org.freedesktop.Telepathy.Channel.TargetHandleType u=1
-org.freedesktop.Telepathy.Channel.Type.Call1.InitialVideo b=1
-allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;org.freedesktop.Telepathy.Channel.Type.Call1.InitialAudio;
+im.telepathy1.Channel.ChannelType s=im.telepathy1.Channel.Type.Call1
+im.telepathy1.Channel.TargetHandleType u=1
+im.telepathy1.Channel.Type.Call1.InitialVideo b=1
+allowed=im.telepathy1.Channel.TargetHandle;im.telepathy1.Channel.TargetID;im.telepathy1.Channel.Type.Call1.InitialAudio;
diff --git a/examples/cm/channelspecific/Makefile.am b/examples/cm/channelspecific/Makefile.am
index d0c5a6a8a..a32b51492 100644
--- a/examples/cm/channelspecific/Makefile.am
+++ b/examples/cm/channelspecific/Makefile.am
@@ -51,7 +51,9 @@ clean-local:
# pkg-config via autoconf) instead of the .la path, and put it last; we use
# a different format here because we're part of the telepathy-glib source tree.
LDADD = \
- $(top_builddir)/telepathy-glib/libtelepathy-glib.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(NULL)
diff --git a/examples/cm/channelspecific/conn.c b/examples/cm/channelspecific/conn.c
index f7957cc46..3e516d62d 100644
--- a/examples/cm/channelspecific/conn.c
+++ b/examples/cm/channelspecific/conn.c
@@ -16,6 +16,7 @@
#include <dbus/dbus-glib.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include "protocol.h"
#include "room-manager.h"
diff --git a/examples/cm/channelspecific/room-manager.c b/examples/cm/channelspecific/room-manager.c
index 5aa164419..56cd7673f 100644
--- a/examples/cm/channelspecific/room-manager.c
+++ b/examples/cm/channelspecific/room-manager.c
@@ -14,6 +14,7 @@
#include <dbus/dbus-glib.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include "room.h"
diff --git a/examples/cm/channelspecific/room.c b/examples/cm/channelspecific/room.c
index c701f5ae7..c8ce6cf7f 100644
--- a/examples/cm/channelspecific/room.c
+++ b/examples/cm/channelspecific/room.c
@@ -18,9 +18,7 @@ G_DEFINE_TYPE_WITH_CODE (ExampleCSHRoomChannel,
example_csh_room_channel,
TP_TYPE_BASE_CHANNEL,
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TEXT,
- tp_message_mixin_text_iface_init);
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_MESSAGES,
- tp_message_mixin_messages_iface_init);
+ tp_message_mixin_iface_init);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_GROUP,
tp_group_mixin_iface_init);)
@@ -46,7 +44,6 @@ example_csh_room_channel_get_interfaces (TpBaseChannel *self)
get_interfaces (self);
g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_GROUP);
- g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_MESSAGES);
return interfaces;
};
@@ -100,6 +97,7 @@ complete_join (ExampleCSHRoomChannel *self)
TpHandle alice_global, bob_global, chris_global;
TpGroupMixin *mixin = TP_GROUP_MIXIN (self);
TpIntset *added;
+ GHashTable *details;
/* For this example, we assume that all chatrooms initially contain
* Alice, Bob and Chris (and that their global IDs are also known),
@@ -146,9 +144,16 @@ complete_join (ExampleCSHRoomChannel *self)
conn->self_handle);
tp_group_mixin_change_self_handle ((GObject *) self, new_self);
- tp_group_mixin_change_members ((GObject *) self, "", NULL, removed, NULL,
- rp, 0, TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED);
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, "",
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED,
+ "actor", G_TYPE_UINT, 0,
+ NULL);
+ tp_group_mixin_change_members ((GObject *) self, NULL, removed, NULL,
+ rp, details);
+
+ tp_clear_pointer (&details, g_hash_table_unref);
tp_intset_destroy (removed);
tp_intset_destroy (rp);
}
@@ -171,8 +176,16 @@ complete_join (ExampleCSHRoomChannel *self)
tp_intset_add (added, anon_local);
tp_intset_add (added, mixin->self_handle);
- tp_group_mixin_change_members ((GObject *) self, "", added, NULL, NULL,
- NULL, 0, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, "",
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
+ "actor", G_TYPE_UINT, 0,
+ NULL);
+
+ tp_group_mixin_change_members ((GObject *) self, added, NULL, NULL,
+ NULL, details);
+
+ tp_clear_pointer (&details, g_hash_table_unref);
/* now that the dust has settled, we can also invite people */
tp_group_mixin_change_flags ((GObject *) self,
@@ -188,6 +201,7 @@ join_room (ExampleCSHRoomChannel *self)
TpGroupMixin *mixin = TP_GROUP_MIXIN (self);
GObject *object = (GObject *) self;
TpIntset *add_remote_pending;
+ GHashTable *details;
g_assert (!tp_handle_set_is_member (mixin->members, mixin->self_handle));
g_assert (!tp_handle_set_is_member (mixin->remote_pending,
@@ -198,12 +212,18 @@ join_room (ExampleCSHRoomChannel *self)
add_remote_pending = tp_intset_new ();
tp_intset_add (add_remote_pending, mixin->self_handle);
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, "",
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
+ "actor", G_TYPE_UINT, conn->self_handle,
+ NULL);
+
tp_group_mixin_add_handle_owner (object, mixin->self_handle,
conn->self_handle);
- tp_group_mixin_change_members (object, "", NULL, NULL, NULL,
- add_remote_pending, conn->self_handle,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+ tp_group_mixin_change_members (object, NULL, NULL, NULL,
+ add_remote_pending, details);
+ g_hash_table_unref (details);
tp_intset_destroy (add_remote_pending);
/* Actually join the room. In a real implementation this would be a network
@@ -266,8 +286,7 @@ constructor (GType type,
/* Initially, we can't do anything. */
tp_group_mixin_change_flags (object,
- TP_CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES |
- TP_CHANNEL_GROUP_FLAG_PROPERTIES,
+ TP_CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES,
0);
/* Immediately attempt to join the group */
diff --git a/examples/cm/contactlist/Makefile.am b/examples/cm/contactlist/Makefile.am
index b4933fcf9..8e6472df9 100644
--- a/examples/cm/contactlist/Makefile.am
+++ b/examples/cm/contactlist/Makefile.am
@@ -47,7 +47,9 @@ clean-local:
# pkg-config via autoconf) instead of the .la path, and put it last; we use
# a different format here because we're part of the telepathy-glib source tree.
LDADD = \
- $(top_builddir)/telepathy-glib/libtelepathy-glib.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(NULL)
diff --git a/examples/cm/contactlist/conn.c b/examples/cm/contactlist/conn.c
index 2317eda4c..c033d420c 100644
--- a/examples/cm/contactlist/conn.c
+++ b/examples/cm/contactlist/conn.c
@@ -16,6 +16,7 @@
#include <dbus/dbus-glib.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include "contact-list.h"
#include "protocol.h"
@@ -36,9 +37,7 @@ G_DEFINE_TYPE_WITH_CODE (ExampleContactListConnection,
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_BLOCKING,
tp_base_contact_list_mixin_blocking_iface_init);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE,
- tp_presence_mixin_iface_init);
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
- tp_presence_mixin_simple_presence_iface_init))
+ tp_presence_mixin_iface_init))
enum
{
@@ -204,24 +203,7 @@ presence_updated_cb (ExampleContactList *contact_list,
static GPtrArray *
create_channel_managers (TpBaseConnection *conn)
{
- ExampleContactListConnection *self =
- EXAMPLE_CONTACT_LIST_CONNECTION (conn);
- GPtrArray *ret = g_ptr_array_sized_new (1);
-
- self->priv->contact_list = EXAMPLE_CONTACT_LIST (g_object_new (
- EXAMPLE_TYPE_CONTACT_LIST,
- "connection", conn,
- "simulation-delay", self->priv->simulation_delay,
- NULL));
-
- g_signal_connect (self->priv->contact_list, "alias-updated",
- G_CALLBACK (alias_updated_cb), self);
- g_signal_connect (self->priv->contact_list, "presence-updated",
- G_CALLBACK (presence_updated_cb), self);
-
- g_ptr_array_add (ret, self->priv->contact_list);
-
- return ret;
+ return g_ptr_array_sized_new (0);
}
static gboolean
@@ -281,6 +263,7 @@ aliasing_fill_contact_attributes (GObject *object,
static void
constructed (GObject *object)
{
+ ExampleContactListConnection *self = EXAMPLE_CONTACT_LIST_CONNECTION (object);
TpBaseConnection *base = TP_BASE_CONNECTION (object);
void (*chain_up) (GObject *) =
G_OBJECT_CLASS (example_contact_list_connection_parent_class)->constructed;
@@ -292,7 +275,20 @@ constructed (GObject *object)
G_STRUCT_OFFSET (ExampleContactListConnection, contacts_mixin));
tp_base_connection_register_with_contacts_mixin (base);
- tp_base_contact_list_mixin_register_with_contacts_mixin (base);
+
+ self->priv->contact_list = EXAMPLE_CONTACT_LIST (g_object_new (
+ EXAMPLE_TYPE_CONTACT_LIST,
+ "connection", self,
+ "simulation-delay", self->priv->simulation_delay,
+ NULL));
+
+ g_signal_connect (self->priv->contact_list, "alias-updated",
+ G_CALLBACK (alias_updated_cb), self);
+ g_signal_connect (self->priv->contact_list, "presence-updated",
+ G_CALLBACK (presence_updated_cb), self);
+
+ tp_base_contact_list_mixin_register_with_contacts_mixin (
+ TP_BASE_CONTACT_LIST (self->priv->contact_list), base);
tp_contacts_mixin_add_contact_attributes_iface (object,
TP_IFACE_CONNECTION_INTERFACE_ALIASING,
@@ -300,7 +296,7 @@ constructed (GObject *object)
tp_presence_mixin_init (object,
G_STRUCT_OFFSET (ExampleContactListConnection, presence_mixin));
- tp_presence_mixin_simple_presence_register_with_contacts_mixin (object);
+ tp_presence_mixin_register_with_contacts_mixin (object);
}
static gboolean
@@ -398,7 +394,6 @@ static const gchar *interfaces_always_present[] = {
TP_IFACE_CONNECTION_INTERFACE_CONTACT_BLOCKING,
TP_IFACE_CONNECTION_INTERFACE_PRESENCE,
TP_IFACE_CONNECTION_INTERFACE_REQUESTS,
- TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
NULL };
const gchar * const *
@@ -450,7 +445,7 @@ example_contact_list_connection_class_init (
G_STRUCT_OFFSET (ExampleContactListConnectionClass, presence_mixin),
status_available, get_contact_statuses, set_own_status,
example_contact_list_presence_statuses ());
- tp_presence_mixin_simple_presence_init_dbus_properties (object_class);
+ tp_presence_mixin_init_dbus_properties (object_class);
tp_base_contact_list_mixin_class_init (base_class);
}
diff --git a/examples/cm/contactlist/example_contact_list.manager b/examples/cm/contactlist/example_contact_list.manager
index 379d822b4..e5216af59 100644
--- a/examples/cm/contactlist/example_contact_list.manager
+++ b/examples/cm/contactlist/example_contact_list.manager
@@ -3,7 +3,7 @@ Interfaces=
[Protocol example]
Interfaces=
-ConnectionInterfaces=org.freedesktop.Telepathy.Connection.Interface.Requests;org.freedesktop.Telepathy.Connection.Interface.Contacts;org.freedesktop.Telepathy.Connection.Interface.Presence;org.freedesktop.Telepathy.Connection.Interface.SimplePresence;
+ConnectionInterfaces=im.telepathy1.Connection.Interface.Requests;im.telepathy1.Connection.Interface.Contacts;im.telepathy1.Connection.Interface.Presence;
param-account=s required register
param-simulation-delay=u
default-simulation-delay=1000
@@ -13,11 +13,11 @@ EnglishName=Example with a contact list
Icon=face-smile
[contactlist]
-org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.ContactList
-org.freedesktop.Telepathy.Channel.TargetHandleType u=3
-allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;
+im.telepathy1.Channel.ChannelType s=im.telepathy1.Channel.Type.ContactList
+im.telepathy1.Channel.TargetHandleType u=3
+allowed=im.telepathy1.Channel.TargetHandle;im.telepathy1.Channel.TargetID;
[contactgroup]
-org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.ContactList
-org.freedesktop.Telepathy.Channel.TargetHandleType u=4
-allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;
+im.telepathy1.Channel.ChannelType s=im.telepathy1.Channel.Type.ContactList
+im.telepathy1.Channel.TargetHandleType u=4
+allowed=im.telepathy1.Channel.TargetHandle;im.telepathy1.Channel.TargetID;
diff --git a/examples/cm/echo-message-parts/Makefile.am b/examples/cm/echo-message-parts/Makefile.am
index 609a18514..be32c8c05 100644
--- a/examples/cm/echo-message-parts/Makefile.am
+++ b/examples/cm/echo-message-parts/Makefile.am
@@ -47,7 +47,9 @@ clean-local:
# pkg-config via autoconf) instead of the .la path, and put it last; we use
# a different format here because we're part of the telepathy-glib source tree.
LDADD = \
- $(top_builddir)/telepathy-glib/libtelepathy-glib.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(NULL)
diff --git a/examples/cm/echo-message-parts/chan.c b/examples/cm/echo-message-parts/chan.c
index 3d1d85392..47325793b 100644
--- a/examples/cm/echo-message-parts/chan.c
+++ b/examples/cm/echo-message-parts/chan.c
@@ -28,9 +28,7 @@ G_DEFINE_TYPE_WITH_CODE (ExampleEcho2Channel,
example_echo_2_channel,
TP_TYPE_BASE_CHANNEL,
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TEXT,
- tp_message_mixin_text_iface_init)
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_MESSAGES,
- tp_message_mixin_messages_iface_init)
+ tp_message_mixin_iface_init)
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_CHAT_STATE,
tp_message_mixin_chat_state_iface_init)
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_DESTROYABLE,
@@ -48,7 +46,6 @@ example_echo_2_channel_get_interfaces (TpBaseChannel *self)
interfaces = TP_BASE_CHANNEL_CLASS (example_echo_2_channel_parent_class)->
get_interfaces (self);
- g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_MESSAGES);
g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_DESTROYABLE);
g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_SMS);
g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_CHAT_STATE);
@@ -269,10 +266,10 @@ example_echo_2_channel_fill_immutable_properties (TpBaseChannel *chan,
tp_dbus_properties_mixin_fill_properties_hash (
G_OBJECT (chan), properties,
- TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "MessagePartSupportFlags",
- TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "DeliveryReportingSupport",
- TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "SupportedContentTypes",
- TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "MessageTypes",
+ TP_IFACE_CHANNEL_TYPE_TEXT, "MessagePartSupportFlags",
+ TP_IFACE_CHANNEL_TYPE_TEXT, "DeliveryReportingSupport",
+ TP_IFACE_CHANNEL_TYPE_TEXT, "SupportedContentTypes",
+ TP_IFACE_CHANNEL_TYPE_TEXT, "MessageTypes",
TP_IFACE_CHANNEL_INTERFACE_SMS, "Flash",
NULL);
}
@@ -422,7 +419,7 @@ sms_get_sms_length (TpSvcChannelInterfaceSMS *self,
(GBoxedCopyFunc) tp_g_value_slice_dup);
}
- txt = tp_message_to_text (message, NULL);
+ txt = tp_message_to_text (message);
len = strlen (txt);
tp_svc_channel_interface_sms_return_from_get_sms_length (context, len,
diff --git a/examples/cm/echo-message-parts/conn.c b/examples/cm/echo-message-parts/conn.c
index 7e6e4c0ec..ac2793ac4 100644
--- a/examples/cm/echo-message-parts/conn.c
+++ b/examples/cm/echo-message-parts/conn.c
@@ -14,6 +14,7 @@
#include <dbus/dbus-glib.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include "im-manager.h"
#include "protocol.h"
diff --git a/examples/cm/echo-message-parts/im-manager.c b/examples/cm/echo-message-parts/im-manager.c
index 6451fb8f8..369b31832 100644
--- a/examples/cm/echo-message-parts/im-manager.c
+++ b/examples/cm/echo-message-parts/im-manager.c
@@ -16,6 +16,7 @@
#include <dbus/dbus-glib.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include "chan.h"
diff --git a/examples/cm/echo-message-parts/protocol.c b/examples/cm/echo-message-parts/protocol.c
index 7981fedaa..3ba69b4db 100644
--- a/examples/cm/echo-message-parts/protocol.c
+++ b/examples/cm/echo-message-parts/protocol.c
@@ -11,6 +11,7 @@
#include "protocol.h"
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include "conn.h"
#include "im-manager.h"
diff --git a/examples/cm/extended/Makefile.am b/examples/cm/extended/Makefile.am
index 437e5614a..98e6c7a2d 100644
--- a/examples/cm/extended/Makefile.am
+++ b/examples/cm/extended/Makefile.am
@@ -36,7 +36,9 @@ clean-local:
# a different format here because we're part of the telepathy-glib source tree.
LDADD = \
$(top_builddir)/examples/extensions/libexample-extensions.la \
- $(top_builddir)/telepathy-glib/libtelepathy-glib.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(NULL)
diff --git a/examples/cm/extended/conn.c b/examples/cm/extended/conn.c
index 69e99cc0b..2cd95465f 100644
--- a/examples/cm/extended/conn.c
+++ b/examples/cm/extended/conn.c
@@ -16,6 +16,7 @@
#include <dbus/dbus-glib.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
/* This would conventionally be extensions/extensions.h */
#include "examples/extensions/extensions.h"
@@ -136,7 +137,7 @@ create_handle_repos (TpBaseConnection *conn,
}
static GPtrArray *
-create_channel_factories (TpBaseConnection *conn)
+create_channel_managers (TpBaseConnection *conn)
{
return g_ptr_array_sized_new (0);
}
@@ -216,7 +217,7 @@ example_extended_connection_class_init (ExampleExtendedConnectionClass *klass)
base_class->create_handle_repos = create_handle_repos;
base_class->get_unique_connection_name = get_unique_connection_name;
- base_class->create_channel_factories = create_channel_factories;
+ base_class->create_channel_managers = create_channel_managers;
base_class->start_connecting = start_connecting;
base_class->shut_down = shut_down;
diff --git a/examples/cm/no-protocols/Makefile.am b/examples/cm/no-protocols/Makefile.am
index f12c374db..e3f541831 100644
--- a/examples/cm/no-protocols/Makefile.am
+++ b/examples/cm/no-protocols/Makefile.am
@@ -31,7 +31,9 @@ clean-local:
# pkg-config via autoconf) instead of the .la path, and put it last; we use
# a different format here because we're part of the telepathy-glib source tree.
LDADD = \
- $(top_builddir)/telepathy-glib/libtelepathy-glib.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(NULL)
diff --git a/examples/extensions/Makefile.am b/examples/extensions/Makefile.am
index ab778d1b9..47c1e9e5c 100644
--- a/examples/extensions/Makefile.am
+++ b/examples/extensions/Makefile.am
@@ -30,7 +30,10 @@ noinst_LTLIBRARIES = libexample-extensions.la
libexample_extensions_la_LIBADD = \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
- $(top_builddir)/telepathy-glib/libtelepathy-glib.la
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
+ $(NULL)
# The client-specific parts are built into a separate .o file, so the linker
# can discard them when linking services. The service-specific parts are
diff --git a/next-NEWS b/next-NEWS
new file mode 100644
index 000000000..15fa8f15b
--- /dev/null
+++ b/next-NEWS
@@ -0,0 +1,48 @@
+API/Behaviour changes
+=====================
+
+ - The library has been split in half. To use high-level APIs, use the
+ pkg-config module "telepathy-glib-1" and
+ #include <telepathy-glib/telepathy-glib.h>. To use lower-level APIs that
+ rely on dbus-glib GTypes or specific D-Bus interfaces, methods or signals,
+ also use the pkg-config module "telepathy-glib-1-dbus" and
+ #include <telepathy-glib/telepathy-glib-dbus.h>.
+
+ - TpSimpleClientFactory got renamed to TpClientFactory
+
+ - tp_automatic_client_factory_new() now returns a TpSimpleClientFactory*
+ for less boring casting.
+
+ - Tp{Basic,Automatic}ProxyFactory and TpClientChannelFactory, as well as all
+ related APIs got removed. TpClientFactory and TpAutomaricClientFactory are
+ their replacement.
+
+ - tp_simple_{observer,approver,handler}_new() now takes a TpClientFactory as
+ first argument, and _new_with_factory() got removed.
+
+ - TpBaseClient lost its "account-manager" property, applications only
+ interested by channels does not have to create a full TpAccountManager,
+ TpAccount objects will be created only when a channel comes up for that
+ account.
+
+ - TpContact now uses GQuark instead of TpContactFeature. This make them
+ consistent with TpProxy features.
+
+ - TpAutomaticClientFactory now only has CORE features by default, other
+ features must be added explicitly by the user using
+ tp_client_factory_add_*_features().
+
+ - TP_CHANNEL_FEATURE_CONTACTS is removed:
+ * TpChannel:target-contact and TpChannel:initiator-contact are now prepared
+ as part of TP_CHANNEL_FEATURE_CORE;
+ * group TpContacts are now prepared as part of TP_CHANNEL_FEATURE_GROUP.
+
+ - TP_CHANNEL_FEATURE_GROUP is not CORE anymore, so must be request explicitly
+ to introspect Group interface.
+
+ - Some of the Group APIs of TpChannel has been renamed:
+ * tp_channel_group_dup_members_contacts -> tp_channel_group_dup_members;
+ * tp_channel_group_dup_local_pending_contacts -> tp_channel_group_dup_local_pending;
+ * tp_channel_group_get_local_pending_contact_info -> tp_channel_group_get_local_pending_info;
+ * tp_channel_group_dup_remote_pending_contacts -> tp_channel_group_dup_remote_pending;
+ * "group-contacts-changed" -> "group-members-changed".
diff --git a/spec/Account.xml b/spec/Account.xml
index fff0232dd..b700b8fa2 100644
--- a/spec/Account.xml
+++ b/spec/Account.xml
@@ -19,25 +19,25 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Account">
+ <interface name="im.telepathy1.Account">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An Account object encapsulates the necessary details to make a
Telepathy connection.</p>
<p>Accounts are uniquely identified by object path. The object path
of an Account MUST take the form
- <code>/org/freedesktop/Telepathy/Account/<em>cm</em>/<em>proto</em>/<em>acct</em></code>, where:</p>
+ <code>/im/telepathy1/Account/<em>cm</em>/<em>proto</em>/<em>acct</em></code>, where:</p>
<ul>
<li><em>cm</em> is the same <tp:type>Connection_Manager_Name</tp:type>
that appears in the connection manager's well-known bus name and
object path</li>
- <li><em>proto</em> is the <tp:type>Protocol</tp:type> name as seen in
+ <li><em>proto</em> is the <tp:type>Protocol_Name</tp:type> as seen in
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ConnectionManager.ListProtocols</tp:dbus-ref>,
+ namespace="im.telepathy1">ConnectionManager.Protocols</tp:dbus-ref>,
but with "-" replaced with "_"
(i.e. the same as in the object-path of a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>)</li>
+ namespace="im.telepathy1">Connection</tp:dbus-ref>)</li>
<li><em>acct</em> is an arbitrary string of ASCII letters, digits
and underscores, starting with a letter or underscore, which
uniquely identifies this account</li>
@@ -117,7 +117,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<method name="Remove" tp:name-for-bindings="Remove">
<tp:docstring>Delete the account.</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
</tp:possible-errors>
</method>
@@ -127,7 +127,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:rationale>
This is redundant with <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.AccountManager">AccountRemoved</tp:dbus-ref>,
+ namespace="im.telepathy1.AccountManager">AccountRemoved</tp:dbus-ref>,
but it's still worth having,
to avoid having to bind to AccountManager.AccountRemoved to tell
you whether your Account is valid — ideally, an account-editing UI
@@ -175,7 +175,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:docstring>
</property>
- <property name="Valid" tp:name-for-bindings="Valid"
+ <property name="Usable" tp:name-for-bindings="Usable"
type="b" access="read">
<tp:docstring>
If true, this account is considered by the account manager to be
@@ -235,7 +235,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
The nickname to set on this account for display to other contacts,
as set by the user. When the account becomes connected, the
account manager SHOULD set this as the user's alias using <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Aliasing">SetAliases</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface.Aliasing1">SetAliases</tp:dbus-ref>
if appropriate.
<tp:rationale>
@@ -256,23 +256,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
user-recognised brands, such as <i>Google Talk</i> and <i>Ovi by
Nokia</i>. On accounts for such services, this property SHOULD be
set to a string describing the service, which MUST consist only of
- ASCII letters, numbers and hyphen/minus signs, and start with a
- letter (matching the requirements for <tp:type>Protocol</tp:type>).
+ ASCII letters, numbers and underscores, and start with a
+ letter (matching the requirements for
+ <tp:type>Protocol_Name</tp:type>).
For the <tt>jabber</tt> protocol, one of the following service names
should be used if possible:</p>
<ul>
- <li><tt>google-talk</tt> (for <a
+ <li><tt>google_talk</tt> (for <a
href="http://www.google.com/talk/">Google's IM service</a>)</li>
- <li><tt>ovi-chat</tt> (for <a href="http://www.ovi.com/">Ovi</a>'s IM
+ <li><tt>ovi_chat</tt> (for <a href="http://www.ovi.com/">Ovi</a>'s IM
service)</li>
<li><tt>facebook</tt> (for <a
href="http://www.facebook.com/sitetour/chat.php">Facebook's IM
service</a>)</li>
- <li><tt>lj-talk</tt> (for <a
+ <li><tt>lj_talk</tt> (for <a
href="http://www.livejournal.com/chat/">LiveJournal's IM
service</a>)</li>
- <li><tt>windows-live</tt> (for <a
+ <li><tt>windows_live</tt> (for <a
href="http://live.com">Windows Live Messenger IM service</a>)</li>
</ul>
@@ -291,10 +292,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>This property MAY be set, if appropriate, when calling
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.AccountManager"
+ namespace="im.telepathy1.AccountManager"
>CreateAccount</tp:dbus-ref>. Updating this property will fail on
externally-stored accounts whose <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account.Interface.Storage"
+ namespace="im.telepathy1.Account.Interface.Storage1"
>StorageRestrictions</tp:dbus-ref> include
<code>Cannot_Set_Service</code>.</p>
</tp:docstring>
@@ -305,7 +306,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A map from connection manager parameter names (as in the
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ConnectionManager</tp:dbus-ref>
+ namespace="im.telepathy1">ConnectionManager</tp:dbus-ref>
interface) to their values. This property includes
only those parameters that are stored for this account, and SHOULD
only include those parameters that the user has explicitly set.
@@ -379,7 +380,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
the empty list, signifying that no reconnection is required for the
new parameters to take effect. For example, if the only parameter
updated is <tt>...Cellular.<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Cellular">MessageValidityPeriod</tp:dbus-ref></tt>,
+ namespace="im.telepathy1.Connection.Interface.Cellular1">MessageValidityPeriod</tp:dbus-ref></tt>,
the new value can be applied immediately to the connection.</p>
<p>Otherwise, a list of the names of parameters with changes that
@@ -388,7 +389,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:member-ref>Reconnect</tp:member-ref> in response to receiving a
non-empty list. For example, if the caller updates both
<tt>...Anonymity.<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Anonymity">AnonymityMandatory</tp:dbus-ref></tt>
+ namespace="im.telepathy1.Connection.Interface.Anonymity1">AnonymityMandatory</tp:dbus-ref></tt>
and <tt>require-encryption</tt>, the former can be applied to the
current connection, but the latter needs a reconnect to take
effect, so this method should return
@@ -397,13 +398,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument"/>
</tp:possible-errors>
</method>
<property name="AutomaticPresence" type="(uss)" access="readwrite"
- tp:type="Simple_Presence" tp:name-for-bindings="Automatic_Presence">
+ tp:type="Presence" tp:name-for-bindings="Automatic_Presence">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The presence status that this account should have if it is brought
online.</p>
@@ -449,7 +450,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
type="o" access="read">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Either the object path of the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref> to
+ namespace="im.telepathy1">Connection</tp:dbus-ref> to
this account, or the special value <code>'/'</code> if there is no
connection.</p>
@@ -506,9 +507,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>If the last connection to this account failed with an error,
the D-Bus error name of that error; otherwise, the empty string.
The account manager is expected to set this by observing the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>Connection.ConnectionError</tp:dbus-ref> and
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>Connection.StatusChanged</tp:dbus-ref>
signals.</p>
@@ -537,7 +538,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
a mapping representing any additional information about the last
disconnection; otherwise, the empty map. The keys and values are
the same as for the second argument of
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>Connection.ConnectionError</tp:dbus-ref>.</p>
<p>Whenever the Connection connects successfully, this property should
@@ -552,13 +553,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</property>
<property name="CurrentPresence" type="(uss)" access="read"
- tp:type="Simple_Presence" tp:name-for-bindings="Current_Presence">
+ tp:type="Presence" tp:name-for-bindings="Current_Presence">
<tp:docstring>
The actual presence. If the connection is not online, the
<tp:type>Connection_Presence_Type</tp:type> SHOULD be
Connection_Presence_Type_Offline.
If the connection is online but does not support the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">SimplePresence</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface">Presence1</tp:dbus-ref>
interface, the type SHOULD be Connection_Presence_Type_Unset.
The account manager is expected to set this by observing signals
from the Connection.
@@ -566,7 +567,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</property>
<property name="RequestedPresence" type="(uss)" access="readwrite"
- tp:type="Simple_Presence" tp:name-for-bindings="Requested_Presence">
+ tp:type="Presence" tp:name-for-bindings="Requested_Presence">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The requested presence for this account. When this is changed, the
account manager should attempt to manipulate the connection manager to
@@ -599,7 +600,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
non-offline <tp:member-ref>RequestedPresence</tp:member-ref> becomes
able to go online (for instance because
<tp:member-ref>Enabled</tp:member-ref> or
- <tp:member-ref>Valid</tp:member-ref> changes to True),
+ <tp:member-ref>Usable</tp:member-ref> changes to True),
ChangingPresence MUST change to True, and the two property changes MUST
be emitted in the same
<tp:member-ref>AccountPropertyChanged</tp:member-ref> signal, before the
@@ -632,7 +633,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>Re-connect this account. If the account is currently disconnected
and the requested presence is offline, or if the account
is not <tp:member-ref>Enabled</tp:member-ref> or not
- <tp:member-ref>Valid</tp:member-ref>, this does nothing.</p>
+ <tp:member-ref>Usable</tp:member-ref>, this does nothing.</p>
<p>If the account is disconnected and the requested presence is not
offline, this forces an attempt to connect with the requested
@@ -667,11 +668,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The normalized user ID of the local user on this account (i.e. the
string returned when the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">InspectHandles</tp:dbus-ref>
- method is called on the
- result of <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">GetSelfHandle</tp:dbus-ref>
- for an active connection).</p>
+ namespace="im.telepathy1.Connection">InspectHandles</tp:dbus-ref>
+ method is called on the value of the <tp:dbus-ref
+ namespace="im.telepathy1.Connection">SelfHandle</tp:dbus-ref>
+ property for an active connection).</p>
<p>It is unspecified whether this user ID is globally unique.</p>
@@ -735,7 +735,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
automatically, it SHOULD set this property. If a client performs
an account migration, it SHOULD set this property via
via the Properties argument of <tp:dbus-ref
- namespace="ofdT.AccountManager">CreateAccount</tp:dbus-ref>
+ namespace="imt1.AccountManager">CreateAccount</tp:dbus-ref>
when creating the migrated account. In either case, the value
SHOULD include the old account's path, and every path from
the old account's Supersedes property.</p>
diff --git a/spec/Account_Interface_Addressing.xml b/spec/Account_Interface_Addressing1.xml
index 4b2846b68..4212811c8 100644
--- a/spec/Account_Interface_Addressing.xml
+++ b/spec/Account_Interface_Addressing1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Account_Interface_Addressing" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Account_Interface_Addressing1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2010 Collabora Ltd</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
<p>This library is free software; you can redistribute it and/or
@@ -16,8 +16,8 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Account.Interface.Addressing">
- <tp:requires interface="org.freedesktop.Telepathy.Account"/>
+ <interface name="im.telepathy1.Account.Interface.Addressing1">
+ <tp:requires interface="im.telepathy1.Account"/>
<tp:added version="0.21.5">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Some accounts can be used for multiple protocols; for instance, SIP
diff --git a/spec/Account_Interface_Avatar.xml b/spec/Account_Interface_Avatar1.xml
index a6c516727..db77838e7 100644
--- a/spec/Account_Interface_Avatar.xml
+++ b/spec/Account_Interface_Avatar1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Account_Interface_Avatar"
+<node name="/Account_Interface_Avatar1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright (C) 2008 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
@@ -19,8 +19,8 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Account.Interface.Avatar">
- <tp:requires interface="org.freedesktop.Telepathy.Account"/>
+ <interface name="im.telepathy1.Account.Interface.Avatar1">
+ <tp:requires interface="im.telepathy1.Account"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This interface extends the core Account interface to provide a
diff --git a/spec/Account_Interface_External_Password_Storage.xml b/spec/Account_Interface_External_Password_Storage1.xml
index 5bd1bfce0..cfa07fa45 100644
--- a/spec/Account_Interface_External_Password_Storage.xml
+++ b/spec/Account_Interface_External_Password_Storage1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Account_Interface_External_Password_Storage"
+<node name="/Account_Interface_External_Password_Storage1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2011 Collabora Ltd.</tp:copyright>
@@ -20,21 +20,21 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Account.Interface.ExternalPasswordStorage.DRAFT"
+ <interface name="im.telepathy1.Account.Interface.ExternalPasswordStorage1"
tp:causes-havoc="experimental">
<tp:added version="0.21.10">(draft 1)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Account"/>
+ <tp:requires interface="im.telepathy1.Account"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface for Accounts whose passwords are stored externally and
SHOULD NOT be stored by either the
- <tp:dbus-ref namespace="ofdT">AccountManager</tp:dbus-ref> nor any
- <tp:dbus-ref namespace="ofdT.Channel.Type">ServerAuthentication</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1">AccountManager</tp:dbus-ref> nor any
+ <tp:dbus-ref namespace="imt1.Channel.Type">ServerAuthentication1</tp:dbus-ref>
handler.</p>
<p>This interface SHOULD only appear on accounts for which the
related Connection Manager implements
- <tp:dbus-ref namespace="ofdT">ConnectionManager.Interface.AccountStorage.DRAFT</tp:dbus-ref>.</p>
+ <tp:dbus-ref namespace="imt1">ConnectionManager.Interface.AccountStorage1</tp:dbus-ref>.</p>
</tp:docstring>
<method name="ForgetPassword" tp:name-for-bindings="Forget_Password">
diff --git a/spec/Account_Interface_Hidden.xml b/spec/Account_Interface_Hidden1.xml
index cb0019178..a78636052 100644
--- a/spec/Account_Interface_Hidden.xml
+++ b/spec/Account_Interface_Hidden1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Account_Interface_Hidden"
+<node name="/Account_Interface_Hidden1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2010 Collabora Ltd.</tp:copyright>
@@ -20,7 +20,7 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Account.Interface.Hidden.DRAFT1"
+ <interface name="im.telepathy1.Account.Interface.Hidden1"
tp:causes-havoc="outrageous">
<tp:added version="0.21.10">(draft 1)</tp:added>
@@ -30,7 +30,7 @@
Accounts whose <tp:member-ref>Hidden</tp:member-ref> property is
<code>True</code> are intended for non-interactive use (by
non-user-visible services), and appear on the <tp:dbus-ref
- namespace='ofdT'>AccountManager.Interface.Hidden.DRAFT1</tp:dbus-ref>
+ namespace='imt1'>AccountManager.Interface.Hidden1</tp:dbus-ref>
interface; in all other respects, they behave like any other
account.</p>
@@ -54,9 +54,9 @@
<p>If <code>True</code>, this account is intended for non-interactive
use, and thus should not be presented to the user. It will not appear
in properties and signals on the main <tp:dbus-ref
- namespace='ofdT'>AccountManager</tp:dbus-ref> interface; instead, it
+ namespace='imt1'>AccountManager</tp:dbus-ref> interface; instead, it
will show up on <tp:dbus-ref
- namespace='ofdT'>AccountManager.Interface.Hidden.DRAFT1</tp:dbus-ref>.</p>
+ namespace='imt1'>AccountManager.Interface.Hidden1</tp:dbus-ref>.</p>
</tp:docstring>
</property>
diff --git a/spec/Account_Interface_Storage.xml b/spec/Account_Interface_Storage1.xml
index 4e3ba5dca..8a4809e7b 100644
--- a/spec/Account_Interface_Storage.xml
+++ b/spec/Account_Interface_Storage1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Account_Interface_Storage"
+<node name="/Account_Interface_Storage1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright (C) 2010 Collabora Ltd.</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -18,8 +18,8 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Account.Interface.Storage">
- <tp:requires interface="org.freedesktop.Telepathy.Account"/>
+ <interface name="im.telepathy1.Account.Interface.Storage1">
+ <tp:requires interface="im.telepathy1.Account"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>
@@ -130,9 +130,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:flag suffix="Cannot_Set_Parameters" value="1">
<tp:docstring>
The account's <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account"
+ namespace="im.telepathy1.Account"
>Parameters</tp:dbus-ref> property can't be changed by calling
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Account"
+ <tp:dbus-ref namespace="im.telepathy1.Account"
>UpdateParameters</tp:dbus-ref>.
</tp:docstring>
</tp:flag>
@@ -140,7 +140,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:flag suffix="Cannot_Set_Enabled" value="2">
<tp:docstring>
The account can't be enabled/disabled by setting the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account"
+ namespace="im.telepathy1.Account"
>Enabled</tp:dbus-ref> property.
</tp:docstring>
</tp:flag>
@@ -148,9 +148,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:flag suffix="Cannot_Set_Presence" value="4">
<tp:docstring>
The account's presence can't be changed by setting the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account"
+ namespace="im.telepathy1.Account"
>RequestedPresence</tp:dbus-ref> and <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account"
+ namespace="im.telepathy1.Account"
>AutomaticPresence</tp:dbus-ref> properties.
</tp:docstring>
</tp:flag>
@@ -158,7 +158,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:flag suffix="Cannot_Set_Service" value="8">
<tp:docstring>
The account's <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">Service</tp:dbus-ref>
+ namespace="im.telepathy1.Account">Service</tp:dbus-ref>
property cannot be changed.
</tp:docstring>
</tp:flag>
diff --git a/spec/Account_Manager.xml b/spec/Account_Manager.xml
index defa074fe..7a281951a 100644
--- a/spec/Account_Manager.xml
+++ b/spec/Account_Manager.xml
@@ -19,15 +19,15 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.AccountManager">
+ <interface name="im.telepathy1.AccountManager">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The account manager is a central service used to store account
details.</p>
<p>The current account manager is defined to be the process that owns
- the well-known bus name <tt>org.freedesktop.Telepathy.AccountManager</tt> on
+ the well-known bus name <tt>im.telepathy1.AccountManager</tt> on
the session bus. This process must export an
- <tt>/org/freedesktop/Telepathy/AccountManager</tt> object with the
+ <tt>/im/telepathy1/AccountManager</tt> object with the
AccountManager interface.</p>
</tp:docstring>
<tp:added version="0.17.2"/>
@@ -50,13 +50,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:docstring>
</property>
- <property name="ValidAccounts" type="ao" access="read"
- tp:name-for-bindings="Valid_Accounts">
+ <property name="UsableAccounts" type="ao" access="read"
+ tp:name-for-bindings="Usable_Accounts">
<tp:docstring>
A list of the valid (complete, usable) <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>s. Change
+ namespace="im.telepathy1">Account</tp:dbus-ref>s. Change
notification is via
- <tp:member-ref>AccountValidityChanged</tp:member-ref>.
+ <tp:member-ref>AccountUsabilityChanged</tp:member-ref>.
<tp:rationale>
This split between valid and invalid accounts makes it easy to
@@ -67,13 +67,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:docstring>
</property>
- <property name="InvalidAccounts" type="ao" access="read"
- tp:name-for-bindings="Invalid_Accounts">
+ <property name="UnusableAccounts" type="ao" access="read"
+ tp:name-for-bindings="Unusable_Accounts">
<tp:docstring>
A list of incomplete or otherwise unusable <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>s. Change
+ namespace="im.telepathy1">Account</tp:dbus-ref>s. Change
notification is via
- <tp:member-ref>AccountValidityChanged</tp:member-ref>.
+ <tp:member-ref>AccountUsabilityChanged</tp:member-ref>.
</tp:docstring>
</property>
@@ -95,8 +95,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</arg>
</signal>
- <signal name="AccountValidityChanged"
- tp:name-for-bindings="Account_Validity_Changed">
+ <signal name="AccountUsabilityChanged"
+ tp:name-for-bindings="Account_Usability_Changed">
<tp:docstring>
The validity of the given account has changed. New accounts are
also indicated by this signal, as an account validity change
@@ -111,11 +111,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<arg name="Account" type="o">
<tp:docstring>
An <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>.
+ namespace="im.telepathy1">Account</tp:dbus-ref>.
</tp:docstring>
</arg>
- <arg name="Valid" type="b">
+ <arg name="Usable" type="b">
<tp:docstring>
True if the account is now valid.
</tp:docstring>
@@ -135,45 +135,45 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:rationale>
<p>Examples of good properties to support here include
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">Icon</tp:dbus-ref>,
+ namespace="im.telepathy1.Account">Icon</tp:dbus-ref>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">Enabled</tp:dbus-ref>,
+ namespace="im.telepathy1.Account">Enabled</tp:dbus-ref>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">Nickname</tp:dbus-ref>,
+ namespace="im.telepathy1.Account">Nickname</tp:dbus-ref>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">AutomaticPresence</tp:dbus-ref>,
+ namespace="im.telepathy1.Account">AutomaticPresence</tp:dbus-ref>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">ConnectAutomatically</tp:dbus-ref>,
+ namespace="im.telepathy1.Account">ConnectAutomatically</tp:dbus-ref>,
<tp:dbus-ref
- namespace="ofdT.Account">Supersedes</tp:dbus-ref>,
+ namespace="im.telepathy1.Account">RequestedPresence</tp:dbus-ref>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">RequestedPresence</tp:dbus-ref>
+ namespace="imt1.Account">Supersedes</tp:dbus-ref>
and
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account.Interface.Avatar">Avatar</tp:dbus-ref>.
+ namespace="im.telepathy1.Account.Interface.Avatar1">Avatar</tp:dbus-ref>.
</p>
<p>Examples of properties that would make no sense here include
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">Valid</tp:dbus-ref>,
+ namespace="im.telepathy1.Account">Usable</tp:dbus-ref>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">Connection</tp:dbus-ref>,
+ namespace="im.telepathy1.Account">Connection</tp:dbus-ref>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">ConnectionStatus</tp:dbus-ref>,
+ namespace="im.telepathy1.Account">ConnectionStatus</tp:dbus-ref>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">ConnectionStatusReason</tp:dbus-ref>,
+ namespace="im.telepathy1.Account">ConnectionStatusReason</tp:dbus-ref>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">CurrentPresence</tp:dbus-ref>
+ namespace="im.telepathy1.Account">CurrentPresence</tp:dbus-ref>
and
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">NormalizedName</tp:dbus-ref>.
+ namespace="im.telepathy1.Account">NormalizedName</tp:dbus-ref>.
</p>
</tp:rationale>
<p>This property MUST NOT include include the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">DisplayName</tp:dbus-ref>
+ namespace="im.telepathy1.Account">DisplayName</tp:dbus-ref>
and <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">Parameters</tp:dbus-ref>
+ namespace="im.telepathy1.Account">Parameters</tp:dbus-ref>
properties, which are set using separate arguments.</p>
<p>This property MAY include the names of properties that, after
@@ -183,7 +183,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:rationale>
<p>For example, an account manager might support migration tools that
use this to preserve the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">HasBeenOnline</tp:dbus-ref>
+ namespace="im.telepathy1.Account">HasBeenOnline</tp:dbus-ref>
property, even though that property is usually read-only.</p>
</tp:rationale>
</tp:docstring>
@@ -192,7 +192,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<method name="CreateAccount" tp:name-for-bindings="Create_Account">
<tp:docstring>
Request the creation of a new <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>. The
+ namespace="im.telepathy1">Account</tp:dbus-ref>. The
account manager SHOULD NOT allow invalid accounts to be created.
</tp:docstring>
<tp:changed version="0.17.24">added the Properties argument</tp:changed>
@@ -205,13 +205,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</arg>
<arg name="Protocol" direction="in" type="s"
- tp:type="Protocol">
+ tp:type="Protocol_Name">
<tp:docstring>The protocol, e.g. "local-xmpp".</tp:docstring>
</arg>
<arg name="Display_Name" direction="in" type="s">
<tp:docstring>The initial value of the new account's <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">DisplayName</tp:dbus-ref>
+ namespace="im.telepathy1.Account">DisplayName</tp:dbus-ref>
property. The account manager SHOULD modify this to make it unique if
an Account already exists with the same display name, for instance by
appending a number or the 'account' parameter. Account manager
@@ -237,7 +237,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<arg name="Parameters" direction="in" type="a{sv}">
<tp:docstring>Initial parameter values, as would be passed to
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ConnectionManager">RequestConnection</tp:dbus-ref>.</tp:docstring>
+ namespace="im.telepathy1.ConnectionManager">RequestConnection</tp:dbus-ref>.</tp:docstring>
</arg>
<arg name="Properties" direction="in" type="a{sv}"
@@ -249,9 +249,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>Only the properties mentioned in
<tp:member-ref>SupportedAccountProperties</tp:member-ref> are
acceptable here. In particular, the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">DisplayName</tp:dbus-ref>
+ namespace="im.telepathy1.Account">DisplayName</tp:dbus-ref>
and <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">Parameters</tp:dbus-ref>
+ namespace="im.telepathy1.Account">Parameters</tp:dbus-ref>
properties are never allowed here, since they are set using the other
arguments to this method.</p>
@@ -262,17 +262,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<arg name="Account" direction="out" type="o">
<tp:docstring>The new <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>.</tp:docstring>
+ namespace="im.telepathy1">Account</tp:dbus-ref>.</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The <var>Connection_Manager</var> is not installed or does not
implement the given <var>Protocol</var>.</p>
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The <var>Parameters</var> provided were unacceptable: they might
omit a
diff --git a/spec/Account_Manager_Interface_Hidden.xml b/spec/Account_Manager_Interface_Hidden1.xml
index 284eb6428..2a4d32e86 100644
--- a/spec/Account_Manager_Interface_Hidden.xml
+++ b/spec/Account_Manager_Interface_Hidden1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Account_Manager_Interface_Hidden"
+<node name="/Account_Manager_Interface_Hidden1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2010 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright © 2010 Nokia Corporation</tp:copyright>
@@ -20,36 +20,36 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</p>
</tp:license>
<interface
- name="org.freedesktop.Telepathy.AccountManager.Interface.Hidden.DRAFT1"
+ name="im.telepathy1.AccountManager.Interface.Hidden1"
tp:causes-havoc='kind of sketchy'>
- <tp:requires interface='org.freedesktop.Telepathy.AccountManager'/>
+ <tp:requires interface='im.telepathy1.AccountManager'/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This interface lists accounts whose <tp:dbus-ref
- namespace='ofdT.Account.Interface.Hidden.DRAFT1'>Hidden</tp:dbus-ref>
+ namespace='imt1.Account.Interface.Hidden1'>Hidden</tp:dbus-ref>
property is <code>True</code>.</p>
</tp:docstring>
<tp:added version="0.21.10">first draft</tp:added>
- <property name="ValidHiddenAccounts" type="ao" access="read"
- tp:name-for-bindings="Valid_Hidden_Accounts">
+ <property name="UsableHiddenAccounts" type="ao" access="read"
+ tp:name-for-bindings="Usable_Hidden_Accounts">
<tp:docstring>
A list of valid (complete, usable) <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>s intended
+ namespace="im.telepathy1">Account</tp:dbus-ref>s intended
exclusively for noninteractive applications. These accounts are not
included in <tp:dbus-ref
- namespace='ofdT'>AccountManager.ValidAccounts</tp:dbus-ref>. Change
+ namespace='imt1'>AccountManager.UsableAccounts</tp:dbus-ref>. Change
notification is via
- <tp:member-ref>HiddenAccountValidityChanged</tp:member-ref>.
+ <tp:member-ref>HiddenAccountUsabilityChanged</tp:member-ref>.
</tp:docstring>
</property>
- <property name="InvalidHiddenAccounts" type="ao" access="read"
- tp:name-for-bindings="Invalid_Hidden_Accounts">
+ <property name="UnusableHiddenAccounts" type="ao" access="read"
+ tp:name-for-bindings="Unusable_Hidden_Accounts">
<tp:docstring>
A list of incomplete or otherwise unusable <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>s intended
+ namespace="im.telepathy1">Account</tp:dbus-ref>s intended
exclusively for noninteractive applications. Change notification is via
- <tp:member-ref>HiddenAccountValidityChanged</tp:member-ref>.
+ <tp:member-ref>HiddenAccountUsabilityChanged</tp:member-ref>.
</tp:docstring>
</property>
@@ -57,8 +57,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
tp:name-for-bindings="Hidden_Account_Removed">
<tp:docstring>
The given account has been removed from
- <tp:member-ref>ValidHiddenAccounts</tp:member-ref> or
- <tp:member-ref>InvalidHiddenAccounts</tp:member-ref>.
+ <tp:member-ref>UsableHiddenAccounts</tp:member-ref> or
+ <tp:member-ref>UnusableHiddenAccounts</tp:member-ref>.
</tp:docstring>
<arg name="Account" type="o">
@@ -68,8 +68,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</arg>
</signal>
- <signal name="HiddenAccountValidityChanged"
- tp:name-for-bindings="Hidden_Account_Validity_Changed">
+ <signal name="HiddenAccountUsabilityChanged"
+ tp:name-for-bindings="Hidden_Account_Usability_Changed">
<tp:docstring>
The validity of the given account has changed. New magic
accounts are also indicated by this signal, as an account validity
@@ -84,11 +84,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<arg name="Account" type="o">
<tp:docstring>
An <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>.
+ namespace="im.telepathy1">Account</tp:dbus-ref>.
</tp:docstring>
</arg>
- <arg name="Valid" type="b">
+ <arg name="Usable" type="b">
<tp:docstring>
True if the account is now valid.
</tp:docstring>
diff --git a/spec/Authentication_TLS_Certificate.xml b/spec/Authentication_TLS_Certificate.xml
index db1d76fd7..79098f93f 100644
--- a/spec/Authentication_TLS_Certificate.xml
+++ b/spec/Authentication_TLS_Certificate.xml
@@ -17,7 +17,7 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:license>
- <interface name="org.freedesktop.Telepathy.Authentication.TLSCertificate">
+ <interface name="im.telepathy1.Authentication.TLSCertificate">
<tp:added version="0.19.13">(as stable API)</tp:added>
<tp:docstring>
@@ -114,7 +114,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:enum type="u" name="TLS_Certificate_State">
<tp:docstring>
The possible states for a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Authentication">TLSCertificate</tp:dbus-ref>
+ namespace="im.telepathy1.Authentication">TLSCertificate</tp:dbus-ref>
object.
</tp:docstring>
@@ -291,7 +291,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
Raised when the method is called on an object whose <tp:member-ref>State</tp:member-ref>
is not <code>Pending</code>, or when the provided rejection list is empty.
diff --git a/spec/Call_Content.xml b/spec/Call1_Content.xml
index be3376fe4..1926e4918 100644
--- a/spec/Call_Content.xml
+++ b/spec/Call1_Content.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Call_Content"
+<node name="/Call1_Content"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009-2010 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright © 2009-2010 Nokia Corporation</tp:copyright>
@@ -20,15 +20,15 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Call1.Content">
+ <interface name="im.telepathy1.Call1.Content">
<tp:added version="0.25.2">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This object represents one Content inside a <tp:dbus-ref
- namespace="ofdT.Channel.Type">Call1</tp:dbus-ref>. For
+ namespace="imt1.Channel.Type">Call1</tp:dbus-ref>. For
example, in an audio/video call there would be one audio content
and one video content. Each content has one or more <tp:dbus-ref
- namespace="ofdT.Call1">Stream</tp:dbus-ref> objects which
+ namespace="imt1.Call1">Stream</tp:dbus-ref> objects which
represent the actual transport to one or more remote contacts.</p>
<tp:rationale>
There are two cases where multiple streams may happen:
@@ -43,7 +43,7 @@
</tp:rationale>
<p>For protocols that support muting all streams of a given content
separately, this object MAY also implement the <tp:dbus-ref
- namespace="ofdT.Call1.Interface">Mute</tp:dbus-ref> interface</p>
+ namespace="imt1.Call1.Interface">Mute</tp:dbus-ref> interface</p>
</tp:docstring>
<method name="Remove" tp:name-for-bindings="Remove">
@@ -51,14 +51,14 @@
arguments</tp:changed>
<tp:docstring>
Remove the content from the call. This will cause
- <tp:dbus-ref namespace="ofdT.Channel.Type">Call1.ContentRemoved</tp:dbus-ref>((self_handle,
+ <tp:dbus-ref namespace="imt1.Channel.Type">Call1.ContentRemoved</tp:dbus-ref>((self_handle,
<tp:value-ref type="Call_State_Change_Reason">User_Requested</tp:value-ref>, "", "")) to be
emitted.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError" />
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NetworkError" />
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
Raised when a Call doesn't support removing contents
(e.g. a Google Talk video call).
@@ -72,9 +72,9 @@
<tp:added version="0.19.11"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Extra interfaces provided by this content, such as <tp:dbus-ref
- namespace="ofdT.Call1">Content.Interface.Media</tp:dbus-ref>,
- <tp:dbus-ref namespace="ofdT.Channel">Interface.Hold</tp:dbus-ref> or
- <tp:dbus-ref namespace="ofdT.Call1">Interface.Mute</tp:dbus-ref>.
+ namespace="imt1.Call1">Content.Interface.Media</tp:dbus-ref>,
+ <tp:dbus-ref namespace="imt1.Channel">Interface.Hold1</tp:dbus-ref> or
+ <tp:dbus-ref namespace="imt1.Call1">Interface.Mute</tp:dbus-ref>.
This SHOULD NOT include the Content interface itself, and cannot
change once the content has been created.</p>
</tp:docstring>
@@ -107,7 +107,7 @@
The disposition of this content, which defines whether to
automatically start sending data on the streams when
<tp:dbus-ref
- namespace="ofdT.Channel.Type.Call1">Accept</tp:dbus-ref> is
+ namespace="imt1.Channel.Type.Call1">Accept</tp:dbus-ref> is
called on the channel.
</tp:docstring>
@@ -121,14 +121,14 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The content was initially part of the call. When
<tp:dbus-ref
- namespace="ofdT.Channel.Type.Call1">Accept</tp:dbus-ref>
+ namespace="imt1.Channel.Type.Call1">Accept</tp:dbus-ref>
is called on the channel, all streams of this content with
<tp:dbus-ref
- namespace="ofdT.Call1.Stream">LocalSendingState</tp:dbus-ref>
+ namespace="imt1.Call1.Stream">LocalSendingState</tp:dbus-ref>
set to <tp:value-ref type="Sending_State">Pending_Send</tp:value-ref> will be
moved to <tp:value-ref type="Sending_State">Sending</tp:value-ref> as if
<tp:dbus-ref
- namespace="ofdT.Call1.Stream">SetSending</tp:dbus-ref>
+ namespace="imt1.Call1.Stream">SetSending</tp:dbus-ref>
(True) had been called.</p>
</tp:docstring>
</tp:enumvalue>
@@ -151,7 +151,7 @@
<arg name="Streams" type="ao">
<tp:docstring>
The <tp:dbus-ref
- namespace="ofdT.Call1">Stream</tp:dbus-ref>s which were
+ namespace="imt1.Call1">Stream</tp:dbus-ref>s which were
added.
</tp:docstring>
</arg>
@@ -166,7 +166,7 @@
<arg name="Streams" type="ao">
<tp:docstring>
The <tp:dbus-ref
- namespace="ofdT.Call1">Stream</tp:dbus-ref>s which were
+ namespace="imt1.Call1">Stream</tp:dbus-ref>s which were
removed.
</tp:docstring>
</arg>
@@ -180,7 +180,7 @@
<property name="Streams" tp:name-for-bindings="Streams"
type="ao" access="read">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The list of <tp:dbus-ref namespace="ofdT.Call1"
+ <p>The list of <tp:dbus-ref namespace="imt1.Call1"
>Stream</tp:dbus-ref> objects that exist in this
content.</p>
diff --git a/spec/Call_Content_Interface_Audio_Control.xml b/spec/Call1_Content_Interface_Audio_Control1.xml
index 0efb488c0..c7f441cfd 100644
--- a/spec/Call_Content_Interface_Audio_Control.xml
+++ b/spec/Call1_Content_Interface_Audio_Control1.xml
@@ -1,5 +1,5 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-<node name="/Call_Content_Interface_Audio_Control"
+<node name="/Call1_Content_Interface_Audio_Control1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009-2011 Collabora Ltd.</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -19,9 +19,9 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Call1.Content.Interface.AudioControl">
+ <interface name="im.telepathy1.Call1.Content.Interface.AudioControl1">
<tp:added version="0.25.2">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Call1.Content.Interface.Media"/>
+ <tp:requires interface="im.telepathy1.Call1.Content.Interface.Media"/>
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="true"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
diff --git a/spec/Call_Content_Interface_DTMF.xml b/spec/Call1_Content_Interface_DTMF1.xml
index f6e9bda0c..594ecf31a 100644
--- a/spec/Call_Content_Interface_DTMF.xml
+++ b/spec/Call1_Content_Interface_DTMF1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Call_Content_Interface_DTMF" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Call1_Content_Interface_DTMF1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2005-2010 Collabora Limited</tp:copyright>
<tp:copyright>Copyright © 2005-2010 Nokia Corporation</tp:copyright>
<tp:copyright>Copyright © 2006 INdT</tp:copyright>
@@ -18,8 +18,8 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Call1.Content.Interface.DTMF">
- <tp:requires interface="org.freedesktop.Telepathy.Call1.Content"/>
+ <interface name="im.telepathy1.Call1.Content.Interface.DTMF1">
+ <tp:requires interface="im.telepathy1.Call1.Content"/>
<tp:added version="0.25.2">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -52,13 +52,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
be called if no DTMF tones are already being played.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError" />
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.NetworkError" />
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The event id was invalid.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.ServiceBusy">
+ <tp:error name="im.telepathy1.Error.ServiceBusy">
<tp:docstring>
DTMF tones are already being played.
</tp:docstring>
@@ -81,8 +81,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:rationale>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError" />
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NetworkError" />
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
Continuous tones are not supported by this stream. Deprecated,
since stream IDs are ignored.
@@ -137,13 +137,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
be called if no DTMF tones are already being played.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError" />
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.NetworkError" />
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The supplied Tones string was invalid.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.ServiceBusy">
+ <tp:error name="im.telepathy1.Error.ServiceBusy">
<tp:docstring>
DTMF tones are already being played.
</tp:docstring>
diff --git a/spec/Call_Content_Interface_Media.xml b/spec/Call1_Content_Interface_Media.xml
index 3f04df9bc..4b2f30ae6 100644
--- a/spec/Call_Content_Interface_Media.xml
+++ b/spec/Call1_Content_Interface_Media.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Call_Content_Interface_Media"
+<node name="/Call1_Content_Interface_Media"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009-2010 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright © 2009-2010 Nokia Corporation</tp:copyright>
@@ -20,16 +20,15 @@
02110-1301, USA.</p>
</tp:license>
- <interface
- name="org.freedesktop.Telepathy.Call1.Content.Interface.Media">
+ <interface name="im.telepathy1.Call1.Content.Interface.Media">
<tp:added version="0.25.2">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Call1.Content"/>
+ <tp:requires interface="im.telepathy1.Call1.Content"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Interface to use by a software implementation of media
streaming. The reason behind splitting the members of this
interface out from the main <tp:dbus-ref
- namespace="ofdT.Call1">Content</tp:dbus-ref> interface is
+ namespace="imt1.Call1">Content</tp:dbus-ref> interface is
that the software is not necessarily what controls the
media. An example of this is in GSM phones, where the CM just
tells the phone to dial a number and it does the audio routing
@@ -39,41 +38,41 @@
<h4>Codec Negotiation</h4>
<p>When a new <tp:dbus-ref
- namespace="ofdT.Channel.Type">Call1</tp:dbus-ref> channel
+ namespace="imt1.Channel.Type">Call1</tp:dbus-ref> channel
appears (whether it was requested or not) a <tp:dbus-ref
- namespace="ofdT.Call1.Content">MediaDescription</tp:dbus-ref>
+ namespace="imt1.Call1.Content">MediaDescription</tp:dbus-ref>
object will either be waiting in the
<tp:member-ref>MediaDescriptionOffer</tp:member-ref> property, or will
appear at some point via the
<tp:member-ref>NewMediaDescriptionOffer</tp:member-ref> signal.</p>
<p>If nothing is known about the remote side's Media capabilities
- (e.g. outgoing SIP/XMPP call), this <tp:dbus-ref namespace="ofdT.Call1.Content"
+ (e.g. outgoing SIP/XMPP call), this <tp:dbus-ref namespace="imt1.Call1.Content"
>MediaDescription</tp:dbus-ref> will pop up with {<tp:dbus-ref
- namespace="ofdT.Call1.Content.MediaDescription"
+ namespace="imt1.Call1.Content.MediaDescription"
>HasRemoteInformation</tp:dbus-ref> = false, <tp:dbus-ref
- namespace="ofdT.Call1.Content.MediaDescription"
+ namespace="imt1.Call1.Content.MediaDescription"
>FurtherNegotiationRequired</tp:dbus-ref> = true}, and the local
user's streaming implementation SHOULD call
- <tp:dbus-ref namespace="ofdT.Call1.Content.MediaDescription"
+ <tp:dbus-ref namespace="imt1.Call1.Content.MediaDescription"
>Accept</tp:dbus-ref>,
with a description of all supported codecs and other features.
The CM will then send this information to the remote side (and
<tp:member-ref>LocalMediaDescriptionChanged</tp:member-ref> will fire
with details of the description passed into <tp:dbus-ref
- namespace="ofdT.Call1.Content.MediaDescription"
+ namespace="imt1.Call1.Content.MediaDescription"
>Accept</tp:dbus-ref> for debugging purposes).
</p>
<p>When the remote codecs and other content information are available
(e.g. Remote user replies to initial offer, or sends a new offer of
- their own, a new <tp:dbus-ref namespace="ofdT.Call1.Content"
+ their own, a new <tp:dbus-ref namespace="imt1.Call1.Content"
>MediaDescription</tp:dbus-ref> will appear, with {<tp:dbus-ref
- namespace="ofdT.Call1.Content.MediaDescription"
+ namespace="imt1.Call1.Content.MediaDescription"
>HasRemoteInformation</tp:dbus-ref> = true, <tp:dbus-ref
- namespace="ofdT.Call1.Content.MediaDescription"
+ namespace="imt1.Call1.Content.MediaDescription"
>FurtherNegotiationRequired</tp:dbus-ref> = false},
and the <tp:dbus-ref
- namespace="ofdT.Call1.Content.MediaDescription"
+ namespace="imt1.Call1.Content.MediaDescription"
>Codecs</tp:dbus-ref>
property on the description offer set to the codecs which are
supported by the remote contact. The local user's streaming
@@ -83,9 +82,9 @@
<tp:member-ref>LocalMediaDescriptionChanged</tp:member-ref> and
<tp:member-ref>RemoteMediaDescriptionsChanged</tp:member-ref>
will fire to signal their respective changes, to aid with debugging.
- Note that if <tp:dbus-ref namespace="ofdT.Call1.Content.MediaDescription"
+ Note that if <tp:dbus-ref namespace="imt1.Call1.Content.MediaDescription"
>Accept</tp:dbus-ref> is called, with <tp:dbus-ref
- namespace="ofdT.Call1.Content.MediaDescription"
+ namespace="imt1.Call1.Content.MediaDescription"
>FurtherNegotiationRequired</tp:dbus-ref> set to false,
the CM should be able to rely on the fact that the
description passed into Accept is compatible with the one in the
@@ -105,7 +104,7 @@
</p>
<p> If parameters requiring negotiation are changed, then the
<tp:dbus-ref
- namespace="ofdT.Call1.Content.MediaDescription"
+ namespace="imt1.Call1.Content.MediaDescription"
>FurtherNegotiationRequired</tp:dbus-ref> property should be set to
TRUE, and the new media description should
only be used once they come in a new MediaDescriptionOffer
@@ -113,7 +112,7 @@
<p>If the other side decides to update his or her codec list
during a call, a new <tp:dbus-ref
- namespace="ofdT.Call1.Content">MediaDescription</tp:dbus-ref>
+ namespace="imt1.Call1.Content">MediaDescription</tp:dbus-ref>
object will appear through
<tp:member-ref>NewMediaDescriptionOffer</tp:member-ref> which should be
acted on as documented above.</p>
@@ -121,12 +120,12 @@
<h4>Protocols without negotiation</h4>
<p>For protocols where the codecs are not negotiable, the initial content's <tp:dbus-ref
- namespace="ofdT.Call1.Content">MediaDescription</tp:dbus-ref>
+ namespace="imt1.Call1.Content">MediaDescription</tp:dbus-ref>
object will appear with <tp:dbus-ref
- namespace="ofdT.Call1.Content.MediaDescription"
+ namespace="imt1.Call1.Content.MediaDescription"
>HasRemoteInformation</tp:dbus-ref>,
set to true and the known supported codec values in <tp:dbus-ref
- namespace="ofdT.Call1.Content.MediaDescription"
+ namespace="imt1.Call1.Content.MediaDescription"
>Codecs</tp:dbus-ref>.
</p>
</tp:docstring>
@@ -159,7 +158,7 @@
<tp:member name="Updated" type="b">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
This should be set to true in calls to <tp:dbus-ref
- namespace="ofdT.Call1.Content.MediaDescription"
+ namespace="imt1.Call1.Content.MediaDescription"
>Accept</tp:dbus-ref> and
<tp:member-ref>UpdateLocalMediaDescription</tp:member-ref> if this
codec has changed in a way that needs to be signalled over the
@@ -200,9 +199,9 @@
<tp:member name="Remote_Contact" type="u" tp:type="Handle">
<tp:docstring>
The remote contact this description refers to or 0. This matches the
- <tp:dbus-ref namespace="ofdT.Call1.Content.MediaDescription"
+ <tp:dbus-ref namespace="imt1.Call1.Content.MediaDescription"
>RemoteContact</tp:dbus-ref> property on
- <tp:dbus-ref namespace="ofdT.Call1.Content"
+ <tp:dbus-ref namespace="imt1.Call1.Content"
>MediaDescription</tp:dbus-ref>
</tp:docstring>
</tp:member>
@@ -220,7 +219,7 @@
</tp:docstring>
<tp:member name="Media_Description" type="o">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- The object path to the <tp:dbus-ref namespace="ofdT.Call1.Content"
+ The object path to the <tp:dbus-ref namespace="imt1.Call1.Content"
>MediaDescription</tp:dbus-ref>
</tp:docstring>
</tp:member>
@@ -257,12 +256,12 @@
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The protocol does not support changing the codecs mid-call.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The description given is invalid in some way.
</tp:docstring>
@@ -279,8 +278,8 @@
contact.</p>
<p>Keys of this map will appear in at most one <tp:dbus-ref
- namespace="ofdT.Call1.Stream">RemoteMembers</tp:dbus-ref>.
- See <tp:dbus-ref namespace="ofdT.Call1.Content.MediaDescription"
+ namespace="imt1.Call1.Stream">RemoteMembers</tp:dbus-ref>.
+ See <tp:dbus-ref namespace="imt1.Call1.Content.MediaDescription"
>RemoteContact</tp:dbus-ref> for more details on how to map between
MediaDescriptions and Streams.</p>
</tp:docstring>
@@ -298,12 +297,12 @@
<signal name="NewMediaDescriptionOffer"
tp:name-for-bindings="New_Media_Description_Offer">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Emitted when a new <tp:dbus-ref namespace="ofdT.Call1.Content"
+ <p>Emitted when a new <tp:dbus-ref namespace="imt1.Call1.Content"
>MediaDescription</tp:dbus-ref> appears. The streaming
>implementation MUST respond by calling the
- <tp:dbus-ref namespace="ofdT.Call1.Content.MediaDescription"
+ <tp:dbus-ref namespace="imt1.Call1.Content.MediaDescription"
>Accept</tp:dbus-ref> or <tp:dbus-ref
- namespace="ofdT.Call1.Content.MediaDescription"
+ namespace="imt1.Call1.Content.MediaDescription"
>Reject</tp:dbus-ref> method on the description object appeared.</p>
<p>Emission of this signal indicates that the
@@ -312,10 +311,10 @@
<code>(Description, Contact, MediaDescriptionProperties)</code>.</p>
<p>When the MediaDescriptionOffer has been dealt with then
- <tp:dbus-ref namespace="ofdT.Call1.Content.Interface.Media"
+ <tp:dbus-ref namespace="imt1.Call1.Content.Interface.Media"
>MediaDescriptionOfferDone</tp:dbus-ref> must be emitted
before <tp:dbus-ref
- namespace="ofdT.Call1.Content.Interface.Media"
+ namespace="imt1.Call1.Content.Interface.Media"
>NewMediaDescriptionOffer</tp:dbus-ref> is emitted again.
</p>
@@ -343,7 +342,7 @@
<signal name="MediaDescriptionOfferDone"
tp:name-for-bindings="Media_Description_Offer_Done">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Emitted when a <tp:dbus-ref namespace="ofdT.Call1.Content"
+ <p>Emitted when a <tp:dbus-ref namespace="imt1.Call1.Content"
>MediaDescription</tp:dbus-ref> has been handled. </p>
<p>Emission of this signal indicates that the
<tp:member-ref>MediaDescriptionOffer</tp:member-ref> property has
@@ -358,7 +357,7 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Change notification for
- <tp:dbus-ref namespace="ofdT.Call1.Content.Interface.Media"
+ <tp:dbus-ref namespace="imt1.Call1.Content.Interface.Media"
>LocalMediaDescriptions</tp:dbus-ref>
</p>
</tp:docstring>
@@ -376,7 +375,7 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Change notification for
- <tp:dbus-ref namespace="ofdT.Call1.Content.Interface.Media"
+ <tp:dbus-ref namespace="imt1.Call1.Content.Interface.Media"
>RemoteMediaDescriptions</tp:dbus-ref>
</p>
</tp:docstring>
@@ -394,10 +393,10 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Removal notification for
- <tp:dbus-ref namespace="ofdT.Call1.Content.Interface.Media"
+ <tp:dbus-ref namespace="imt1.Call1.Content.Interface.Media"
>RemoteMediaDescriptions</tp:dbus-ref>
and
- <tp:dbus-ref namespace="ofdT.Call1.Content.Interface.Media"
+ <tp:dbus-ref namespace="imt1.Call1.Content.Interface.Media"
>LocalMediaDescriptions</tp:dbus-ref>
</p>
</tp:docstring>
@@ -416,9 +415,9 @@
type="(oa{sv})" tp:type="Media_Description_Offer" access="read">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The object path to the current
- <tp:dbus-ref namespace="ofdT.Call1.Content"
+ <tp:dbus-ref namespace="imt1.Call1.Content"
>MediaDescription</tp:dbus-ref> object, its
- <tp:dbus-ref namespace="ofdT.Call1.Content.MediaDescription"
+ <tp:dbus-ref namespace="imt1.Call1.Content.MediaDescription"
>RemoteContact</tp:dbus-ref> and
a mapping of the MediaDescriptions properties.
If the object path is "/" then there isn't an outstanding
@@ -426,7 +425,7 @@
<tp:rationale>
Having all <tp:dbus-ref
- namespace="ofdT.Call1.Content">MediaDescription</tp:dbus-ref>
+ namespace="imt1.Call1.Content">MediaDescription</tp:dbus-ref>
properties here saves a D-Bus round-trip - it shouldn't be
necessary to get these properties from the Content MediaDescription
object, in practice.
@@ -479,7 +478,7 @@
tp:name-for-bindings="DTMF_Change_Requested">
<tp:docstring>
Used by the CM to relay instructions from <tp:dbus-ref
- namespace="ofdT">Channel.Interface.DTMF</tp:dbus-ref> to the streaming
+ namespace="imt1">Channel.Interface.DTMF1</tp:dbus-ref> to the streaming
implementation. If any contact in this call supports the
telephone-event codec in their MediaDescription, this event should be
sent as outlined in RFC 4733. Otherwise, it should be sent as an
diff --git a/spec/Call_Content_Interface_Video_Control.xml b/spec/Call1_Content_Interface_Video_Control1.xml
index 5a11dcbae..130ec8290 100644
--- a/spec/Call_Content_Interface_Video_Control.xml
+++ b/spec/Call1_Content_Interface_Video_Control1.xml
@@ -1,5 +1,5 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-<node name="/Call_Content_Interface_Video_Control"
+<node name="/Call1_Content_Interface_Video_Control1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2011 Collabora Ltd.</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -19,9 +19,9 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Call1.Content.Interface.VideoControl">
+ <interface name="im.telepathy1.Call1.Content.Interface.VideoControl1">
<tp:added version="0.25.2">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Call1.Content.Interface.Media"/>
+ <tp:requires interface="im.telepathy1.Call1.Content.Interface.Media"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface that allows the connection manager to control the video
diff --git a/spec/Call_Content_Media_Description.xml b/spec/Call1_Content_Media_Description.xml
index 88791a25f..ae6e9d502 100644
--- a/spec/Call_Content_Media_Description.xml
+++ b/spec/Call1_Content_Media_Description.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Call_Content_Media_Description"
+<node name="/Call1_Content_Media_Description"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009-2010 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright © 2009-2010 Nokia Corporation</tp:copyright>
@@ -20,7 +20,7 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Call1.Content.MediaDescription">
+ <interface name="im.telepathy1.Call1.Content.MediaDescription">
<tp:added version="0.25.2">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -28,7 +28,7 @@
streaming implementation should reply with its local Description.
This is intended as a temporary transactional object for use with <tp:dbus-ref
- namespace="ofdT.Call1">Content.Interface.Media</tp:dbus-ref>.
+ namespace="imt1.Call1">Content.Interface.Media</tp:dbus-ref>.
There will always be 0 or 1 MediaDescription object per Content.
In most cases, this object will stay alive until you call either
<tp:member-ref>Accept</tp:member-ref> or
@@ -44,7 +44,7 @@
<tp:docstring>
The local description to send to the remote contacts and
to use in the <tp:dbus-ref
- namespace="ofdT.Call1">Content</tp:dbus-ref>.
+ namespace="imt1.Call1">Content</tp:dbus-ref>.
</tp:docstring>
</arg>
<tp:docstring>
@@ -55,7 +55,7 @@
FurtherNegotiationRequired set to False).
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The description given is invalid in some way.
</tp:docstring>
@@ -134,7 +134,7 @@
The contact handle that this description applies to.
This property can be used as an opaque identifier, and searched for in
- <tp:dbus-ref namespace="ofdT.Call1.Stream"
+ <tp:dbus-ref namespace="imt1.Call1.Stream"
>RemoteMembers</tp:dbus-ref> for each Stream in this Content, to
determine which Stream this MediaDescription applies to. If multiple
MediaDescriptions apply to the same Stream, the
@@ -178,7 +178,7 @@
list containing a single SSRC (which does not collide with these,
or any previously seen SSRCs). If a new MediaDescription offer
appears with an SSRC the same as one in <tp:dbus-ref
- namespace="ofdT.Call1.Content.Interface.Media"
+ namespace="imt1.Call1.Content.Interface.Media"
>LocalMediaDescriptions</tp:dbus-ref>, then the streaming
implementation should pick a new SSRC to resolve the collision.</p>
@@ -204,15 +204,15 @@
<p>
A mapping containing all properties that define the information from a
<tp:dbus-ref
- namespace="ofdT.Call1.Content"
+ namespace="imt1.Call1.Content"
>MediaDescription</tp:dbus-ref> and its interfaces.
</p>
<p>
- If <tp:dbus-ref namespace="ofdT.Call1.Content.MediaDescription"
+ If <tp:dbus-ref namespace="imt1.Call1.Content.MediaDescription"
>HasRemoteInformation</tp:dbus-ref> is True, then this mapping
will always contains at least
- <tp:dbus-ref namespace="ofdT.Call1.Content.MediaDescription"
+ <tp:dbus-ref namespace="imt1.Call1.Content.MediaDescription"
>Codecs</tp:dbus-ref>
</p>
</tp:docstring>
diff --git a/spec/Call_Content_Media_Description_Interface_RTCP_Extended_Reports.xml b/spec/Call1_Content_Media_Description_Interface_RTCP_Extended_Reports1.xml
index eb5fbdb6f..bd6c7f150 100644
--- a/spec/Call_Content_Media_Description_Interface_RTCP_Extended_Reports.xml
+++ b/spec/Call1_Content_Media_Description_Interface_RTCP_Extended_Reports1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Call_Content_Media_Description_Interface_RTCP_Extended_Reports" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Call1_Content_Media_Description_Interface_RTCP_Extended_Reports1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright © 2005-2010 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright © 2005-2010 Collabora Ltd </tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -18,10 +18,10 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:license>
- <interface name="org.freedesktop.Telepathy.Call1.Content.MediaDescription.Interface.RTCPExtendedReports">
+ <interface name="im.telepathy1.Call1.Content.MediaDescription.Interface.RTCPExtendedReports1">
<tp:added version="0.25.2">(as stable API)</tp:added>
<tp:requires
- interface="org.freedesktop.Telepathy.Call1.Content.MediaDescription"/>
+ interface="im.telepathy1.Call1.Content.MediaDescription"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This codec offer interface provides a method of signalling for
diff --git a/spec/Call1_Content_Media_Description_Interface_RTCP_Feedback1.xml b/spec/Call1_Content_Media_Description_Interface_RTCP_Feedback1.xml
new file mode 100644
index 000000000..e9dbf2268
--- /dev/null
+++ b/spec/Call1_Content_Media_Description_Interface_RTCP_Feedback1.xml
@@ -0,0 +1,126 @@
+<?xml version="1.0" ?>
+<node name="/Call1_Content_Media_Description_Interface_RTCP_Feedback1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+ <tp:copyright> Copyright © 2005-2010 Nokia Corporation </tp:copyright>
+ <tp:copyright> Copyright © 2005-2010 Collabora Ltd </tp:copyright>
+ <tp:license xmlns="http://www.w3.org/1999/xhtml">
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ </tp:license>
+
+ <interface name="im.telepathy1.Call1.Content.MediaDescription.Interface.RTCPFeedback1">
+ <tp:added version="0.25.2">(as stable API)</tp:added>
+ <tp:requires interface="im.telepathy1.Call1.Content.MediaDescription"/>
+
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>This codec offer interface provides a method of signalling
+ support for RTCP feedback, documented by <em>Extended RTP
+ Profile for Real-time Transport Control Protocol (RTCP)-Based
+ Feedback (RTP/AVPF)</em> (RFC 4585).</p>
+
+ <p>The codec identifiers used in the description of the Feedback Messages
+ sent in the <tp:dbus-ref
+ namespace="imt1.Call1.Content.MediaDescription">Accept</tp:dbus-ref>'s
+ should match those used for the RemoteCodecs in the same Accept call.
+ </p>
+
+ <p>For more details on what RTCP Feedback can do and how to use
+ it, one should refer to
+ <a href="http://www.faqs.org/rfcs/rfc4585.html">RFC 4585</a>.</p>
+
+ </tp:docstring>
+
+ <tp:struct name="RTCP_Feedback_Message_Properties">
+ <tp:added version="0.22.1"/>
+ <tp:changed version="0.23.4">This struct is also used by Call, but
+ in call, the CM should know about RTP profiles, and never use MAXUINT
+ as a default value, because it complicates things unnecessarily.
+ </tp:changed>
+ <tp:member type="u" name="RTCPMinimumInterval">
+ <tp:docstring>
+ The minimum interval between two regular RTCP packets in
+ milliseconds for this content. If no special value is
+ required, 5000 (5 seconds) should be used in RTP/AVP, and a
+ lower value in RTP/AVPF (by default, 0).
+ </tp:docstring>
+ </tp:member>
+ <tp:member type="a(sss)" tp:type="RTCP_Feedback_Message[]"
+ name="Messages">
+ <tp:docstring>
+ The RTCP feedback messages for this codec.
+ </tp:docstring>
+ </tp:member>
+ </tp:struct>
+
+ <tp:struct name="RTCP_Feedback_Message"
+ array-name="RTCP_Feedback_Message_List">
+ <tp:added version="0.22.1"/>
+ <tp:docstring>
+ A struct defining an RTCP feedback message.
+ </tp:docstring>
+ <tp:member type="s" name="Type">
+ <tp:docstring>
+ Feedback type, for example "ack", "nack", or "ccm".
+ </tp:docstring>
+ </tp:member>
+ <tp:member type="s" name="Subtype">
+ <tp:docstring>
+ Feedback subtype, according to the Type, can be an empty string (""),
+ if there is no subtype.
+ For example, generic nack is Type="nack" Subtype="".
+ </tp:docstring>
+ </tp:member>
+ <tp:member type="s" name="Parameters">
+ <tp:docstring>
+ Feedback parameters as a string. Format is defined in the relevant RFC
+ </tp:docstring>
+ </tp:member>
+ </tp:struct>
+
+ <tp:mapping name="RTCP_Feedback_Message_Map">
+ <tp:added version="0.22.1"/>
+ <tp:docstring>
+ A map of codec and its feedback properties.
+ </tp:docstring>
+ <tp:member type="u" name="Codec_Identifier">
+ <tp:docstring>
+ Numeric identifier for the codec. This will be used as the
+ PT in the SDP or content description.
+ </tp:docstring>
+ </tp:member>
+ <tp:member type="(ua(sss))" tp:type="RTCP_Feedback_Message_Properties"
+ name="Properties">
+ <tp:docstring>
+ The RTCP feedback properties for this codec.
+ </tp:docstring>
+ </tp:member>
+ </tp:mapping>
+
+ <property name="FeedbackMessages" type="a{u(ua(sss))}"
+ tp:type="RTCP_Feedback_Message_Map"
+ access="read" tp:name-for-bindings="Feedback_Messages">
+ <tp:docstring>
+ A map of remote feedback codec properties that are supported.
+ </tp:docstring>
+ </property>
+
+ <property name="DoesAVPF" type="b"
+ access="read" tp:name-for-bindings="Does_AVPF">
+ <tp:docstring>
+ True if the remote contact supports Audio-Visual Profile
+ Feedback (AVPF), otherwise False.
+ </tp:docstring>
+ </property>
+ </interface>
+</node>
+<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Call_Content_Media_Description_Interface_RTP_Header_Extensions.xml b/spec/Call1_Content_Media_Description_Interface_RTP_Header_Extensions1.xml
index 25a77e021..4f50eb7a8 100644
--- a/spec/Call_Content_Media_Description_Interface_RTP_Header_Extensions.xml
+++ b/spec/Call1_Content_Media_Description_Interface_RTP_Header_Extensions1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Call_Content_Media_Description_Interface_RTP_Header_Extensions" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Call1_Content_Media_Description_Interface_RTP_Header_Extensions1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright © 2005-2010 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright © 2005-2010 Collabora Ltd </tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -18,9 +18,9 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:license>
- <interface name="org.freedesktop.Telepathy.Call1.Content.MediaDescription.Interface.RTPHeaderExtensions">
+ <interface name="im.telepathy1.Call1.Content.MediaDescription.Interface.RTPHeaderExtensions1">
<tp:added version="0.25.2">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Call1.Content.MediaDescription"/>
+ <tp:requires interface="im.telepathy1.Call1.Content.MediaDescription"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This media description interface provides a method of signalling
@@ -33,6 +33,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:docstring>
+ <tp:enum name="Media_Stream_Direction" type="u">
+ <tp:enumvalue suffix="None" value="0">
+ <tp:docstring>Media are not being sent or received</tp:docstring>
+ </tp:enumvalue>
+ <tp:enumvalue suffix="Send" value="1">
+ <tp:docstring>Media are being sent, but not received</tp:docstring>
+ </tp:enumvalue>
+ <tp:enumvalue suffix="Receive" value="2">
+ <tp:docstring>Media are being received, but not sent</tp:docstring>
+ </tp:enumvalue>
+ <tp:enumvalue suffix="Bidirectional" value="3">
+ <tp:docstring>Media are being sent and received</tp:docstring>
+ </tp:enumvalue>
+ </tp:enum>
+
<tp:struct name="RTP_Header_Extension"
array-name="RTP_Header_Extensions_List">
<tp:docstring>
diff --git a/spec/Call_Interface_Mute.xml b/spec/Call1_Interface_Mute.xml
index 573efcc84..d1a7766d4 100644
--- a/spec/Call_Interface_Mute.xml
+++ b/spec/Call1_Interface_Mute.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Call_Interface_Mute" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Call1_Interface_Mute" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright © 2005-2010 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright © 2005-2010 Collabora Ltd </tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -18,12 +18,12 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:license>
- <interface name="org.freedesktop.Telepathy.Call1.Interface.Mute" tp:causes-havoc="experimental">
+ <interface name="im.telepathy1.Call1.Interface.Mute" tp:causes-havoc="experimental">
<tp:added version="0.25.2">(as stable API)</tp:added>
<tp:xor-requires>
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.Call1"/>
- <tp:requires interface="org.freedesktop.Telepathy.Call1.Content"/>
- <tp:requires interface="org.freedesktop.Telepathy.Call1.Stream"/>
+ <tp:requires interface="im.telepathy1.Channel.Type.Call1"/>
+ <tp:requires interface="im.telepathy1.Call1.Content"/>
+ <tp:requires interface="im.telepathy1.Call1.Stream"/>
</tp:xor-requires>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -114,12 +114,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
access="read" tp:name-for-bindings="Local_Mute_State">
<tp:docstring>
The current mute state of this part of the call. New
- <tp:dbus-ref namespace="ofdT.Call1">Content</tp:dbus-ref>s should
+ <tp:dbus-ref namespace="imt1.Call1">Content</tp:dbus-ref>s should
inherit the value of this property from the parent
- <tp:dbus-ref namespace="ofdT.Channel.Type">Call1</tp:dbus-ref>.
- Similarly, <tp:dbus-ref namespace="ofdT.Call1">Stream</tp:dbus-ref>s
+ <tp:dbus-ref namespace="imt1.Channel.Type">Call1</tp:dbus-ref>.
+ Similarly, <tp:dbus-ref namespace="imt1.Call1">Stream</tp:dbus-ref>s
should inherit it from the parent <tp:dbus-ref
- namespace="ofdT.Call1">Content</tp:dbus-ref>.
+ namespace="imt1.Call1">Content</tp:dbus-ref>.
</tp:docstring>
</property>
diff --git a/spec/Call_Stream.xml b/spec/Call1_Stream.xml
index 729dc7ea4..7751c7b8a 100644
--- a/spec/Call_Stream.xml
+++ b/spec/Call1_Stream.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Call_Stream"
+<node name="/Call1_Stream"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009-2010 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright © 2009-2010 Nokia Corporation</tp:copyright>
@@ -20,18 +20,18 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Call1.Stream">
+ <interface name="im.telepathy1.Call1.Stream">
<tp:added version="0.25.2">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>One stream inside a <tp:dbus-ref
- namespace="ofdT.Call1">Content</tp:dbus-ref>. A stream is
+ namespace="imt1.Call1">Content</tp:dbus-ref>. A stream is
a single flow of packets to and from a single remote endpoint.
If your call connects to multiple people, you could have
multiple streams.</p>
<p>For protocols that support muting streams separately, this object MAY
also implement the <tp:dbus-ref
- namespace="ofdT.Call1.Interface">Mute</tp:dbus-ref> interface</p>
+ namespace="imt1.Call1.Interface">Mute</tp:dbus-ref> interface</p>
</tp:docstring>
<method name="SetSending" tp:name-for-bindings="Set_Sending">
@@ -55,8 +55,8 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented" />
- <tp:error name="org.freedesktop.Telepathy.Error.NotYet">
+ <tp:error name="im.telepathy1.Error.NotImplemented" />
+ <tp:error name="im.telepathy1.Error.NotYet">
<tp:docstring>If the call has not been accepted yet, calling
SetSending(True) is an error. See
<tp:member-ref>LocalSendingState</tp:member-ref> for details.
@@ -89,14 +89,14 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The request contact is valid but is not involved in this
stream.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The protocol does not allow the local user to request the
other side starts sending on this stream.
@@ -211,7 +211,7 @@
<tp:added version="0.19.11"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Extra interfaces provided by this stream, such as <tp:dbus-ref
- namespace="ofdT.Call1">Stream.Interface.Media</tp:dbus-ref>.
+ namespace="imt1.Call1">Stream.Interface.Media</tp:dbus-ref>.
This SHOULD NOT include the Stream interface itself, and cannot
change once the stream has been created.</p>
</tp:docstring>
@@ -225,7 +225,7 @@
<p>Media sent to this stream will be sent to all members listed here.
All members listed here will also appear in <tp:dbus-ref
- namespace="ofdT.Channel.Type.Call1">CallMembers</tp:dbus-ref>,
+ namespace="imt1.Channel.Type.Call1">CallMembers</tp:dbus-ref>,
and each CallMembers member will be listed in at most one Stream per
Content. Therefore, to hide things from a member of the
call, UIs only need to mute one Stream per Content.</p>
@@ -237,10 +237,10 @@
>LocalSendingState</tp:member-ref>.</p>
<p>This mapping is also used by the streaming implementation to map
- from <tp:dbus-ref namespace="ofdT.Call1.Content"
+ from <tp:dbus-ref namespace="imt1.Call1.Content"
>MediaDescription</tp:dbus-ref>s to Streams. In this use-case,
all of the senders in this stream will be represented in
- <tp:dbus-ref namespace="ofdT.Call1.Content.Interface.Media"
+ <tp:dbus-ref namespace="imt1.Call1.Content.Interface.Media"
>RemoteMediaDescriptions</tp:dbus-ref>. This use-case should not
affect anything that does not handle media streaming.</p>
</tp:docstring>
@@ -279,13 +279,13 @@
this property indicates that the other side requested the
local user start sending media (which can be done by calling either
<tp:member-ref>SetSending</tp:member-ref> or <tp:dbus-ref
- namespace="ofdT.Channel.Type.Call1">Accept</tp:dbus-ref>).</p>
+ namespace="imt1.Channel.Type.Call1">Accept</tp:dbus-ref>).</p>
<p>When <tp:dbus-ref
- namespace="ofdT.Channel.Type.Call1">Accept</tp:dbus-ref> is
+ namespace="imt1.Channel.Type.Call1">Accept</tp:dbus-ref> is
called, all streams with a local sending state of
<tp:value-ref type="Sending_State">Pending_Send</tp:value-ref> and the associated
- <tp:dbus-ref namespace="ofdT.Call1.Content"
+ <tp:dbus-ref namespace="imt1.Call1.Content"
>Disposition</tp:dbus-ref> set to
<tp:value-ref type="Call_Content_Disposition">Initial</tp:value-ref> are
automatically set to sending.</p>
diff --git a/spec/Call_Stream_Endpoint.xml b/spec/Call1_Stream_Endpoint.xml
index cf2397b4a..8c705b8f8 100644
--- a/spec/Call_Stream_Endpoint.xml
+++ b/spec/Call1_Stream_Endpoint.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Call_Stream_Endpoint"
+<node name="/Call1_Stream_Endpoint"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009-2010 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright © 2009-2010 Nokia Corporation</tp:copyright>
@@ -20,7 +20,7 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Call1.Stream.Endpoint">
+ <interface name="im.telepathy1.Call1.Stream.Endpoint">
<tp:added version="0.25.2">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -148,7 +148,7 @@
<p>Also note that some or all of the local candidates in this list may
represent a peer-reflexive candidate that do not appear in
- <tp:dbus-ref namespace="ofdT.Call1.Stream.Interface.Media"
+ <tp:dbus-ref namespace="imt1.Call1.Stream.Interface.Media"
>LocalCandidates</tp:dbus-ref>.</p>
<p>See <a href='http://tools.ietf.org/html/rfc5245#appendix-B.6'>RFC
@@ -187,7 +187,7 @@
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument"/>
</tp:possible-errors>
</method>
@@ -283,8 +283,8 @@
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
</tp:possible-errors>
</method>
@@ -308,7 +308,7 @@
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument"/>
</tp:possible-errors>
</method>
@@ -332,7 +332,7 @@
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument"/>
</tp:possible-errors>
</method>
diff --git a/spec/Call_Stream_Interface_Media.xml b/spec/Call1_Stream_Interface_Media.xml
index 1356faa1a..09d1e0c45 100644
--- a/spec/Call_Stream_Interface_Media.xml
+++ b/spec/Call1_Stream_Interface_Media.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Call_Stream_Interface_Media"
+<node name="/Call1_Stream_Interface_Media"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009-2010 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright © 2009-2010 Nokia Corporation</tp:copyright>
@@ -20,9 +20,9 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Call1.Stream.Interface.Media">
+ <interface name="im.telepathy1.Call1.Stream.Interface.Media">
<tp:added version="0.25.2">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Call1.Stream"/>
+ <tp:requires interface="im.telepathy1.Call1.Stream"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This interface deals with how to connect a stream to an
@@ -32,7 +32,7 @@
endpoints at the same time. This is called forking in the SIP
jargon. Informations related to the connections are on the
<tp:dbus-ref
- namespace="ofdT.Call1.Stream">Endpoint</tp:dbus-ref>
+ namespace="imt1.Call1.Stream">Endpoint</tp:dbus-ref>
objects. Once the call is established, there MUST be a single
endpoint left.</p>
@@ -126,7 +126,7 @@
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The state change made no sense, and was ignored by the CM. The
most likely cause for this is a race-condition between the CM
@@ -187,7 +187,7 @@
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The state change made no sense, and was ignored by the CM. The
most likely cause for this is a race-condition between the CM
@@ -277,6 +277,14 @@
</tp:enumvalue>
</tp:enum>
+ <tp:enum name="Media_Stream_Base_Proto" type="u">
+ <tp:enumvalue suffix="UDP" value="0">
+ <tp:docstring>UDP (User Datagram Protocol)</tp:docstring>
+ </tp:enumvalue>
+ <tp:enumvalue suffix="TCP" value="1">
+ <tp:docstring>TCP (Transmission Control Protocol)</tp:docstring>
+ </tp:enumvalue>
+ </tp:enum>
<tp:mapping name="Candidate_Info">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -408,7 +416,7 @@
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The minimal required candidates have not been set. For
example, for an RTP protocol, at least one candidate on the
@@ -433,7 +441,7 @@
<tp:docstring>
Raw UDP, with or without STUN. All streaming clients are assumed to
support this transport, so there is no handler capability token for
- it in the <tp:dbus-ref namespace="ofdT.Channel.Type"
+ it in the <tp:dbus-ref namespace="imt1.Channel.Type"
>Call1</tp:dbus-ref> interface.
[This corresponds to "none" or "stun" in the old Media.StreamHandler
interface.]
@@ -720,7 +728,7 @@
<property name="Endpoints" tp:name-for-bindings="Endpoints"
type="ao" access="read">
<tp:docstring>
- <p>The list of <tp:dbus-ref namespace="ofdT.Call1.Stream"
+ <p>The list of <tp:dbus-ref namespace="imt1.Call1.Stream"
>Endpoint</tp:dbus-ref> objects that exist for this
stream.</p>
diff --git a/spec/Call_Content_Media_Description_Interface_RTCP_Feedback.xml b/spec/Call_Content_Media_Description_Interface_RTCP_Feedback.xml
deleted file mode 100644
index 7a558cc33..000000000
--- a/spec/Call_Content_Media_Description_Interface_RTCP_Feedback.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Call_Content_Media_Description_Interface_RTCP_Feedback" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright> Copyright © 2005-2010 Nokia Corporation </tp:copyright>
- <tp:copyright> Copyright © 2005-2010 Collabora Ltd </tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- </tp:license>
-
- <interface name="org.freedesktop.Telepathy.Call1.Content.MediaDescription.Interface.RTCPFeedback">
- <tp:added version="0.25.2">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Call1.Content.MediaDescription"/>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>This codec offer interface provides a method of signalling
- support for RTCP feedback, documented by <em>Extended RTP
- Profile for Real-time Transport Control Protocol (RTCP)-Based
- Feedback (RTP/AVPF)</em> (RFC 4585).</p>
-
- <p>The codec identifiers used in the description of the Feedback Messages
- sent in the <tp:dbus-ref
- namespace="ofdT.Call1.Content.MediaDescription">Accept</tp:dbus-ref>'s
- should match those used for the RemoteCodecs in the same Accept call.
- </p>
-
- <p>For more details on what RTCP Feedback can do and how to use
- it, one should refer to
- <a href="http://www.faqs.org/rfcs/rfc4585.html">RFC 4585</a>.</p>
-
- </tp:docstring>
-
- <property name="FeedbackMessages" type="a{u(ua(sss))}"
- tp:type="RTCP_Feedback_Message_Map"
- access="read" tp:name-for-bindings="Feedback_Messages">
- <tp:docstring>
- A map of remote feedback codec properties that are supported.
- </tp:docstring>
- </property>
-
- <property name="DoesAVPF" type="b"
- access="read" tp:name-for-bindings="Does_AVPF">
- <tp:docstring>
- True if the remote contact supports Audio-Visual Profile
- Feedback (AVPF), otherwise False.
- </tp:docstring>
- </property>
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Channel.xml b/spec/Channel.xml
index e0fa76594..194f5960a 100644
--- a/spec/Channel.xml
+++ b/spec/Channel.xml
@@ -18,7 +18,7 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel">
+ <interface name="im.telepathy1.Channel">
<property name="ChannelType" type="s" tp:type="DBus_Interface"
access="read" tp:name-for-bindings="Channel_Type">
@@ -27,11 +27,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>The channel's type. This cannot change once the channel has
been created.</p>
- <p>For compatibility between older connection managers and newer
- clients, if this is unavailable or is an empty string,
- clients MUST use the result of calling
- <tp:member-ref>GetChannelType</tp:member-ref>.</p>
-
<tp:rationale>
The GetAll method lets clients retrieve all properties in one
round-trip, which is desirable.
@@ -55,21 +50,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
the channel type and the Channel interface itself, and cannot
change once the channel has been created.</p>
- <p>For compatibility between older connection managers and newer
- clients, if this is unavailable, or if this is an empty list and
- <tp:member-ref>ChannelType</tp:member-ref> is an empty string,
- clients MUST use the result of calling
- <tp:member-ref>GetInterfaces</tp:member-ref> instead. If this is an
- empty list but ChannelType is non-empty, clients SHOULD NOT call
- GetInterfaces; this implies that connection managers that implement
- the ChannelType property MUST also implement the Interfaces property
- correctly.</p>
-
- <tp:rationale>
- The GetAll method lets clients retrieve all properties in one
- round-trip, which is desirable.
- </tp:rationale>
-
<p>When requesting a channel with a particular value for this
property, the request must fail without side-effects unless the
connection manager expects to be able to provide a channel whose
@@ -102,7 +82,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
MUST be present and not Handle_Type_None, and
<tp:member-ref>TargetID</tp:member-ref> MUST NOT be
present. Properties from
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface">Addressing1</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel.Interface">Addressing1</tp:dbus-ref>
MUST NOT be present.</p>
<p>The channel that satisfies the request MUST either:</p>
@@ -136,11 +116,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<ul>
<li>New channel C is signalled with target handle T</li>
<li>Client calls <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">InspectHandles</tp:dbus-ref>(CONTACT,
+ namespace="im.telepathy1.Connection">InspectHandles</tp:dbus-ref>(CONTACT,
[T])</li>
<li>Channel C closes, removing the last reference to handle T</li>
<li><tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">InspectHandles</tp:dbus-ref>(CONTACT,
+ namespace="im.telepathy1.Connection">InspectHandles</tp:dbus-ref>(CONTACT,
[T]) returns an error</li>
</ul>
</tp:rationale>
@@ -150,11 +130,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
MUST be present and not Handle_Type_None, and
<tp:member-ref>TargetHandle</tp:member-ref> MUST NOT be
present. Properties from
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface">Addressing1</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel.Interface">Addressing1</tp:dbus-ref>
MUST NOT be present.The request MUST fail with error InvalidHandle,
without side-effects, if the requested TargetID would not be
accepted by
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">RequestHandles</tp:dbus-ref>.</p>
+ <tp:dbus-ref namespace="im.telepathy1.Connection">RequestHandles</tp:dbus-ref>.</p>
<p>The returned channel must be related to the handle corresponding
to the given identifier, in the same way as if TargetHandle
@@ -197,14 +177,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
such as contact list channels may not be closed.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
This channel may never be closed, e.g. a contact list
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
This channel is not currently in a state where it can be closed,
e.g. a non-empty user-defined contact group
@@ -222,84 +202,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:docstring>
</signal>
- <method name="GetChannelType" tp:name-for-bindings="Get_Channel_Type">
- <tp:deprecated version="0.17.7">Use the ChannelType
- property if possible.</tp:deprecated>
- <arg direction="out" type="s" tp:type="DBus_Interface"
- name="Channel_Type">
- <tp:docstring>The interface name</tp:docstring>
- </arg>
- <tp:docstring>
- Returns the interface name for the type of this channel. Clients
- SHOULD use the <tp:member-ref>ChannelType</tp:member-ref> property
- instead, falling back to this method only if necessary.
-
- <tp:rationale>
- The GetAll method lets clients retrieve all properties in one
- round-trip.
- </tp:rationale>
- </tp:docstring>
- </method>
-
- <method name="GetHandle" tp:name-for-bindings="Get_Handle">
- <tp:deprecated version="0.17.7">Use the TargetHandleType
- and TargetHandle properties if possible.</tp:deprecated>
- <arg direction="out" type="u" tp:type="Handle_Type"
- name="Target_Handle_Type">
- <tp:docstring>
- The same as TargetHandleType.
- </tp:docstring>
- </arg>
- <arg direction="out" type="u" tp:type="Handle" name="Target_Handle">
- <tp:docstring>
- The same as TargetHandle.
- </tp:docstring>
- </arg>
- <tp:docstring>
- Returns the handle type and number if this channel represents a
- communication with a particular contact, room or server-stored list, or
- zero if it is transient and defined only by its contents. Clients
- SHOULD use the <tp:member-ref>TargetHandle</tp:member-ref> and
- <tp:member-ref>TargetHandleType</tp:member-ref> properties instead,
- falling back to this method only if necessary.
-
- <tp:rationale>
- The GetAll method lets clients retrieve all properties in one
- round-trip.
- </tp:rationale>
- </tp:docstring>
- </method>
-
- <method name="GetInterfaces" tp:name-for-bindings="Get_Interfaces">
- <tp:deprecated version="0.17.7">Use the Interfaces
- property if possible.</tp:deprecated>
- <arg direction="out" type="as" tp:type="DBus_Interface[]"
- name="Interfaces">
- <tp:docstring>
- An array of the D-Bus interface names
- </tp:docstring>
- </arg>
- <tp:docstring>
- Get the optional interfaces implemented by the channel.
- Clients SHOULD use the <tp:member-ref>Interfaces</tp:member-ref>
- property instead, falling back to this method only if necessary.
-
- <tp:rationale>
- The GetAll method lets clients retrieve all properties in one
- round-trip.
- </tp:rationale>
- </tp:docstring>
- </method>
-
<property name="Requested" tp:name-for-bindings="Requested"
type="b" access="read">
<tp:added version="0.17.13">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>True if this channel was created in response to a local request,
such as a call to
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.RequestChannel</tp:dbus-ref>
- or
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>.</p>
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>.</p>
<tp:rationale>
<p>The idea of this property is to distinguish between "incoming"
@@ -320,34 +229,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
e.g. because joining a Tube in a MUC context on XMPP implies
joining that MUC), then this property is false.</p>
- <p>For compatibility with older connection managers, clients SHOULD
- assume that this property is true if they see a channel announced
- by the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.NewChannel</tp:dbus-ref>
- signal with the suppress_handler parameter set to true.</p>
-
- <tp:rationale>
- <p>In a correct connection manager, the only way to get such a
- channel is to request it.</p>
- </tp:rationale>
-
- <p>Clients MAY additionally assume that this property is false
- if they see a channel announced by the NewChannel signal with the
- suppress_handler parameter set to false.</p>
-
- <tp:rationale>
- <p>This is more controversial, since it's possible to get that
- parameter set to false by requesting a channel. However, there's
- no good reason to do so, and we've deprecated this practice.</p>
-
- <p>In the particular case of the channel dispatcher, the only
- side-effect of wrongly thinking a channel is unrequested
- is likely to be that the user has to confirm that they want to
- use it, so it seems fairly harmless to assume in the channel
- dispatcher that channels with suppress_handler false are
- indeed unrequested.</p>
- </tp:rationale>
-
<p>It does not make sense for this property to be in channel
requests—it will always be true for channels returned by
CreateChannel, and callers of EnsureChannel cannot control whether an
@@ -383,14 +264,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>For channels requested by the
local user, this MUST be the value of
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.SelfHandle</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Connection.SelfHandle</tp:dbus-ref>
at the time the channel was created (i.e. not a channel-specific
handle).</p>
<tp:rationale>
<p>On some protocols, the SelfHandle may change (as signalled by
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.SelfHandleChanged</tp:dbus-ref>),
+ namespace="im.telepathy1">Connection.SelfContactChanged</tp:dbus-ref>),
but this property is immutable. Hence, locally-requested channels'
InitiatorHandle and InitiatorID may not match the current
SelfHandle; <tp:member-ref>Requested</tp:member-ref> can be used to
@@ -404,7 +285,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
anonymous).</p>
<p>For channels with the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface">Group</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Interface">Group1</tp:dbus-ref>
interface, this SHOULD be the same
contact who is signalled as the "Actor" causing the self-handle
to be placed in the local-pending set.</p>
@@ -430,14 +311,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
condition:</p>
<ul>
- <li>New StreamedMedia channel C is signalled with initiator
+ <li>New Call channel C is signalled with initiator
handle I</li>
<li>Client calls <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">InspectHandles</tp:dbus-ref>(CONTACT,
+ namespace="im.telepathy1.Connection">InspectHandles</tp:dbus-ref>(CONTACT,
[I])</li>
<li>Channel C closes, removing the last reference to handle I</li>
<li><tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">InspectHandles</tp:dbus-ref>(CONTACT,
+ namespace="im.telepathy1.Connection">InspectHandles</tp:dbus-ref>(CONTACT,
[I]) returns an error</li>
<li>Client can indicate that a call was missed, but not who
called!</li>
@@ -451,18 +332,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</property>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>All communication in the Telepathy framework is carried out via channel
- objects which are created and managed by connections. This interface must
- be implemented by all channel objects, along with one single channel type,
- such as <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Type.ContactList</tp:dbus-ref>
- which represents a list of people (such as a buddy list) or <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Type.Text</tp:dbus-ref> which
- represents a channel over which textual messages are sent and received.</p>
+ <p>
+ All communication in the Telepathy framework is carried out via
+ channel objects which are created and managed by
+ connections. This interface must be implemented by all channel
+ objects, along with one single channel type, such as
+ <tp:dbus-ref
+ namespace="im.telepathy1">Channel.Type.Text</tp:dbus-ref> which
+ represents a channel over which textual messages are sent and
+ received.</p>
<p>Each Channel's object path MUST start with the object path of
its associated <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>, followed
+ namespace="im.telepathy1">Connection</tp:dbus-ref>, followed
by '/'. There MAY be any number of additional object-path components,
which clients MUST NOT attempt to parse.</p>
@@ -479,11 +361,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>Each channel has a number of immutable properties (which cannot vary
after the channel has been announced with <tp:dbus-ref
- namespace='ofdT.Connection.Interface.Requests'>NewChannels</tp:dbus-ref>),
+ namespace='imt1.Connection.Interface.Requests'>NewChannels</tp:dbus-ref>),
provided to clients in the
- <tp:dbus-ref namespace='ofdT.Client.Observer'>ObserveChannels</tp:dbus-ref>,
- <tp:dbus-ref namespace='ofdT.Client.Approver'>AddDispatchOperation</tp:dbus-ref> and
- <tp:dbus-ref namespace='ofdT.Client.Handler'>HandleChannels</tp:dbus-ref>
+ <tp:dbus-ref namespace='imt1.Client.Observer'>ObserveChannels</tp:dbus-ref>,
+ <tp:dbus-ref namespace='imt1.Client.Approver'>AddDispatchOperation</tp:dbus-ref> and
+ <tp:dbus-ref namespace='imt1.Client.Handler'>HandleChannels</tp:dbus-ref>
methods to permit immediate identification of the channel. This interface
contains immutable properties common to all channels. In brief:</p>
@@ -507,12 +389,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>Other optional <tp:member-ref>Interfaces</tp:member-ref> can be
implemented to indicate other available
functionality, such as <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Interface.Group</tp:dbus-ref>
+ namespace="im.telepathy1">Channel.Interface.Group1</tp:dbus-ref>
if the channel contains a number of contacts, <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Interface.Password</tp:dbus-ref>
+ namespace="im.telepathy1">Channel.Interface.Password1</tp:dbus-ref>
to indicate that a channel may have a password set to require entry, and
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Interface.ChatState</tp:dbus-ref>
+ namespace="im.telepathy1">Channel.Interface.ChatState1</tp:dbus-ref>
for typing notifications. The interfaces implemented may not vary after
the channel has been created. These other interfaces (along with the
interface named by <tp:member-ref>ChannelType</tp:member-ref>) may
@@ -524,11 +406,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
which indicates that the channel is defined by some other properties. For
instance, transient ad-hoc chat rooms may be defined only by their members (as visible
through the <tp:dbus-ref
- namespace="ofdT.Channel.Interface">Group</tp:dbus-ref>
+ namespace="imt1.Channel.Interface">Group1</tp:dbus-ref>
interface), and <tp:dbus-ref
- namespace='ofdT.Channel.Type'>ContactSearch</tp:dbus-ref>
+ namespace='imt1.Channel.Type'>ContactSearch1</tp:dbus-ref>
channels represent a single search attempt for a particular <tp:dbus-ref
- namespace='ofdT.Channel.Type.ContactSearch'>Server</tp:dbus-ref>.</p>
+ namespace='imt1.Channel.Type.ContactSearch1'>Server</tp:dbus-ref>.</p>
<p>Specific connection manager implementations may implement channel types and
interfaces which are not contained within this specification in order to
@@ -552,6 +434,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
guarantee that Channels' object paths had the Connection's object path
as a prefix.
</tp:changed>
+
+ <tp:changed version="UNRELEASED">Deprecated methods
+ (GetChannelType, GetHandle, and GetInterfaces) have been removed
+ from this interface.</tp:changed>
</interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Channel_Bundle.xml b/spec/Channel_Bundle.xml
deleted file mode 100644
index d211525a4..000000000
--- a/spec/Channel_Bundle.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Channel_Bundle"
- xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright>Copyright (C) 2008 Collabora Ltd.</tp:copyright>
- <tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
-<p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-</p>
- </tp:license>
- <interface name="org.freedesktop.Telepathy.ChannelBundle.DRAFT"
- tp:causes-havoc="experimental">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A group of related channels, which should all be dispatched to the
- same handler if possible.</p>
-
- <p>Bundles currently have no functionality of their own, so clients
- SHOULD NOT examine this interface, but should instead treat the
- bundle object-path as an opaque identifier. If more functionality is
- added to bundles in future, this interface will be used for capability
- discovery.</p>
-
- <p>The lifetime of a bundle is defined by its component channels -
- as long as one or more channels whose Bundle property is <em>B</em>
- exist, the bundle <em>B</em> will also exist.</p>
- </tp:docstring>
-
- <property name="Interfaces" tp:name-for-bindings="Interfaces"
- type="as" access="read" tp:type="DBus_Interface[]">
- <tp:docstring>
- A list of the extra interfaces provided by this channel bundle.
- </tp:docstring>
- </property>
-
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Channel_Dispatch_Operation.xml b/spec/Channel_Dispatch_Operation.xml
index 6ec69a67b..2b4756a97 100644
--- a/spec/Channel_Dispatch_Operation.xml
+++ b/spec/Channel_Dispatch_Operation.xml
@@ -21,29 +21,26 @@
MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.ChannelDispatchOperation">
+ <interface name="im.telepathy1.ChannelDispatchOperation">
<tp:added version="0.17.26">(as a stable interface)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A channel dispatch operation is an object in the ChannelDispatcher
representing a batch of unrequested channels being announced to
client
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client">Approver</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Client">Approver</tp:dbus-ref>
processes.</p>
<p>These objects can result from new incoming channels or channels
which are automatically created for some reason, but cannot result
from outgoing requests for channels.</p>
- <p>More specifically, whenever the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.NewChannels</tp:dbus-ref>
- signal contains channels whose
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">Requested</tp:dbus-ref>
- property is false, or whenever the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.NewChannel</tp:dbus-ref>
- signal contains a channel with suppress_handler false,
- one or more ChannelDispatchOperation objects are created for those
- channels.</p>
+ <p>More specifically, whenever the <tp:dbus-ref
+ namespace="im.telepathy1">Connection.Interface.Requests.NewChannels</tp:dbus-ref>
+ signal contains channels whose <tp:dbus-ref
+ namespace="im.telepathy1.Channel">Requested</tp:dbus-ref>
+ property is false, one or more ChannelDispatchOperation
+ objects are created for those channels.</p>
<p>(If some channels in a NewChannels signal are in different bundles,
this is an error. The channel dispatcher SHOULD recover by treating
@@ -52,9 +49,9 @@
<p>First, the channel dispatcher SHOULD construct a list of all the
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client">Handler</tp:dbus-ref>s
+ namespace="im.telepathy1.Client">Handler</tp:dbus-ref>s
that could handle all the channels (based on their <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Handler">HandlerChannelFilter</tp:dbus-ref>
property), ordered by
priority in some implementation-dependent way. If there are handlers
which could handle all the channels, one channel dispatch operation
@@ -66,30 +63,20 @@
SHOULD terminate that channel instead of creating a channel dispatcher
for it. It is RECOMMENDED that the channel dispatcher closes
the channels using <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Interface.Destroyable.Destroy</tp:dbus-ref>
+ namespace="im.telepathy1">Channel.Interface.Destroyable1.Destroy</tp:dbus-ref>
if supported, or <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Close</tp:dbus-ref>
- otherwise. As a special case, the channel dispatcher SHOULD NOT close
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">ContactList</tp:dbus-ref>
- channels, and if Close fails, the channel dispatcher SHOULD ignore
- that channel.</p>
-
- <tp:rationale>
- <p>ContactList channels are strange. We hope to replace them with
- something better, such as an interface on the Connection, in a
- future version of this specification.</p>
- </tp:rationale>
+ namespace="im.telepathy1">Channel.Close</tp:dbus-ref>
+ otherwise.</p>
<p>When listing channel handlers, priority SHOULD be given to
channel handlers that are already handling channels from the same
bundle.</p>
<p>If a handler with <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">BypassApproval</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Handler">BypassApproval</tp:dbus-ref>
<code>= True</code> could handle all of the channels in the dispatch
operation, then the channel dispatcher SHOULD call <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandleChannels</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Handler">HandleChannels</tp:dbus-ref>
on that handler, and (assuming the call succeeds) emit
<tp:member-ref>Finished</tp:member-ref> and stop processing those
channels without involving any approvers.</p>
@@ -97,12 +84,12 @@
<tp:rationale>
<p>Some channel types can be picked up "quietly" by an existing
channel handler. If a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">Text</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type">Text</tp:dbus-ref>
channel is added to an existing bundle containing a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type">Call1</tp:dbus-ref>
channel, there shouldn't be
any approvers, flashing icons or notification bubbles, if the
- the UI for the StreamedMedia channel can just add a text box
+ the UI for the Call channel can just add a text box
and display the message.</p>
</tp:rationale>
@@ -111,7 +98,7 @@
approver to claim the channels or request that they are handled.
See
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Approver">AddDispatchOperation</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Approver">AddDispatchOperation</tp:dbus-ref>
for more details on this.</p>
<p>Finally, if the approver requested it, the channel dispatcher SHOULD
@@ -130,7 +117,7 @@
type="o" access="read">
<tp:docstring>
The <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>
+ namespace="im.telepathy1">Connection</tp:dbus-ref>
with which the <tp:member-ref>Channels</tp:member-ref> are
associated. The well-known bus name to use can be derived from
this object path by removing the leading '/' and replacing all
@@ -142,7 +129,7 @@
type="o" access="read">
<tp:docstring>
The <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>
+ namespace="im.telepathy1">Account</tp:dbus-ref>
with which the <tp:member-ref>Connection</tp:member-ref>
and <tp:member-ref>Channels</tp:member-ref> are
associated. This property cannot change.
@@ -153,7 +140,7 @@
type="a(oa{sv})" access="read" tp:type="Channel_Details[]">
<tp:docstring>
The <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel</tp:dbus-ref>s
+ namespace="im.telepathy1">Channel</tp:dbus-ref>s
to be dispatched, and their properties. Change notification is via
the <tp:member-ref>ChannelLost</tp:member-ref> signal (channels
cannot be added to this property, only removed).
@@ -170,7 +157,7 @@
<p>This signal MUST NOT be emitted until all Approvers that were
invoked have returned (successfully or with an error) from
their <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Approver">AddDispatchOperation</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Approver">AddDispatchOperation</tp:dbus-ref>
method.</p>
<tp:rationale>
@@ -189,7 +176,7 @@
<arg name="Channel" type="o">
<tp:docstring>
The <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel</tp:dbus-ref>
+ namespace="im.telepathy1">Channel</tp:dbus-ref>
that closed.
</tp:docstring>
</arg>
@@ -198,7 +185,7 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The name of a D-Bus error indicating why the channel closed. If
no better reason can be found,
- <code>org.freedesktop.Telepathy.Error.NotAvailable</code> MAY
+ <code>im.telepathy1.Error.NotAvailable</code> MAY
be used as a fallback; this means that this error SHOULD NOT be
given any more specific meaning.</p>
</tp:docstring>
@@ -215,9 +202,9 @@
type="as" access="read" tp:type="DBus_Well_Known_Name[]">
<tp:docstring>
<p>The well known bus names (starting with
- <code>org.freedesktop.Telepathy.Client.</code>) of the possible
+ <code>im.telepathy1.Client.</code>) of the possible
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client">Handler</tp:dbus-ref>s
+ namespace="im.telepathy1.Client">Handler</tp:dbus-ref>s
for these channels. The channel dispatcher MUST place the most
preferred handlers first, according to some reasonable heuristic.
As a result, approvers SHOULD use the first handler by default.</p>
@@ -257,7 +244,7 @@
<p>(FIXME: list some possible errors)</p>
<p>If the channel handler raises an error from <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandleChannels</tp:dbus-ref>,
+ namespace="im.telepathy1.Client.Handler">HandleChannels</tp:dbus-ref>,
this method
MAY respond by raising that same error, even if it is not
specifically documented here.</p>
@@ -266,27 +253,27 @@
<arg direction="in" type="s" tp:type="DBus_Bus_Name" name="Handler">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The well-known bus name (starting with
- <code>org.freedesktop.Telepathy.Client.</code>) of the channel
+ <code>im.telepathy1.Client.</code>) of the channel
handler that should handle the channel, or the empty string
if the client has no preferred channel handler.</p>
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
The selected handler is non-empty, but is not a syntactically
correct <tp:type>DBus_Bus_Name</tp:type> or does not start with
- "<code>org.freedesktop.Telepathy.Client.</code>".
+ "<code>im.telepathy1.Client.</code>".
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The selected handler is temporarily unable to handle these
channels.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The selected handler is syntactically correct, but will never
be able to handle these channels (for instance because the channels
@@ -294,7 +281,7 @@
raised NotImplemented).
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYours">
+ <tp:error name="im.telepathy1.Error.NotYours">
<tp:docstring>
At the time that HandleWith was called, this dispatch operation was
processing an earlier call to HandleWith. The earlier call has
@@ -315,18 +302,18 @@
internally. If this method is called successfully, the process
calling this method becomes the handler for the channel, but
<em>does not</em> have the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandleChannels</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Handler">HandleChannels</tp:dbus-ref>
method called on it.</p>
<p>Clients that call Claim on channels but do not immediately
close them SHOULD implement the Handler interface and its
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandledChannels</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Handler">HandledChannels</tp:dbus-ref>
property.</p>
<p>Approvers wishing to reject channels MUST call this method to
claim ownership of them, and MUST NOT call
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel">Close</tp:dbus-ref>
on the channels unless/until this method returns successfully.</p>
<tp:rationale>
@@ -336,13 +323,15 @@
to acknowledge any messages that have already been displayed to
the user first - ideally, the approver would display and then
acknowledge the messages - or to call <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Interface.Destroyable.Destroy</tp:dbus-ref>
+ namespace="im.telepathy1">Channel.Interface.Destroyable1.Destroy</tp:dbus-ref>
if the destructive behaviour of that method is desired.</p>
- <p>Similarly, an Approver for StreamedMedia channels can close the
- channel with a reason (e.g. "busy") if desired. The channel
- dispatcher, which is designed to have no specific knowledge
- of particular channel types, can't do that.</p>
+ <p>Similarly, an Approver for <tp:dbus-ref
+ namespace="imt1.Channel.Type">Call1</tp:dbus-ref> channels
+ can close the channel with a reason (e.g. "busy") if
+ desired. The channel dispatcher, which is designed to have
+ no specific knowledge of particular channel types, can't
+ do that.</p>
</tp:rationale>
<p>If successful, this method will cause the ChannelDispatchOperation
@@ -359,7 +348,7 @@
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYours">
+ <tp:error name="im.telepathy1.Error.NotYours">
<tp:docstring>
At the time that Claim was called, this dispatch operation was
processing a call to HandleWith which has now succeeded, so
@@ -380,14 +369,14 @@
<p>A variant of <tp:member-ref>HandleWith</tp:member-ref> allowing the
approver to pass an user action time. This timestamp will be passed
to the Handler when <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandleChannels</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Handler">HandleChannels</tp:dbus-ref>
is called.</p>
</tp:docstring>
<arg direction="in" type="s" tp:type="DBus_Bus_Name" name="Handler">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The well-known bus name (starting with
- <code>org.freedesktop.Telepathy.Client.</code>) of the channel
+ <code>im.telepathy1.Client.</code>) of the channel
handler that should handle the channel, or the empty string
if the client has no preferred channel handler.</p>
</tp:docstring>
@@ -400,20 +389,20 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
The selected handler is non-empty, but is not a syntactically
correct <tp:type>DBus_Bus_Name</tp:type> or does not start with
- "<code>org.freedesktop.Telepathy.Client.</code>".
+ "<code>im.telepathy1.Client.</code>".
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The selected handler is temporarily unable to handle these
channels.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The selected handler is syntactically correct, but will never
be able to handle these channels (for instance because the channels
@@ -421,7 +410,7 @@
raised NotImplemented).
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYours">
+ <tp:error name="im.telepathy1.Error.NotYours">
<tp:docstring>
At the time that HandleWith was called, this dispatch operation was
processing an earlier call to HandleWith. The earlier call has
@@ -461,7 +450,7 @@
<p>This signal MUST NOT be emitted until all Approvers that were
invoked have returned (successfully or with an error) from
their <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Approver">AddDispatchOperation</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Approver">AddDispatchOperation</tp:dbus-ref>
method.</p>
<tp:rationale>
diff --git a/spec/Channel_Dispatcher.xml b/spec/Channel_Dispatcher.xml
index 771d06089..bd4825ba2 100644
--- a/spec/Channel_Dispatcher.xml
+++ b/spec/Channel_Dispatcher.xml
@@ -21,7 +21,7 @@
USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.ChannelDispatcher">
+ <interface name="im.telepathy1.ChannelDispatcher">
<tp:added version="0.17.26">(as a stable interface)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -32,9 +32,9 @@
<p>If a channel dispatcher is running, it is responsible for dispatching
new channels on all
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>s
+ <tp:dbus-ref namespace="im.telepathy1">Connection</tp:dbus-ref>s
created by the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">AccountManager</tp:dbus-ref>.
+ <tp:dbus-ref namespace="im.telepathy1">AccountManager</tp:dbus-ref>.
Connections not created by the AccountManager are outside the scope
of the channel dispatcher.</p>
@@ -48,10 +48,10 @@
<p>The current channel dispatcher is defined to be the process that
owns the well-known bus name
- <code>org.freedesktop.Telepathy.ChannelDispatcher</code> on
+ <code>im.telepathy1.ChannelDispatcher</code> on
the session bus. This process MUST export an object with this
interface at the object path
- <code>/org/freedesktop/Telepathy/ChannelDispatcher</code>.</p>
+ <code>/im/telepathy1/ChannelDispatcher</code>.</p>
<p>Until a mechanism exists for making a reasonable automatic choice
of ChannelDispatcher implementation, implementations SHOULD NOT
@@ -68,13 +68,13 @@
<dl>
<dt><tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client">Observer</tp:dbus-ref></dt>
+ namespace="im.telepathy1.Client">Observer</tp:dbus-ref></dt>
<dd><p>Observers monitor the creation of new channels. This
functionality can be used for things like message logging.
All observers are notified simultaneously.</p></dd>
<dt><tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client">Approver</tp:dbus-ref></dt>
+ namespace="im.telepathy1.Client">Approver</tp:dbus-ref></dt>
<dd>
<p>Approvers notify the user that new channels have been created,
and also select which channel handler will be used for the channel,
@@ -83,7 +83,7 @@
</dd>
<dt><tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client">Handler</tp:dbus-ref></dt>
+ namespace="im.telepathy1.Client">Handler</tp:dbus-ref></dt>
<dd>
<p>Each new channel or set of channels is passed to exactly one
handler as its final destination. A typical channel handler is a
@@ -99,169 +99,12 @@
</tp:docstring>
</property>
- <method name="CreateChannel" tp:name-for-bindings="Create_Channel">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Equivalent to calling
- <tp:member-ref>CreateChannelWithHints</tp:member-ref> with an empty
- <var>Hints</var> parameter.</p>
- </tp:docstring>
-
- <arg direction="in" name="Account" type="o">
- <tp:docstring>
- The
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>
- for which the new channel is to be created.
- </tp:docstring>
- </arg>
-
- <arg direction="in" name="Requested_Properties" type="a{sv}"
- tp:type="Qualified_Property_Value_Map">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A dictionary containing desirable properties.</p>
-
- <p>This parameter is used in the same way as the corresponding
- parameter to
- <tp:member-ref>CreateChannelWithHints</tp:member-ref>.</p>
- </tp:docstring>
- </arg>
-
- <arg direction="in" name="User_Action_Time" type="x"
- tp:type="User_Action_Timestamp">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The time at which user action occurred, or 0 if this channel
- request is for some reason not involving user action.</p>
-
- <p>This parameter is used in the same way as the corresponding
- parameter to
- <tp:member-ref>CreateChannelWithHints</tp:member-ref>.</p>
- </tp:docstring>
- </arg>
-
- <arg direction="in" name="Preferred_Handler" type="s"
- tp:type="DBus_Well_Known_Name">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Either the well-known bus name (starting with
- <code>org.freedesktop.Telepathy.Client.</code>)
- of the preferred handler for this
- channel, or an empty string to indicate that any handler would be
- acceptable.</p>
-
- <p>This parameter is used in the same way as the corresponding
- parameter to
- <tp:member-ref>CreateChannelWithHints</tp:member-ref>.</p>
- </tp:docstring>
- <tp:changed version="0.19.0">
- Previously, the spec didn't say that this should disregard the
- handler's filter. This has been implemented since
- telepathy-mission-control 5.3.2.
- </tp:changed>
- </arg>
-
- <arg direction="out" name="Request" type="o">
- <tp:docstring>
- A
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">ChannelRequest</tp:dbus-ref>
- object.
- </tp:docstring>
- </arg>
-
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- The <var>Preferred_Handler</var> is syntactically invalid or does
- not start with <code>org.freedesktop.Telepathy.Client.</code>,
- the <var>Account</var> does not exist, or one of the
- <var>Requested_Properties</var> is invalid
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
-
- </method>
-
- <method name="EnsureChannel" tp:name-for-bindings="Ensure_Channel">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Equivalent to calling
- <tp:member-ref>EnsureChannelWithHints</tp:member-ref> with an empty
- <var>Hints</var> parameter.</p>
- </tp:docstring>
-
- <arg direction="in" name="Account" type="o">
- <tp:docstring>
- The
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>
- for which the new channel is to be created.
- </tp:docstring>
- </arg>
-
- <arg direction="in" name="Requested_Properties" type="a{sv}"
- tp:type="Qualified_Property_Value_Map">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A dictionary containing desirable properties.</p>
-
- <p>This parameter is used in the same way as the corresponding
- parameter to
- <tp:member-ref>CreateChannelWithHints</tp:member-ref>.</p>
- </tp:docstring>
- </arg>
-
- <arg direction="in" name="User_Action_Time" type="x"
- tp:type="User_Action_Timestamp">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The time at which user action occurred, or 0 if this channel
- request is for some reason not involving user action.</p>
-
- <p>This parameter is used in the same way as the corresponding
- parameter to
- <tp:member-ref>CreateChannelWithHints</tp:member-ref>.</p>
- </tp:docstring>
- </arg>
-
- <arg direction="in" name="Preferred_Handler" type="s"
- tp:type="DBus_Well_Known_Name">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Either the well-known bus name (starting with
- <code>org.freedesktop.Telepathy.Client.</code>)
- of the preferred handler for this
- channel, or an empty string to indicate that any handler would be
- acceptable. The behaviour and rationale are the same as for the
- corresponding parameter to
- <tp:member-ref>EnsureChannelWithHints</tp:member-ref>.</p>
- </tp:docstring>
- </arg>
-
- <arg direction="out" name="Request" type="o">
- <tp:docstring>
- A
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">ChannelRequest</tp:dbus-ref>
- object.
- </tp:docstring>
- </arg>
-
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- The <var>Preferred_Handler</var> is syntactically invalid or does
- not start with <code>org.freedesktop.Telepathy.Client.</code>,
- the <var>Account</var> does not exist, or one of the
- <var>Requested_Properties</var> is invalid
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
-
- </method>
-
- <method name="CreateChannelWithHints"
- tp:name-for-bindings="Create_Channel_With_Hints">
- <tp:added version="0.21.5">
- Support for this method is indicated by the
- <tp:member-ref>SupportsRequestHints</tp:member-ref> property.
- Clients MUST recover from this method being unsupported by falling back
- to <tp:dbus-ref
- namespace="ofdT.ChannelDispatcher">CreateChannel</tp:dbus-ref>.
- </tp:added>
+ <method name="CreateChannel"
+ tp:name-for-bindings="Create_Channel">
+ <tp:added version="0.21.5"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Start a request to create a channel. This initially just creates a
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">ChannelRequest</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">ChannelRequest</tp:dbus-ref>
object, which can be used to continue the request and track its
success or failure.</p>
@@ -281,10 +124,10 @@
<p>If this method is called for an Account that is disabled, invalid
or otherwise unusable, no error is signalled until
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelRequest.Proceed</tp:dbus-ref>
+ namespace="im.telepathy1">ChannelRequest.Proceed</tp:dbus-ref>
is called, at which point
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelRequest.Failed</tp:dbus-ref>
+ namespace="im.telepathy1">ChannelRequest.Failed</tp:dbus-ref>
is emitted with an appropriate error.</p>
<tp:rationale>
@@ -300,7 +143,7 @@
<arg direction="in" name="Account" type="o">
<tp:docstring>
The
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Account</tp:dbus-ref>
for which the new channel is to be created.
</tp:docstring>
</arg>
@@ -310,14 +153,14 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A dictionary containing desirable properties. This has the same
semantics as the corresponding parameter to
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>.
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>.
</p>
<p>Certain properties will not necessarily make sense in this
dictionary: for instance,
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandle</tp:dbus-ref>
can only be given if the requester is able to interact with a
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Connection</tp:dbus-ref>
to the desired account.</p>
</tp:docstring>
</arg>
@@ -328,10 +171,10 @@
<p>The time at which user action occurred, or 0 if this channel
request is for some reason not involving user action.
The <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelRequest">UserActionTime</tp:dbus-ref>
+ namespace="im.telepathy1.ChannelRequest">UserActionTime</tp:dbus-ref>
property will be set to this value, and it will eventually be
passed as the <code>User_Action_Time</code> parameter of <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandleChannels</tp:dbus-ref>.</p>
+ namespace="im.telepathy1.Client.Handler">HandleChannels</tp:dbus-ref>.</p>
</tp:docstring>
</arg>
@@ -339,13 +182,13 @@
tp:type="DBus_Well_Known_Name">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Either the well-known bus name (starting with
- <code>org.freedesktop.Telepathy.Client.</code>)
+ <code>im.telepathy1.Client.</code>)
of the preferred handler for this
channel, or an empty string to indicate that any handler would be
acceptable. The channel dispatcher SHOULD dispatch as many as
possible of the resulting channels (ideally, all of them)
to that handler—irrespective of whether that handler's <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Handler">HandlerChannelFilter</tp:dbus-ref>
matches the channel—and SHOULD remember the preferred handler
so it can try to dispatch subsequent channels in the same bundle
to the same handler.</p>
@@ -357,7 +200,7 @@
<p>This is partly so the channel dispatcher can call
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandleChannels</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Handler">HandleChannels</tp:dbus-ref>
on it, and partly so the channel dispatcher
can recover state if it crashes and is restarted.</p>
@@ -372,7 +215,7 @@
<p>If this is a well-known bus name and the handler has the
Requests interface, the channel dispatcher SHOULD
call <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Interface.Requests">AddRequest</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Interface.Requests">AddRequest</tp:dbus-ref>
on that Handler after this method has returned.</p>
<tp:rationale>
@@ -383,7 +226,7 @@
<p>This is copied to the ChannelRequest that is returned,
as the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelRequest">PreferredHandler</tp:dbus-ref>
+ namespace="im.telepathy1.ChannelRequest">PreferredHandler</tp:dbus-ref>
property.</p>
</tp:docstring>
@@ -398,11 +241,13 @@
<tp:docstring>
<p>Additional information about the channel request, which will be
used as the value for the resulting request's <tp:dbus-ref
- namespace="ofdT.ChannelRequest">Hints</tp:dbus-ref>
+ namespace="imt1.ChannelRequest">Hints</tp:dbus-ref>
property.</p>
<tp:rationale>
- <p>See the Hints property's documentation for rationale.</p>
+ <p>See the <tp:dbus-ref
+ namespace="imt1.ChannelRequest">Hints</tp:dbus-ref>
+ property's documentation for rationale.</p>
</tp:rationale>
</tp:docstring>
</arg>
@@ -410,16 +255,16 @@
<arg direction="out" name="Request" type="o">
<tp:docstring>
A
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">ChannelRequest</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">ChannelRequest</tp:dbus-ref>
object.
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The <var>Preferred_Handler</var> is syntactically invalid or does
- not start with <code>org.freedesktop.Telepathy.Client.</code>,
+ not start with <code>im.telepathy1.Client.</code>,
the <var>Account</var> does not exist, or one of the
<var>Requested_Properties</var> is invalid
</tp:docstring>
@@ -428,41 +273,35 @@
</method>
- <method name="EnsureChannelWithHints"
- tp:name-for-bindings="Ensure_Channel_With_Hints">
- <tp:added version="0.21.5">
- Support for this method is indicated by the
- <tp:member-ref>SupportsRequestHints</tp:member-ref> property.
- Clients MUST recover from this method being unsupported by falling back
- to <tp:dbus-ref
- namespace="ofdT.ChannelDispatcher">EnsureChannel</tp:dbus-ref>.
- </tp:added>
+ <method name="EnsureChannel"
+ tp:name-for-bindings="Ensure_Channel">
+ <tp:added version="0.21.5"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Start a request to ensure that a channel exists, creating it if
necessary. This initially just creates a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelRequest</tp:dbus-ref>
+ namespace="im.telepathy1">ChannelRequest</tp:dbus-ref>
object, which can be used to continue the request and track its
success or failure.</p>
<p>If this method is called for an Account that is disabled, invalid
or otherwise unusable, no error is signalled until
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelRequest.Proceed</tp:dbus-ref>
+ namespace="im.telepathy1">ChannelRequest.Proceed</tp:dbus-ref>
is called, at which point
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelRequest.Failed</tp:dbus-ref>
+ namespace="im.telepathy1">ChannelRequest.Failed</tp:dbus-ref>
is emitted with an appropriate error.</p>
<tp:rationale>
<p>The rationale is as for <tp:dbus-ref
- namespace='org.freedesktop.Telepathy.ChannelDispatcher'>CreateChannelWithHints</tp:dbus-ref>.</p>
+ namespace='im.telepathy1.ChannelDispatcher'>CreateChannel</tp:dbus-ref>.</p>
</tp:rationale>
</tp:docstring>
<arg direction="in" name="Account" type="o">
<tp:docstring>
The
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Account</tp:dbus-ref>
for which the new channel is to be created.
</tp:docstring>
</arg>
@@ -472,14 +311,14 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A dictionary containing desirable properties. This has the same
semantics as the corresponding parameter to
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.EnsureChannel</tp:dbus-ref>.
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Requests.EnsureChannel</tp:dbus-ref>.
</p>
<p>Certain properties will not necessarily make sense in this
dictionary: for instance,
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandle</tp:dbus-ref>
can only be given if the requester is able to interact with a
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Connection</tp:dbus-ref>
to the desired account.</p>
</tp:docstring>
</arg>
@@ -492,7 +331,7 @@
<p>This parameter is used in the same way as the corresponding
parameter to
- <tp:member-ref>CreateChannelWithHints</tp:member-ref>.</p>
+ <tp:member-ref>CreateChannel</tp:member-ref>.</p>
</tp:docstring>
</arg>
@@ -500,12 +339,12 @@
tp:type="DBus_Well_Known_Name">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Either the well-known bus name (starting with
- <code>org.freedesktop.Telepathy.Client.</code>)
+ <code>im.telepathy1.Client.</code>)
of the preferred handler for this
channel, or an empty string to indicate that any handler would be
acceptable. The behaviour and rationale are the same as for the
corresponding parameter to
- <tp:member-ref>CreateChannelWithHints</tp:member-ref>, except
+ <tp:member-ref>CreateChannel</tp:member-ref>, except
as noted here.</p>
<p>If any new channels are created in response to this
@@ -515,7 +354,7 @@
so it can try to dispatch subsequent channels in the same bundle
to the same handler. If the requested channel already exists (that
is, <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.EnsureChannel</tp:dbus-ref>
+ namespace="im.telepathy1">Connection.Interface.Requests.EnsureChannel</tp:dbus-ref>
returns <code>Yours=False</code>) then the channel dispatcher
SHOULD re-dispatch the channel to its existing handler, and MUST
NOT dispatch it to this client (unless it is the existing handler);
@@ -523,11 +362,11 @@
<tp:rationale>
<p>An address book application, for example, might call <tp:dbus-ref
- namespace='org.freedesktop.Telepathy.ChannelDispatcher'>EnsureChannel</tp:dbus-ref>
+ namespace='im.telepathy1.ChannelDispatcher'>EnsureChannel</tp:dbus-ref>
to ensure that a text channel with a particular contact is
displayed to the user; it does not care whether a new channel was
made. An IM client might call <tp:dbus-ref
- namespace='org.freedesktop.Telepathy.ChannelDispatcher'>EnsureChannel</tp:dbus-ref>
+ namespace='im.telepathy1.ChannelDispatcher'>EnsureChannel</tp:dbus-ref>
in response to the user double-clicking an entry in the contact
list, with itself as the <code>Preferred_Handler</code>; if the
user already has a conversation with that contact in another
@@ -544,23 +383,23 @@
<tp:docstring>
Additional information about the channel request, which will be used
as the value for the resulting request's <tp:dbus-ref
- namespace="ofdT.ChannelRequest">Hints</tp:dbus-ref>
+ namespace="imt1.ChannelRequest">Hints</tp:dbus-ref>
property.</tp:docstring>
</arg>
<arg direction="out" name="Request" type="o">
<tp:docstring>
A
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">ChannelRequest</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">ChannelRequest</tp:dbus-ref>
object.
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The <var>Preferred_Handler</var> is syntactically invalid or does
- not start with <code>org.freedesktop.Telepathy.Client.</code>,
+ not start with <code>im.telepathy1.Client.</code>,
the <var>Account</var> does not exist, or one of the
<var>Requested_Properties</var> is invalid
</tp:docstring>
@@ -576,27 +415,27 @@
</tp:added>
<tp:changed version="0.23.2">This method now returns
<var>Delegated</var> and <var>Not_Delegated</var> instead of nothing.
- <tp:dbus-ref namespace="ofdT.Client.Handler">HandleChannels</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Client.Handler">HandleChannels</tp:dbus-ref>
is now called once per <var>Channel</var> in <var>Channels</var>.
</tp:changed>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Called by a
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client">Handler</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Client">Handler</tp:dbus-ref>
to redispatch a bunch of channels it is currently handling.</p>
<p>For each <var>Channel</var> in <var>Channels</var>, if another
- <tp:dbus-ref namespace="ofdT.Client">Handler</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Client">Handler</tp:dbus-ref>
can be found,
- <tp:dbus-ref namespace="ofdT.Client.Handler">HandleChannels</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Client.Handler">HandleChannels</tp:dbus-ref>
will be called on it until a
- <tp:dbus-ref namespace="ofdT.Client">Handler</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Client">Handler</tp:dbus-ref>
accepts it.</p>
<p>This method returns once all the <var>Channels</var> have either
been accepted or rejected by Handlers.</p>
<p>If this method fails, the original
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client">Handler</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Client">Handler</tp:dbus-ref>
is still handling the channels.</p>
</tp:docstring>
@@ -604,7 +443,7 @@
<arg direction="in" name="Channels" type="ao">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The list of channels to redispatch. The caller has to be the current
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client">Handler</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Client">Handler</tp:dbus-ref>
of all of these channels
</p>
</tp:docstring>
@@ -618,7 +457,7 @@
<p>This parameter is used in the same way as the corresponding
parameter to
- <tp:member-ref>CreateChannelWithHints</tp:member-ref>.</p>
+ <tp:member-ref>CreateChannel</tp:member-ref>.</p>
</tp:docstring>
</arg>
@@ -626,12 +465,12 @@
tp:type="DBus_Well_Known_Name">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Either the well-known bus name (starting with
- <code>org.freedesktop.Telepathy.Client.</code>)
+ <code>im.telepathy1.Client.</code>)
of the preferred new handler for these
channels, or an empty string to indicate that any handler would be
acceptable. The behaviour and rationale are the same as for the
corresponding parameter to
- <tp:member-ref>CreateChannelWithHints</tp:member-ref>.</p>
+ <tp:member-ref>CreateChannel</tp:member-ref>.</p>
</tp:docstring>
</arg>
@@ -642,7 +481,7 @@
longer handling these channels.</p>
<p>The client should remove these channels from its
- <tp:dbus-ref namespace="ofdT.Client.Handler">HandledChannels</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Client.Handler">HandledChannels</tp:dbus-ref>
property.</p>
</tp:docstring>
</arg>
@@ -656,14 +495,14 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The Preferred_Handler is syntactically invalid or does
- not start with <code>org.freedesktop.Telepathy.Client.</code>.
+ not start with <code>im.telepathy1.Client.</code>.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYours">
+ <tp:error name="im.telepathy1.Error.NotYours">
<tp:docstring>
At least one <var>Channel</var> in <var>Channels</var> is not
currently handled by the caller. No <var>Channel</var> has been
@@ -711,7 +550,7 @@
</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Equivalent of calling
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.ChannelDispatcher">EnsureChannel</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.ChannelDispatcher">EnsureChannel</tp:dbus-ref>
with a <var>Requested_Properties</var> which would result in ensuring
<var>Channel</var>.</p>
@@ -733,12 +572,12 @@
<p>This parameter is used in the same way as the corresponding
parameter to
- <tp:member-ref>EnsureChannelWithHints</tp:member-ref>.</p>
+ <tp:member-ref>EnsureChannel</tp:member-ref>.</p>
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The Account does not exist, the Channel does not exist or it
does not belong to the Account.
@@ -748,27 +587,6 @@
</tp:possible-errors>
</method>
- <property name="SupportsRequestHints"
- tp:name-for-bindings="Supports_Request_Hints"
- type="b" access="read">
- <tp:added version="0.21.5"/>
- <tp:docstring>
- If <code>True</code>, the channel dispatcher is new enough to support
- <tp:member-ref>CreateChannelWithHints</tp:member-ref> and
- <tp:member-ref>EnsureChannelWithHints</tp:member-ref>, in addition
- to the older <tp:dbus-ref
- namespace="ofdT.ChannelDispatcher">CreateChannel</tp:dbus-ref>
- and <tp:dbus-ref
- namespace="ofdT.ChannelDispatcher">EnsureChannel</tp:dbus-ref>
- methods, and also new enough to emit <tp:dbus-ref
- namespace="ofdT.ChannelRequest">SucceededWithChannel</tp:dbus-ref>
- before the older <tp:dbus-ref
- namespace="ofdT.ChannelRequest">Succeeded</tp:dbus-ref> signal.
- If <code>False</code> or missing, only the metadata-less
- variants are supported.
- </tp:docstring>
- </property>
-
</interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Channel_Dispatcher_Interface_Operation_List.xml b/spec/Channel_Dispatcher_Interface_Operation_List1.xml
index be06f5caa..f2d365a71 100644
--- a/spec/Channel_Dispatcher_Interface_Operation_List.xml
+++ b/spec/Channel_Dispatcher_Interface_Operation_List1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Dispatcher_Interface_Operation_List"
+<node name="/Channel_Dispatcher_Interface_Operation_List1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2008-2009 Collabora Ltd.</tp:copyright>
@@ -21,10 +21,10 @@
USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.ChannelDispatcher.Interface.OperationList">
+ <interface name="im.telepathy1.ChannelDispatcher.Interface.OperationList1">
<tp:added version="0.17.26">(as a stable interface)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.ChannelDispatcher"/>
+ <tp:requires interface="im.telepathy1.ChannelDispatcher"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This interface allows users of the ChannelDispatcher to enumerate
@@ -51,7 +51,7 @@
<tp:docstring>
The object path of the
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelDispatchOperation</tp:dbus-ref>.
+ namespace="im.telepathy1">ChannelDispatchOperation</tp:dbus-ref>.
</tp:docstring>
</tp:member>
@@ -71,10 +71,10 @@
<p>Each dictionary MUST contain at least the following keys:</p>
<ul>
- <li><tp:dbus-ref>org.freedesktop.Telepathy.ChannelDispatchOperation.Interfaces</tp:dbus-ref></li>
- <li><tp:dbus-ref>org.freedesktop.Telepathy.ChannelDispatchOperation.Connection</tp:dbus-ref></li>
- <li><tp:dbus-ref>org.freedesktop.Telepathy.ChannelDispatchOperation.Account</tp:dbus-ref></li>
- <li><tp:dbus-ref>org.freedesktop.Telepathy.ChannelDispatchOperation.PossibleHandlers</tp:dbus-ref></li>
+ <li><tp:dbus-ref>im.telepathy1.ChannelDispatchOperation.Interfaces</tp:dbus-ref></li>
+ <li><tp:dbus-ref>im.telepathy1.ChannelDispatchOperation.Connection</tp:dbus-ref></li>
+ <li><tp:dbus-ref>im.telepathy1.ChannelDispatchOperation.Account</tp:dbus-ref></li>
+ <li><tp:dbus-ref>im.telepathy1.ChannelDispatchOperation.PossibleHandlers</tp:dbus-ref></li>
</ul>
</tp:docstring>
</tp:member>
@@ -118,7 +118,7 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
Emitted when a dispatch operation finishes (i.e. exactly once per
emission of <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelDispatchOperation.Finished</tp:dbus-ref>).
+ namespace="im.telepathy1">ChannelDispatchOperation.Finished</tp:dbus-ref>).
<tp:rationale>
Strictly speaking this is redundant with
diff --git a/spec/Channel_Future.xml b/spec/Channel_Future.xml
deleted file mode 100644
index 5bbca17b1..000000000
--- a/spec/Channel_Future.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Channel_Future"
- xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright>Copyright (C) 2008 Collabora Ltd.</tp:copyright>
- <tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
- <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
- </tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.FUTURE"
- tp:causes-havoc="a staging area for future Channel functionality">
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>This interface contains functionality which we intend to incorporate
- into the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel</tp:dbus-ref> interface
- in future. It should be considered to
- be conceptually part of the core Channel interface, but without
- API or ABI guarantees.</p>
-
- <tp:rationale>
- <p>If we add new functionality to the Channel interface, libraries
- that use generated code (notably telepathy-glib) will have it as
- part of their ABI forever, meaning we can't make incompatible
- changes. By using this interface as a staging area for future
- Channel functionality, we can try out new properties, signals
- and methods as application-specific extensions, then merge them
- into the core Channel interface when we have enough implementation
- experience to declare them to be stable.</p>
-
- <p>The name is by analogy to Python's <code>__future__</code>
- pseudo-module.</p>
- </tp:rationale>
- </tp:docstring>
-
- <property name="Bundle" tp:name-for-bindings="Bundle"
- type="o" access="read">
- <tp:added version="0.17.9">(in Channel.FUTURE
- pseudo-interface)</tp:added>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">ChannelBundle.DRAFT</tp:dbus-ref>
- to which this channel belongs.</p>
-
- <p>A channel's Bundle property can never change.</p>
-
- <p>Older connection managers might not have this property. Clients
- (particularly the channel dispatcher) SHOULD recover by considering
- each channel to be in a bundle containing only that channel,
- distinct from all other bundles, which has no additional
- interfaces.</p>
- </tp:docstring>
- </property>
-
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Channel_Handler.xml b/spec/Channel_Handler.xml
deleted file mode 100644
index edf975e4d..000000000
--- a/spec/Channel_Handler.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Channel_Handler" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright>Copyright (C) 2007-2008 Collabora Limited</tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
- <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
- </tp:license>
- <interface name="org.freedesktop.Telepathy.ChannelHandler">
- <tp:deprecated version="0.17.23">
- Clients should implement <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Client.Handler</tp:dbus-ref>
- instead.
- </tp:deprecated>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>An interface exported by Mission Control 4 client applications which
- are able to handle incoming channels.</p>
- </tp:docstring>
- <tp:added version="0.17.0"/>
-
- <method name="HandleChannel" tp:name-for-bindings="Handle_Channel">
- <tp:docstring>
- Called when a channel handler should handle a new channel.
- </tp:docstring>
- <tp:added version="0.17.0"/>
-
- <arg direction="in" type="s" name="Bus_Name" tp:type="DBus_Bus_Name">
- <tp:docstring>
- The bus name of the connection and channel
- </tp:docstring>
- </arg>
-
- <arg direction="in" type="o" name="Connection">
- <tp:docstring>
- The object-path of the connection that owns the channel
- </tp:docstring>
- </arg>
-
- <arg direction="in" type="s" tp:type="DBus_Interface" name="Channel_Type">
- <tp:docstring>
- The channel type
- </tp:docstring>
- </arg>
-
- <arg direction="in" type="o" name="Channel">
- <tp:docstring>
- The object-path of the channel
- </tp:docstring>
- </arg>
-
- <arg direction="in" type="u" tp:type="Handle_Type" name="Handle_Type">
- <tp:docstring>The type of the handle that the channel communicates
- with, or 0 if there is no associated handle</tp:docstring>
- </arg>
-
- <arg direction="in" type="u" tp:type="Handle" name="Handle">
- <tp:docstring>The handle that the channel communicates with,
- or 0 if there is no associated handle</tp:docstring>
- </arg>
-
- <!-- FIXME: possible errors? -->
- </method>
-
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
-
diff --git a/spec/Channel_Interface_Addressing.xml b/spec/Channel_Interface_Addressing1.xml
index 2524ac7f6..9daada9c4 100644
--- a/spec/Channel_Interface_Addressing.xml
+++ b/spec/Channel_Interface_Addressing1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Addressing" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Interface_Addressing1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2010 Collabora Limited</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
<p>This library is free software; you can redistribute it and/or
@@ -16,7 +16,7 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.Addressing1"
+ <interface name="im.telepathy1.Channel.Interface.Addressing1"
tp:causes-havoc="experimental">
<tp:added version="0.19.12">(as draft)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -54,7 +54,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:rationale>
<p>While this seems redundant, since the scheme is included in
<tp:member-ref>TargetURI</tp:member-ref>, it exists for constructing
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref>
that support a limited set of URI schemes.</p>
</tp:rationale>
@@ -72,10 +72,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If this is present in a channel request,
<tp:member-ref>TargetVCardField</tp:member-ref>
MUST be present, and
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref>,
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandle</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref>,
and <tp:member-ref>TargetURI</tp:member-ref> MUST NOT be present.
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandleType</tp:dbus-ref>
must either not be present or set to Handle_Type_Contact.
The request MUST fail with error InvalidHandle, without
side-effects, if the requested vCard address cannot be found.</p>
@@ -92,11 +92,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If this is present in a channel request,
<tp:member-ref>TargetVCardField</tp:member-ref>
MUST be present, and
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref>,
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandle</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref>,
and <tp:member-ref>TargetVCardAddress</tp:member-ref> MUST NOT be
present.
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandleType</tp:dbus-ref>
must either not be present or set to Handle_Type_Contact.
The request MUST fail with error InvalidHandle, without
side-effects, if the requested vCard address cannot be found.</p>
diff --git a/spec/Channel_Interface_Anonymity.xml b/spec/Channel_Interface_Anonymity1.xml
index ef3a3b85d..f98311fdb 100644
--- a/spec/Channel_Interface_Anonymity.xml
+++ b/spec/Channel_Interface_Anonymity1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Anonymity"
+<node name="/Channel_Interface_Anonymity1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2008-2010 Nokia Corporation</tp:copyright>
@@ -21,13 +21,13 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.Anonymity">
+ <interface name="im.telepathy1.Channel.Interface.Anonymity1">
<tp:added version="0.19.7">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Interface for requesting the anonymity modes of a channel
- (as defined in <tp:dbus-ref namespace="org.freedesktop.Telepathy"
- >Connection.Interface.Anonymity</tp:dbus-ref>).</p>
+ (as defined in <tp:dbus-ref namespace="im.telepathy1"
+ >Connection.Interface.Anonymity1</tp:dbus-ref>).</p>
</tp:docstring>
<property name="AnonymityModes" type="u" tp:type="Anonymity_Mode_Flags"
diff --git a/spec/Channel_Interface_Call_State.xml b/spec/Channel_Interface_Call_State.xml
deleted file mode 100644
index b0aea5915..000000000
--- a/spec/Channel_Interface_Call_State.xml
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Channel_Interface_Call_State" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright> Copyright (C) 2008 Collabora Limited </tp:copyright>
- <tp:copyright> Copyright (C) 2008 Nokia Corporation </tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
- <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
- </tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.CallState">
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.StreamedMedia"/>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>An interface for streamed media channels that can indicate call
- progress or call states. The presence of this interface is no guarantee
- that call states will actually be signalled (for instance, SIP
- implementations are not guaranteed to generate status 180 Ringing, so a
- call can be accepted without the Ringing flag ever having been set;
- similarly, Jingle implementations are not guaranteed to send
- <code>&lt;ringing/&gt;</code>).</p>
-
- <p>To notify the other participant in the call that they are on hold,
- see <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface"
- >Hold</tp:dbus-ref>.</p>
- </tp:docstring>
- <tp:added version="0.17.2"/>
-
- <method name="GetCallStates" tp:name-for-bindings="Get_Call_States">
- <tp:docstring>
- Get the current call states for all contacts involved in this call.
- </tp:docstring>
-
- <arg tp:type="Channel_Call_State_Map" name="States" direction="out"
- type="a{uu}">
- <tp:docstring>
- The current call states. Participants where the call state flags
- would be 0 (all unset) may be omitted from this mapping.
- </tp:docstring>
- </arg>
- </method>
-
- <signal name="CallStateChanged" tp:name-for-bindings="Call_State_Changed">
- <tp:docstring>
- Emitted when the state of a member of the channel has changed.
- </tp:docstring>
-
- <arg name="Contact" type="u" tp:type="Contact_Handle">
- <tp:docstring>
- An integer handle for the contact.
- </tp:docstring>
- </arg>
-
- <arg name="State" type="u" tp:type="Channel_Call_State_Flags">
- <tp:docstring>
- The new state for this contact.
- </tp:docstring>
- </arg>
- </signal>
-
- <tp:mapping name="Channel_Call_State_Map">
- <tp:docstring>
- A map from contacts to call states.
- </tp:docstring>
-
- <tp:member name="Contact" type="u" tp:type="Contact_Handle">
- <tp:docstring>A contact involved in this call.</tp:docstring>
- </tp:member>
-
- <tp:member name="State" type="u" tp:type="Channel_Call_State_Flags">
- <tp:docstring>State flags for the given contact.</tp:docstring>
- </tp:member>
- </tp:mapping>
-
- <tp:flags name="Channel_Call_State_Flags" value-prefix="Channel_Call_State" type="u">
- <tp:docstring>
- A set of flags representing call states.
- </tp:docstring>
-
- <tp:flag suffix="Ringing" value="1">
- <tp:docstring>
- The contact has been alerted about the call but has not responded
- (e.g. 180 Ringing in SIP).
- </tp:docstring>
- </tp:flag>
-
- <tp:flag suffix="Queued" value="2">
- <tp:docstring>
- The contact is temporarily unavailable, and the call has been placed
- in a queue (e.g. 182 Queued in SIP, or call-waiting in telephony).
- </tp:docstring>
- </tp:flag>
-
- <tp:flag suffix="Held" value="4">
- <tp:docstring>
- The contact has placed the call on hold, and will not receive
- media from the local user or any other participants until they
- unhold the call again.
- </tp:docstring>
- </tp:flag>
-
- <tp:flag suffix="Forwarded" value="8">
- <tp:docstring>
- The initiator of the call originally called a contact other than the
- current recipient of the call, but the call was then forwarded or
- diverted.
- </tp:docstring>
- </tp:flag>
-
- <tp:flag suffix="In_Progress" value="16">
- <tp:docstring>
- Progress has been made in placing the outgoing call, but the
- destination contact may not have been made aware of the call yet
- (so the Ringing state is not appropriate). This corresponds to SIP's
- status code 183 Session Progress, and could be used when the
- outgoing call has reached a gateway, for instance.
- </tp:docstring>
- </tp:flag>
-
- <tp:flag suffix="Conference_Host" value="32">
- <tp:added version='0.19.11'/>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- This contact has merged this call into a conference. Note that GSM
- provides a notification when the remote party merges a call into a
- conference, but not when it is split out again; thus, this flag can
- only indicate that the call has been part of a conference at some
- point. If a GSM connection manager receives a notification that a
- call has been merged into a conference a second time, it SHOULD
- represent this by clearing and immediately re-setting this flag on
- the remote contact.
- </tp:docstring>
- </tp:flag>
- </tp:flags>
-
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Channel_Interface_Captcha_Authentication.xml b/spec/Channel_Interface_Captcha_Authentication1.xml
index 27b1e0cf5..bba0cb2c6 100644
--- a/spec/Channel_Interface_Captcha_Authentication.xml
+++ b/spec/Channel_Interface_Captcha_Authentication1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Captcha_Authentication"
+<node name="/Channel_Interface_Captcha_Authentication1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright © 2010-2012 Collabora Limited </tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -17,20 +17,20 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.CaptchaAuthentication1">
+ <interface name="im.telepathy1.Channel.Interface.CaptchaAuthentication1">
<tp:added version="0.25.2">(version 1)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <tp:requires interface="im.telepathy1.Channel"/>
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal"
value="true"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A channel interface for captcha authentication.
When this interface appears on a <tp:dbus-ref
- namespace="ofdT.Channel.Type">ServerAuthentication</tp:dbus-ref>
+ namespace="imt1.Channel.Type">ServerAuthentication1</tp:dbus-ref>
channel, it represents authentication with the server. In future,
it could also be used to authenticate with secondary services,
or even to authenticate end-to-end connections with contacts. As a result,
- this interface does not REQUIRE <tp:dbus-ref namespace="ofdT.Channel.Type"
- >ServerAuthentication</tp:dbus-ref> to allow for a potential future
+ this interface does not REQUIRE <tp:dbus-ref namespace="imt1.Channel.Type"
+ >ServerAuthentication1</tp:dbus-ref> to allow for a potential future
Channel.Type.PeerAuthentication interface.</p>
<p>In any protocol that requires a captcha, the connection manager can
@@ -39,9 +39,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
interactively.</p>
<p>For channels managed by a
- <tp:dbus-ref namespace="ofdT">ChannelDispatcher</tp:dbus-ref>,
+ <tp:dbus-ref namespace="imt1">ChannelDispatcher</tp:dbus-ref>,
only the channel's <tp:dbus-ref
- namespace="ofdT.Client">Handler</tp:dbus-ref> may call the
+ namespace="imt1.Client">Handler</tp:dbus-ref> may call the
methods on this interface. Other clients MAY observe the
authentication process by watching its signals and properties.</p>
@@ -213,11 +213,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:error-ref>ServiceConfused</tp:error-ref>.</p>
<p>If this interface appears on a <tp:dbus-ref
- namespace="ofdT.Channel.Type">ServerAuthentication</tp:dbus-ref>
+ namespace="imt1.Channel.Type">ServerAuthentication1</tp:dbus-ref>
channel, and connection to the server fails with an authentication
failure, this error code SHOULD be copied into the
<tp:dbus-ref
- namespace="ofdT">Connection.ConnectionError</tp:dbus-ref>
+ namespace="imt1">Connection.ConnectionError</tp:dbus-ref>
signal.</p>
</tp:docstring>
</property>
@@ -231,14 +231,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
disconnection; otherwise, the empty map. The keys and values are
the same as for the second argument of
<tp:dbus-ref
- namespace="ofdT">Connection.ConnectionError</tp:dbus-ref>.</p>
+ namespace="imt1">Connection.ConnectionError</tp:dbus-ref>.</p>
<p>If this interface appears on a <tp:dbus-ref
- namespace="ofdT.Channel.Type">ServerAuthentication</tp:dbus-ref>
+ namespace="imt1.Channel.Type">ServerAuthentication1</tp:dbus-ref>
channel, and connection to the server fails with an authentication
failure, these details SHOULD be copied into the
<tp:dbus-ref
- namespace="ofdT">Connection.ConnectionError</tp:dbus-ref>
+ namespace="imt1">Connection.ConnectionError</tp:dbus-ref>
signal.</p>
</tp:docstring>
</property>
@@ -288,14 +288,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
Either the state is not Local_Pending or Try_Again, or it has
already been called and
<tp:member-ref>CanRetryCaptcha</tp:member-ref> is False.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
</tp:possible-errors>
</method>
@@ -335,13 +335,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:rationale>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The state is not in Local_Pending or
<tp:member-ref>GetCaptchas</tp:member-ref> had never been called.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
</tp:possible-errors>
</method>
@@ -359,12 +359,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The state is not in Local_Pending.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
</tp:possible-errors>
</method>
@@ -383,7 +383,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
by the Handler. This message SHOULD NOT be sent to the remote
server, but SHOULD be copied into the 'debug-message' field
of the <tp:member-ref>CaptchaErrorDetails</tp:member-ref> and
- <tp:dbus-ref namespace="ofdT.Connection">ConnectionError</tp:dbus-ref>.
+ <tp:dbus-ref namespace="imt1.Connection">ConnectionError</tp:dbus-ref>.
</tp:docstring>
</arg>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -392,7 +392,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
to close the channel.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The current state is Failed.
</tp:docstring>
@@ -431,12 +431,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
If this is used, the <tp:member-ref>CaptchaError</tp:member-ref>
SHOULD be set to <tp:error-ref>CaptchaNotSupported</tp:error-ref>.
This SHOULD also be used if
- <tp:dbus-ref namespace="ofdT.Channel">Close</tp:dbus-ref> is called
+ <tp:dbus-ref namespace="imt1.Channel">Close</tp:dbus-ref> is called
before <tp:member-ref>CancelCaptcha</tp:member-ref>.
<tp:rationale>
If no Handler supports captcha channels,
the ChannelDispatcher will just call
- <tp:dbus-ref namespace="ofdT.Channel">Close</tp:dbus-ref>,
+ <tp:dbus-ref namespace="imt1.Channel">Close</tp:dbus-ref>,
because it has no knowledge of specific channel types.
</tp:rationale>
</tp:docstring>
@@ -458,7 +458,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
a local action. Call <tp:member-ref>AnswerCaptchas</tp:member-ref>
to go to the Remote_Pending state, or call
<tp:member-ref>CancelCaptcha</tp:member-ref> followed by
- <tp:dbus-ref namespace="ofdT.Channel">Close</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Channel">Close</tp:dbus-ref>
to give up.
</tp:docstring>
</tp:enumvalue>
@@ -468,7 +468,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
a response from the server. Wait for a reply from the server,
which will result in the Succeeded, Try_Again, or Failed state,
or call <tp:member-ref>CancelCaptcha</tp:member-ref> followed by
- <tp:dbus-ref namespace="ofdT.Channel">Close</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Channel">Close</tp:dbus-ref>
to give up.
</tp:docstring>
</tp:enumvalue>
@@ -477,7 +477,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
Everyone is happy. Connection to the server will proceed as soon as
this state is reached. There is nothing useful to do in this state
except to call <tp:dbus-ref
- namespace="ofdT.Channel">Close</tp:dbus-ref>
+ namespace="imt1.Channel">Close</tp:dbus-ref>
to close the channel.
</tp:docstring>
</tp:enumvalue>
@@ -487,7 +487,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
Call <tp:member-ref>GetCaptchas</tp:member-ref> again to get
a new captcha, or
<tp:member-ref>CancelCaptcha</tp:member-ref> followed by
- <tp:dbus-ref namespace="ofdT.Channel">Close</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Channel">Close</tp:dbus-ref>
to give up.
</tp:docstring>
</tp:enumvalue>
@@ -495,7 +495,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring>
Authentication has failed in some way. There is nothing
useful to do in this state except to close the channel with
- <tp:dbus-ref namespace="ofdT.Channel">Close</tp:dbus-ref>.
+ <tp:dbus-ref namespace="imt1.Channel">Close</tp:dbus-ref>.
</tp:docstring>
</tp:enumvalue>
</tp:enum>
diff --git a/spec/Channel_Interface_Chat_State.xml b/spec/Channel_Interface_Chat_State1.xml
index 27515d2e8..f2f1dabed 100644
--- a/spec/Channel_Interface_Chat_State.xml
+++ b/spec/Channel_Interface_Chat_State1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Chat_State" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Interface_Chat_State1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright (C) 2007 Collabora Limited </tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
<p>This library is free software; you can redistribute it and/or
@@ -16,8 +16,8 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.ChatState">
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.Text"/>
+ <interface name="im.telepathy1.Channel.Interface.ChatState1">
+ <tp:requires interface="im.telepathy1.Channel.Type.Text"/>
<tp:mapping name="Chat_State_Map">
<tp:added version="0.19.7"/>
@@ -39,26 +39,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>Contacts in this channel, but who are not listed in this map,
may be assumed to be in the Inactive state.</p>
-
- <p>In implementations that do not have this property, its value may be
- assumed to be empty until a
- <tp:member-ref>ChatStateChanged</tp:member-ref> signal indicates
- otherwise.</p>
-
- <tp:rationale>
- <p>This property was not present in older versions of telepathy-spec,
- because chat states in XMPP are not state-recoverable (if you
- miss the change notification signal, there's no way to know the
- state). However, this property still allows clients to recover
- state changes that were seen by the CM before the client started
- to deal with the channel.</p>
-
- <p>In CMs that follow older spec versions, assuming Inactive will
- mean that initial chat states will always be assumed to be
- Inactive, which is the best we can do. XEP 0085 specifies
- Inactive as the "neutral" state to be assumed unless told
- otherwise.</p>
- </tp:rationale>
</tp:docstring>
</property>
@@ -73,9 +53,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
has changed.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument"/>
</tp:possible-errors>
</method>
<signal name="ChatStateChanged" tp:name-for-bindings="Chat_State_Changed">
diff --git a/spec/Channel_Interface_Conference.xml b/spec/Channel_Interface_Conference1.xml
index abda59eef..41a833c84 100644
--- a/spec/Channel_Interface_Conference.xml
+++ b/spec/Channel_Interface_Conference1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Conference"
+<node name="/Channel_Interface_Conference1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009 Collabora Limited</tp:copyright>
<tp:copyright>Copyright © 2009 Nokia Corporation</tp:copyright>
@@ -20,11 +20,11 @@
02110-1301, USA.</p>
</tp:license>
<interface
- name="org.freedesktop.Telepathy.Channel.Interface.Conference">
+ name="im.telepathy1.Channel.Interface.Conference1">
<tp:added version="0.19.13">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:requires
- interface="org.freedesktop.Telepathy.Channel.Interface.Group"/>
+ interface="im.telepathy1.Channel.Interface.Group1"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface for multi-user conference channels that can "continue
@@ -44,13 +44,13 @@
<p>Existing channels are upgraded by requesting a new channel of the same
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">ChannelType</tp:dbus-ref>,
+ namespace="im.telepathy1.Channel">ChannelType</tp:dbus-ref>,
listing the channels to be merged into the new conference in the
<tp:member-ref>InitialChannels</tp:member-ref> property of the request.
If <tp:member-ref>InitialInviteeHandles</tp:member-ref> and
<tp:member-ref>InitialInviteeIDs</tp:member-ref> are
<var>Allowed_Properties</var> in <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref>,
+ namespace="im.telepathy1.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref>,
ad-hoc conferences to a set of contacts may be created by requesting a
channel, specifying
<tp:member-ref>InitialInviteeHandles</tp:member-ref> and/or
@@ -60,15 +60,15 @@
upgrade a channel to a conference and invite others to join it.</p>
<p>Channels with this interface MAY also implement <tp:dbus-ref
- namespace='ofdT.Channel.Interface'>MergeableConference.DRAFT</tp:dbus-ref>
+ namespace='imt1.Channel.Interface'>MergeableConference1</tp:dbus-ref>
to support merging more 1-1 channels into an ongoing conference.
Similarly, 1-1 channels MAY implement <tp:dbus-ref
- namespace='ofdT.Channel.Interface'>Splittable.DRAFT</tp:dbus-ref> to
+ namespace='imt1.Channel.Interface'>Splittable1</tp:dbus-ref> to
support being broken out of a Conference channel.</p>
<p>The <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface"
- >Group</tp:dbus-ref> interface on Conference channels MAY use
+ namespace="im.telepathy1.Channel.Interface"
+ >Group1</tp:dbus-ref> interface on Conference channels MAY use
channel-specific handles for participants; clients SHOULD support
both Conferences that have channel-specific handles, and those that
do not.</p>
@@ -114,8 +114,8 @@
into a single conference call by calling:</p>
<blockquote>
- <code><tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>({
- ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">ChannelType</tp:dbus-ref>: ...Call,
+ <code><tp:dbus-ref namespace="im.telepathy1.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>({
+ ...<tp:dbus-ref namespace="im.telepathy1.Channel">ChannelType</tp:dbus-ref>: ...Call,
...<tp:member-ref>InitialChannels</tp:member-ref>: [C1, C2]
})</code>
</blockquote>
@@ -123,7 +123,7 @@
<p>which returns a new channel <var>Cn</var> implementing the conference
interface. (As a quirk of GSM, both 1-1 will cease to function normally
until they are <tp:dbus-ref
- namespace="ofdT.Channel.Interface.Splittable.DRAFT">Split</tp:dbus-ref>
+ namespace="imt1.Channel.Interface.Splittable1">Split</tp:dbus-ref>
from the conference, or the conference ends.)</p>
<p>An XMPP 1-1 conversation <var>C3</var> (with
@@ -153,10 +153,10 @@
the room), call:</p>
<blockquote>
- <code><tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">EnsureChannel</tp:dbus-ref>({
+ <code><tp:dbus-ref namespace="im.telepathy1.Connection.Interface.Requests">EnsureChannel</tp:dbus-ref>({
...ChannelType: ...Text,
- ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>: ...Room,
- ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>: 'telepathy@conf.example.com',
+ ...<tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandleType</tp:dbus-ref>: ...Room,
+ ...<tp:dbus-ref namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref>: 'telepathy@conf.example.com',
...<tp:member-ref>InitialChannels</tp:member-ref>: [C3]
})</code>
</blockquote>
@@ -189,7 +189,7 @@
(maybe it transformed the existing tab into the group chat window,
and so there'd be no UI element still around to show new messages),
then it should just <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref> the
+ namespace="im.telepathy1.Channel">Close</tp:dbus-ref> the
old 1-1 channel; it'll respawn if necessary.</p>
</tp:rationale>
@@ -204,7 +204,7 @@
TargetHandle of C1 into Cn), then immediately inviting the
TargetHandle of C2, the TargetHandle of C3, etc. into Cn as well.</p>
- <h4>Sample <tp:dbus-ref namespace='ofdT.Connection.Interface.Requests'
+ <h4>Sample <tp:dbus-ref namespace='imt1.Connection.Interface.Requests'
>RequestableChannelClasses</tp:dbus-ref></h4>
<p>A GSM connection might advertise the following channel class for
@@ -213,11 +213,11 @@
<blockquote>
<code>
( Fixed = {<br/>
-    ...<tp:dbus-ref namespace='ofdT.Channel'>ChannelType</tp:dbus-ref>:
- ...<tp:dbus-ref namespace='ofdT.Channel.Type'>StreamedMedia</tp:dbus-ref><br/>
+    ...<tp:dbus-ref namespace='imt1.Channel'>ChannelType</tp:dbus-ref>:
+ ...<tp:dbus-ref namespace='imt1.Channel.Type'>Call1</tp:dbus-ref><br/>
  },<br/>
  Allowed = [ <tp:member-ref>InitialChannels</tp:member-ref>,
- <tp:dbus-ref namespace='ofdT.Channel.Type.StreamedMedia'
+ <tp:dbus-ref namespace='imt1.Channel.Type.Call1'
>InitialAudio</tp:dbus-ref>
]<br/>
)
@@ -235,8 +235,8 @@
<blockquote>
<code>
( Fixed = {<br/>
-    ...<tp:dbus-ref namespace='ofdT.Channel'>ChannelType</tp:dbus-ref>:
- ...<tp:dbus-ref namespace='ofdT.Channel.Type'>Text</tp:dbus-ref><br/>
+    ...<tp:dbus-ref namespace='imt1.Channel'>ChannelType</tp:dbus-ref>:
+ ...<tp:dbus-ref namespace='imt1.Channel.Type'>Text</tp:dbus-ref><br/>
  },<br/>
  Allowed = [ <tp:member-ref>InitialChannels</tp:member-ref>,
<tp:member-ref>InitialInviteeHandles</tp:member-ref>,
@@ -245,13 +245,13 @@
]<br/>
),<br/>
( Fixed = {<br/>
-    ...<tp:dbus-ref namespace='ofdT.Channel'>ChannelType</tp:dbus-ref>:
- ...<tp:dbus-ref namespace='ofdT.Channel.Type'>Text</tp:dbus-ref>,<br/>
-    ...<tp:dbus-ref namespace='ofdT.Channel'>TargetHandleType</tp:dbus-ref>:
+    ...<tp:dbus-ref namespace='imt1.Channel'>ChannelType</tp:dbus-ref>:
+ ...<tp:dbus-ref namespace='imt1.Channel.Type'>Text</tp:dbus-ref>,<br/>
+    ...<tp:dbus-ref namespace='imt1.Channel'>TargetHandleType</tp:dbus-ref>:
Room<br/>
  },<br/>
-  Allowed = [ <tp:dbus-ref namespace='ofdT.Channel'>TargetHandle</tp:dbus-ref>,
- <tp:dbus-ref namespace='ofdT.Channel'>TargetID</tp:dbus-ref>,<br/>
+  Allowed = [ <tp:dbus-ref namespace='imt1.Channel'>TargetHandle</tp:dbus-ref>,
+ <tp:dbus-ref namespace='imt1.Channel'>TargetID</tp:dbus-ref>,<br/>
              <tp:member-ref>InitialChannels</tp:member-ref>,
<tp:member-ref>InitialInviteeHandles</tp:member-ref>,
<tp:member-ref>InitialInviteeIDs</tp:member-ref>,
@@ -272,11 +272,11 @@
access="read" type="ao">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The individual <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel</tp:dbus-ref>s that
+ namespace="im.telepathy1">Channel</tp:dbus-ref>s that
are continued by this conference, which have the same <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel"
+ namespace="im.telepathy1.Channel"
>ChannelType</tp:dbus-ref> as this one, but with <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel"
+ namespace="im.telepathy1.Channel"
>TargetHandleType</tp:dbus-ref> = CONTACT.</p>
<p>This property MUST NOT be requestable; instead, the
@@ -288,7 +288,7 @@
<tp:member-ref>InitialInviteeHandles</tp:member-ref> and
<tp:member-ref>InitialInviteeIDs</tp:member-ref>, rather than
requesting <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface">Group.Members</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Interface">Group1.Members</tp:dbus-ref>
and some hypothetical ID version of that property.</p>
</tp:rationale>
@@ -311,12 +311,12 @@
<arg name="Channel_Specific_Handle" type="u" tp:type="Contact_Handle">
<tp:docstring>A new channel-specific handle for the <tp:dbus-ref
- namespace="ofdT.Channel">TargetHandle</tp:dbus-ref> of
+ namespace="imt1.Channel">TargetHandle</tp:dbus-ref> of
<var>Channel</var>, as will appear in
<tp:member-ref>OriginalChannels</tp:member-ref>, or <tt>0</tt> if a
global handle is used for
<var>Channel</var>'s TargetHandle on the <tp:dbus-ref
- namespace="ofdT.Channel.Interface">Group</tp:dbus-ref> interface
+ namespace="imt1.Channel.Interface">Group1</tp:dbus-ref> interface
of this channel.</tp:docstring>
</arg>
@@ -331,11 +331,11 @@
<p>Emitted when a channel is removed from the value of
<tp:member-ref>Channels</tp:member-ref>, either because it closed
or because it was split using the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface"
- >Splittable.DRAFT.Split</tp:dbus-ref> method.</p>
+ namespace="im.telepathy1.Channel.Interface"
+ >Splittable1.Split</tp:dbus-ref> method.</p>
<p>If a channel is removed because it was closed, <tp:dbus-ref
- namespace='ofdT.Channel'>Closed</tp:dbus-ref> should be emitted
+ namespace='imt1.Channel'>Closed</tp:dbus-ref> should be emitted
before this signal.</p>
</tp:docstring>
@@ -348,8 +348,8 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
Additional information about the removal, which may include
the same well-known keys as the Details argument of
- <tp:dbus-ref namespace="ofdT.Channel.Interface.Group"
- >MembersChangedDetailed</tp:dbus-ref>, with the same semantics.
+ <tp:dbus-ref namespace="imt1.Channel.Interface.Group1"
+ >MembersChanged</tp:dbus-ref>, with the same semantics.
</tp:docstring>
</arg>
</signal>
@@ -366,7 +366,7 @@
<tp:member-ref>InitialInviteeHandles</tp:member-ref> and
<tp:member-ref>InitialInviteeIDs</tp:member-ref> are
<var>Allowed_Properties</var> in <tp:dbus-ref
- namespace='ofdT.Connection.Interface.Requests'
+ namespace='imt1.Connection.Interface.Requests'
>RequestableChannelClasses</tp:dbus-ref>, then requests with zero
or one channel paths SHOULD also succeed; otherwise, clients SHOULD
NOT make requests with zero or one paths for this property.</p>
@@ -385,8 +385,8 @@
the protocol, the Channels MAY be placed in a "frozen" state by placing
them in this property's value or by calling
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface"
- >MergeableConference.DRAFT.Merge</tp:dbus-ref> on them.</p>
+ namespace="im.telepathy1.Channel.Interface"
+ >MergeableConference1.Merge</tp:dbus-ref> on them.</p>
<tp:rationale>
<p>In Jingle, nothing special will happen to merged calls. UIs MAY
@@ -396,8 +396,8 @@
<p>In GSM, the calls that are merged go into a state similar to
Hold, but they cannot be unheld, only split from the conference
- call using <tp:dbus-ref namespace="org.freedesktop.Telepathy"
- >Channel.Interface.Splittable.DRAFT.Split</tp:dbus-ref>.</p>
+ call using <tp:dbus-ref namespace="im.telepathy1"
+ >Channel.Interface.Splittable1.Split</tp:dbus-ref>.</p>
</tp:rationale>
<p>Depending on the protocol, it might be signalled to remote users
@@ -428,7 +428,7 @@
(as opposed to merging several channels into one new conference
channel), this property SHOULD be requestable, and appear in the allowed
properties in <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests"
+ namespace="im.telepathy1.Connection.Interface.Requests"
>RequestableChannelClasses</tp:dbus-ref>. Otherwise, this property
SHOULD NOT be requestable, and its value SHOULD always be the empty
list.</p>
@@ -442,8 +442,8 @@
<p>If included in a request, the given contacts are automatically
invited into the new channel, as if they had been added with
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface"
- >Group.AddMembers</tp:dbus-ref>(InitialInviteeHandles,
+ <tp:dbus-ref namespace="im.telepathy1.Channel.Interface"
+ >Group1.AddMembers</tp:dbus-ref>(InitialInviteeHandles,
<tp:member-ref>InvitationMessage</tp:member-ref>) immediately after
the channel was created.</p>
@@ -454,8 +454,8 @@
</tp:rationale>
<p>If the local user was not the initiator of this channel, the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface"
- >Group.SelfHandle</tp:dbus-ref> SHOULD appear in the value of this
+ <tp:dbus-ref namespace="im.telepathy1.Channel.Interface"
+ >Group1.SelfHandle</tp:dbus-ref> SHOULD appear in the value of this
property, together with any other contacts invited at the same time
(if that information is known).</p>
@@ -521,7 +521,7 @@
<p>This property SHOULD be requestable, and appear in the allowed
properties in <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests"
+ namespace="im.telepathy1.Connection.Interface.Requests"
>RequestableChannelClasses</tp:dbus-ref>, in protocols where
invitations can have an accompanying text message.</p>
@@ -546,9 +546,9 @@
a corporate switchboard. This is represented using channel-specific
handles; whether or not a channel uses channel-specific handles is
reported in <tp:dbus-ref
- namespace='ofdT.Channel.Interface'>Group.GroupFlags</tp:dbus-ref>.
+ namespace='imt1.Channel.Interface'>Group1.GroupFlags</tp:dbus-ref>.
The <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface">Group.HandleOwners</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Interface">Group1.HandleOwners</tp:dbus-ref>
property specifies the mapping from opaque channel-specific handles
to actual numbers; this property specifies the original 1-1 channel
corresponding to each channel-specific handle in the conference.</p>
@@ -577,13 +577,13 @@
<blockquote>
<code>{<br/>
...<tp:dbus-ref
- namespace="ofdT.Channel.Interface">Group.GroupFlags</tp:dbus-ref>:
+ namespace="imt1.Channel.Interface">Group1.GroupFlags</tp:dbus-ref>:
Channel_Specific_Handles | (other flags),<br/>
...<tp:dbus-ref
- namespace="ofdT.Channel.Interface">Group.Members</tp:dbus-ref>:
+ namespace="imt1.Channel.Interface">Group1.Members</tp:dbus-ref>:
[self_handle, s, j],<br/>
...<tp:dbus-ref
- namespace="ofdT.Channel.Interface">Group.HandleOwners</tp:dbus-ref>:
+ namespace="imt1.Channel.Interface">Group1.HandleOwners</tp:dbus-ref>:
{ s: h, j: h },<br/>
...<tp:member-ref>InitialChannels</tp:member-ref>:
['/call/to/simon', '/call/to/jonny'],<br/>
diff --git a/spec/Channel_Interface_Credentials_Storage.xml b/spec/Channel_Interface_Credentials_Storage1.xml
index e44b13e32..0f5226a1b 100644
--- a/spec/Channel_Interface_Credentials_Storage.xml
+++ b/spec/Channel_Interface_Credentials_Storage1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Credentials_Storage"
+<node name="/Channel_Interface_Credentials_Storage1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright © 2011 Collabora Limited </tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -17,10 +17,10 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.CredentialsStorage.DRAFT"
+ <interface name="im.telepathy1.Channel.Interface.CredentialsStorage1"
tp:causes-havoc="experimental">
<tp:added version="0.21.10">(draft 1)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Interface.SASLAuthentication"/>
+ <tp:requires interface="im.telepathy1.Channel.Interface.SASLAuthentication1"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A channel interface for SASL authentication channels that can save the
credentials in the connection manager.</p>
@@ -31,10 +31,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>In practice, this interface should only be implemented by connection
managers that implement the <tp:dbus-ref
- namespace="ofdT">ConnectionManager.Interface.AccountStorage.DRAFT</tp:dbus-ref>
+ namespace="imt1">ConnectionManager.Interface.AccountStorage1</tp:dbus-ref>
interface. To clear a password that has been saved in this manner, a
client should call <tp:dbus-ref
- namespace="ofdT.ConnectionManager.Interface">AccountStorage.DRAFT.ForgetCredentials</tp:dbus-ref>
+ namespace="imt1.ConnectionManager.Interface">AccountStorage1.ForgetCredentials</tp:dbus-ref>
on the Account.</p>
</tp:docstring>
@@ -51,7 +51,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If credentials have been stored in this way, the client SHOULD NOT
attempt to store the credentials locally in a keyring.</p>
<p>This method MUST be called before <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.SASLAuthentication">AcceptSASL</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Interface.SASLAuthentication1">AcceptSASL</tp:dbus-ref>
is called or it will have no effect.</p>
</tp:docstring>
</method>
diff --git a/spec/Channel_Interface_DTMF.xml b/spec/Channel_Interface_DTMF1.xml
index 00e3a549d..0222dd7a5 100644
--- a/spec/Channel_Interface_DTMF.xml
+++ b/spec/Channel_Interface_DTMF1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_DTMF" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Interface_DTMF1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2005-2010 Collabora Limited</tp:copyright>
<tp:copyright>Copyright © 2005-2010 Nokia Corporation</tp:copyright>
<tp:copyright>Copyright © 2006 INdT</tp:copyright>
@@ -18,36 +18,35 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.DTMF">
- <tp:xor-requires>
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.StreamedMedia"/>
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.Call1"/>
- </tp:xor-requires>
+ <interface name="im.telepathy1.Channel.Interface.DTMF1">
+ <tp:requires interface="im.telepathy1.Channel.Type.Call1"/>
<tp:changed version="0.25.2">The only part of this spec that should
be used with a Call1 channel is the "InitialTones" property.
</tp:changed>
- <tp:changed version="0.19.6">The <tp:type>Stream_ID</tp:type>s in this
+ <tp:changed version="0.19.6">The Stream_IDs in this
interface can now be ignored by CMs.
</tp:changed>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- An interface that gives a Channel the ability to send DTMF events over
- audio streams which have been established using the StreamedMedia channel
- type. The event codes used are in common with those defined in <a
- href="http://www.rfc-editor.org/rfc/rfc4733.txt">RFC4733</a>, and are
- listed in the <tp:type>DTMF_Event</tp:type> enumeration.
+ An interface that gives a Channel the ability to send DTMF
+ events over audio streams which have been established using the
+ <tp:dbus-ref namespace="imt1.Channel.Type">Call1</tp:dbus-ref>
+ channel type. The event codes used are in common with those
+ defined in <a
+ href="http://www.rfc-editor.org/rfc/rfc4733.txt">RFC4733</a>,
+ and are listed in the <tp:type>DTMF_Event</tp:type> enumeration.
</tp:docstring>
<method name="StartTone" tp:name-for-bindings="Start_Tone">
<tp:changed version="0.19.6">The <var>Stream_ID</var> parameter became
vestigial.</tp:changed>
- <arg direction="in" name="Stream_ID" type="u" tp:type="Stream_ID">
- <tp:docstring>A stream ID as defined in the StreamedMedia channel
- type. This argument is included for backwards compatibility and MUST
- be ignored by the implementations - the tone SHOULD be sent to all
- eligible streams in the channel.</tp:docstring>
+ <arg direction="in" name="Stream_ID" type="u">
+ <tp:docstring>This argument is included for backwards
+ compatibility and MUST be ignored by the implementations - the
+ tone SHOULD be sent to all eligible streams in the
+ channel.</tp:docstring>
</arg>
<arg direction="in" name="Event" type="y" tp:type="DTMF_Event">
<tp:docstring>A numeric event code from the DTMF_Event enum.</tp:docstring>
@@ -70,19 +69,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
be called if no DTMF tones are already being played.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError" />
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.NetworkError" />
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The given stream ID was invalid. Deprecated, since stream IDs
are ignored.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
There are no eligible audio streams.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.ServiceBusy">
+ <tp:error name="im.telepathy1.Error.ServiceBusy">
<tp:docstring>
DTMF tones are already being played.
</tp:docstring>
@@ -93,11 +92,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<method name="StopTone" tp:name-for-bindings="Stop_Tone">
<tp:changed version="0.19.6">The <var>Stream_ID</var> parameter became
vestigial.</tp:changed>
- <arg direction="in" name="Stream_ID" type="u" tp:type="Stream_ID">
- <tp:docstring>A stream ID as defined in the StreamedMedia channel
- type. This argument is included for backwards compatibility and MUST
- be ignored by the implementations - the sending SHOULD be stoped in
- all eligible streams in the channel.</tp:docstring>
+ <arg direction="in" name="Stream_ID" type="u">
+ <tp:docstring>This argument is included for backwards
+ compatibility and MUST be ignored by the implementations - the
+ sending SHOULD be stoped in all eligible streams in the
+ channel.</tp:docstring>
</arg>
<tp:docstring>
@@ -114,14 +113,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:rationale>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError" />
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.NetworkError" />
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The given stream ID was invalid. Deprecated, since stream IDs
are ignored.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
Continuous tones are not supported by this stream. Deprecated,
since stream IDs are ignored.
@@ -179,18 +178,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
be called if no DTMF tones are already being played.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError" />
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.NetworkError" />
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The supplied Tones string was invalid.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
There are no eligible audio streams.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.ServiceBusy">
+ <tp:error name="im.telepathy1.Error.ServiceBusy">
<tp:docstring>
DTMF tones are already being played.
</tp:docstring>
diff --git a/spec/Channel_Interface_Destroyable.xml b/spec/Channel_Interface_Destroyable1.xml
index ce5592327..e373bf5d3 100644
--- a/spec/Channel_Interface_Destroyable.xml
+++ b/spec/Channel_Interface_Destroyable1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Destroyable"
+<node name="/Channel_Interface_Destroyable1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright (C) 2008 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
@@ -22,17 +22,17 @@
</tp:license>
<interface
- name="org.freedesktop.Telepathy.Channel.Interface.Destroyable">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ name="im.telepathy1.Channel.Interface.Destroyable1">
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:added version="0.17.14">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This interface exists to support channels where
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Close</tp:dbus-ref>
+ namespace="im.telepathy1">Channel.Close</tp:dbus-ref>
is insufficiently destructive. At the moment this means
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Type.Text</tp:dbus-ref>,
+ namespace="im.telepathy1">Channel.Type.Text</tp:dbus-ref>,
but the existence of this interface means that unsupported channels
can be terminated in a non-channel-type-specific way.</p>
</tp:docstring>
@@ -55,12 +55,12 @@
<p>Most clients SHOULD call
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Close</tp:dbus-ref>
+ namespace="im.telepathy1">Channel.Close</tp:dbus-ref>
instead. However, if a client explicitly intends to destroy the
channel with possible loss of data, it SHOULD call this method
if this interface is supported (according to the
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Interfaces</tp:dbus-ref>
+ namespace="im.telepathy1">Channel.Interfaces</tp:dbus-ref>
property), falling back to Close if not.</p>
<p>In particular, channel dispatchers SHOULD use this method if
diff --git a/spec/Channel_Interface_File_Transfer_Metadata.xml b/spec/Channel_Interface_File_Transfer_Metadata1.xml
index 4d2d728d9..26d3374b8 100644
--- a/spec/Channel_Interface_File_Transfer_Metadata.xml
+++ b/spec/Channel_Interface_File_Transfer_Metadata1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_File_Transfer_Metadata"
+<node name="/Channel_Interface_File_Transfer_Metadata1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright (C) 2011 Collabora Ltd.</tp:copyright>
@@ -21,8 +21,8 @@
</tp:license>
<interface
- name="org.freedesktop.Telepathy.Channel.Interface.FileTransfer.Metadata">
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.FileTransfer"/>
+ name="im.telepathy1.Channel.Interface.FileTransfer.Metadata1">
+ <tp:requires interface="im.telepathy1.Channel.Type.FileTransfer1"/>
<tp:added version="0.25.0"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -48,9 +48,9 @@
<p>A string representing the service name that will be used
over the file transfer channel. This property is equivalent
to the <tp:dbus-ref
- namespace="ofdT">Channel.Type.DBusTube.ServiceName</tp:dbus-ref>
+ namespace="imt1">Channel.Type.DBusTube1.ServiceName</tp:dbus-ref>
and <tp:dbus-ref
- namespace="ofdT">Channel.Type.StreamTube.Service</tp:dbus-ref>
+ namespace="imt1">Channel.Type.StreamTube1.Service</tp:dbus-ref>
properties. If no service name is given then this property
will be the empty string.</p>
</tp:docstring>
diff --git a/spec/Channel_Interface_Group.xml b/spec/Channel_Interface_Group1.xml
index 890e84ebe..ca2201d26 100644
--- a/spec/Channel_Interface_Group.xml
+++ b/spec/Channel_Interface_Group1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Group" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Interface_Group1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2005-2009 Collabora Limited</tp:copyright>
<tp:copyright>Copyright © 2005-2009 Nokia Corporation</tp:copyright>
<tp:copyright>Copyright © 2006 INdT</tp:copyright>
@@ -18,8 +18,10 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.Group">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <interface name="im.telepathy1.Channel.Interface.Group1">
+ <tp:requires interface="im.telepathy1.Channel"/>
+ <tp:changed version="UNRELEASED">Deprecated methods, signals, and
+ properties have all been removed.</tp:changed>
<tp:struct name="Local_Pending_Info" array-name="Local_Pending_Info_List">
<tp:docstring>A structure representing a contact whose attempt to
@@ -73,50 +75,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
connection managers must silently accept this, without error.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotCapable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.Full"/>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.InviteOnly"/>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.Banned"/>
- </tp:possible-errors>
- </method>
-
- <method name="GetAllMembers" tp:name-for-bindings="Get_All_Members">
- <tp:deprecated version="0.17.6">Use GetAll on the D-Bus
- Properties D-Bus interface to get properties including Members,
- RemotePendingMembers and LocalPendingMembers instead, falling back to
- this method and GetLocalPendingMembersWithInfo if necessary.
- </tp:deprecated>
-
- <arg direction="out" type="au" tp:type="Contact_Handle[]"
- name="Members">
- <tp:docstring>
- array of handles of current members
- </tp:docstring>
- </arg>
- <arg direction="out" type="au" tp:type="Contact_Handle[]"
- name="Local_Pending">
- <tp:docstring>
- array of handles of local pending members
- </tp:docstring>
- </arg>
- <arg direction="out" type="au" tp:type="Contact_Handle[]"
- name="Remote_Pending">
- <tp:docstring>
- array of handles of remote pending members
- </tp:docstring>
- </arg>
- <tp:docstring>
- Returns arrays of all current, local and remote pending channel
- members.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.NotCapable"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.Channel.Full"/>
+ <tp:error name="im.telepathy1.Error.Channel.InviteOnly"/>
+ <tp:error name="im.telepathy1.Error.Channel.Banned"/>
</tp:possible-errors>
</method>
@@ -180,13 +147,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:flag suffix="Channel_Specific_Handles" value="256">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>
- The members of this group have handles which are specific to
- this channel, and are not valid as general-purpose handles on
- the connection. Depending on the channel, it may be possible to
- check the <tp:member-ref>HandleOwners</tp:member-ref> property or
- call <tp:member-ref>GetHandleOwners</tp:member-ref> to find the
- owners of these handles, which should be done if you wish to (e.g.)
- subscribe to the contact's presence.
+ The members of this group have handles which are specific
+ to this channel, and are not valid as general-purpose
+ handles on the connection. Depending on the channel, it
+ may be possible to check the
+ <tp:member-ref>HandleOwners</tp:member-ref> property to
+ find the owners of these handles, which should be done if
+ you wish to (e.g.) subscribe to the contact's presence.
</p>
<p>
@@ -206,43 +173,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:flag>
<tp:flag suffix="Handle_Owners_Not_Available" value="1024">
<tp:docstring>
- In rooms with channel specific handles (ie Channel_Specific_Handles
+ In rooms with channel specific handles (i.e. Channel_Specific_Handles
flag is set), this flag indicates that no handle owners are
available, apart from the owner of the
<tp:member-ref>SelfHandle</tp:member-ref>.
<tp:rationale>
- This used to be an important optimization to avoid repeated
- GetHandleOwners calls, before we introduced the
+ This used to be an important optimization to avoid
+ repeated calls to the now-removed GetHandleOwners method,
+ before we introduced the
<tp:member-ref>HandleOwners</tp:member-ref> property and
- <tp:member-ref>HandleOwnersChanged</tp:member-ref> signal.
- </tp:rationale>
- </tp:docstring>
- </tp:flag>
- <tp:flag suffix="Properties" value="2048">
- <tp:docstring>
- This flag indicates that all the properties introduced in
- specification 0.17.6 are fully supported.
- </tp:docstring>
- </tp:flag>
- <tp:flag suffix="Members_Changed_Detailed" value="4096">
- <tp:docstring>
- Indicates that <tp:member-ref>MembersChangedDetailed</tp:member-ref>
- will be emitted for changes to this group's members in addition to
- <tp:member-ref>MembersChanged</tp:member-ref>.
- Clients can then connect to the former and ignore emission of the
- latter. This flag's state MUST NOT change over the lifetime of a
- channel.
-
- <tp:rationale>
- If it were allowed to change, client bindings would have to always
- connect to MembersChanged just in case the flag ever went away (and
- generally be unnecessarily complicated), which would mostly negate
- the point of having this flag in the first place.
+ <tp:member-ref>HandleOwnersChanged</tp:member-ref>
+ signal.
</tp:rationale>
</tp:docstring>
</tp:flag>
- <tp:flag suffix="Message_Depart" value="8192">
+ <tp:flag suffix="Message_Depart" value="2048">
<tp:added version="0.17.21"/>
<tp:docstring>
A message may be sent to the server when calling
@@ -265,37 +211,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
which operations are currently valid. Change notification is via
the <tp:member-ref>GroupFlagsChanged</tp:member-ref> signal.
</tp:docstring>
- <tp:added version="0.17.6">For backwards compatibility,
- clients should fall back to calling GetGroupFlags if
- Channel_Group_Flag_Properties is not present.</tp:added>
+ <tp:added version="0.17.6"/>
</property>
- <method name="GetGroupFlags" tp:name-for-bindings="Get_Group_Flags">
- <arg direction="out" type="u" tp:type="Channel_Group_Flags"
- name="Group_Flags">
- <tp:docstring>
- The value of the GroupFlags property
- </tp:docstring>
- </arg>
- <tp:docstring>
- Returns the value of the <tp:member-ref>GroupFlags</tp:member-ref> property.
- </tp:docstring>
- <tp:deprecated version="0.17.6">Use GetAll on the D-Bus
- Properties D-Bus interface to get properties including GroupFlags
- instead, falling back to this method if necessary.</tp:deprecated>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
-
<tp:mapping name="Handle_Owner_Map">
<tp:docstring>
A map from channel-specific handles to their owners.
</tp:docstring>
- <tp:added version="0.17.6">For backwards compatibility,
- clients should fall back to calling GetHandleOwners if
- Channel_Group_Flag_Properties is not present.</tp:added>
+ <tp:added version="0.17.6"/>
<tp:member type="u" name="Channel_Specific_Handle"
tp:type="Contact_Handle">
@@ -321,7 +244,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
Handles which are channel-specific, but for which the owner is
unknown, MUST appear in this mapping with 0 as owner. Change
notification is via the
- <tp:member-ref>HandleOwnersChanged</tp:member-ref> signal.
+ <tp:member-ref>HandleOwnersChanged</tp:member-ref>
+ signal.
</tp:docstring>
<tp:added version="0.17.6"/>
</property>
@@ -329,42 +253,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<signal name="HandleOwnersChanged"
tp:name-for-bindings="Handle_Owners_Changed">
<tp:docstring>
- Emitted whenever the <tp:member-ref>HandleOwners</tp:member-ref>
- property changes.
- </tp:docstring>
- <tp:added version="0.17.6">This signal should not be relied on
- unless Channel_Group_Flag_Properties is present.</tp:added>
- <tp:deprecated version="0.23.4">Clients should listen to
- <tp:member-ref>HandleOwnersChangedDetailed</tp:member-ref> instead to
- get the new identifiers as well.
- </tp:deprecated>
-
- <arg name="Added" type="a{uu}" tp:type="Handle_Owner_Map">
- <tp:docstring>
- A map from channel-specific handles to their owners, in which the
- keys include all the handles that were added to the keys of the
- HandleOwners property, and all the handles in that property whose
- owner has changed
- </tp:docstring>
- </arg>
- <arg name="Removed" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- The channel-specific handles that were removed from the keys of the
- HandleOwners property, as a result of the contact leaving this group
- in a previous <tp:member-ref>MembersChanged</tp:member-ref> signal
- </tp:docstring>
- </arg>
- </signal>
-
- <signal name="HandleOwnersChangedDetailed"
- tp:name-for-bindings="Handle_Owners_Changed_Detailed">
- <tp:docstring>
<p>Emitted whenever the <tp:member-ref>HandleOwners</tp:member-ref>
property changes.</p>
-
- <p>Clients can assume this signal is emitted by the Connection Manager
- if the <tp:member-ref>MemberIdentifiers</tp:member-ref> property exists
- </p>
</tp:docstring>
<tp:added version="0.23.4"/>
@@ -394,102 +284,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</arg>
</signal>
- <method name="GetHandleOwners" tp:name-for-bindings="Get_Handle_Owners">
- <arg direction="in" name="Handles" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- A list of integer handles representing members of the channel
- </tp:docstring>
- </arg>
- <arg direction="out" type="au" tp:type="Contact_Handle[]" name="Owners">
- <tp:docstring>
- An array of integer handles representing the owner handles of
- the given room members, in the same order, or 0 if the
- owner is not available
- </tp:docstring>
- </arg>
- <tp:docstring>
- If the CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES flag is set on
- the channel, then the handles of the group members are specific
- to this channel, and are not meaningful in a connection-wide
- context such as contact lists. This method allows you to find
- the owner of the handle if it can be discovered in this channel,
- or 0 if the owner is not available.
- </tp:docstring>
- <tp:deprecated version="0.17.6">Clients should use the
- HandleOwners property and HandleOwnersChanged signal if
- Channel_Group_Flag_Properties is present.</tp:deprecated>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
- <tp:docstring>
- This channel doesn't have the CHANNEL_SPECIFIC_HANDLES flag,
- so handles in this channel are globally meaningful and calling
- this method is not necessary
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- One of the given handles is not a member
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
- <method name="GetLocalPendingMembers"
- tp:name-for-bindings="Get_Local_Pending_Members">
- <arg direction="out" type="au" tp:type="Contact_Handle[]"
- name="Handles"/>
- <tp:docstring>
- Returns the To_Be_Added handle (only) for each structure in the
- <tp:member-ref>LocalPendingMembers</tp:member-ref> property.
- </tp:docstring>
- <tp:deprecated version="0.17.6">Use the LocalPendingMembers
- property, if Channel_Group_Flag_Properties is present.</tp:deprecated>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
-
- <method name="GetLocalPendingMembersWithInfo"
- tp:name-for-bindings="Get_Local_Pending_Members_With_Info">
- <tp:added version="0.15.0" />
- <tp:docstring>
- Returns the <tp:member-ref>LocalPendingMembers</tp:member-ref> property.
- </tp:docstring>
- <tp:deprecated version="0.17.6">Use the LocalPendingMembers
- property, if Channel_Group_Flag_Properties is present.</tp:deprecated>
- <arg direction="out" type="a(uuus)" tp:type="Local_Pending_Info[]"
- name="Info">
- <tp:docstring>
- An array of structs containing:
- <ul>
- <li>
- A handle representing the contact requesting channel membership
- </li>
- <li>
- A handle representing the contact making the request, or 0 if
- unknown
- </li>
- <li>
- The reason for the request: one of the values of
- <tp:type>Channel_Group_Change_Reason</tp:type>
- </li>
- <li>
- A string message containing the reason for the request if any (or
- blank if none)
- </li>
- </ul>
- </tp:docstring>
- </arg>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
-
<property name="LocalPendingMembers" access="read"
type="a(uuus)" tp:type="Local_Pending_Info[]"
tp:name-for-bindings="Local_Pending_Members">
@@ -498,10 +292,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
requesting channel membership and awaiting local approval with
<tp:member-ref>AddMembers</tp:member-ref>.
</tp:docstring>
- <tp:added version="0.17.6">If Channel_Group_Flag_Properties is
- not present, clients should fall back to using the
- deprecated GetLocalPendingMembersWithInfo method, or fall back
- from that to the deprecated GetAllMembers method.</tp:added>
+ <tp:added version="0.17.6"/>
</property>
<property name="Members" tp:name-for-bindings="Members"
@@ -509,70 +300,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring>
The members of this channel.
</tp:docstring>
- <tp:added version="0.17.6">If Channel_Group_Flag_Properties
- is not set, fall back to calling GetAllMembers.</tp:added>
+ <tp:added version="0.17.6"/>
</property>
- <method name="GetMembers" tp:name-for-bindings="Get_Members">
- <arg direction="out" type="au" tp:type="Contact_Handle[]"
- name="Handles"/>
- <tp:docstring>
- Returns the <tp:member-ref>Members</tp:member-ref> property.
- </tp:docstring>
- <tp:deprecated version="0.17.6">Use the Members
- property, if Channel_Group_Flag_Properties is present.</tp:deprecated>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
-
<property name="RemotePendingMembers" access="read" type="au"
tp:type="Contact_Handle[]" tp:name-for-bindings="Remote_Pending_Members">
<tp:docstring>
An array of handles representing contacts who have been
invited to the channel and are awaiting remote approval.
</tp:docstring>
- <tp:added version="0.17.6">If Channel_Group_Flag_Properties
- is not set, fall back to calling GetAllMembers.</tp:added>
+ <tp:added version="0.17.6"/>
</property>
- <method name="GetRemotePendingMembers"
- tp:name-for-bindings="Get_Remote_Pending_Members">
- <arg direction="out" type="au" tp:type="Contact_Handle[]"
- name="Handles"/>
- <tp:docstring>
- Returns an array of handles representing contacts who have been
- invited to the channel and are awaiting remote approval.
- </tp:docstring>
- <tp:deprecated version="0.17.6">Use the
- <tp:member-ref>RemotePendingMembers</tp:member-ref>
- property, if Channel_Group_Flag_Properties is present.</tp:deprecated>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
-
- <signal name="SelfHandleChanged" tp:name-for-bindings="Self_Handle_Changed">
- <tp:docstring>
- Emitted whenever the <tp:member-ref>SelfHandle</tp:member-ref> property
- changes.
- </tp:docstring>
- <tp:added version="0.17.6">This signal should not be relied on
- unless Channel_Group_Flag_Properties is present.</tp:added>
- <tp:deprecated version="0.23.4">Clients should listen to
- <tp:member-ref>SelfContactChanged</tp:member-ref> instead to get the new
- identifier as well.
- </tp:deprecated>
-
- <arg type="u" tp:type="Contact_Handle" name="Self_Handle">
- <tp:docstring>
- The new value of the SelfHandle property.
- </tp:docstring>
- </arg>
- </signal>
-
<signal name="SelfContactChanged" tp:name-for-bindings="Self_Contact_Changed">
<tp:docstring>
<p>Emitted whenever the <tp:member-ref>SelfHandle</tp:member-ref> property
@@ -600,18 +339,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
access="read" tp:name-for-bindings="Self_Handle">
<tp:docstring>
The handle for the user on this channel (which can also be a
- local or remote pending member), or 0 if the user is not a member at
- all (which is likely to be the case, for instance, on <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">ContactList</tp:dbus-ref>
- channels). Note that this is different from the result of
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.GetSelfHandle</tp:dbus-ref>
- on some protocols, so the value of this handle should
+ local or remote pending member), or 0 if the user is not a
+ member at all (which is likely to be the case, for instance,
+ on the old ContactList channels). Note that this is different
+ from the value of the <tp:dbus-ref
+ namespace="im.telepathy1">Connection.SelfHandle</tp:dbus-ref>
+ property on some protocols, so the value of this handle should
always be used with the methods of this interface.
</tp:docstring>
- <tp:added version="0.17.6">For backwards compatibility,
- clients should fall back to calling GetSelfHandle if
- Channel_Group_Flag_Properties is not present.</tp:added>
+ <tp:added version="0.17.6"/>
</property>
<property name="MemberIdentifiers" type="a{us}" tp:type="Handle_Identifier_Map"
@@ -623,30 +359,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
least the identifiers for
<tp:member-ref>SelfHandle</tp:member-ref>,
<tp:member-ref>Members</tp:member-ref>,
- <tp:member-ref>LocalPendingMembers</tp:member-ref> (and their actors if
- any),
<tp:member-ref>RemotePendingMembers</tp:member-ref> and
<tp:member-ref>HandleOwners</tp:member-ref>.
</tp:docstring>
<tp:added version="0.23.4"/>
</property>
- <method name="GetSelfHandle" tp:name-for-bindings="Get_Self_Handle">
- <arg direction="out" type="u" tp:type="Contact_Handle"
- name="Self_Handle"/>
- <tp:docstring>
- Returns the value of the <tp:member-ref>SelfHandle</tp:member-ref>
- property.
- </tp:docstring>
- <tp:deprecated version="0.17.6">Clients should retrieve the
- SelfHandle property using GetAll instead,
- if Channel_Group_Flag_Properties is present.</tp:deprecated>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
-
<signal name="GroupFlagsChanged" tp:name-for-bindings="Group_Flags_Changed">
<arg name="Added" type="u" tp:type="Channel_Group_Flags">
<tp:docstring>
@@ -659,9 +377,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:docstring>
</arg>
<tp:docstring>
- Emitted when the flags as returned by
- <tp:member-ref>GetGroupFlags</tp:member-ref> are changed.
- The user interface should be updated as appropriate.
+ Emitted when the flags as retrieved by the
+ <tp:member-ref>GroupFlags</tp:member-ref> property are
+ changed. The user interface should be updated as appropriate.
</tp:docstring>
</signal>
@@ -673,10 +391,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:member-ref>RemotePendingMembers</tp:member-ref>, or to be removed
from the group. A client may supply a reason when attempting to
remove members from a group with
- <tp:member-ref>RemoveMembersWithReason</tp:member-ref>, and reasons
+ <tp:member-ref>RemoveMembers</tp:member-ref>, and reasons
are supplied by the CM when emitting
- <tp:member-ref>MembersChanged</tp:member-ref> and
- <tp:member-ref>MembersChangedDetailed</tp:member-ref>. Some reason
+ <tp:member-ref>MembersChanged</tp:member-ref>. Some reason
codes have different meanings depending on the <var>Actor</var> in a
MembersChanged signal.</p>
</tp:docstring>
@@ -693,11 +410,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If the <tp:member-ref>SelfHandle</tp:member-ref> is removed from
a group for this reason and the actor is not the SelfHandle, the
equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Terminated</code>.</p>
+ <code>im.telepathy1.Error.Terminated</code>.</p>
<p>If the SelfHandle is removed from a group for this reason and
the actor is also the SelfHandle, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Cancelled</code>.</p>
+ <code>im.telepathy1.Error.Cancelled</code>.</p>
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Offline" value="1">
@@ -705,12 +422,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>The change is due to a user going offline. Also used when
user is already offline, but this wasn't known previously.</p>
- <p>If a one-to-one <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
- call fails because the contact being called is offline, the
- connection manager SHOULD indicate this by removing both the
- <tp:member-ref>SelfHandle</tp:member-ref> and the other contact's
- handle from the Group interface with reason Offline.</p>
+ <p>If a one-to-one StreamedMedia call fails because the
+ contact being called is offline, the connection manager
+ SHOULD indicate this by removing both the
+ <tp:member-ref>SelfHandle</tp:member-ref> and the other
+ contact's handle from the Group interface with reason
+ Offline.</p>
<tp:rationale>
For 1-1 calls, the call terminates as a result of removing the
@@ -720,7 +437,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If a handle is removed from a group for this reason, the
equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Offline</code>.</p>
+ <code>im.telepathy1.Error.Offline</code>.</p>
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Kicked" value="2">
@@ -729,7 +446,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If the <tp:member-ref>SelfHandle</tp:member-ref> is removed
from a group for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Channel.Kicked</code>.
+ <code>im.telepathy1.Error.Channel.Kicked</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -737,12 +454,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The change is due to a busy indication.</p>
- <p>If a one-to-one <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
- call fails because the contact being called is busy, the
- connection manager SHOULD indicate this by removing both the
- <tp:member-ref>SelfHandle</tp:member-ref> and the other contact's
- handle from the Group interface with reason Busy.</p>
+ <p>If a one-to-one StreamedMedia call fails because the
+ contact being called is busy, the connection manager
+ SHOULD indicate this by removing both the
+ <tp:member-ref>SelfHandle</tp:member-ref> and the other
+ contact's handle from the Group interface with reason
+ Busy.</p>
<tp:rationale>
For 1-1 calls, the call terminates as a result of removing the
@@ -752,7 +469,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If the <tp:member-ref>SelfHandle</tp:member-ref> is removed
from a group for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Busy</code>.
+ <code>im.telepathy1.Error.Busy</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -774,7 +491,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If the <tp:member-ref>SelfHandle</tp:member-ref> is removed
from a group for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Channel.Banned</code>.
+ <code>im.telepathy1.Error.Channel.Banned</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -803,7 +520,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If a contact is removed from a group for this reason, the
equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.DoesNotExist</code>.
+ <code>im.telepathy1.Error.DoesNotExist</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -811,13 +528,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The change is because the requested contact did not respond.</p>
- <p>If a one-to-one <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
- call fails because the contact being called did not respond, or the
- local user did not respond to an incoming call, the
- connection manager SHOULD indicate this by removing both the
- <tp:member-ref>SelfHandle</tp:member-ref> and the other contact's
- handle from the Group interface with reason No_Answer.</p>
+ <p>If a one-to-one StreamedMedia call fails because the
+ contact being called did not respond, or the local user
+ did not respond to an incoming call, the connection
+ manager SHOULD indicate this by removing both the
+ <tp:member-ref>SelfHandle</tp:member-ref> and the other
+ contact's handle from the Group interface with reason
+ No_Answer.</p>
<tp:rationale>
Documenting existing practice.
@@ -825,7 +542,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If a contact is removed from a group for this reason, the
equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.NoAnswer</code>.
+ <code>im.telepathy1.Error.NoAnswer</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -834,10 +551,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>The change is because a contact's unique identifier changed.
There must be exactly one handle in the removed set and exactly
one handle in one of the added sets. The <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Renaming">Renamed</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface.Renaming1">Renamed</tp:dbus-ref>
signal on the
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">Renaming</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface">Renaming1</tp:dbus-ref>
interface will have been emitted for the same handles,
shortly before this <tp:member-ref>MembersChanged</tp:member-ref> signal is emitted.</p>
</tp:docstring>
@@ -849,7 +566,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If a contact is removed from a group for this reason, the
equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.PermissionDenied</code>.
+ <code>im.telepathy1.Error.PermissionDenied</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -864,9 +581,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
If members are added with this reason code, the change is because
unconnected parts of the group have rejoined. If this channel
carries messages (e.g. <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">Text</tp:dbus-ref>
- or <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">Tubes</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type">Text</tp:dbus-ref>
channels) applications must
assume that the contacts being added are likely to have missed some
messages as a result of the separation, and that the contacts
@@ -886,66 +601,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:enumvalue>
</tp:enum>
- <signal name="MembersChanged" tp:name-for-bindings="Members_Changed">
- <arg name="Message" type="s">
- <tp:docstring>
- A string message from the server, or blank if not
- </tp:docstring>
- </arg>
- <arg name="Added" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- A list of members added to the channel
- </tp:docstring>
- </arg>
- <arg name="Removed" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- A list of members removed from the channel
- </tp:docstring>
- </arg>
- <arg name="Local_Pending" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- A list of members who are pending local approval
- </tp:docstring>
- </arg>
- <arg name="Remote_Pending" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- A list of members who are pending remote approval
- </tp:docstring>
- </arg>
- <arg name="Actor" type="u" tp:type="Contact_Handle">
- <tp:docstring>
- The contact handle of the person who made the change, or 0
- if not known
- </tp:docstring>
- </arg>
- <arg name="Reason" type="u" tp:type="Channel_Group_Change_Reason">
- <tp:docstring>
- A reason for the change
- </tp:docstring>
- </arg>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Emitted when contacts join any of the three lists (members, local
- pending or remote pending) or when they leave any of the three lists.
- There may also be a message from the server regarding this change,
- which may be displayed to the user if desired.</p>
-
- <p>All channel-specific handles that are mentioned in this signal
- MUST be represented in the value of the
- <tp:member-ref>HandleOwners</tp:member-ref> property.
- In practice, this will mean that
- <tp:member-ref>HandleOwnersChanged</tp:member-ref> is
- emitted <em>before</em> emitting a MembersChanged signal in which
- channel-specific handles are added, but that it is emitted
- <em>after</em> emitting a MembersChanged signal in which
- channel-specific handles are removed.</p>
-
- <p>See <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
- for an overview of how group state changes are used to indicate the
- progress of a call.</p>
- </tp:docstring>
- </signal>
-
<tp:mapping name="Handle_Identifier_Map">
<tp:docstring>
A map from handles to the corresponding normalized string identifier.
@@ -960,14 +615,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:member type="s" name="Identifier">
<tp:docstring>
The same string that would be returned by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">InspectHandles</tp:dbus-ref>
+ namespace="im.telepathy1.Connection">InspectHandles</tp:dbus-ref>
for this handle.
</tp:docstring>
</tp:member>
</tp:mapping>
- <signal name="MembersChangedDetailed"
- tp:name-for-bindings="Members_Changed_Detailed">
+ <signal name="MembersChanged"
+ tp:name-for-bindings="Members_Changed">
<arg name="Added" type="au" tp:type="Contact_Handle[]">
<tp:docstring>
A list of members added to the channel
@@ -1055,26 +710,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Emitted when contacts join any of the three lists (members, local
pending or remote pending) or when they leave any of the three
- lists. This signal provides a superset of the information provided by
- <tp:member-ref>MembersChanged</tp:member-ref>;
- if the channel's <tp:member-ref>GroupFlags</tp:member-ref>
- contains Members_Changed_Detailed, then clients may listen exclusively
- to this signal in preference to that signal.</p>
+ lists.</p>
<p>All channel-specific handles that are mentioned in this signal
MUST be represented in the value of the
- <tp:member-ref>HandleOwners</tp:member-ref> property. In practice,
- this will mean that
- <tp:member-ref>HandleOwnersChanged</tp:member-ref> is emitted
- <em>before</em> emitting a MembersChangedDetailed signal in which
- channel-specific handles are added, but that it is emitted
- <em>after</em> emitting a MembersChangedDetailed signal in which
- channel-specific handles are removed.</p>
-
- <p>See <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
- for an overview of how group state changes are used to indicate the
- progress of a call.</p>
+ <tp:member-ref>HandleOwners</tp:member-ref> property.</p>
</tp:docstring>
<tp:added version="0.17.16"/>
</signal>
@@ -1090,6 +730,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
A string message, which can be blank if desired
</tp:docstring>
</arg>
+ <arg direction="in" name="Reason" type="u"
+ tp:type="Channel_Group_Change_Reason">
+ <tp:docstring>
+ A reason for the change
+ </tp:docstring>
+ </arg>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Requests the removal of contacts from a channel, reject their
request for channel membership on the pending local list, or
@@ -1097,10 +743,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If the <tp:member-ref>SelfHandle</tp:member-ref> is in a Group,
it can be removed via this method, in order to leave the group
- gracefully. This is the recommended way to leave a chatroom, close
- or reject a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
- call, and so on.</p>
+ gracefully. This is the recommended way to leave a chatroom.</p>
<p>Accordingly, connection managers SHOULD support
doing this, regardless of the value of
@@ -1108,7 +751,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
If doing so fails with PermissionDenied, this is considered to a bug
in the connection manager, but clients MUST recover by falling back
to closing the channel with the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">Close</tp:dbus-ref>
method.</p>
<p>Removing any contact from the local pending list is always
@@ -1129,47 +772,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
Channel_Group_Flag_Message_Rescind
<tp:member-ref>GroupFlags</tp:member-ref> to see in which cases this
message should be provided.</p>
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- </tp:possible-errors>
- </method>
- <method name="RemoveMembersWithReason"
- tp:name-for-bindings="Remove_Members_With_Reason">
- <arg direction="in" name="Contacts" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- An array of contact handles to remove from the channel
- </tp:docstring>
- </arg>
- <arg direction="in" name="Message" type="s">
- <tp:docstring>
- A string message, which can be blank if desired
- </tp:docstring>
- </arg>
- <arg direction="in" name="Reason" type="u"
- tp:type="Channel_Group_Change_Reason">
- <tp:docstring>
- A reason for the change
- </tp:docstring>
- </arg>
- <tp:docstring>
- As <tp:member-ref>RemoveMembers</tp:member-ref>, but a reason code may
- be provided where
- appropriate. The reason code may be ignored if the underlying
- protocol is unable to represent the given reason.
+ <p>The reason code may be ignored if the underlying
+ protocol is unable to represent the given reason.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The provided reason code was invalid.
</tp:docstring>
@@ -1195,19 +808,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
their request before they may join. A single contact should never appear on
more than one of the three lists. The lists are empty when the channel is
created, and the <tp:member-ref>MembersChanged</tp:member-ref> signal
- (and, if the channel's <tp:member-ref>GroupFlags</tp:member-ref> contains
- Members_Changed_Detailed, the
- <tp:member-ref>MembersChangedDetailed</tp:member-ref> signal)
- should be emitted when information
- is retrieved from the server, or changes occur.</p>
-
- <p>If the <tp:member-ref>MembersChanged</tp:member-ref> or
- <tp:member-ref>MembersChangedDetailed</tp:member-ref> signal indicates
+ should be emitted when information is retrieved from the server,
+ or changes occur.</p>
+
+ <p>If the <tp:member-ref>MembersChanged</tp:member-ref> signal indicates
that the <tp:member-ref>SelfHandle</tp:member-ref> has been removed from
the channel, and the channel subsequently emits <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Closed</tp:dbus-ref>,
- clients SHOULD consider the details given in the MembersChanged or
- MembersChangedDetailed signal to be the reason why the channel closed.</p>
+ namespace="im.telepathy1.Channel">Closed</tp:dbus-ref>,
+ clients SHOULD consider the details given in the MembersChanged
+ signal to be the reason why the channel closed.</p>
<p>Addition of members to the channel may be requested by using
<tp:member-ref>AddMembers</tp:member-ref>. If
diff --git a/spec/Channel_Interface_HTML.xml b/spec/Channel_Interface_HTML1.xml
index ad86867ca..245ad1b14 100644
--- a/spec/Channel_Interface_HTML.xml
+++ b/spec/Channel_Interface_HTML1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_HTML"
+<node name="/Channel_Interface_HTML1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright (C) 2008 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
@@ -19,17 +19,16 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
<interface
- name="org.freedesktop.Telepathy.Channel.Interface.HTML.DRAFT"
+ name="im.telepathy1.Channel.Interface.HTML1"
tp:causes-havoc="unfinished">
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.Text"/>
- <tp:requires
- interface="org.freedesktop.Telepathy.Channel.Interface.Messages"/>
+ <tp:requires interface="im.telepathy1.Channel.Type.Text"/>
<tp:added version="0.17.5">(draft version, not API-stable)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>This interface extends the Messages interface to support
- capability discovery, so clients can decide what subset of HTML
- is supported.</p>
+ <p>This interface extends the <tp:dbus-ref
+ namespace="imt1.Channel.Type">Text</tp:dbus-ref> interface to
+ support capability discovery, so clients can decide what
+ subset of HTML is supported.</p>
<p>(However, the capability discovery mechanism has not been written
yet, so this interface MUST NOT be used. It exists only to
diff --git a/spec/Channel_Interface_Hold.xml b/spec/Channel_Interface_Hold1.xml
index 69d295d97..9801827e1 100644
--- a/spec/Channel_Interface_Hold.xml
+++ b/spec/Channel_Interface_Hold1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Hold" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Interface_Hold1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright (C) 2005-2008 Collabora Limited </tp:copyright>
<tp:copyright> Copyright (C) 2005-2008 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
@@ -19,12 +19,9 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.Hold">
- <tp:xor-requires>
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.StreamedMedia"/>
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.Call1"/>
- <tp:requires interface="org.freedesktop.Telepathy.Call1.Content"/>
- </tp:xor-requires>
+ <interface name="im.telepathy1.Channel.Interface.Hold1">
+ <tp:requires interface="im.telepathy1.Channel.Type.Call1"/>
+ <tp:requires interface="im.telepathy1.Call1.Content"/>
<tp:changed version="0.17.4">first API-stable version</tp:changed>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -32,7 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
This only makes sense for channels where
you are streaming media to or from the members. (To see whether the
other participant has put you on hold, see <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface"
+ namespace="im.telepathy1.Channel.Type.Call1"
>CallState</tp:dbus-ref>.)</p>
<p>If you place a channel on hold, this indicates that you do not wish
@@ -215,9 +212,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The requested hold state cannot be achieved; for example,
if only a limited number of channels can be in the "not on hold"
diff --git a/spec/Channel_Interface_Media_Signalling.xml b/spec/Channel_Interface_Media_Signalling.xml
deleted file mode 100644
index 58a222c19..000000000
--- a/spec/Channel_Interface_Media_Signalling.xml
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Channel_Interface_Media_Signalling" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright> Copyright © 2005-2009 Collabora Limited </tp:copyright>
- <tp:copyright> Copyright © 2005-2009 Nokia Corporation </tp:copyright>
- <tp:copyright> Copyright © 2006 INdT </tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
- <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
- </tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.MediaSignalling">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.StreamedMedia"/>
- <tp:changed version="0.24.0">The old-style Telepathy properties,
- deprecated since March 2009, have been removed.</tp:changed>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>An interface for signalling a channel containing synchronised media
- sessions which can contain an arbitrary number of streams. The
- presence of this interface on a Channel indicates that the connection
- manager will not carry out the actual streaming for this channel,
- and that the client handling the channel is responsible for doing
- so; in most cases we recommend doing this by using the
- telepathy-farsight library.</p>
-
- <tp:rationale>
- <p>Streaming audio and (particularly) video requires a high level of
- integration with the UI, and having the connection manager act as
- a proxy would be likely to introduce unacceptable latency. As a
- result, audio/video streaming is offloaded into the client
- where possible, as an exception to the general design of
- Telepathy.</p>
- </tp:rationale>
-
- <p>The negotiation interface is based on the API of the
- <a href="http://farsight.freedesktop.org/">Farsight</a> library.
- This, in turn, is based upon the IETF MMusic ICE drafts, where
- connections are established by signalling potential connection
- candidates to the peer until a usable connection is found, and
- codecs are negotiated with an SDP-style offer and answer. However,
- the principles should be applicable to other media streaming methods
- and the API re-used without difficulty.</p>
-
- <p>Note that the naming conventions used in the MediaStreamHandler
- and MediaSessionHandler interfaces are rather confusing; methods
- have signal-like names and signals have method-like names, due to
- the API being based rather too closely on that of Farsight. This
- is for historical reasons and will be fixed in a future release
- of the Telepathy specification.</p>
- </tp:docstring>
-
- <tp:simple-type name="Media_Session_Type" type="s">
- <tp:docstring>The type of a media session. Currently, the only supported
- value is "rtp".</tp:docstring>
- </tp:simple-type>
-
- <tp:struct name="Media_Session_Handler_Info"
- array-name="Media_Session_Handler_Info_List">
- <tp:docstring>A struct representing a active session handler.</tp:docstring>
- <tp:member type="o" name="Session_Handler">
- <tp:docstring>The object path of the session handler, which is on the
- same bus name as the channel.</tp:docstring>
- </tp:member>
- <tp:member type="s" tp:type="Media_Session_Type" name="Media_Session_Type">
- <tp:docstring>The media session's type</tp:docstring>
- </tp:member>
- </tp:struct>
-
- <method name="GetSessionHandlers"
- tp:name-for-bindings="Get_Session_Handlers">
- <arg direction="out" type="a(os)" tp:type="Media_Session_Handler_Info[]"
- name="Session_Handlers"/>
- <tp:docstring>
- Returns all currently active session handlers on this channel
- as a list of (session_handler_path, type).
- </tp:docstring>
- </method>
-
- <signal name="NewSessionHandler" tp:name-for-bindings="New_Session_Handler">
- <arg name="Session_Handler" type="o">
- <tp:docstring>
- Object path of the new <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Media.SessionHandler</tp:dbus-ref>
- object
- </tp:docstring>
- </arg>
- <arg name="Session_Type" tp:type="Media_Session_Type" type="s">
- <tp:docstring>
- String indicating type of session, eg &quot;rtp&quot;
- </tp:docstring>
- </arg>
- <tp:docstring>
- Signal that a session handler object has been created. The client
- should create a session object and create streams for the streams
- within.
- </tp:docstring>
- </signal>
-
- <tp:hct name="gtalk-p2p">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The client can implement streaming for streams whose <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Media.StreamHandler">NATTraversal</tp:dbus-ref>
- property is <code>gtalk-p2p</code>.</p>
- </tp:docstring>
- </tp:hct>
-
- <tp:hct name="ice-udp">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The client can implement streaming for streams whose <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Media.StreamHandler">NATTraversal</tp:dbus-ref>
- property is <code>ice-udp</code>.</p>
- </tp:docstring>
- </tp:hct>
-
- <tp:hct name="wlm-8.5">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The client can implement streaming for streams whose <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Media.StreamHandler">NATTraversal</tp:dbus-ref>
- property is <code>wlm-8.5</code>.</p>
- </tp:docstring>
- </tp:hct>
-
- <tp:hct name="wlm-2009">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The client can implement streaming for streams whose <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Media.StreamHandler">NATTraversal</tp:dbus-ref>
- property is <code>wlm-2009</code>.</p>
- </tp:docstring>
- </tp:hct>
-
- <tp:hct name="video/h264" is-family="yes">
- <tp:docstring>
- <p>The client supports media streaming with H264 (etc.).</p>
-
- <p>This handler capability token is a one of a family
- of similar tokens: for any other audio or video codec whose MIME
- type is audio/<em>subtype</em> or video/<em>subtype</em>, a handler
- capability token of this form may exist (the subtype MUST appear
- in lower case in this context). Clients MAY support more
- codecs than they explicitly advertise support for; clients SHOULD
- explicitly advertise support for their preferred codec(s), and
- for codecs like H264 that are, in practice, significant in codec
- negotiation.</p>
-
- <tp:rationale>
- <p>For instance, the XMPP capability used by the Google Video
- Chat web client to determine whether a client is compatible
- with it requires support for H264 video, so an XMPP
- connection manager that supports this version of Jingle should
- not advertise the Google Video Chat capability unless there
- is at least one installed client that declares that it supports
- <code>video/h264</code> on StreamedMedia channels.</p>
- </tp:rationale>
-
- <p>For example, a client could advertise support for
- Speex, Theora and H264 by having three
- handler capability tokens,
- <code>org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/audio/speex</code>,
- <code>org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/video/theora</code> and
- <code>org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/video/h264</code>,
- in its <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">Capabilities</tp:dbus-ref>
- property.</p>
-
- <p>Clients MAY have media signalling abilities without explicitly
- supporting any particular codec, and connection managers SHOULD
- support this usage.</p>
-
- <tp:rationale>
- <p>This is necessary to support gatewaying between two Telepathy
- connections, in which case the available codecs might not be
- known to the gatewaying process.</p>
- </tp:rationale>
- </tp:docstring>
- </tp:hct>
-
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Channel_Interface_Mergeable_Conference.xml b/spec/Channel_Interface_Mergeable_Conference1.xml
index cd606c1b7..91ed10513 100644
--- a/spec/Channel_Interface_Mergeable_Conference.xml
+++ b/spec/Channel_Interface_Mergeable_Conference1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Mergeable_Conference"
+<node name="/Channel_Interface_Mergeable_Conference1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009 Collabora Limited</tp:copyright>
<tp:copyright>Copyright © 2009 Nokia Corporation</tp:copyright>
@@ -20,10 +20,10 @@
02110-1301, USA.</p>
</tp:license>
<interface
- name="org.freedesktop.Telepathy.Channel.Interface.MergeableConference.DRAFT"
+ name="im.telepathy1.Channel.Interface.MergeableConference1"
tp:causes-havoc="experimental">
<tp:added version="0.19.0">(draft 1)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Interface.Conference"/>
+ <tp:requires interface="im.telepathy1.Channel.Interface.Conference1"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface for multi-user conference channels that can have
@@ -49,12 +49,12 @@
channel.</p>
<p>The given channel SHOULD be added to <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface"
- >Conference.Channels</tp:dbus-ref> if and only if the
+ namespace="im.telepathy1.Channel.Interface"
+ >Conference1.Channels</tp:dbus-ref> if and only if the
underlying protocol signals the merge in some way. It MUST NOT be
added to <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface"
- >Conference.InitialChannels</tp:dbus-ref> (to preserve
+ namespace="im.telepathy1.Channel.Interface"
+ >Conference1.InitialChannels</tp:dbus-ref> (to preserve
immutability).</p>
<tp:rationale>
@@ -73,28 +73,28 @@
<arg direction="in" name="Channel" type="o">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A channel with the same <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel"
+ namespace="im.telepathy1.Channel"
>ChannelType</tp:dbus-ref>
as this one, but with <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel"
+ namespace="im.telepathy1.Channel"
>TargetHandleType</tp:dbus-ref> = CONTACT.</p>
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The given channel isn't suitable for merging into this one: for
instance, it might have the wrong channel type or handle type.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
It will never be possible to merge channels into this particular
conference.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
The given channel is theoretically suitable for merging into this
one, but that's not currently possible for some reason (for
diff --git a/spec/Channel_Interface_Messages.xml b/spec/Channel_Interface_Messages.xml
deleted file mode 100644
index a88576dc8..000000000
--- a/spec/Channel_Interface_Messages.xml
+++ /dev/null
@@ -1,1484 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Channel_Interface_Messages"
- xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright>Copyright © 2008–2010 Collabora Ltd.</tp:copyright>
- <tp:copyright>Copyright © 2008–2010 Nokia Corporation</tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
- <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-USA.</p>
- </tp:license>
- <interface
- name="org.freedesktop.Telepathy.Channel.Interface.Messages">
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.Text"/>
- <tp:added version="0.17.16">(as stable API)</tp:added>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>This interface extends the <tp:dbus-ref
- namespace='org.freedesktop.Telepathy.Channel.Type'>Text</tp:dbus-ref>
- interface to support more general messages, including:</p>
-
- <ul>
- <li>messages with attachments (like MIME multipart/mixed)</li>
- <li>groups of alternatives (like MIME multipart/alternative)</li>
- <li>delivery reports (which replace <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">Text.SendError</tp:dbus-ref>),
- addding support for protocols where the message content is not echoed
- back to the sender on failure and for receiving positive
- acknowledgements, as well as ensuring that incoming delivery reports
- are not lost if no client is handling the channel yet;</li>
- <li>any extra types of message we need in future</li>
- </ul>
-
- <p>Incoming messages, outgoing messages, and delivery reports are all
- represented as lists of <tp:type>Message_Part</tp:type> structures,
- with a format reminiscent of e-mail. Messages are sent by calling
- <tp:member-ref>SendMessage</tp:member-ref>; outgoing messages are
- announced to other clients which may be interested in the channel by
- the <tp:member-ref>MessageSent</tp:member-ref> signal. Incoming
- messages and delivery reports are signalled by
- <tp:member-ref>MessageReceived</tp:member-ref>, and are stored in the
- the <tp:member-ref>PendingMessages</tp:member-ref> property until
- acknowledged by calling <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">Text.AcknowledgePendingMessages</tp:dbus-ref>.
- Only the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client">Handler</tp:dbus-ref>
- for a channel should acknowledge messages; <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client">Observer</tp:dbus-ref>s
- (such as loggers) and <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client">Approver</tp:dbus-ref>s
- for the channel may listen for incoming messages, and send messages of their own, but SHOULD NOT acknowledge messages.</p>
-
- <tp:rationale>
- <p>If observers were allowed to acknowledge messages, then messages
- might have been acknowledged before the handler even got to see the
- channel, and hence could not be shown to the user.</p>
- </tp:rationale>
-
- <p>If this interface is present, clients that support it SHOULD
- listen for the <tp:member-ref>MessageSent</tp:member-ref> and
- <tp:member-ref>MessageReceived</tp:member-ref> signals, and
- ignore the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.Text">Sent</tp:dbus-ref>,
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.Text">SendError</tp:dbus-ref>
- and <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.Text">Received</tp:dbus-ref>
- signals on the Text interface (which are guaranteed to duplicate
- signals from this interface).</p>
-
- <p>Although this specification supports formatted (rich-text)
- messages with unformatted alternatives, implementations SHOULD NOT
- attempt to send formatted messages until the Telepathy specification
- has also been extended to cover capability discovery for message
- formatting.</p>
-
- <tp:rationale>
- We intend to expose all rich-text messages as XHTML-IM, but on some
- protocols, formatting is an extremely limited subset of that format
- (e.g. there are protocols where foreground/background colours, font
- and size can be set, but only for entire messages).
- Until we can tell UIs what controls to offer to the user, it's
- unfriendly to offer the user controls that may have no effect.
- </tp:rationale>
- </tp:docstring>
-
- <property name="SupportedContentTypes" type="as" access="read"
- tp:name-for-bindings="Supported_Content_Types"
- tp:immutable="yes">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A list of MIME types supported by this channel, with more preferred
- MIME types appearing earlier in the list. The list MAY include "*/*"
- to indicate that attachments with arbitrary MIME types can be sent.
- This list MUST NOT be empty, since all Messages implementations
- MUST accept messages containing a single "text/plain" part.</p>
-
- <p>Items in this list MUST be normalized to lower-case.</p>
-
- <p>Some examples of how this property interacts with the
- <tp:member-ref>MessagePartSupportFlags</tp:member-ref>:</p>
-
- <dl>
- <dt>A simple IM implementation: only plain text messages are
- allowed</dt>
- <dd>SupportedContentTypes = ['text/plain'],
- MessagePartSupportFlags = 0</dd>
-
- <dt>Formatted text with a plain text alternative is allowed (see the
- HTML interface draft)</dt>
- <dd>SupportedContentTypes = ['text/html', 'text/plain'],
- MessagePartSupportFlags = 0</dd>
-
- <dt>JPEG or PNG images may be sent, but without any attached
- text</dt>
- <dd>SupportedContentTypes = ['text/plain', 'image/jpeg',
- 'image/png'], MessagePartSupportFlags = 0</dd>
-
- <dt>Unformatted text to which an optional JPEG or PNG image may be
- attached</dt>
- <dd>SupportedContentTypes = ['text/plain', 'image/jpeg',
- 'image/png'], MessagePartSupportFlags = One_Attachment</dd>
-
- <dt>Formatted text to which arbitrarily many images may be
- attached</dt>
- <dd>SupportedContentTypes = ['text/html', 'text/plain', 'image/jpeg',
- 'image/png', 'image/x-ms-bmp'], MessagePartSupportFlags =
- One_Attachment | Multiple_Attachments</dd>
-
- <dt>A full SIP implementation: arbitrary MIME messages are
- allowed</dt>
- <dd>SupportedContentTypes = ['*/*'], MessagePartSupportFlags =
- One_Attachment | Multiple_Attachments</dd>
- </dl>
- </tp:docstring>
- </property>
-
- <property name="MessageTypes" type="au"
- tp:type="Channel_Text_Message_Type[]" access="read"
- tp:name-for-bindings="Message_Types"
- tp:immutable="yes">
- <tp:added version="0.21.5">
- This supersedes <tp:dbus-ref namespace="ofdT.Channel.Type.Text"
- >GetMessageTypes</tp:dbus-ref>; fall back to that method for
- compatibility with older connection managers.
- </tp:added>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A list of message types which may be sent on this channel.</p>
- </tp:docstring>
- </property>
-
- <property name="MessagePartSupportFlags" type="u"
- tp:type="Message_Part_Support_Flags" access="read"
- tp:name-for-bindings="Message_Part_Support_Flags"
- tp:immutable="yes">
- <tp:docstring>
- Flags indicating the level of support for message parts on this
- channel.
- </tp:docstring>
- </property>
-
- <tp:flags name="Message_Part_Support_Flags"
- value-prefix="Message_Part_Support_Flag" type="u">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Flags indicating the level of support for message parts on this
- channel. They are designed such that setting more flags always
- implies that the channel has more capabilities.</p>
-
- <p>If no flags are set, this indicates that messages may contain
- a single message part whose content-type is any of the types
- from SupportedContentTypes, possibly with some alternatives.</p>
-
- <p>There is no flag indicating support for alternatives. This is
- because the SendMessage implementation can always accept messages
- containing alternatives, even if the underlying protocol does not,
- by deleting all alternatives except the first (most preferred)
- that is supported.</p>
-
- <tp:rationale>
- Each of the flags so far implies the previous flag, so we could
- have used a simple enumeration here; however, we've defined
- the message-part support indicator as a flag set for future
- expansion.
- </tp:rationale>
-
- <p>See <tp:member-ref>SupportedContentTypes</tp:member-ref> for some
- examples.</p>
- </tp:docstring>
-
- <tp:flag suffix="One_Attachment" value="1">
- <tp:docstring>
- <tp:member-ref>SendMessage</tp:member-ref> will accept messages
- containing a textual message body,
- plus a single attachment of any type listed in the
- SupportedContentTypes property. It does not make sense for this
- flag to be set if Message_Part_Support_Flag_Data_Only is not also set
- (because the connection manager can trivially provide an empty text
- part if necessary).
- </tp:docstring>
- </tp:flag>
- <tp:flag suffix="Multiple_Attachments" value="2">
- <tp:docstring>
- SendMessage will accept messages containing a textual message body,
- plus an arbitrary number of attachments of any type listed in the
- SupportedContentTypes property. It does not make sense for this
- flag to be set if Message_Part_Support_Flag_One_Attachment is not
- also set.
- </tp:docstring>
- </tp:flag>
- </tp:flags>
-
- <tp:mapping name="Message_Part" array-name="Message_Part_List"
- array-depth="2">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Part of a message's content. In practice, this mapping never
- appears in isolation: incoming messages are represented by a list of
- <tp:type>Message_Part</tp:type> mappings in the
- <tp:member-ref>MessageReceived</tp:member-ref> signal, and outgoing
- messages are passed to <tp:member-ref>SendMessage</tp:member-ref> as
- a list of these mappings.</p>
-
- <p>The first part of the message contains "headers", which refer
- to the entire message. The second and subsequent parts contain the
- message's content, including plain text, formatted text and/or
- attached files. Well-known keys for the header and body parts are
- defined by the <tp:type>Message_Header_Key</tp:type> and
- <tp:type>Message_Body_Key</tp:type> types, respectively. It is an
- error for a connection manager to put keys referring to the message
- as a whole in the second or subsequent Message_Part, or keys intended
- for body parts in the first Message_Part; clients MUST recover from
- this error by ignoring these mis-placed keys.</p>
-
- <tp:rationale>
- <p>Instead of representing messages as aa{sv} where the first
- dictionary is special (a dictionary of headers), we could have
- used a signature like (a{sv}aa{sv}) to separate out the headers
- and the body parts.</p>
-
- <p>However, this would make access to the messages more awkward.
- In Python, the syntax for access to a header field would remain
- <code>message[0]['message-type']</code>, but access to a body
- field in the second body part would change from
- <code>message[2]['content'] to message[1][1]['content']</code>. In
- GLib, the message would change from being a
- <code>GPtrArray(GHashTable)</code> to being a
- <code>GValueArray(GHashTable, GPtrArray(GHashTable))</code> which
- is rather inconvenient to dereference.</p>
- </tp:rationale>
-
- <p>In any group of parts with the same non-empty value for the
- <tt>alternative</tt> key (which represent alternative versions of the
- same content), more faithful versions of the intended message MUST
- come before less faithful versions (note that this order is the
- opposite of MIME <tt>multipart/alternative</tt> parts). Clients
- SHOULD display the first alternative that they understand.</p>
-
- <tp:rationale>
- <p>Specifying the preference order means that if the underlying
- protocol doesn't support alternatives, the CM can safely delete
- everything apart from the first supported alternative when
- sending messages.</p>
-
- <p>The order is the reverse of MIME because MIME's rationale for
- placing the "plainest" part first (legibility in pre-MIME UAs)
- does not apply to us, and placing the most preferred part
- first simplifies display (a client can iterate the message
- in order, display the first alternative that it understands,
- and skip displaying all subsequent parts with the same
- "alternative" key).</p>
- </tp:rationale>
-
- <p>Clients SHOULD present all parts that are not redundant
- alternatives in the order they appear in this array, possibly
- excluding parts that are referenced by another displayed part.
- It is implementation-specific how the parts are presented to the
- user.</p>
-
- <tp:rationale>
- <p>This allows CMs to assume that all parts are actually shown to
- the user, even if they are not explicitly referenced - we do
- not yet recommend formatted text, and there is no way for
- plain text to reference an attachment since it has no concept of
- markup or references. This also forces clients to do something
- sensible with messages that consist entirely of "attachments",
- with no "body" at all.</p>
-
- <p>For instance, when displaying the above example, a client that
- understands the HTML part should display the JPEG image once,
- between the two lines "Here is a photo of my cat:" and
- "Isn't it cute?"; it may additionally present the image in some
- way for a second time, after "Isn't it cute?", or may choose
- not to.</p>
-
- <p>A client that does not understand HTML, displaying the same
- message, should display the plain-text part, followed by the JPEG
- image.</p>
- </tp:rationale>
-
- <p>Connection managers, clients and extensions to this specification
- SHOULD NOT include <tp:type>Handle</tp:type>s as values in a
- Message_Part, except for <code>message-sender</code> in the
- header.</p>
-
- <tp:rationale>
- <p>Reference-counting handles in clients becomes problematic if
- the channel proxy cannot know whether particular map values
- are handles or not.</p>
- </tp:rationale>
-
- <h4>Example messages</h4>
-
- <p>A rich-text message, with an embedded image, might be represented
- as:</p>
-
- <pre>
-[
- {
- 'message-token': '9de9546a-3400-4419-a505-3ea270cb834c',
- 'message-sender': 42,
- 'message-sent': 1210067943,
- 'message-received': 1210067947,
- 'message-type': 0, # = Channel_Text_Message_Type_Normal
- 'pending-message-id': 437,
- },
- { 'alternative': 'main',
- 'content-type': 'text/html',
- 'content': 'Here is a photo of my cat:&lt;br /&gt;' +
- '&lt;img src="cid:catphoto" alt="lol!" /&gt;' +
- '&lt;br /&gt;Isn't it cute?',
- },
- { 'alternative': 'main',
- 'content-type': 'text/plain',
- 'content': 'Here is a photo of my cat:\n[IMG: lol!]\nIsn't it cute?',
- },
- { 'identifier': 'catphoto',
- 'content-type': 'image/jpeg',
- 'size': 101000,
- 'needs-retrieval': True,
- },
-]</pre>
-
- <p>telepathy-ring, Nokia's GSM connection manager, represents vCards
- sent via SMS as:</p>
-
- <pre>
-[
- {
- 'message-token': '9de9546a-3400-4419-a505-3ea270cb834c',
- 'message-sender': 42,
- 'message-sent': 1210067943,
- 'message-received': 1210067947,
- 'message-type': 0, # = Channel_Text_Message_Type_Normal
- 'pending-message-id': 437,
- },
- { 'content-type': 'text/x-vcard',
- 'content': [ 0x66, 0x69, 0x71, ...], # vCard data as an array of bytes
- },
-]</pre>
-
- <h3>Delivery reports</h3>
-
- <div>
- <p>Delivery reports are also represented as messages with the
- <tt>message-type</tt> header mapping to
- <tp:type>Channel_Text_Message_Type</tp:type> Delivery_Report.
- Delivery reports SHOULD contain the <tt>message-sender</tt> header,
- mapping to the intended recipient of the original message, if
- possible; other headers specific to delivery reports are defined by
- the <tp:type>Delivery_Report_Header_Key</tp:type> type. The second
- and subsequent parts, if present, are a human-readable report from
- the IM service.</p>
-
- <p>For backwards- and forwards-compatibility, whenever a delivery
- error report is signalled—that is, with <tt>delivery-status</tt>
- mapping to <tp:type>Delivery_Status</tp:type> Temporarily_Failed or
- Permanently_Failed—<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.Text">SendError</tp:dbus-ref>
- SHOULD also be emitted; whenever <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.Text">SendError</tp:dbus-ref>
- is emitted, a delivery report MUST also be signalled.
- Delivery report messages on this interface MUST be represented in
- emissions of <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.Text">Received</tp:dbus-ref>
- as messages with the Non_Text_Content
- <tp:type>Channel_Text_Message_Flags</tp:type>; clients which
- understand this interface SHOULD ignore the SendError signal in
- favour of listening for delivery reports, as mentioned in the
- introduction.</p>
-
- <p>The result of attempting to send delivery reports using
- <tp:member-ref>SendMessage</tp:member-ref> is currently
- undefined.</p>
-
- <h4>Example delivery reports</h4>
-
- <dl>
- <dt>A minimal delivery report indicating permanent failure of the
- sent message whose token was
- <code>b9a991bd-8845-4d7f-a704-215186f43bb4</code> for an unknown
- reason</dt>
- <dd><pre>
-[{
-# header
-'message-sender': 123,
-'message-type': Channel_Text_Message_Type_Delivery_Report,
-'delivery-status': Delivery_Status_Permanently_Failed,
-'delivery-token': 'b9a991bd-8845-4d7f-a704-215186f43bb4',
-}
-# no body
-]</pre></dd>
-
- <dt>A delivery report where the failed message is echoed back to the
- sender rather than being referenced by ID, and the failure reason
- is that this protocol cannot send messages to offline contacts
- such as the contact with handle 123</dt>
- <dd><pre>
-[{ # header
-'message-sender': 123,
-'message-type': Channel_Text_Message_Type_Delivery_Report,
-'delivery-status': Delivery_Status_Temporarily_Failed,
-'delivery-error': Channel_Text_Send_Error_Offline,
-'delivery-echo':
- [{ # header of original message
- 'message-sender': 1,
- 'message-sent': 1210067943,
- },
- { # body of original message
- 'content-type': 'text/plain',
- 'content': 'Hello, world!',
- }]
- ],
-
-# no body
-]</pre></dd>
-
- <dt>A maximally complex delivery report: the server reports a
- bilingual human-readable failure message because the user sent
- a message "Hello, world!" with token
- <code>b9a991bd-8845-4d7f-a704-215186f43bb4</code> to a contact
- with handle 123, but that handle represents a contact who does not
- actually exist</dt>
- <dd><pre>
-[{ # header
-'message-sender': 123,
-'message-type': Channel_Text_Message_Type_Delivery_Report,
-'delivery-status': Delivery_Status_Permanently_Failed,
-'delivery-error': Channel_Text_Send_Error_Invalid_Contact,
-'delivery-token': 'b9a991bd-8845-4d7f-a704-215186f43bb4',
-'delivery-echo':
- [{ # header of original message
- 'message-sender': 1,
- 'message-sent': 1210067943,
- },
- { # body of original message
- 'content-type': 'text/plain',
- 'content': 'Hello, world!',
- }]
- ],
-},
-{ # message from server (alternative in English)
-'alternative': '404',
-'content-type': 'text/plain',
-'lang': 'en',
-'content': 'I have no contact with that name',
-},
-{ # message from server (alternative in German)
-'alternative': '404'.
-'content-type': 'text/plain',
-'lang': 'de',
-'content', 'Ich habe keinen Kontakt mit diesem Namen',
-}
-]</pre></dd>
-
- <dt>A minimal delivery report indicating successful delivery
- of the sent message whose token was
- <code>b9a991bd-8845-4d7f-a704-215186f43bb4</code></dt>
- <dd><pre>
-[{
-# header
-'message-sender': 123,
-'message-type': Channel_Text_Message_Type_Delivery_Report,
-'delivery-status': Delivery_Status_Delivered,
-'delivery-token': 'b9a991bd-8845-4d7f-a704-215186f43bb4',
-}
-# no body
-]</pre></dd>
-
- </dl>
-
- </div>
- </tp:docstring>
-
- <tp:member name="Key" type="s">
- <tp:docstring>
- A key, which SHOULD be one of the well-known keys specified by
- <tp:type>Message_Header_Key</tp:type>,
- <tp:type>Message_Body_Key</tp:type> or
- <tp:type>Delivery_Report_Header_Key</tp:type> if possible.
- </tp:docstring>
- </tp:member>
-
- <tp:member name="Value" type="v">
- <tp:docstring>
- The value corresponding to the given key, which SHOULD be one of the
- specified types for well-known keys.
- </tp:docstring>
- </tp:member>
- </tp:mapping>
-
- <tp:simple-type type="s" name="Message_Header_Key">
- <tp:added version="0.19.8"/>
- <tp:changed version="0.21.5">
- Removed <tt>protocol-token</tt>—which had never been implemented—and
- respecified <tt>message-token</tt> not to have unimplementable
- uniqueness guarantees.
- </tp:changed>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Well-known keys for the first <tp:type>Message_Part</tp:type> of a
- message, which contains metadata about the message as a whole, along
- with the corresponding value types. Some keys make sense for both
- incoming and outgoing messages, while others are only meaningful for
- one or the other.</p>
-
- <dl>
- <dt>message-token (s -
- <tp:type>Protocol_Message_Token</tp:type>)
- </dt>
- <dd>
- <p>An opaque identifier for the message, as used by the
- underlying protocol. For outgoing messages, this SHOULD be
- globally unique; for incoming messages, this is <em>not</em>
- guaranteed to uniquely identify a message, <em>even within the
- scope of a single channel or contact</em>; the only guarantee
- made is that two messages with different <tt>message-token</tt>
- headers are different messages.</p>
-
- <p>Clients wishing to determine whether a new message with the
- <tt>scrollback</tt> header matches a previously-logged message
- with the same <tt>message-token</tt> SHOULD compare the
- message's sender, contents, <tt>message-sent</tt> or
- <tt>message-received</tt> timestamp, etc. Note that, in XMPP,
- the server only supplies a timestamp for scrollback messages,
- not for messages received while you are in a room; thus,
- non-scrollback messages will lack a <tt>message-sent</tt>
- timestamp.</p>
-
- <tp:rationale>
- <p>In practice, most protocols do not provide globally-unique
- identifiers for messages. Connection managers, being
- stateless, do not have the necessary information — namely, IM
- logs — to generate reliable unique tokens for messages.</p>
-
- <p>For instance, some XMPP clients (including Gabble) stamp
- messages they send with unique identifiers, but others number
- outgoing messages in a conversation from 1 upwards.</p>
- </tp:rationale>
- </dd>
-
- <dt>message-sent (x - <tp:type>Unix_Timestamp64</tp:type>)</dt>
- <dd>The time the message was sent (if unavailable, the time
- it arrived at a central server MAY be used). Omitted if no
- reasonable approximation is available; SHOULD always be present
- on outgoing messages.</dd>
-
- <dt>message-received (x - <tp:type>Unix_Timestamp64</tp:type>)</dt>
- <dd>The time the message was received locally. SHOULD always
- be present.</dd>
-
- <dt>message-sender (u - <tp:type>Contact_Handle</tp:type>)</dt>
- <dd>The contact who sent the message. If 0 or omitted, the contact
- who sent the message could not be determined.</dd>
-
- <dt>message-sender-id (s)</dt>
- <dd>The identifier of the contact who sent the message,
- i.e. the result of calling <tp:dbus-ref
- namespace="ofdT.Connection">InspectHandles</tp:dbus-ref>
- on <code>message-sender</code>. If omitted, clients MUST
- fall back to looking at <code>message-sender</code>.</dd>
-
- <dt>sender-nickname (s)</dt>
- <dd>The nickname chosen by the sender of the message, which can be
- different for each message in a conversation.</dd>
-
- <dt>message-type (u - <tp:type>Channel_Text_Message_Type</tp:type>)
- </dt>
- <dd>The type of message; if omitted,
- Channel_Text_Message_Type_Normal MUST be assumed. MAY
- be omitted for normal chat messages.</dd>
-
- <dt>supersedes (s – <tp:type>Protocol_Message_Token</tp:type>)</dt>
- <dd>If present, this message supersedes a previous message,
- identified by its <tt>message-token</tt> header. The user
- interface MAY, for example, choose to replace the superseded
- message with this message, or grey out the superseded message.
-
- <tp:rationale>Skype, for example, allows the user to amend
- messages they have already sent (to correct typos,
- etc.).</tp:rationale>
-
- Connection Managers SHOULD represent repeatedly edited messages
- in the following form:
- <pre>
- message {token = a};
- message {token = b, supersedes = a};
- message {token = c, supersedes = a};
- </pre>
-
- <tp:rationale>The alternative form is:
- <pre>
- message {token = a};
- message {token = b, supersedes = a};
- message {token = c, supersedes = b};
- </pre>
- but it is more difficult to implement in UIs/loggers, and it
- breaks irrecoverably if message b is lost. If a CM is forced
- to use this form, it should be tested extensively for
- interoperability with existing clients.
- </tp:rationale>
-
- Clients should deal gracefully if the original message gets
- lost, but one or more corrections to it get through:
- <pre>
- message {token = x} gets lost;
- message {token = y, supersedes = x};
- message {token = z, supersedes = x};
- </pre>
-
- <tp:rationale>This is the form that CMs will use to mean "I know
- that this message was edited, but I don't know what it
- originally said." It is often in the interests of the
- remote side for message x to be lost (e.g. to hide
- embarassing mistakes or sensitive information) so it might not
- be possible to retrieve it (even on protocols with reliable
- message-delivery guarantees).</tp:rationale></dd>
-
- <dt>original-message-sent (x - <tp:type>Unix_Timestamp64</tp:type>)</dt>
- <dd>The <tt>message-sent</tt> header of the message that this
- one supersedes.
- This key should only be present if <tt>supersedes</tt> is also
- present. It MAY be used as a hint to help clients locate the
- original message in its logs. If present, comparing the tuple
- (original-message-sent, supersedes) with (message-sent,
- message-token) SHOULD be enough to uniquely
- identify the original message.</dd>
-
- <dt>original-message-received (x - <tp:type>Unix_Timestamp64</tp:type>)</dt>
- <dd>The <tt>message-received</tt> header of the message that this
- one supersedes.
- This key should only be present if <tt>supersedes</tt> is also
- present. It MAY be used as a hint in a similar way to
- <tt>original-message-sent</tt>.</dd>
-
- <dt>pending-message-id (u - <tp:type>Message_ID</tp:type>)</dt>
- <dd>The incoming message ID. This MUST NOT be present on outgoing
- messages. Clients SHOULD NOT store this key - it is only valid
- for as long as the message remains unacknowledged.</dd>
-
- <dt>interface (s - <tp:type>DBus_Interface</tp:type>)</dt>
- <dd>This message is specific to the given interface, which is
- neither Text nor Messages. It SHOULD be ignored if that
- interface is not supported. (Note that an 'interface' key
- can also appear on the second and subsequent parts, where
- it indicates that that part (only) should be ignored if
- unsupported.)</dd>
-
- <dt>scrollback (b)</dt>
- <dd>If present and true, the incoming message was part of a
- replay of message history (this matches the Scrollback flag in
- <tp:type>Channel_Text_Message_Flags</tp:type>). This flag
- does not make sense on outgoing messages and SHOULD NOT
- appear there.</dd>
-
- <dt>rescued (b)</dt>
- <dd>If present and true, the incoming message has been seen in
- a previous channel during the lifetime of the Connection,
- but had not been acknowledged when that channel closed, causing
- an identical channel (in which the message now appears) to open.
- This matches the Rescued flag in
- <tp:type>Channel_Text_Message_Flags</tp:type>; it
- does not make sense on outgoing messages, and SHOULD NOT
- appear there.</dd>
- </dl>
-
- </tp:docstring>
- </tp:simple-type>
-
- <tp:simple-type type="s" name="Message_Body_Key">
- <tp:added version="0.19.8"/>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Well-known keys for the second and subsequent
- <tp:type>Message_Part</tp:type>s of a message, which contain the
- message content, along with the corresponding value types.</p>
-
- <dl>
- <dt>identifier (s —
- <tp:type>Protocol_Content_Identifier</tp:type>)</dt>
- <dd>An opaque identifier for this part.
- Parts of a message MAY reference other parts by treating
- this identifier as if it were a MIME Content-ID and using
- the cid: URI scheme.</dd>
-
- <dt>alternative (s)</dt>
- <dd>
- <p>If present, this part of the message is an alternative for
- all other parts with the same value for "alternative".
- Clients SHOULD only display one of them (this is expected to
- be used for XHTML messages in a future version of this
- specification).</p>
-
- <p>If omitted, this part is not an alternative for any other
- part.</p>
-
- <p>Parts of a message MAY reference the group of alternatives
- as a whole (i.e. a reference to whichever of them is chosen)
- by treating this identifier as if it were the MIME Content-ID
- of a multipart/alternative part, and using the cid: URI
- scheme.</p>
- </dd>
-
- <dt>content-type (s)</dt>
- <dd>
- <p>The MIME type of this part. See the documentation
- for <tp:member-ref>MessageReceived</tp:member-ref> and
- <tp:member-ref>MessageSent</tp:member-ref> for notes on the
- special status of "text/plain" parts.</p>
-
- <p>Connection managers MUST NOT signal parts without a
- 'content-type' key; if a protocol provides no way to determine
- the MIME type, the connection manager is responsible for
- guessing it, but MAY fall back to "text/plain" for text and
- "application/octet-stream" for non-text.</p>
-
- <p>Clients MUST ignore parts without a 'content-type' key, which
- are reserved for future expansion.</p>
-
- <p>When sending messages, clients SHOULD normalize the
- content-type to lower case, but connection managers SHOULD NOT
- rely on this. When signalling sent or received messages,
- connection managers MUST normalize the content-type to lower
- case.</p>
- </dd>
-
- <dt>lang (s)</dt>
- <dd>The natural language of this part, identified by a
- RFC 3066 language tag.
-
- <tp:rationale>
- XMPP allows alternative-selection by language as well as
- by content-type.
- </tp:rationale>
- </dd>
-
- <dt>size (u)</dt>
- <dd>The size in bytes (if needs-retrieval is true, this MAY be an
- estimated or approximate size). SHOULD be omitted if 'content'
- is provided.
-
- <tp:rationale>
- There's no point in providing the size if you're already
- providing all the content.
- </tp:rationale>
- </dd>
-
- <dt>thumbnail (b)</dt>
- <dd>
- <p>This part is a thumbnail. To represent an image together with
- its thumbnail in a single message, there should be one part for
- the full image followed by a part for the thumbnail (following
- the “more complete versions first” requirement), with the same
- 'alternative' value. For example:</p>
-
- <pre>
-[ ... ,
- { 'alternative': 'catphoto',
- 'content-type': 'image/jpeg',
- 'size': 150000,
- 'content': [0xFF, 0xD8, ... 0xFF 0xD9],
- },
- { 'alternative': 'catphoto',
- 'content-type': 'image/jpeg'
- 'size': 1024,
- 'thumbnail': True,
- 'content': [0xFF, 0xD8, ... 0xFF 0xD9],
- },
- ...
-]</pre>
- </dd>
-
- <dt>needs-retrieval (b)</dt>
- <dd>If false or omitted, the connection
- manager already holds this part in memory. If present and true,
- this part must be retrieved on demand (like MIME's
- <tt>message/external-body</tt>) by a mechanism to be defined later.
-
- <tp:rationale>The mechanism was meant to be
- <tp:member-ref>GetPendingMessageContent</tp:member-ref>, but
- that didn't work out. It's worth leaving the header in in
- preparation for a future mechanism.
- </tp:rationale>
- </dd>
-
- <dt>truncated (b)</dt>
- <dd>The content available via the 'content' key has been truncated
- by the server or connection manager (equivalent to
- Channel_Text_Message_Flag_Truncated in the Text interface).
- </dd>
-
- <dt>content (s or ay)</dt>
- <dd>The part's content, if it is available and
- sufficiently small to include here (implies that
- 'needs-retrieval' is false or omitted). Otherwise, omitted.
- If the part is human-readable text or HTML, the value for this
- key MUST be a UTF-8 string (D-Bus signature 's').
- If the part is not text, the value MUST be a byte-array
- (D-Bus signature 'ay'). If the part is a text-based format
- that is not the main body of the message (e.g. an iCalendar
- or an attached XML document), the value SHOULD be a UTF-8 string,
- transcoding from another charset to UTF-8 if necessary, but
- MAY be a byte-array (of unspecified character set) if
- transcoding fails or the source charset is not known.</dd>
-
- <!-- FIXME: "sufficiently small to include" is not currently
- defined; we should add some API so clients can tell the
- CM how large a message it should emit in the signal.-->
-
- <dt>interface (s - <tp:type>DBus_Interface</tp:type>)</dt>
- <dd>This part is specific to the given interface, which is
- neither Text nor Messages. It SHOULD be ignored if that
- interface is not supported. (Note that an 'interface' key
- can also appear on the first part, where it indicates that the
- entire message should be ignored if unsupported.)</dd>
- </dl>
- </tp:docstring>
- </tp:simple-type>
-
- <tp:simple-type type="s" name="Delivery_Report_Header_Key">
- <tp:added version="0.19.8"/>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Well-known keys for the first <tp:type>Message_Part</tp:type> of a
- delivery report, along with the corresponding value types. Some of
- these are special-cases of headers defined by
- <tp:type>Message_Header_Key</tp:type>.</p>
-
- <dl>
- <dt>message-sender (u - <tp:type>Contact_Handle</tp:type>, as
- defined by <tp:type>Message_Header_Key</tp:type>)</dt>
- <dd>MUST be the intended recipient of the original message, if
- available (zero or omitted if the intended recipient is
- unavailable or is not a contact, e.g. a chatroom), even if the
- delivery report actually came from an intermediate server.</dd>
-
- <dt>message-type (u - <tp:type>Channel_Text_Message_Type</tp:type>,
- as defined by <tp:type>Message_Header_Key</tp:type>)</dt>
- <dd>MUST be Channel_Text_Message_Type_Delivery_Report.</dd>
-
- <dt>delivery-status (u - <tp:type>Delivery_Status</tp:type>)</dt>
- <dd>The status of the message. All delivery reports MUST contain
- this key in the first Message_Part.</dd>
-
- <dt>delivery-token (s - <tp:type>Protocol_Message_Token</tp:type>)</dt>
-
- <dd>
- <p>An identifier for the message to which this delivery report
- refers. MUST NOT be an empty string. Omitted if not
- available.</p>
-
- <p>Clients may match this against the token produced by the
- SendMessage method and MessageSent signal. A status report
- with no token could match any sent message, and a sent
- message with an empty token could match any status report.
- If multiple sent messages match, clients SHOULD use some
- reasonable heuristic.</p>
-
- <tp:rationale>
- In an ideal world, we could unambiguously match reports
- against messages; however, deployed protocols are not ideal,
- and not all reports and messages can be matched.
- </tp:rationale>
- </dd>
-
- <dt>delivery-error (u -
- <tp:type>Channel_Text_Send_Error</tp:type>)</dt>
- <dd>
- The reason for the failure. MUST be omitted if this was a
- successful delivery; SHOULD be omitted if it would be
- Channel_Text_Send_Error_Unknown.
- </dd>
-
- <dt>delivery-dbus-error (s -
- <tp:type>DBus_Error_Name</tp:type>)</dt>
- <dd>
- The reason for the failure, specified as a (possibly
- implementation-specific) D-Bus error. MUST be omitted if this was
- a successful delivery. If set, the 'delivery-error' key SHOULD be
- set to the closest available value.
- </dd>
-
- <dt>delivery-error-message (s)</dt>
- <dd>
- Debugging information on why the message could not be delivered.
- MUST be omitted if this was a successful delivery; MAY always be
- omitted.
- </dd>
-
- <dt>delivery-echo (aa{sv} - <tp:type>Message_Part[]</tp:type>)</dt>
- <dd>
- <p>The message content, as defined by the Messages interface.
- Omitted if no content is available. Content MAY have been
- truncated, message parts MAY have been removed, and message
- parts MAY have had their content removed (i.e. the message part
- metadata is present, but the 'content' key is not).</p>
-
- <tp:rationale>
- Some protocols, like XMPP, echo the failing message back to
- the sender. This is sometimes the only way to match it
- against the sent message, so we include it here.
- </tp:rationale>
- </dd>
-
- </dl>
- </tp:docstring>
- </tp:simple-type>
-
- <tp:simple-type type="u" name="Message_Part_Index"
- array-name="Message_Part_Index_List">
- <tp:deprecated version="0.21.5">
- This type is only used by
- <tp:member-ref>GetPendingMessageContent</tp:member-ref>, which is
- unimplemented and deprecated.
- </tp:deprecated>
- <tp:added version="0.17.17"/>
- <tp:docstring>
- The index of a message part within a message.
- </tp:docstring>
- </tp:simple-type>
-
- <tp:mapping name="Message_Part_Content_Map">
- <tp:added version="0.17.17"/>
- <tp:deprecated version="0.21.5">
- This structure is only used by
- <tp:member-ref>GetPendingMessageContent</tp:member-ref>, which is
- unimplemented and deprecated.
- </tp:deprecated>
- <tp:docstring>
- A mapping from message part indexes to their content, as returned by
- <tp:member-ref>GetPendingMessageContent</tp:member-ref>.
- </tp:docstring>
-
- <tp:member type="u" tp:type="Message_Part_Index" name="Part">
- <tp:docstring>
- Indexes into the array of <tp:type>Message_Part</tp:type>s that
- represents a message. The "headers" part (which is not a valid
- argument to GetPendingMessageContent) is considered to be part 0,
- so the valid part numbers start at 1 (for the second message part).
- </tp:docstring>
- </tp:member>
-
- <tp:member type="v" name="Content">
- <tp:docstring>
- The message part's content. The variant MUST contain either type
- 's' or 'ay' (UTF-8 text string, or byte array), following the
- same rules as for the value of the 'content' key in
- the <tp:type>Message_Part</tp:type> mappings.
- </tp:docstring>
- </tp:member>
- </tp:mapping>
-
- <tp:simple-type type="s" name="Protocol_Message_Token"
- array-name="Protocol_Message_Token_List">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>An opaque token used to identify messages in the underlying.
- protocol. As a special case, the empty string indicates that there
- is no particular identification for a message.</p>
-
- <p>CM implementations SHOULD use an identifier expected to be unique,
- such as a UUID, for outgoing messages (if possible).</p>
-
- <p>Some protocols can only track a limited number of messages
- in a small message-ID space (SMS messages are identified by a single
- byte), and some implementations send non-unique identifiers (some
- XMPP clients use very simple message IDs, such as an incrementing
- integer that resets to 1 at the beginning of each connection). As a
- result, clients MUST NOT assume that protocol tokens will not be
- re-used.</p>
-
- <p>In particular, clients SHOULD use a heuristic to assign delivery
- reports to messages, such as matching on message content or
- timestamp (if available), or assuming that the delivery report
- refers to the most recent message with that ID.</p>
- </tp:docstring>
- </tp:simple-type>
-
- <tp:simple-type name="Protocol_Content_Identifier" type="s">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A protocol-specific identifier for a blob of content, as used for
- the <tt>identifier</tt> key in a <tp:type>Message_Part</tp:type>. The
- same identifier MAY be re-used if the same content, byte-for-byte,
- appears as a part of several messages.</p>
-
- <tp:rationale>
- <p>On XMPP, these identifiers might be Content-IDs for custom
- smileys implemented using <a
- href="http://xmpp.org/extensions/xep-0231.html">XEP-0232 Bits of
- Binary</a>; the same smiley might well appear in multiple
- messages.</p>
- </tp:rationale>
- </tp:docstring>
- </tp:simple-type>
-
- <method name="SendMessage" tp:name-for-bindings="Send_Message">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Submit a message to the server for sending.
- If this method returns successfully, the message has been submitted
- to the server and the <tp:member-ref>MessageSent</tp:member-ref>
- signal is emitted. A corresponding
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.Text">Sent</tp:dbus-ref>
- signal on the Text interface MUST also be emitted.</p>
-
- <p>This method MUST return before the MessageSent signal is
- emitted.</p>
-
- <tp:rationale>
- <p>This means that the process sending the message is the first
- to see the <tp:type>Protocol_Message_Token</tp:type>, and can
- relate the message to the corresponding
- <tp:member-ref>MessageSent</tp:member-ref> signal by comparing
- message tokens (if supported by the protocol).</p>
- </tp:rationale>
-
- <p>If this method fails, message submission to the server has failed
- and no signal on this interface (or the Text interface) is
- emitted.</p>
-
- <p>If this method succeeds, message submission to the server has
- succeeded, but the message has not necessarily reached its intended
- recipient. If a delivery failure is detected later, this is
- signalled by receiving a message whose <code>message-type</code>
- header maps to
- <tp:value-ref type="Channel_Text_Message_Type">Delivery_Report</tp:value-ref>.
- Similarly, if delivery is detected to have been successful
- (which is not possible in all protocols), a successful delivery
- report will be signalled.</p>
- </tp:docstring>
-
- <arg direction="in" type="aa{sv}" tp:type="Message_Part[]"
- name="Message">
- <tp:docstring>
- The message content, including any attachments or alternatives.
- This MUST NOT include the following headers, or any others that
- do not make sense for a client to specify:
- <code>message-sender</code>, <code>message-sender-id</code>,
- <code>message-sent</code>, <code>message-received</code>,
- <code>pending-message-id</code>.
- </tp:docstring>
- </arg>
- <arg direction="in" name="Flags" type="u"
- tp:type="Message_Sending_Flags">
- <tp:docstring>
- Flags affecting how the message is sent. The channel MAY ignore some
- or all flags, depending on
- <tp:member-ref>DeliveryReportingSupport</tp:member-ref>; the flags
- that were handled by the CM are provided in
- <tp:member-ref>MessageSent</tp:member-ref>.
- </tp:docstring>
- </arg>
-
- <arg direction="out" type="s" tp:type="Protocol_Message_Token"
- name="Token">
- <tp:docstring>
- An opaque token used to match any incoming delivery or failure
- reports against this message, or an empty string if the message
- is not readily identifiable.
- </tp:docstring>
- </arg>
-
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- The requested message is malformed and cannot be sent.
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
-
- <tp:flags name="Message_Sending_Flags" value-prefix="Message_Sending_Flag"
- type="u">
- <tp:docstring>
- Flags altering the way a message is sent. The "most usual" action
- should always be to have these flags unset. Some indication of which
- flags are supported is provided by the
- <tp:member-ref>DeliveryReportingSupport</tp:member-ref> property.
- </tp:docstring>
-
- <tp:flag suffix="Report_Delivery" value="1">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Provide a successful delivery report if possible, even if this is
- not the default for this protocol. Ignored if delivery reports are
- not possible on this protocol.</p>
-
- <tp:rationale>
- <p>In some protocols, like XMPP, it is not conventional to request
- or send positive delivery notifications.</p>
- </tp:rationale>
-
- <p>Delivery failure reports SHOULD always be sent, but if this flag
- is present, the connection manager MAY also try harder to obtain
- failed delivery reports or allow them to be matched to outgoing
- messages.</p>
- </tp:docstring>
- </tp:flag>
-
- <tp:flag suffix="Report_Read" value="2">
- <tp:added version="0.19.9"/>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Provide a delivery report when the message is read by the
- recipient, even if this is not the default for this protocol.
- Ignored if read reports are not possible on this protocol.</p>
- </tp:docstring>
- </tp:flag>
-
- <tp:flag suffix="Report_Deleted" value="4">
- <tp:added version="0.19.9"/>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Provide a delivery report when the message is deleted by the
- recipient, even if this is not the default for this protocol.
- Ignored if such reports are not possible on this protocol.</p>
- </tp:docstring>
- </tp:flag>
- </tp:flags>
-
- <signal name="MessageSent" tp:name-for-bindings="Message_Sent">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Signals that a message has been submitted for sending. This
- MUST be emitted exactly once per emission of the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.Text">Sent</tp:dbus-ref>
- signal on the Text interface, for backwards-compatibility; clients
- SHOULD ignore the latter if this interface is present, as mentioned
- in the introduction.</p>
-
- <p>This SHOULD be emitted as soon as the CM determines it's
- theoretically possible to send the message (e.g. the parameters are
- supported and correct).</p>
-
- <tp:rationale>
- <p>This signal allows a process that is not the caller of
- SendMessage to log sent messages.</p>
- </tp:rationale>
- </tp:docstring>
-
- <arg type="aa{sv}" tp:type="Message_Part[]" name="Content">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The message content (see <tp:type>Message_Part</tp:type> for full
- details). If the message that was passed to
- <tp:member-ref>SendMessage</tp:member-ref> has a formatted text
- part that the connection manager recognises, but no
- <tt>text/plain</tt> alternative, the CM MUST use the formatted text
- part to generate a <tt>text/plain</tt> alternative which is also
- included in this signal argument.</p>
-
- <p>The connection manager SHOULD include the
- <code>message-sender</code>, <code>message-sender-id</code> and
- <code>message-sent</code> headers in the representation of the
- message that is signalled here. If the channel has
- channel-specific handles, the <code>message-sender</code> and
- <code>message-sender-id</code> SHOULD reflect the sender that
- other contacts will see.</p>
-
- <p>If the connection manager can predict that the message will be
- altered during transmission, this argument SHOULD reflect what
- other contacts will receive, rather than being a copy of the
- argument to SendMessage (if the message is truncated,
- formatting or alternatives are dropped, etc., then the edited
- version SHOULD appear in this signal).</p>
- </tp:docstring>
- </arg>
-
- <arg name="Flags" type="u" tp:type="Message_Sending_Flags">
- <tp:docstring>
- <p>Flags affecting how the message was sent. The flags might be a
- subset of those passed to SendMessage if the caller requested
- unsupported flags.</p>
- </tp:docstring>
- </arg>
-
- <arg name="Message_Token" type="s" tp:type="Protocol_Message_Token">
- <tp:docstring>
- An opaque token used to match any incoming delivery or failure
- reports against this message, or an empty string if the message
- is not readily identifiable.
- </tp:docstring>
- </arg>
- </signal>
-
- <property name="PendingMessages" type="aaa{sv}" access="read"
- tp:type="Message_Part[][]" tp:name-for-bindings="Pending_Messages">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A list of incoming messages that have neither been acknowledged nor
- rejected. This list is a more detailed version of the one returned
- by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">Text.ListPendingMessages</tp:dbus-ref>,
- and contains the same messages, uniquely identified by the same
- pending message IDs. Its items can be removed using
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">Text.AcknowledgePendingMessages</tp:dbus-ref>.</p>
-
- <p>Change notification is via
- <tp:member-ref>MessageReceived</tp:member-ref> and
- <tp:member-ref>PendingMessagesRemoved</tp:member-ref>.</p>
- </tp:docstring>
- </property>
-
- <signal name="PendingMessagesRemoved"
- tp:name-for-bindings="Pending_Messages_Removed">
- <tp:docstring>
- The messages with the given IDs have been removed from the
- <tp:member-ref>PendingMessages</tp:member-ref> list. Clients SHOULD NOT
- attempt to acknowledge those messages.
-
- <tp:rationale>
- This completes change notification for the PendingMessages property
- (previously, there was change notification when pending messages
- were added, but not when they were removed).
- </tp:rationale>
- </tp:docstring>
-
- <arg name="Message_IDs" type="au" tp:type="Message_ID[]">
- <tp:docstring>
- The messages that have been removed from the pending message list.
- </tp:docstring>
- </arg>
- </signal>
-
- <method name="GetPendingMessageContent"
- tp:name-for-bindings="Get_Pending_Message_Content">
- <tp:deprecated version='0.21.5'
- xmlns="http://www.w3.org/1999/xhtml">
- This method has never been implemented, and in any case would have been
- impossible to use correctly when multiple clients (such as a logger and
- the handler) are interested in a text channel. See <a
- href='https://bugs.freedesktop.org/show_bug.cgi?id=26417'>freedesktop.org
- bug #26417</a> for more details.
- </tp:deprecated>
- <tp:docstring>
- Retrieve the content of one or more parts of a pending message.
- Note that this function may take a considerable amount of time
- to return if the part's 'needs-retrieval' flag is true; consider
- extending the default D-Bus method call timeout. Additional API is
- likely to be added in future, to stream large message parts.
- </tp:docstring>
-
- <arg name="Message_ID" type="u" tp:type="Message_ID" direction="in">
- <tp:docstring>
- The ID of a pending message
- </tp:docstring>
- </arg>
-
- <arg name="Parts" type="au" direction="in"
- tp:type="Message_Part_Index[]">
- <tp:docstring>
- The desired entries in the array of message parts, identified by
- their position. The "headers" part (which is not a valid argument
- to this method) is considered to be part 0, so the valid part
- numbers start at 1 (for the second Message_Part).
- </tp:docstring>
- </arg>
-
- <arg name="Content" type="a{uv}" direction="out"
- tp:type="Message_Part_Content_Map">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The content of the requested parts. The keys in this mapping
- are positions in the array of message parts; the values are
- either of type 's' or 'ay' (UTF-8 text string, or byte array),
- following the same rules as for the value of the 'content' key in
- the <tp:type>Message_Part</tp:type> mappings.</p>
-
- <p>If the one of the requested part numbers was greater than zero
- but referred to a part that had no content (i.e. it had no
- 'content-type' key or no 'content' key), it is simply omitted from
- this mapping; this is not considered to be an error condition.</p>
- </tp:docstring>
- </arg>
-
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- Either there is no pending message with the given message ID,
- or one of the part numbers given was 0 or too large.
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
-
- <signal name="MessageReceived" tp:name-for-bindings="Message_Received">
- <tp:docstring>
- Signals that a message has been received and added to the pending
- messages queue. This MUST be emitted exactly once per emission of the
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.Text">Received</tp:dbus-ref>
- signal on the Text interface, for backwards-compatibility; clients
- SHOULD ignore the latter in favour of this signal if this interface is
- present, as mentioned in the introduction.
- </tp:docstring>
-
- <arg type="aa{sv}" tp:type="Message_Part[]" name="Message">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The message content, including any attachments or alternatives. If
- the incoming message contains formatted text without a plain text
- alternative, the connection manager MUST generate a
- <tt>text/plain</tt> alternative from the formatted text, and
- include it in this message (both here, and in the
- <tp:member-ref>PendingMessages</tp:member-ref> property).</p>
- </tp:docstring>
- </arg>
- </signal>
-
- <tp:enum name="Delivery_Status" value-prefix="Delivery_Status"
- plural="Delivery_Statuses" type="u">
- <tp:docstring>
- <p>The status of a message as indicated by a delivery report.</p>
-
- <p>If this enum is extended in future specifications, this should
- only be to add new, non-overlapping conditions (i.e. all failures
- should still be signalled as either Temporarily_Failed
- or Permanently_Failed). If additional detail is required (e.g.
- distinguishing between the various types of permanent failure) this
- will be done using additional
- <tp:type>Delivery_Report_Header_Key</tp:type>s.</p>
- </tp:docstring>
-
- <tp:enumvalue suffix="Unknown" value="0">
- <tp:docstring>
- The message's disposition is unknown.
- Clients SHOULD consider all messages to have status
- Delivery_Status_Unknown unless otherwise specified; connection
- managers SHOULD NOT signal this delivery status explicitly.
- </tp:docstring>
- </tp:enumvalue>
-
- <tp:enumvalue suffix="Delivered" value="1">
- <tp:docstring>
- The message has been delivered to the intended recipient.
- </tp:docstring>
- </tp:enumvalue>
-
- <tp:enumvalue suffix="Temporarily_Failed" value="2">
- <tp:docstring>
- Delivery of the message has failed. Clients SHOULD notify the user,
- but MAY automatically try sending another copy of the message.
-
- <tp:rationale>
- Similar to errors with type="wait" in XMPP; analogous to
- 4xx errors in SMTP.
- </tp:rationale>
- </tp:docstring>
- </tp:enumvalue>
-
- <tp:enumvalue suffix="Permanently_Failed" value="3">
- <tp:docstring>
- Delivery of the message has failed. Clients SHOULD NOT try again
- unless by specific user action. If the user does not modify the
- message or alter configuration before re-sending, this error is
- likely to happen again.
-
- <tp:rationale>
- Similar to errors with type="cancel", type="modify"
- or type="auth" in XMPP; analogous to 5xx errors in SMTP.
- </tp:rationale>
- </tp:docstring>
- </tp:enumvalue>
-
- <tp:enumvalue suffix="Accepted" value="4">
- <tp:docstring>
- An intermediate server has accepted the message but the message
- has not been yet delivered to the ultimate recipient. The
- connection manager might send a Failed report or Delivered report
- later.
-
- <tp:rationale>
- Similar to "202 Accepted" success code in SIP; analogous to
- 251 and 252 responses in SMTP.
- </tp:rationale>
- </tp:docstring>
- </tp:enumvalue>
-
- <tp:enumvalue suffix="Read" value="5">
- <tp:added version="0.19.9"/>
- <tp:docstring>
- The message has been read by the intended recipient.
- </tp:docstring>
- </tp:enumvalue>
-
- <tp:enumvalue suffix="Deleted" value="6">
- <tp:added version="0.19.9"/>
- <tp:docstring>
- The message has been deleted by the intended recipient. This MAY be
- signalled on its own if the message is deleted without being read, or
- after <code>Read</code> if the message was read before being deleted.
- </tp:docstring>
- </tp:enumvalue>
- </tp:enum>
-
- <tp:flags name="Delivery_Reporting_Support_Flags"
- value-prefix="Delivery_Reporting_Support_Flag" type="u">
- <tp:docstring>
- Flags indicating the level of support for delivery reporting on this
- channel, as found on the
- <tp:member-ref>DeliveryReportingSupport</tp:member-ref> property. Any
- future flags added to this set will conform to the
- convention that the presence of an extra flag implies that
- more operations will succeed. Note that CMs may always provide more
- reports than are requested in the
- <tp:type>Message_Sending_Flags</tp:type> passed to
- <tp:member-ref>SendMessage</tp:member-ref>.
-
- <tp:rationale>
- If senders want delivery reports, they should ask for them. If they
- don't want delivery reports, they can just ignore them, so there's no
- need to have capability discovery for what will happen if a delivery
- report isn't requested.
- </tp:rationale>
- </tp:docstring>
-
- <tp:flag suffix="Receive_Failures" value="1">
- <tp:docstring>
- Clients MAY expect to receive negative delivery reports if
- Message_Sending_Flag_Report_Delivery is specified when sending.
- </tp:docstring>
- </tp:flag>
-
- <tp:flag suffix="Receive_Successes" value="2">
- <tp:docstring>
- Clients MAY expect to receive positive delivery reports if
- Message_Sending_Flag_Report_Delivery is specified when sending.
- </tp:docstring>
- </tp:flag>
-
- <tp:flag suffix="Receive_Read" value="4">
- <tp:added version="0.19.9"/>
- <tp:docstring>
- Clients MAY expect to receive <tp:type>Delivery_Status</tp:type>
- <code>Read</code> reports if Message_Sending_Flag_Report_Read
- is specified when sending.
- </tp:docstring>
- </tp:flag>
-
- <tp:flag suffix="Receive_Deleted" value="8">
- <tp:added version="0.19.9"/>
- <tp:docstring>
- Clients MAY expect to receive <tp:type>Delivery_Status</tp:type>
- <code>Deleted</code> reports if Message_Sending_Flag_Report_Deleted
- is specified when sending.
- </tp:docstring>
- </tp:flag>
- </tp:flags>
-
- <property name="DeliveryReportingSupport" access="read"
- tp:type="Delivery_Reporting_Support_Flags" type="u"
- tp:name-for-bindings="Delivery_Reporting_Support"
- tp:immutable="yes">
- <tp:docstring>
- A bitfield indicating features supported by this channel.
- </tp:docstring>
- </property>
-
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Channel_Interface_Password.xml b/spec/Channel_Interface_Password1.xml
index 8f08627e2..e2a35b82b 100644
--- a/spec/Channel_Interface_Password.xml
+++ b/spec/Channel_Interface_Password1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Password" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Interface_Password1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>
Copyright © 2005-2011 Collabora Limited
Copyright © 2005-2009 Nokia Corporation
@@ -20,8 +20,8 @@ You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.Password">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <interface name="im.telepathy1.Channel.Interface.Password1">
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:flags name="Channel_Password_Flags" value-prefix="Channel_Password_Flag" type="u">
<tp:flag suffix="Provide" value="8">
<tp:docstring>
@@ -32,7 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:flag suffix="Hint" value="4">
<tp:added version="0.25.0"/>
<tp:docstring>
- The <tp:dbus-ref namespace="ofdT.Channel.Interface">RoomConfig1.PasswordHint</tp:dbus-ref>
+ The <tp:dbus-ref namespace="imt1.Channel.Interface">RoomConfig1.PasswordHint</tp:dbus-ref>
contains a hint for the password.
</tp:docstring>
</tp:flag>
@@ -51,8 +51,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
which operations are currently valid.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
</tp:possible-errors>
</method>
<signal name="PasswordFlagsChanged"
@@ -90,9 +90,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
proceed if the 'provide' password flag is set.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument"/>
</tp:possible-errors>
</method>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -106,7 +106,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>Once the user has joined the channel, the current
password-protectedness of the room can be checked (and possibly
modified) using the <tp:dbus-ref
- namespace='ofdT.Channel.Interface'>RoomConfig1</tp:dbus-ref>
+ namespace='imt1.Channel.Interface'>RoomConfig1</tp:dbus-ref>
interface, if implemented.</p>
</tp:docstring>
</interface>
diff --git a/spec/Channel_Interface_Picture.xml b/spec/Channel_Interface_Picture1.xml
index fb2fcf3d2..ae1bbeb9f 100644
--- a/spec/Channel_Interface_Picture.xml
+++ b/spec/Channel_Interface_Picture1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Picture"
+<node name="/Channel_Interface_Picture1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2011 Collabora Ltd.</tp:copyright>
@@ -20,9 +20,9 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.Picture1"
+ <interface name="im.telepathy1.Channel.Interface.Picture1"
tp:causes-havoc="draft">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:added version="0.25.0"/>
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal"
value="true"/>
@@ -31,13 +31,13 @@
<p>An interface channels can implement to support a picture. Most
of the time this will be implemented by channels implementing
the <tp:dbus-ref
- namespace="ofdT.Channel.Interface">Room2</tp:dbus-ref>
+ namespace="imt1.Channel.Interface">Room1</tp:dbus-ref>
interface. Note that this interface is not restricted to
Text channels, and can also be used on Call channels.</p>
<tp:rationale>
This is a separate interface from
- <tp:dbus-ref namespace="ofdT.Channel.Interface">RoomConfig1</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Channel.Interface">RoomConfig1</tp:dbus-ref>
because (a) it's possible some protocol might support pictures for
1:1 chats; and (b) it avoids downloading an unwanted picture in a
GetAll request.
@@ -62,14 +62,14 @@
further changes by other users or the server.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.NotImplemented"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
Picture is somehow invalid: e.g. unsupported MIME type,
too big, etc.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
</tp:possible-errors>
</method>
diff --git a/spec/Channel_Interface_Room.xml b/spec/Channel_Interface_Room1.xml
index 92423b67c..f0cad3040 100644
--- a/spec/Channel_Interface_Room.xml
+++ b/spec/Channel_Interface_Room1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Room"
+<node name="/Channel_Interface_Room1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2010 Collabora Ltd.</tp:copyright>
@@ -21,8 +21,8 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.Room2">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <interface name="im.telepathy1.Channel.Interface.Room1">
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:added version="0.24.0">(version 2)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -45,9 +45,9 @@
<p>This interface intends to support and differentiate these mechanisms
more clearly than the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">TargetHandleType</tp:dbus-ref>
and <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref>
properties can alone. It initially contains a pair of properties used
to represent the human-readable parts of a
<tp:type>Room_Handle</tp:type>'s identifier, if any. The above examples
@@ -57,10 +57,10 @@
<li>The IRC channel <tt>#telepathy</tt> on Freenode is represented by a
channel with properties
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">TargetHandleType</tp:dbus-ref>
= <code>Room</code>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref>
= <code>"#telepathy"</code>,
<tp:member-ref>RoomName</tp:member-ref> = <code>"#telepathy"</code>,
<tp:member-ref>Server</tp:member-ref> = <code>""</code>, indicating
@@ -78,10 +78,10 @@
<li>A Skype group chat with opaque identifier <tt>0xdeadbeef</tt> has
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">TargetHandleType</tp:dbus-ref>
= <code>Room</code>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref>
= <code>"0xdeadbeef"</code>,
<tp:member-ref>RoomName</tp:member-ref> = <code>""</code>,
<tp:member-ref>Server</tp:member-ref> = <code>""</code>, indicating
@@ -90,7 +90,7 @@
<li>An MSN group chat has
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">TargetHandleType</tp:dbus-ref>
= <code>None</code>,
<tp:member-ref>RoomName</tp:member-ref> = <code>""</code>,
<tp:member-ref>Server</tp:member-ref> = <code>""</code>, indicating
@@ -101,10 +101,10 @@
<li>A standard Jabber multi-user chat
<tt>jdev@conference.jabber.org</tt> has
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">TargetHandleType</tp:dbus-ref>
= <code>Room</code>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref>
= <code>"jdev@conference.jabber.org"</code>,
<tp:member-ref>RoomName</tp:member-ref> = <code>"jdev"</code>,
<tp:member-ref>Server</tp:member-ref> = <code>"conference.jabber.org"</code>.
@@ -112,10 +112,10 @@
<li>A Google Talk private MUC <tt>private-chat-11111x1x-11xx-111x-1111-111x1xx11x11@groupchat.google.com</tt> has
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">TargetHandleType</tp:dbus-ref>
= <code>Room</code>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref>
= <code>"private-chat-11111x1x-11xx-111x-1111-111x1xx11x11@groupchat.google.com"</code>,
<tp:member-ref>RoomName</tp:member-ref> = <code>""</code>,
<tp:member-ref>Server</tp:member-ref> =
@@ -127,10 +127,10 @@
<li>Similarly, a XEP-0045 §10.1.4 uniquely-named room
<tt>lrcgsnthzvwm@conference.jabber.org</tt> has
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">TargetHandleType</tp:dbus-ref>
= <code>Room</code>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref>
= <code>"lrcgsnthzvwm@conference.jabber.org"</code>,
<tp:member-ref>RoomName</tp:member-ref> = <code>""</code>,
<tp:member-ref>Server</tp:member-ref> =
@@ -148,21 +148,21 @@
<blockquote>
<pre>
-( Fixed = { ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
- >ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type"
+( Fixed = { ...<tp:dbus-ref namespace="im.telepathy1.Channel"
+ >ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="im.telepathy1.Channel.Type"
>Text</tp:dbus-ref>,
- ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
+ ...<tp:dbus-ref namespace="im.telepathy1.Channel"
>TargetHandleType</tp:dbus-ref>: Room,
},
- Allowed = [ ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
+ Allowed = [ ...<tp:dbus-ref namespace="im.telepathy1.Channel"
>TargetID</tp:dbus-ref>,
- ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
+ ...<tp:dbus-ref namespace="im.telepathy1.Channel"
>TargetHandle</tp:dbus-ref>,
]
)</pre></blockquote>
- <p>Channel requests must specify either <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
- >TargetID</tp:dbus-ref> or <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
+ <p>Channel requests must specify either <tp:dbus-ref namespace="im.telepathy1.Channel"
+ >TargetID</tp:dbus-ref> or <tp:dbus-ref namespace="im.telepathy1.Channel"
>TargetHandle</tp:dbus-ref>.</p>
<p>If, like IRC, the room identifiers are also human-readable, the
@@ -170,22 +170,22 @@
<blockquote>
<pre>
-( Fixed = { ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
- >ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type"
+( Fixed = { ...<tp:dbus-ref namespace="im.telepathy1.Channel"
+ >ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="im.telepathy1.Channel.Type"
>Text</tp:dbus-ref>,
- ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
+ ...<tp:dbus-ref namespace="im.telepathy1.Channel"
>TargetHandleType</tp:dbus-ref>: Room,
},
- Allowed = [ ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
+ Allowed = [ ...<tp:dbus-ref namespace="im.telepathy1.Channel"
>TargetID</tp:dbus-ref>,
- ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
+ ...<tp:dbus-ref namespace="im.telepathy1.Channel"
>TargetHandle</tp:dbus-ref>,
...<tp:member-ref>RoomName</tp:member-ref>
]
),
-( Fixed = { ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
- >ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type"
+( Fixed = { ...<tp:dbus-ref namespace="im.telepathy1.Channel"
+ >ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="im.telepathy1.Channel.Type"
>Text</tp:dbus-ref>
},
Allowed = [ ...<tp:member-ref>RoomName</tp:member-ref>,
@@ -193,20 +193,20 @@
)</pre></blockquote>
<p>Requests may specify the RoomName in place of
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref> or
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref> or
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandle</tp:dbus-ref>
. Note how <tp:member-ref>RoomName</tp:member-ref> appears
in <var>Allowed_Properties</var> of a different RCC because
- when <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
+ when <tp:dbus-ref namespace="im.telepathy1.Channel"
>TargetHandleType</tp:dbus-ref> is omitted (or is None), both
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
+ <tp:dbus-ref namespace="im.telepathy1.Channel"
>TargetHandle</tp:dbus-ref> and
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
+ <tp:dbus-ref namespace="im.telepathy1.Channel"
>TargetID</tp:dbus-ref> must also be omitted.
<tp:member-ref>RoomName</tp:member-ref> is allowed in conjuction
with
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref> or
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref> or
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandle</tp:dbus-ref>
in some situations, as explained below in the <em>Requesting room
channels</em> section.
</p>
@@ -217,22 +217,22 @@
<tp:member-ref>Server</tp:member-ref> if not explicitly
specified in a channel request. The CM's default server MAY
be configurable by a connection parameter specified on a
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.ConnectionManager"
+ <tp:dbus-ref namespace="im.telepathy1.ConnectionManager"
>RequestConnection</tp:dbus-ref> call, similarly to how the
fallback conference server is specified on jabber connections in
gabble.</p>
<p>If the protocol supports unnamed rooms, <tp:member-ref>RoomName</tp:member-ref>
should be fixed to the empty string, and
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandleType</tp:dbus-ref>
should be None:</p>
<blockquote>
<pre>
-( Fixed = { ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
- >ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type"
+( Fixed = { ...<tp:dbus-ref namespace="im.telepathy1.Channel"
+ >ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="im.telepathy1.Channel.Type"
>Text</tp:dbus-ref>,
- ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
+ ...<tp:dbus-ref namespace="im.telepathy1.Channel"
>TargetHandleType</tp:dbus-ref>: None,
...<tp:member-ref>RoomName</tp:member-ref>: "",
},
@@ -248,18 +248,18 @@
<blockquote>
<pre>
-{ ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type">Text</tp:dbus-ref>,
- ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>: Room,
- ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>: "qwerasdfzxcv@conference.jabber.org",
+{ ...<tp:dbus-ref namespace="im.telepathy1.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="im.telepathy1.Channel.Type">Text</tp:dbus-ref>,
+ ...<tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandleType</tp:dbus-ref>: Room,
+ ...<tp:dbus-ref namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref>: "qwerasdfzxcv@conference.jabber.org",
...<tp:member-ref>RoomName</tp:member-ref>: ""
}</pre></blockquote>
<p>If <tp:member-ref>RoomName</tp:member-ref> features in
<var>Allowed_Properties</var> then the only value allowed in conjunction
- with <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>
- or <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref>
+ with <tp:dbus-ref namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref>
+ or <tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandle</tp:dbus-ref>
is the empty string. Requests with conflicting
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref>
and <tp:member-ref>RoomName</tp:member-ref> properties
will fail with InvalidArgument.</p>
@@ -269,7 +269,7 @@
<blockquote>
<pre>
-{ ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type">Text</tp:dbus-ref>,
+{ ...<tp:dbus-ref namespace="im.telepathy1.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="im.telepathy1.Channel.Type">Text</tp:dbus-ref>,
...<tp:member-ref>RoomName</tp:member-ref>: ""
...<tp:member-ref>Server</tp:member-ref>: "conference.jabber.org"
}</pre>
@@ -280,9 +280,9 @@
<blockquote>
<pre>
-{ ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type">Text</tp:dbus-ref>,
- ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>: Room,
- ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>: "kajsdhkajshdfjkshdfjkhs@conference.jabber.org",
+{ ...<tp:dbus-ref namespace="im.telepathy1.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="im.telepathy1.Channel.Type">Text</tp:dbus-ref>,
+ ...<tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandleType</tp:dbus-ref>: Room,
+ ...<tp:dbus-ref namespace="im.telepathy1.Channel">TargetID</tp:dbus-ref>: "kajsdhkajshdfjkshdfjkhs@conference.jabber.org",
...<tp:member-ref>RoomName</tp:member-ref>: ""
...<tp:member-ref>Server</tp:member-ref>: "conference.jabber.org"
}</pre>
@@ -306,7 +306,7 @@
persistent. This D-Bus property is <strong>not</strong> this
XMPP room name, but the bit before the @ in the room jid; see
<tp:dbus-ref
- namespace='ofdT.Channel.Interface'>RoomConfig1.Title</tp:dbus-ref>
+ namespace='imt1.Channel.Interface'>RoomConfig1.Title</tp:dbus-ref>
for that concept.</p>
<p>This property cannot change during the lifetime of the channel. It
diff --git a/spec/Channel_Interface_Room_Config.xml b/spec/Channel_Interface_Room_Config1.xml
index 18bb06f0c..9fba3a446 100644
--- a/spec/Channel_Interface_Room_Config.xml
+++ b/spec/Channel_Interface_Room_Config1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Room_Config"
+<node name="/Channel_Interface_Room_Config1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2011 Collabora Ltd.</tp:copyright>
@@ -20,11 +20,11 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.RoomConfig1">
+ <interface name="im.telepathy1.Channel.Interface.RoomConfig1">
<tp:added version="0.24.0">version 1. This replaces the old-school
Telepathy properties on <tp:dbus-ref
- namespace='ofdT.Channel.Type'>Text</tp:dbus-ref>.</tp:added>
- <tp:requires interface='org.freedesktop.Telepathy.Channel.Interface.Room2'/>
+ namespace='imt1.Channel.Type'>Text</tp:dbus-ref>.</tp:added>
+ <tp:requires interface='im.telepathy1.Channel.Interface.Room1'/>
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal"
value="true"/>
@@ -36,7 +36,7 @@
<p>The “topic” (on IRC) or “subject” (on XMPP) is not part of this
interface; it can be found on the <tp:dbus-ref
- namespace='ofdT.Channel.Interface'>Subject2</tp:dbus-ref>
+ namespace='imt1.Channel.Interface'>Subject1</tp:dbus-ref>
interface.</p>
</tp:docstring>
@@ -64,7 +64,7 @@
<property name="Title" tp:name-for-bindings="Title" type="s" access="read">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
A human-visible name for the channel, if it differs from <tp:dbus-ref
- namespace='ofdT.Channel.Interface'>Room2.RoomName</tp:dbus-ref>; the
+ namespace='imt1.Channel.Interface'>Room1.RoomName</tp:dbus-ref>; the
empty string, otherwise.
<tp:rationale>
@@ -75,10 +75,10 @@
<ul>
<li><tp:dbus-ref
- namespace='ofdT.Channel.Interface'>Room2.RoomName</tp:dbus-ref>
+ namespace='imt1.Channel.Interface'>Room1.RoomName</tp:dbus-ref>
= <code>"jdev"</code>;</li>
<li><tp:dbus-ref
- namespace='ofdT.Channel.Interface'>Room2.Server</tp:dbus-ref>
+ namespace='imt1.Channel.Interface'>Room1.Server</tp:dbus-ref>
= <code>"conference.jabber.org"</code>;</li>
<li><tp:member-ref>Title</tp:member-ref> = <code>"General Jabber
development discussion"</code>.</li>
@@ -111,7 +111,7 @@
<code>True</code> if contacts joining this channel must provide a
password to be granted entry. Note that this property does not
indicate that a password is required <em>right now</em>; see the
- <tp:dbus-ref namespace='ofdT.Channel.Interface'>Password</tp:dbus-ref>
+ <tp:dbus-ref namespace='imt1.Channel.Interface'>Password1</tp:dbus-ref>
interface for the API used to provide a password while joining a room.
</tp:docstring>
</property>
@@ -233,26 +233,26 @@
method.</p>
</tp:docstring>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied">
+ <tp:error name="im.telepathy1.Error.PermissionDenied">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
The user is not allowed to reconfigure this room.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
One or more of the specified properties is unknown, or ill-typed.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
One or more of the specified properties cannot be modified on this
protocol.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
The room's current configuration has not yet been retrieved, so we
cannot update it just yet. The application might like to try again
diff --git a/spec/Channel_Interface_SASL_Authentication.xml b/spec/Channel_Interface_SASL_Authentication1.xml
index 7985a6bd5..b58c90e55 100644
--- a/spec/Channel_Interface_SASL_Authentication.xml
+++ b/spec/Channel_Interface_SASL_Authentication1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_SASL_Authentication"
+<node name="/Channel_Interface_SASL_Authentication1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright © 2010 Collabora Limited </tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -17,20 +17,20 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.SASLAuthentication">
+ <interface name="im.telepathy1.Channel.Interface.SASLAuthentication1">
<tp:added version="0.21.5">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A channel interface for SASL authentication,
as defined by
<a href="http://tools.ietf.org/html/rfc4422">RFC 4422</a>.
When this interface appears on a <tp:dbus-ref
- namespace="ofdT.Channel.Type">ServerAuthentication</tp:dbus-ref>
+ namespace="imt1.Channel.Type">ServerAuthentication1</tp:dbus-ref>
channel, it represents authentication with the server. In future,
it could also be used to authenticate with secondary services,
or even to authenticate end-to-end connections with contacts. As a result,
- this interface does not REQUIRE <tp:dbus-ref namespace="ofdT.Channel.Type"
- >ServerAuthentication</tp:dbus-ref> to allow for a potential future
+ this interface does not REQUIRE <tp:dbus-ref namespace="imt1.Channel.Type"
+ >ServerAuthentication1</tp:dbus-ref> to allow for a potential future
Channel.Type.PeerAuthentication interface.</p>
<p>In any protocol that requires a password, the connection manager can
@@ -39,7 +39,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
interactively. This can be used to connect to protocols that may
require a password, without requiring that the password is saved in
the <tp:dbus-ref
- namespace="ofdT">Account.Parameters</tp:dbus-ref>.</p>
+ namespace="imt1">Account.Parameters</tp:dbus-ref>.</p>
<p>In some protocols, such as XMPP, authentication with the server
is also carried out using SASL. In these protocols, a channel with this
@@ -55,9 +55,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:rationale>
<p>For channels managed by a
- <tp:dbus-ref namespace="ofdT">ChannelDispatcher</tp:dbus-ref>,
+ <tp:dbus-ref namespace="imt1">ChannelDispatcher</tp:dbus-ref>,
only the channel's <tp:dbus-ref
- namespace="ofdT.Client">Handler</tp:dbus-ref> may call the
+ namespace="imt1.Client">Handler</tp:dbus-ref> may call the
methods on this interface. Other clients MAY observe the
authentication process by watching its signals and properties.</p>
@@ -189,11 +189,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:error-ref>ServiceConfused</tp:error-ref>.</p>
<p>If this interface appears on a <tp:dbus-ref
- namespace="ofdT.Channel.Type">ServerAuthentication</tp:dbus-ref>
+ namespace="imt1.Channel.Type">ServerAuthentication1</tp:dbus-ref>
channel, and connection to the server fails with an authentication
failure, this error code SHOULD be copied into the
<tp:dbus-ref
- namespace="ofdT">Connection.ConnectionError</tp:dbus-ref>
+ namespace="imt1">Connection.ConnectionError</tp:dbus-ref>
signal.</p>
</tp:docstring>
</property>
@@ -207,14 +207,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
disconnection; otherwise, the empty map. The keys and values are
the same as for the second argument of
<tp:dbus-ref
- namespace="ofdT">Connection.ConnectionError</tp:dbus-ref>.</p>
+ namespace="imt1">Connection.ConnectionError</tp:dbus-ref>.</p>
<p>If this interface appears on a <tp:dbus-ref
- namespace="ofdT.Channel.Type">ServerAuthentication</tp:dbus-ref>
+ namespace="imt1.Channel.Type">ServerAuthentication1</tp:dbus-ref>
channel, and connection to the server fails with an authentication
failure, these details SHOULD be copied into the
<tp:dbus-ref
- namespace="ofdT">Connection.ConnectionError</tp:dbus-ref>
+ namespace="imt1">Connection.ConnectionError</tp:dbus-ref>
signal.</p>
</tp:docstring>
</property>
@@ -225,7 +225,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The identity for which authorization is being attempted,
typically the 'account' from the <tp:dbus-ref
- namespace="ofdT.ConnectionManager">RequestConnection</tp:dbus-ref>
+ namespace="imt1.ConnectionManager">RequestConnection</tp:dbus-ref>
parameters, normalized and formatted according to the
conventions used for SASL in this protocol.</p>
@@ -311,7 +311,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>For example, in the simple case, if the user connects with
<tp:dbus-ref
- namespace="ofdT.ConnectionManager">RequestConnection</tp:dbus-ref>({
+ namespace="imt1.ConnectionManager">RequestConnection</tp:dbus-ref>({
account: "<tt>user@example.com</tt>" }) and use PLAIN with
password "password", he or she should authenticate like so:
"<tt>\0user\0password</tt>" and the channel will look like
@@ -324,7 +324,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>In the complex case, if the same user is using his or her
sysadmin powers to log in as the "announcements" role address,
he or she would connect with <tp:dbus-ref
- namespace="ofdT.ConnectionManager">RequestConnection</tp:dbus-ref>({
+ namespace="imt1.ConnectionManager">RequestConnection</tp:dbus-ref>({
account: "<tt>announcements@example.com</tt>" }) and the SASL
channel would look like this:</p>
@@ -407,7 +407,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The channel is not in a state where starting authentication makes
sense (i.e. SASL_Status_Not_Started, or (if
@@ -418,8 +418,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
SASL_Status_Client_Failed before starting another attempt.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The server or connection manager doesn't implement the given
SASL mechanism. Choose a SASL mechanism from
@@ -481,7 +481,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The channel is not in a state where starting authentication makes
sense (i.e. SASL_Status_Not_Started, or (if
@@ -492,8 +492,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
SASL_Status_Client_Failed before starting another attempt.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The server or connection manager doesn't implement the given
SASL mechanism (choose one from
@@ -519,13 +519,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
Either the state is not In_Progress, or no challenge has been
received yet, or you have already responded to the last challenge.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
</tp:possible-errors>
</method>
@@ -546,21 +546,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>In mechanisms where the server authenticates itself to the client,
calling this method indicates that the client considers this to have
been successful. In the case of <tp:dbus-ref
- namespace="ofdT.Channel.Type">ServerAuthentication</tp:dbus-ref>
+ namespace="imt1.Channel.Type">ServerAuthentication1</tp:dbus-ref>
channels, this means that the connection manager MAY continue to
connect, and MAY advance the <tp:dbus-ref
- namespace="ofdT">Connection.Status</tp:dbus-ref> to Connected.</p>
+ namespace="imt1">Connection.Status</tp:dbus-ref> to Connected.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
Either the state is neither In_Progress nor Server_Succeeded, or no
challenge has been received yet, or you have already responded to
the last challenge.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
</tp:possible-errors>
</method>
@@ -587,7 +587,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
reason code.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The current state is either Succeeded or Client_Accepted.
</tp:docstring>
@@ -694,7 +694,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:member-ref>AcceptSASL</tp:member-ref>). Connection to the server
will proceed as soon as this state is reached. The Handler SHOULD
call <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">Close</tp:dbus-ref>
to close the channel.
</tp:docstring>
</tp:enumvalue>
@@ -706,7 +706,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:member-ref>StartMechanism</tp:member-ref> or
<tp:member-ref>StartMechanismWithData</tp:member-ref> again.
Otherwise, it should give up completely, by calling <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">Close</tp:dbus-ref>
on the channel.
</tp:docstring>
</tp:enumvalue>
diff --git a/spec/Channel_Interface_SMS.xml b/spec/Channel_Interface_SMS1.xml
index 497e94519..f785c8b9c 100644
--- a/spec/Channel_Interface_SMS.xml
+++ b/spec/Channel_Interface_SMS1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_SMS"
+<node name="/Channel_Interface_SMS1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2008–2010 Nokia Corporation</tp:copyright>
<tp:copyright>Copyright © 2010 Collabora Ltd.</tp:copyright>
@@ -20,8 +20,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:license>
<interface
- name="org.freedesktop.Telepathy.Channel.Interface.SMS">
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Type.Text"/>
+ name="im.telepathy1.Channel.Interface.SMS1">
+ <tp:requires interface="im.telepathy1.Channel.Type.Text"/>
<tp:added version='0.19.12'>Imported from
rtcom-telepathy-glib, with the unused properties removed and the
documentation tidied up.</tp:added>
@@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
messages will be delivered via SMS.</p>
<p>This interface MAY appear in the
- <tp:dbus-ref namespace="ofdT.Channel">Interfaces</tp:dbus-ref> property
+ <tp:dbus-ref namespace="imt1.Channel">Interfaces</tp:dbus-ref> property
of channels where <tp:member-ref>SMSChannel</tp:member-ref> would be
immutable and false. It SHOULD appear on channels where
<tp:member-ref>SMSChannel</tp:member-ref> is immutable and true, and
@@ -47,16 +47,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>A handler for class 0 SMSes should advertise the following filter:</p>
<blockquote><code>
-{ ...<tp:dbus-ref namespace='ofdT.Channel'>ChannelType</tp:dbus-ref>:
- ...<tp:dbus-ref namespace='ofdT.Channel.Type'>Text</tp:dbus-ref>,<br/>
-  ...<tp:dbus-ref namespace='ofdT.Channel'>TargetHandleType</tp:dbus-ref>:
+{ ...<tp:dbus-ref namespace='imt1.Channel'>ChannelType</tp:dbus-ref>:
+ ...<tp:dbus-ref namespace='imt1.Channel.Type'>Text</tp:dbus-ref>,<br/>
+  ...<tp:dbus-ref namespace='imt1.Channel'>TargetHandleType</tp:dbus-ref>:
<tp:value-ref type="Handle_Type">Contact</tp:value-ref>,<br/>
-  ...<tp:dbus-ref namespace='ofdT.Channel.Interface'>SMS.Flash</tp:dbus-ref>:
+  ...<tp:dbus-ref namespace='imt1.Channel.Interface'>SMS1.Flash</tp:dbus-ref>:
True,<br/>
}</code></blockquote>
<p>It should also set its <tp:dbus-ref
- namespace='ofdT.Client.Handler'>BypassApproval</tp:dbus-ref> property
+ namespace='imt1.Client.Handler'>BypassApproval</tp:dbus-ref> property
to <code>True</code>, so that it is invoked immediately for new
channels.</p>
@@ -71,22 +71,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<blockquote><code>
[<br/>
- ({ ...<tp:dbus-ref namespace='ofdT.Channel'>ChannelType</tp:dbus-ref>:
- ...<tp:dbus-ref namespace='ofdT.Channel.Type'>Text</tp:dbus-ref>,<br/>
-    ...<tp:dbus-ref namespace='ofdT.Channel'>TargetHandleType</tp:dbus-ref>:
+ ({ ...<tp:dbus-ref namespace='imt1.Channel'>ChannelType</tp:dbus-ref>:
+ ...<tp:dbus-ref namespace='imt1.Channel.Type'>Text</tp:dbus-ref>,<br/>
+    ...<tp:dbus-ref namespace='imt1.Channel'>TargetHandleType</tp:dbus-ref>:
<tp:value-ref type="Handle_Type">Contact</tp:value-ref>,<br/>
 },<br/>
-  [ ...<tp:dbus-ref namespace='ofdT.Channel'>TargetHandle</tp:dbus-ref>,
- ...<tp:dbus-ref namespace='ofdT.Channel'>TargetID</tp:dbus-ref> ]),<br/>
+  [ ...<tp:dbus-ref namespace='imt1.Channel'>TargetHandle</tp:dbus-ref>,
+ ...<tp:dbus-ref namespace='imt1.Channel'>TargetID</tp:dbus-ref> ]),<br/>
<br/>
- ({ ...<tp:dbus-ref namespace='ofdT.Channel'>ChannelType</tp:dbus-ref>:
- ...<tp:dbus-ref namespace='ofdT.Channel.Type'>Text</tp:dbus-ref>,<br/>
-    ...<tp:dbus-ref namespace='ofdT.Channel'>TargetHandleType</tp:dbus-ref>:
+ ({ ...<tp:dbus-ref namespace='imt1.Channel'>ChannelType</tp:dbus-ref>:
+ ...<tp:dbus-ref namespace='imt1.Channel.Type'>Text</tp:dbus-ref>,<br/>
+    ...<tp:dbus-ref namespace='imt1.Channel'>TargetHandleType</tp:dbus-ref>:
<tp:value-ref type="Handle_Type">Contact</tp:value-ref>,<br/>
   ...<tp:member-ref>SMSChannel</tp:member-ref>: True,<br/>
 },<br/>
-  [ ...<tp:dbus-ref namespace='ofdT.Channel'>TargetHandle</tp:dbus-ref>,
- ...<tp:dbus-ref namespace='ofdT.Channel'>TargetID</tp:dbus-ref> ]),<br/>
+  [ ...<tp:dbus-ref namespace='imt1.Channel'>TargetHandle</tp:dbus-ref>,
+ ...<tp:dbus-ref namespace='imt1.Channel'>TargetID</tp:dbus-ref> ]),<br/>
]
</code></blockquote>
</tp:docstring>
@@ -96,13 +96,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>If <code>True</code>, then this channel is exclusively for
receiving class 0 SMSes (and no SMSes can be sent using <tp:dbus-ref
- namespace='ofdT.Channel.Interface.Messages'>SendMessage</tp:dbus-ref>
+ namespace='imt1.Channel.Type.Text'>SendMessage</tp:dbus-ref>
on this channel). If <code>False</code>, no incoming class 0 SMSes
will appear on this channel.</p>
<p>This property is immutable (cannot change), and therefore SHOULD
appear wherever immutable properties are reported, e.g. <tp:dbus-ref
- namespace="ofdT.Connection.Interface.Requests"
+ namespace="imt1.Connection.Interface.Requests"
>NewChannels</tp:dbus-ref> signals.</p>
<tp:rationale>
@@ -114,9 +114,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>Separating class 0 SMSes into their own channel with this
immutable property allows them to be dispatched to a different
- <tp:dbus-ref namespace='ofdT.Client'>Handler</tp:dbus-ref>—which
+ <tp:dbus-ref namespace='imt1.Client'>Handler</tp:dbus-ref>—which
would include this property in its <tp:dbus-ref
- namespace='ofdT.Client.Handler'
+ namespace='imt1.Client.Handler'
>HandlerChannelFilter</tp:dbus-ref>—avoiding the normal Text
channel handler having to decide for each message whether it should
be displayed to the user immediately or handled normally.</p>
@@ -260,7 +260,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The estimated cost of sending this message. The currency and
scale of this value are the same as the
- <tp:dbus-ref namespace="ofdT.Connection.Interface">Balance.AccountBalance</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Connection.Interface">Balance1.AccountBalance</tp:dbus-ref>
property.</p>
<p>A value of <code>-1</code> indicates the cost could not be
@@ -270,13 +270,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
Raised when the method is not available on this channel.
Clients MAY choose to make their own estimation.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
Raised when the content cannot be encoded into a valid SMS.
</tp:docstring>
diff --git a/spec/Channel_Interface_Securable.xml b/spec/Channel_Interface_Securable1.xml
index d9d971394..6a139a368 100644
--- a/spec/Channel_Interface_Securable.xml
+++ b/spec/Channel_Interface_Securable1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Securable"
+<node name="/Channel_Interface_Securable1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright (C) 2010 Collabora Ltd.</tp:copyright>
@@ -20,24 +20,24 @@
USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.Securable">
+ <interface name="im.telepathy1.Channel.Interface.Securable1">
<tp:added version="0.21.5">as stable API</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This interface exists to expose security information about
- <tp:dbus-ref namespace="ofdT">Channel</tp:dbus-ref>s. The two
+ <tp:dbus-ref namespace="imt1">Channel</tp:dbus-ref>s. The two
properties are sometimes immutable and can be used to make
decisions on how cautious to be about transferring sensitive
data. The special case of <tp:dbus-ref
- namespace="ofdT.Channel.Type">ServerAuthentication</tp:dbus-ref>
+ namespace="imt1.Channel.Type">ServerAuthentication1</tp:dbus-ref>
channels is one example of where the two properties are
immutable.</p>
<p>For example, clients MAY use these properties to decide
whether the <code>PLAIN</code> mechanism is acceptable for a
<tp:dbus-ref
- namespace="ofdT.Channel.Interface">SASLAuthentication</tp:dbus-ref>
+ namespace="imt1.Channel.Interface">SASLAuthentication1</tp:dbus-ref>
channel.</p>
</tp:docstring>
diff --git a/spec/Channel_Interface_Service_Point.xml b/spec/Channel_Interface_Service_Point1.xml
index 787397b20..c2d37e6e7 100644
--- a/spec/Channel_Interface_Service_Point.xml
+++ b/spec/Channel_Interface_Service_Point1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Service_Point" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Interface_Service_Point1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright © 2005-2010 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright © 2005-2010 Collabora Ltd </tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -17,7 +17,7 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.ServicePoint">
+ <interface name="im.telepathy1.Channel.Interface.ServicePoint1">
<tp:added version="0.19.7">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
diff --git a/spec/Channel_Interface_Splittable.xml b/spec/Channel_Interface_Splittable1.xml
index 760c13406..52976ed6b 100644
--- a/spec/Channel_Interface_Splittable.xml
+++ b/spec/Channel_Interface_Splittable1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Splittable"
+<node name="/Channel_Interface_Splittable1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009 Collabora Limited</tp:copyright>
<tp:copyright>Copyright © 2009 Nokia Corporation</tp:copyright>
@@ -20,15 +20,15 @@
02110-1301, USA.</p>
</tp:license>
<interface
- name="org.freedesktop.Telepathy.Channel.Interface.Splittable.DRAFT"
+ name="im.telepathy1.Channel.Interface.Splittable1"
tp:causes-havoc="experimental">
<tp:added version="0.19.0">(draft 1)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface for channels that can be made conceptually part of a
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface"
- >Conference</tp:dbus-ref>, and can then be detached from that
+ <tp:dbus-ref namespace="im.telepathy1.Channel.Interface"
+ >Conference1</tp:dbus-ref>, and can then be detached from that
conference.</p>
<tp:rationale>
@@ -44,8 +44,8 @@
tp:name-for-bindings="Split">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Request that this channel is removed from any
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface"
- >Conference</tp:dbus-ref> of which it is a part.</p>
+ <tp:dbus-ref namespace="im.telepathy1.Channel.Interface"
+ >Conference1</tp:dbus-ref> of which it is a part.</p>
<p>This implies that the media streams within the conference are put on
hold and the media streams within the member channel leaving the
@@ -53,12 +53,12 @@
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
This channel isn't in a conference.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
This channel is in a conference but can't currently be split away
from it.
diff --git a/spec/Channel_Interface_Subject.xml b/spec/Channel_Interface_Subject1.xml
index fcaf39836..a5fee4fd1 100644
--- a/spec/Channel_Interface_Subject.xml
+++ b/spec/Channel_Interface_Subject1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Subject"
+<node name="/Channel_Interface_Subject1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2010–2011 Collabora Ltd.</tp:copyright>
@@ -20,8 +20,8 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.Subject2">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <interface name="im.telepathy1.Channel.Interface.Subject1">
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:added version="0.24.0">(version 2)</tp:added>
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal"
value="true"/>
@@ -30,7 +30,7 @@
<p>An interface channels can implement to support subjects. Most
of the time this will be implemented by channels implementing
the <tp:dbus-ref
- namespace="ofdT.Channel.Interface">Room2</tp:dbus-ref>
+ namespace="imt1.Channel.Interface">Room1</tp:dbus-ref>
interface, but some protocols support subjects in 1-to-1 chats
(such as XMPP). Note that this interface is not restricted to
Text channels, and can also be used on Call channels.</p>
@@ -51,8 +51,8 @@
further changes by other users or the server.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
</tp:possible-errors>
</method>
diff --git a/spec/Channel_Interface_Transfer.xml b/spec/Channel_Interface_Transfer.xml
deleted file mode 100644
index 02591c1d1..000000000
--- a/spec/Channel_Interface_Transfer.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Channel_Interface_Transfer" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
- <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
- <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
- <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
- </tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.Transfer"
- tp:causes-havoc='not well-tested'>
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
- <method name="Transfer">
- <arg direction="in" name="Member" type="u" tp:type="Contact_Handle">
- <tp:docstring>
- The handle of the member to transfer
- </tp:docstring>
- </arg>
- <arg direction="in" name="Destination" type="u" tp:type="Contact_Handle">
- <tp:docstring>
- The handle of the destination contact
- </tp:docstring>
- </arg>
- <tp:docstring>
- Request that the given channel member instead connects to a different
- contact ID.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- </tp:possible-errors>
- </method>
- <tp:docstring>
- An interface for channels where you may request that one of the members
- connects to somewhere else instead.
- </tp:docstring>
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Channel_Interface_Tube.xml b/spec/Channel_Interface_Tube1.xml
index f31ab2138..e02ce2cb8 100644
--- a/spec/Channel_Interface_Tube.xml
+++ b/spec/Channel_Interface_Tube1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Interface_Tube" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Interface_Tube1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2008-2009 Collabora Limited</tp:copyright>
<tp:copyright>Copyright © 2008-2009 Nokia Corporation</tp:copyright>
<tp:license>
@@ -17,17 +17,17 @@ You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Interface.Tube">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <interface name="im.telepathy1.Channel.Interface.Tube1">
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A <i>tube</i> is a mechanism for arbitrary data transfer between
two or more IM users, used to allow applications on the users'
systems to communicate without having to establish network
connections themselves. Currently, two types of tube exist:
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
- >Channel.Type.DBusTube</tp:dbus-ref> and
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
- >Channel.Type.StreamTube</tp:dbus-ref>. This interface contains
+ <tp:dbus-ref namespace="im.telepathy1"
+ >Channel.Type.DBusTube1</tp:dbus-ref> and
+ <tp:dbus-ref namespace="im.telepathy1"
+ >Channel.Type.StreamTube1</tp:dbus-ref>. This interface contains
the properties, signals and methods common to both types of tube;
you can only create channels of a specific tube type, not of this
type. A tube channel contains exactly one tube; if you need several
@@ -36,27 +36,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>Tube channels can be requested for <tp:type>Handle_Type</tp:type>
Contact (for 1-1 communication) or Room (to communicate with others in
the room simultaneously).</p>
-
- <p>As an exception to the usual handling of capabilities, connection managers
- for protocols with capability discovery (such as XMPP) SHOULD advertise the
- capability representing each Tube type that they support
- (<tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.Type.DBusTube</tp:dbus-ref> and/or
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.Type.StreamTube</tp:dbus-ref>)
- even if no client has indicated via
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.ContactCapabilities">UpdateCapabilities</tp:dbus-ref>
- that such a tube is supported. They SHOULD also allow clients to offer tubes with any
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.StreamTube">Service</tp:dbus-ref> or
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.DBusTube">ServiceName</tp:dbus-ref>
- to any contact which supports the corresponding tube capability.</p>
-
- <tp:rationale>
- <p>This lowers the barrier to entry for those writing new tube
- applications, and preserves interoperability with older versions of
- the Telepathy stack which did not support rich capabilities.</p>
- </tp:rationale>
</tp:docstring>
<property name="Parameters" type="a{sv}" tp:type="String_Variant_Map"
@@ -76,7 +55,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
participants.</p>
<p>For example, a stream tube for <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.StreamTube">Service</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type.StreamTube1">Service</tp:dbus-ref>
<tt>"smb"</tt> (<cite>Server Message Block over TCP/IP</cite>) might
use the following properties, as defined in <a
href="http://www.dns-sd.org/ServiceTypes.html">DNS SRV (RFC 2782)
@@ -90,18 +69,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>When requesting a tube with
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>,
+ namespace="im.telepathy1.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>,
this property MUST NOT be included in the request; instead, it is set
when <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamTube.Offer</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type">StreamTube1.Offer</tp:dbus-ref>
or <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">DBusTube.Offer</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type">DBusTube1.Offer</tp:dbus-ref>
(as appropriate) is called. Its value is undefined until the tube is
offered; once set, its value MUST NOT change.</p>
<p>When receiving an incoming tube, this property is immutable and so advertised in the
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">NewChannels</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface.Requests">NewChannels</tp:dbus-ref>
signal.</p>
</tp:docstring>
</property>
@@ -113,7 +92,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>When requesting a tube with
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>,
+ namespace="im.telepathy1.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>,
this property MUST NOT be included in the request.</p>
</tp:docstring>
</property>
@@ -202,6 +181,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:enum name="Socket_Access_Control" type="u"
array-name="Socket_Access_Control_List">
+ <tp:changed version="UNRELEASED">The deprecated Netmask enum
+ value has been removed.</tp:changed>
<tp:enumvalue suffix="Localhost" value="0">
<tp:docstring>
<p>The IP or Unix socket can be accessed by any local user (e.g.
@@ -229,28 +210,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
connections will be rejected.
</tp:docstring>
</tp:enumvalue>
- <tp:enumvalue suffix="Netmask" value="2">
- <tp:deprecated version="0.17.25">This has never been implemented.
- If you want to share a service to your whole LAN, Telepathy is
- not the way to do it.</tp:deprecated>
- <tp:docstring>
- May only be used on IP sockets. The associated variant must contain
- a struct Socket_Netmask_IPv4 (or Socket_Netmask_IPv6) with
- signature (sy), containing the string form of an
- IP address of the appropriate version, and a prefix length "n".
- The socket can only be accessed if the first n bits of the
- connecting address match the first n bits of the given address.
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Credentials" value="3">
+ <tp:enumvalue suffix="Credentials" value="2">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The high-level meaning of this access control type is that
only the same user (e.g. same numeric Unix uid) is allowed to
interact with the tube. Exactly how this is achieved varies by
channel type.</p>
- <p>For <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type"
- >StreamTube</tp:dbus-ref> channels, this access control type
+ <p>For <tp:dbus-ref namespace="im.telepathy1.Channel.Type"
+ >StreamTube1</tp:dbus-ref> channels, this access control type
may only be used on UNIX sockets.
The connecting process must send a byte when
it first connects, which is not considered to be part of the data
@@ -262,8 +230,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
in D-Bus the byte is always zero, whereas in Tubes it can be
nonzero.)</p>
- <p>For <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type"
- >DBusTube</tp:dbus-ref> channels, this access control type
+ <p>For <tp:dbus-ref namespace="im.telepathy1.Channel.Type"
+ >DBusTube1</tp:dbus-ref> channels, this access control type
may be used on any type of socket, and there is no extra byte
added by Telepathy at the beginning of the stream: all bytes in
the stream are part of the D-Bus tube connection. The connecting
diff --git a/spec/Channel_Request.xml b/spec/Channel_Request.xml
index dd10049e1..5347f96fe 100644
--- a/spec/Channel_Request.xml
+++ b/spec/Channel_Request.xml
@@ -21,29 +21,29 @@
MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.ChannelRequest">
+ <interface name="im.telepathy1.ChannelRequest">
<tp:added version="0.17.26">(as a stable interface)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A channel request is an object in the <tp:dbus-ref
- namespace='ofdT'>ChannelDispatcher</tp:dbus-ref> representing
+ namespace='imt1'>ChannelDispatcher</tp:dbus-ref> representing
an ongoing request for some channels to be created or found. They are
created by methods such as <tp:dbus-ref
- namespace='ofdT.ChannelDispatcher'>CreateChannel</tp:dbus-ref>. There
+ namespace='imt1.ChannelDispatcher'>CreateChannel</tp:dbus-ref>. There
can be any number of ChannelRequest objects at the same time.</p>
<p>Its well-known bus name is the same as that of the ChannelDispatcher,
- <code>"org.freedesktop.Telepathy.ChannelDispatcher"</code>.</p>
+ <code>"im.telepathy1.ChannelDispatcher"</code>.</p>
<tp:rationale>
<p>See
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">ChannelDispatcher.CreateChannel</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">ChannelDispatcher.CreateChannel</tp:dbus-ref>
for rationale for ChannelRequest being a separate object.</p>
</tp:rationale>
<p>A channel request can be cancelled by any client (not just the one
that requested it). This means that the ChannelDispatcher will
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel">Close</tp:dbus-ref>
the resulting channel, or refrain from requesting it at all, rather
than dispatching it to a handler.</p>
</tp:docstring>
@@ -52,7 +52,7 @@
type="o" access="read">
<tp:docstring>
The <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>
+ namespace="im.telepathy1">Account</tp:dbus-ref>
on which this request was made. This property cannot change.
</tp:docstring>
</property>
@@ -72,7 +72,7 @@
type="s" tp:type="DBus_Well_Known_Name" access="read">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Either the well-known bus name (starting with
- <code>org.freedesktop.Telepathy.Client.</code>)
+ <code>im.telepathy1.Client.</code>)
of the preferred handler for this
channel, or an empty string to indicate that any handler would be
acceptable.</p>
@@ -133,7 +133,7 @@
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
This method has already been called, so it is no longer
available. Stop calling it.
@@ -153,7 +153,7 @@
<p>If the connection manager has already been asked to create a
channel but has not produced one yet (e.g. if <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
+ namespace="im.telepathy1">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
has been called, but has not yet returned), then the
ChannelDispatcher will remember that the request has been cancelled.
When the channel appears, it will be closed (if it was newly
@@ -165,14 +165,14 @@
then the channel dispatcher will not dispatch that
channel to a handler. If the channel was newly created for this
request, the channel dispatcher will close it with <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref>;
+ namespace="im.telepathy1.Channel">Close</tp:dbus-ref>;
otherwise, the channel dispatcher will ignore it. In either case,
<tp:member-ref>Failed</tp:member-ref> will be emitted when processing
has been completed.</p>
<p>If <tp:member-ref>Failed</tp:member-ref> is emitted in response to
this method, the error SHOULD be
- <code>org.freedesktop.Telepathy.Error.Cancelled</code>.</p>
+ <code>im.telepathy1.Error.Cancelled</code>.</p>
<p>If the channel has already been dispatched to a handler, then
it's too late to call this method, and the channel request will
@@ -190,10 +190,10 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The name of a D-Bus error. This can come from various sources,
including the error raised by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>,
+ namespace="im.telepathy1.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>,
or an error generated
to represent failure to establish the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>.</p>
+ namespace="im.telepathy1">Connection</tp:dbus-ref>.</p>
</tp:docstring>
</arg>
@@ -205,13 +205,6 @@
</arg>
</signal>
- <signal name="Succeeded" tp:name-for-bindings="Succeeded">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The channel request has succeeded. It is no longer present,
- and further methods must not be called on it.</p>
- </tp:docstring>
- </signal>
-
<property name="Hints" tp:name-for-bindings="Hints"
type="a{sv}" access="read">
<tp:added version="0.21.5"/>
@@ -239,24 +232,24 @@
hints: they are solely for communication between cooperating
clients. If hints that do affect the channel dispatcher are added in
future, their names will start with an appropriate reversed domain
- name (e.g. <code>org.freedesktop.Telepathy</code> for hints defined
+ name (e.g. <code>im.telepathy1</code> for hints defined
by this specification, or an appropriate vendor name for third-party
plugins).</p>
<p>This property may be set when the channel request is created, and
can never change. Since it is immutable, it SHOULD be included in the
dictionary of properties passed to <tp:dbus-ref
- namespace="ofdT.Client.Interface.Requests">AddRequest</tp:dbus-ref>
+ namespace="imt1.Client.Interface.Requests">AddRequest</tp:dbus-ref>
by the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelDispatcher</tp:dbus-ref>.</p>
+ namespace="im.telepathy1">ChannelDispatcher</tp:dbus-ref>.</p>
<p>The following standardised hints are defined:</p>
<dl>
- <dt>org.freedesktop.Telepathy.ChannelRequest.DelegateToPreferredHandler - b</dt>
+ <dt>im.telepathy1.ChannelRequest.DelegateToPreferredHandler - b</dt>
<dd>If present and True the client currently handling the channel
SHOULD pass the channel to the
<tp:member-ref>PreferredHandler</tp:member-ref> using
- <tp:dbus-ref namespace="ofdT.ChannelDispatcher">DelegateChannels</tp:dbus-ref>.
+ <tp:dbus-ref namespace="imt1.ChannelDispatcher">DelegateChannels</tp:dbus-ref>.
<tp:rationale>
This hint allows the user to request a channel in their
@@ -276,15 +269,15 @@
</tp:rationale>
The Handler should check each
- <tp:dbus-ref namespace="ofdT">ChannelRequest</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1">ChannelRequest</tp:dbus-ref>
of the Requests_Satisfied parameter of
- <tp:dbus-ref namespace="ofdT.Client.Handler">HandleChannels</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Client.Handler">HandleChannels</tp:dbus-ref>
for the hint. The first request containing the hint SHOULD be used
and all further hints SHOULD be ignored.
<tp:rationale>
This covers the very unlikely case where
- <tp:dbus-ref namespace="ofdT.Client.Handler">HandleChannels</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Client.Handler">HandleChannels</tp:dbus-ref>
satisfies two separate requests which have different
<tp:member-ref>PreferredHandler</tp:member-ref>s.
</tp:rationale>
@@ -294,18 +287,13 @@
</tp:docstring>
</property>
- <signal name="SucceededWithChannel" tp:name-for-bindings="Succeeded_With_Channel">
+ <signal name="Succeeded" tp:name-for-bindings="Succeeded">
<tp:added version="0.21.5"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Variant of the <tp:dbus-ref
- namespace="ofdT.ChannelRequest">Succeeded</tp:dbus-ref> signal
- allowing to get the channel which has been created.</p>
-
- <p>This signal MUST be emitted if the
- <tp:dbus-ref namespace="ofdT">ChannelDispatcher</tp:dbus-ref>'s
- <tp:dbus-ref
- namespace="ofdT.ChannelDispatcher">SupportsRequestHints</tp:dbus-ref>
- property is true. If supported, it MUST be emitted before
+ <p>The channel request has succeeded. It is no longer present,
+ and further methods must not be called on it.</p>
+
+ <p>This signal MUST be emitted before
the <tp:member-ref>Succeeded</tp:member-ref> signal.</p>
</tp:docstring>
@@ -333,7 +321,7 @@
tp:type="Qualified_Property_Value_Map">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The same immutable properties of the Channel that would appear
- in a <tp:dbus-ref namespace="ofdT.Connection.Interface.Requests"
+ in a <tp:dbus-ref namespace="imt1.Connection.Interface.Requests"
>NewChannels</tp:dbus-ref> signal.</p>
</tp:docstring>
</arg>
diff --git a/spec/Channel_Type_Call.xml b/spec/Channel_Type_Call1.xml
index 6deab1fd9..6809ff269 100644
--- a/spec/Channel_Type_Call.xml
+++ b/spec/Channel_Type_Call1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Type_Call" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Type_Call1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009-2010 Collabora Limited</tp:copyright>
<tp:copyright>Copyright © 2009-2010 Nokia Corporation</tp:copyright>
<tp:license>
@@ -17,18 +17,17 @@ You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Type.Call1">
+ <interface name="im.telepathy1.Channel.Type.Call1">
<tp:added version="0.25.2">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:requires
- interface="org.freedesktop.Telepathy.Call1.Interface.Mute"/>
+ interface="im.telepathy1.Call1.Interface.Mute"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A channel type for making audio and video calls. Call
- channels supersede the old <tp:dbus-ref
- namespace="ofdT.Channel.Type">StreamedMedia</tp:dbus-ref>
- channel type. Call channels are much more flexible than its
- predecessor and allow more than two participants.</p>
+ <p>A channel type for making audio and video calls. Call channels
+ supersede the old StreamedMedia channel type. Call channels
+ are much more flexible than its predecessor and allow more
+ than two participants.</p>
<p>Handlers are advised against executing all the media
signalling, codec and candidate negotiation themselves but
@@ -41,8 +40,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
connection between the call participants is being made.</p>
<p>The <tp:dbus-ref
- namespace="ofdT.Channel">TargetHandle</tp:dbus-ref> and
- <tp:dbus-ref namespace="ofdT.Channel">TargetID</tp:dbus-ref>
+ namespace="imt1.Channel">TargetHandle</tp:dbus-ref> and
+ <tp:dbus-ref namespace="imt1.Channel">TargetID</tp:dbus-ref>
properties in a Call channel refer to the contact that the
user initially called, or which contact initially called the
user. Even in a conference call, where there are multiple
@@ -53,7 +52,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<h4>Contents</h4>
- <p><tp:dbus-ref namespace="ofdT.Call1">Content</tp:dbus-ref>
+ <p><tp:dbus-ref namespace="imt1.Call1">Content</tp:dbus-ref>
objects represent the actual media that forms the Call (for
example an audio content and a video content). Calls always
have one or more Content objects associated with them. As a
@@ -63,10 +62,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
as the Requestable Channel Classes will document.</p>
<p><tp:dbus-ref
- namespace="ofdT.Call1">Content</tp:dbus-ref> objects have
+ namespace="imt1.Call1">Content</tp:dbus-ref> objects have
one or more stream associated with them. More information on
these streams and how to maniuplate them can be found on the
- <tp:dbus-ref namespace="ofdT.Call1">Content</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Call1">Content</tp:dbus-ref>
interface page.</p>
<h4>Outgoing calls</h4>
@@ -76,27 +75,27 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<blockquote>
<pre>
-<tp:dbus-ref namespace="ofdT.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>({
- ...<tp:dbus-ref namespace="ofdT.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref
- namespace="ofdT.Channel.Type">Call1</tp:dbus-ref>,
- ...<tp:dbus-ref namespace="ofdT.Channel">TargetHandleType</tp:dbus-ref>: Contact,
- ...<tp:dbus-ref namespace="ofdT.Channel">TargetID</tp:dbus-ref>: 'foo@example.com',
+<tp:dbus-ref namespace="imt1.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>({
+ ...<tp:dbus-ref namespace="imt1.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref
+ namespace="imt1.Channel.Type">Call1</tp:dbus-ref>,
+ ...<tp:dbus-ref namespace="imt1.Channel">TargetHandleType</tp:dbus-ref>: Contact,
+ ...<tp:dbus-ref namespace="imt1.Channel">TargetID</tp:dbus-ref>: 'foo@example.com',
...<tp:member-ref>InitialAudio</tp:member-ref>: True,
})</pre></blockquote>
<p>As always, <tp:dbus-ref
- namespace="ofdT.Channel">TargetHandle</tp:dbus-ref> may be used
+ namespace="imt1.Channel">TargetHandle</tp:dbus-ref> may be used
in place of
- <tp:dbus-ref namespace="ofdT.Channel">TargetID</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Channel">TargetID</tp:dbus-ref>
if the contact's handle is already known. To make an audio
and video call, the handler should also specify
<tp:member-ref>InitialVideo</tp:member-ref> The
connection manager SHOULD return a channel whose immutable
properties contain the local user as the <tp:dbus-ref
- namespace="ofdT.Channel">InitiatorHandle</tp:dbus-ref>, the
+ namespace="imt1.Channel">InitiatorHandle</tp:dbus-ref>, the
remote contact as the <tp:dbus-ref
- namespace="ofdT.Channel">TargetHandle</tp:dbus-ref>,
- <tp:dbus-ref namespace="ofdT.Channel">Requested</tp:dbus-ref> =
+ namespace="imt1.Channel">TargetHandle</tp:dbus-ref>,
+ <tp:dbus-ref namespace="imt1.Channel">Requested</tp:dbus-ref> =
<code>True</code> (indicating the call is outgoing).</p>
<p>After a new Call channel is requested, the
@@ -150,26 +149,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:member-ref>CallStateReason</tp:member-ref> property
changing to (remote contact,
<tp:value-ref type="Call_State_Change_Reason">User_Requested</tp:value-ref>,
- "org.freedesktop.Telepathy.Error.Rejected").</p>
+ "im.telepathy1.Error.Rejected").</p>
<h4>Incoming calls</h4>
<p>When an incoming call occurs, something like the following
<tp:dbus-ref
- namespace="ofdT.Connection.Interface.Requests">NewChannels</tp:dbus-ref>
+ namespace="imt1.Connection.Interface.Requests">NewChannels</tp:dbus-ref>
signal will occur:</p>
<blockquote>
<pre>
-<tp:dbus-ref namespace="ofdT.Connection.Interface.Requests">NewChannels</tp:dbus-ref>([
- /org/freedesktop/Telepathy/Connection/foo/bar/foo_40bar_2ecom/CallChannel,
+<tp:dbus-ref namespace="imt1.Connection.Interface.Requests">NewChannels</tp:dbus-ref>([
+ /im/telepathy1/Connection/foo/bar/foo_40bar_2ecom/CallChannel,
{
- ...<tp:dbus-ref namespace="ofdT.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref
- namespace="ofdT.Channel.Type">Call1</tp:dbus-ref>,
- ...<tp:dbus-ref namespace="ofdT.Channel">TargetHandleType</tp:dbus-ref>: Contact,
- ...<tp:dbus-ref namespace="ofdT.Channel">TargetID</tp:dbus-ref>: 'foo@example.com',
- ...<tp:dbus-ref namespace="ofdT.Channel">TargetHandle</tp:dbus-ref>: 42,
- ...<tp:dbus-ref namespace="ofdT.Channel">Requested</tp:dbus-ref>: False,
+ ...<tp:dbus-ref namespace="imt1.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref
+ namespace="imt1.Channel.Type">Call1</tp:dbus-ref>,
+ ...<tp:dbus-ref namespace="imt1.Channel">TargetHandleType</tp:dbus-ref>: Contact,
+ ...<tp:dbus-ref namespace="imt1.Channel">TargetID</tp:dbus-ref>: 'foo@example.com',
+ ...<tp:dbus-ref namespace="imt1.Channel">TargetHandle</tp:dbus-ref>: 42,
+ ...<tp:dbus-ref namespace="imt1.Channel">Requested</tp:dbus-ref>: False,
...<tp:member-ref>InitialAudio</tp:member-ref>: True,
...<tp:member-ref>InitialVideo</tp:member-ref>: True,
...<tp:member-ref>InitialAudioName</tp:member-ref>: "audio",
@@ -192,7 +191,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
The new channel should also be given to telepathy-farstream to
work out how the two participants will connect together.
telepathy-farstream will call the appropriate methods on the call's
- <tp:dbus-ref namespace="ofdT.Call1">Content</tp:dbus-ref>s
+ <tp:dbus-ref namespace="imt1.Call1">Content</tp:dbus-ref>s
to negotiate codecs and transports.</p>
<p>To pick up the call, the handler should call
@@ -212,7 +211,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:member-ref>CallStateReason</tp:member-ref> property will
change to (self handle,
<tp:value-ref type="Call_State_Change_Reason">User_Requested</tp:value-ref>,
- "org.freedesktop.Telepathy.Error.Rejected").</p>
+ "im.telepathy1.Error.Rejected").</p>
<h4>Ongoing calls</h4>
@@ -240,9 +239,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>A similar method is used for removing contents from a call,
except that the <tp:dbus-ref
- namespace="ofdT.Call1.Content">Remove</tp:dbus-ref> method
+ namespace="imt1.Call1.Content">Remove</tp:dbus-ref> method
is on the <tp:dbus-ref
- namespace="ofdT.Call1">Content</tp:dbus-ref> object.</p>
+ namespace="imt1.Call1">Content</tp:dbus-ref> object.</p>
<h5>Ending the call</h5>
@@ -253,7 +252,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:member-ref>CallStateReason</tp:member-ref> will change
to (self handle,
<tp:value-ref type="Call_State_Change_Reason">User_Requested</tp:value-ref>,
- "org.freedesktop.Telepathy.Error.Cancelled").</p>
+ "im.telepathy1.Error.Cancelled").</p>
<p>If the other participant hangs up first then the
<tp:member-ref>CallState</tp:member-ref> property will change to
@@ -261,22 +260,22 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:member-ref>CallStateReason</tp:member-ref> will change
to (remote contact,
<tp:value-ref type="Call_State_Change_Reason">User_Requested</tp:value-ref>,
- "org.freedesktop.Telepathy.Error.Terminated").</p>
+ "im.telepathy1.Error.Terminated").</p>
<h4>Multi-party calls</h4>
<h4>Requestable channel classes</h4>
<p>The <tp:dbus-ref
- namespace="ofdT.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref>
+ namespace="imt1.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref>
for <tp:dbus-ref
- namespace="ofdT.Channel.Type">Call1</tp:dbus-ref> channels
+ namespace="imt1.Channel.Type">Call1</tp:dbus-ref> channels
can be:</p>
<blockquote>
<pre>
-[( Fixed = { ...<tp:dbus-ref namespace="ofdT.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="ofdT.Channel.Type">Call1</tp:dbus-ref>,
- ...<tp:dbus-ref namespace="ofdT.Channel">TargetHandleType</tp:dbus-ref>: Contact,
+[( Fixed = { ...<tp:dbus-ref namespace="imt1.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="imt1.Channel.Type">Call1</tp:dbus-ref>,
+ ...<tp:dbus-ref namespace="imt1.Channel">TargetHandleType</tp:dbus-ref>: Contact,
...<tp:member-ref>InitialVideo</tp:member-ref>: True
},
Allowed = [ ...<tp:member-ref>InitialVideoName</tp:member-ref>,
@@ -284,8 +283,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
...<tp:member-ref>InitialAudioName</tp:member-ref>
]
),
-( Fixed = { ...<tp:dbus-ref namespace="ofdT.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="ofdT.Channel.Type">Call1</tp:dbus-ref>,
- ...<tp:dbus-ref namespace="ofdT.Channel">TargetHandleType</tp:dbus-ref>: Contact,
+( Fixed = { ...<tp:dbus-ref namespace="imt1.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="imt1.Channel.Type">Call1</tp:dbus-ref>,
+ ...<tp:dbus-ref namespace="imt1.Channel">TargetHandleType</tp:dbus-ref>: Contact,
...<tp:member-ref>InitialAudio</tp:member-ref>: True
},
Allowed = [ ...<tp:member-ref>InitialAudioName</tp:member-ref>,
@@ -301,14 +300,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class, and vice versa for CMs without audio support.</p>
<p>Handlers should not close <tp:dbus-ref
- namespace="ofdT.Channel.Type">Call1</tp:dbus-ref> channels
+ namespace="imt1.Channel.Type">Call1</tp:dbus-ref> channels
without first calling <tp:member-ref>Hangup</tp:member-ref> on
the channel. If a Call handler crashes, the <tp:dbus-ref
- namespace="ofdT">ChannelDispatcher</tp:dbus-ref> will call
- <tp:dbus-ref namespace="ofdT.Channel">Close</tp:dbus-ref> on the
+ namespace="imt1">ChannelDispatcher</tp:dbus-ref> will call
+ <tp:dbus-ref namespace="imt1.Channel">Close</tp:dbus-ref> on the
channel which SHOULD also imply a call to
<tp:member-ref>Hangup</tp:member-ref>(<tp:value-ref type="Call_State_Change_Reason">User_Requested</tp:value-ref>,
- "org.freedesktop.Telepathy.Error.Terminated", "") before
+ "im.telepathy1.Error.Terminated", "") before
actually closing the channel.</p>
</tp:docstring>
@@ -320,7 +319,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
call.</p>
<p>This method is only useful if the
- channel's <tp:dbus-ref namespace="ofdT.Channel">Requested</tp:dbus-ref>
+ channel's <tp:dbus-ref namespace="imt1.Channel">Requested</tp:dbus-ref>
property is False, and
the <tp:member-ref>CallState</tp:member-ref> is
<tp:value-ref type="Call_State">Initialised</tp:value-ref> (an incoming
@@ -336,13 +335,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
- The call was <tp:dbus-ref namespace="ofdT.Channel"
+ The call was <tp:dbus-ref namespace="imt1.Channel"
>Requested</tp:dbus-ref>, so ringing does not make sense.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The call is no longer in state
<tp:value-ref type="Call_State">Initialised</tp:value-ref>.
@@ -358,7 +357,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
call has been put in a call-waiting style queue.</p>
<p>This method is only useful if the
- channel's <tp:dbus-ref namespace="ofdT.Channel">Requested</tp:dbus-ref>
+ channel's <tp:dbus-ref namespace="imt1.Channel">Requested</tp:dbus-ref>
property is False, and
the <tp:member-ref>CallState</tp:member-ref> is
<tp:value-ref type="Call_State">Initialising</tp:value-ref> or
@@ -376,13 +375,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
- The call was <tp:dbus-ref namespace="ofdT.Channel"
+ The call was <tp:dbus-ref namespace="imt1.Channel"
>Requested</tp:dbus-ref>, so queueing does not make sense.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The call is no longer in state
<tp:value-ref type="Call_State">Initialising</tp:value-ref> or
@@ -411,20 +410,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
client (user interface) is handling the channel.</p>
<p>When this method is called, for each <tp:dbus-ref
- namespace="ofdT.Call1" >Content</tp:dbus-ref> whose
- <tp:dbus-ref namespace="ofdT.Call1.Content"
+ namespace="imt1.Call1" >Content</tp:dbus-ref> whose
+ <tp:dbus-ref namespace="imt1.Call1.Content"
>Disposition</tp:dbus-ref> is
<tp:value-ref type="Call_Content_Disposition">Initial</tp:value-ref>, any
streams where the <tp:dbus-ref
- namespace="ofdT.Call1.Stream">LocalSendingState</tp:dbus-ref>
+ namespace="imt1.Call1.Stream">LocalSendingState</tp:dbus-ref>
is <tp:value-ref type="Sending_State">Pending_Send</tp:value-ref> will be
moved to <tp:value-ref type="Sending_State">Sending</tp:value-ref> as if
- <tp:dbus-ref namespace="ofdT.Call1.Stream"
+ <tp:dbus-ref namespace="imt1.Call1.Stream"
>SetSending</tp:dbus-ref>(True) had been called.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The call is not in one of the states where this method makes sense.
</tp:docstring>
@@ -467,7 +466,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The call has already been ended.
</tp:docstring>
@@ -478,7 +477,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<method name="AddContent" tp:name-for-bindings="Add_Content">
<tp:docstring>
Request that a new <tp:dbus-ref
- namespace="ofdT.Call1">Content</tp:dbus-ref> of type
+ namespace="imt1.Call1">Content</tp:dbus-ref> of type
Content_Type is added to the Call1. Handlers should check the
value of the <tp:member-ref>MutableContents</tp:member-ref>
property before trying to add another content as it might not
@@ -521,30 +520,30 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<arg direction="out" name="Content" type="o">
<tp:docstring>
Path to the newly-created <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
+ namespace="im.telepathy1"
>Call1.Content</tp:dbus-ref> object.
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The media stream type given is invalid.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The media stream type requested is not implemented by the
CM.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.Media.UnsupportedType">
+ <tp:error name="im.telepathy1.Error.Media.UnsupportedType">
<tp:docstring>
The media stream type requested is not supported by either the
local or remote side.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotCapable">
+ <tp:error name="im.telepathy1.Error.NotCapable">
<tp:docstring>
The content type requested cannot be added to this
call. Examples of why this might be the case include
@@ -559,12 +558,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<signal name="ContentAdded"
tp:name-for-bindings="Content_Added">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Emitted when a new <tp:dbus-ref namespace="ofdT.Call1"
+ <p>Emitted when a new <tp:dbus-ref namespace="imt1.Call1"
>Content</tp:dbus-ref> is added to the call.</p>
</tp:docstring>
<arg name="Content" type="o">
<tp:docstring>
- Path to the newly-created <tp:dbus-ref namespace="ofdT.Call1"
+ Path to the newly-created <tp:dbus-ref namespace="imt1.Call1"
>Content</tp:dbus-ref> object.
</tp:docstring>
</arg>
@@ -572,12 +571,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<signal name="ContentRemoved" tp:name-for-bindings="Content_Removed">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Emitted when a <tp:dbus-ref namespace="ofdT.Call1"
+ <p>Emitted when a <tp:dbus-ref namespace="imt1.Call1"
>Content</tp:dbus-ref> is removed from the call.</p>
</tp:docstring>
<arg name="Content" type="o">
<tp:docstring>
- The <tp:dbus-ref namespace="ofdT.Call1"
+ The <tp:dbus-ref namespace="imt1.Call1"
>Content</tp:dbus-ref> which was removed.
</tp:docstring>
</arg>
@@ -592,7 +591,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
tp:name-for-bindings="Contents">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The list of <tp:dbus-ref
- namespace="ofdT.Call1">Content</tp:dbus-ref> objects that
+ namespace="imt1.Call1">Content</tp:dbus-ref> objects that
are part of this call. Change notification is via the
<tp:member-ref>ContentAdded</tp:member-ref> and
<tp:member-ref>ContentRemoved</tp:member-ref> signals.
@@ -600,6 +599,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:docstring>
</property>
+ <tp:enum name="Media_Stream_Type" type="u"
+ array-name="Media_Stream_Type_List">
+ <tp:enumvalue suffix="Audio" value="0">
+ <tp:docstring>An audio stream</tp:docstring>
+ </tp:enumvalue>
+ <tp:enumvalue suffix="Video" value="1">
+ <tp:docstring>A video stream</tp:docstring>
+ </tp:enumvalue>
+ </tp:enum>
+
<tp:enum type="u" name="Call_State">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The state of a call, as a whole.</p>
@@ -716,8 +725,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:flag suffix="Locally_Held" value="1">
<tp:docstring>
The call has been put on hold by the local user, e.g. using
- the <tp:dbus-ref namespace="ofdT.Channel.Interface"
- >Hold</tp:dbus-ref> interface. This flag SHOULD only be set
+ the <tp:dbus-ref namespace="imt1.Channel.Interface"
+ >Hold1</tp:dbus-ref> interface. This flag SHOULD only be set
if there is at least one Content, and all Contents are
locally held.
@@ -729,7 +738,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
hear them!
This flag exists as a simplified proxy for <tp:dbus-ref
- namespace="ofdT.Channel.Interface.Hold"
+ namespace="imt1.Channel.Interface.Hold1"
>HoldStateChanged</tp:dbus-ref>,
to reduce the number of signals that need to be
listened to by a simple UI.
@@ -829,7 +838,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
there is <tp:error-ref>InsufficientBalance</tp:error-ref>,
indicating what the required balance would be to place this call.
The value of this key has the same units and scale as
- <tp:dbus-ref namespace="ofdT.Connection.Interface.Balance">AccountBalance</tp:dbus-ref>.
+ <tp:dbus-ref namespace="imt1.Connection.Interface.Balance1">AccountBalance</tp:dbus-ref>.
</dd>
<dt>forwarded-to - u</dt>
@@ -1157,7 +1166,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>If this is False, the handler is responsible for doing the actual
media streaming for at least some contents itself. Those contents
- will have the <tp:dbus-ref namespace="ofdT.Call1.Content.Interface"
+ will have the <tp:dbus-ref namespace="imt1.Call1.Content.Interface"
>Media</tp:dbus-ref> interface, to communicate the necessary
information to a streaming implementation. Connection managers SHOULD
operate like this, if possible.</p>
@@ -1282,8 +1291,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:member-ref>CallMembersChanged</tp:member-ref></p>
<p>If the Call implements
- <tp:dbus-ref namespace="ofdT.Channel.Interface"
- >Group</tp:dbus-ref> and the Group members are
+ <tp:dbus-ref namespace="imt1.Channel.Interface"
+ >Group1</tp:dbus-ref> and the Group members are
channel-specific handles, then this call SHOULD also use
channel-specific handles.</p>
@@ -1327,7 +1336,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
the connection manager should immediately attempt to establish an
audio stream to the remote contact, making it unnecessary for the
client to call <tp:dbus-ref
- namespace="ofdT.Channel.Type.Call1">AddContent</tp:dbus-ref>.</p>
+ namespace="imt1.Channel.Type.Call1">AddContent</tp:dbus-ref>.</p>
<p>If this property, or InitialVideo, is passed to EnsureChannel
(as opposed to CreateChannel), the connection manager SHOULD ignore
@@ -1342,14 +1351,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>If True on an unrequested (incoming) channel, this indicates that
the remote contact initially requested an audio stream; this does
not imply that that audio stream is still active (as indicated by
- <tp:dbus-ref namespace="ofdT.Channel.Type.Call1"
+ <tp:dbus-ref namespace="imt1.Channel.Type.Call1"
>Contents</tp:dbus-ref>).</p>
<p>The name of this new content can be decided by using the
<tp:member-ref>InitialAudioName</tp:member-ref> property.</p>
<p>Connection managers that support the <tp:dbus-ref
- namespace="ofdT.Connection.Interface">ContactCapabilities</tp:dbus-ref>
+ namespace="imt1.Connection.Interface">ContactCapabilities1</tp:dbus-ref>
interface SHOULD represent the capabilities of receiving audio
and/or video calls by including a channel class in
a contact's capabilities with ChannelType = Call
@@ -1367,12 +1376,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>Clients that are willing to receive audio and/or video calls
SHOULD include the following among their channel classes if
calling <tp:dbus-ref
- namespace="ofdT.Connection.Interface.ContactCapabilities">UpdateCapabilities</tp:dbus-ref>
+ namespace="imt1.Connection.Interface.ContactCapabilities1">UpdateCapabilities</tp:dbus-ref>
(clients of a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelDispatcher</tp:dbus-ref>
+ namespace="im.telepathy1">ChannelDispatcher</tp:dbus-ref>
SHOULD instead arrange for the ChannelDispatcher to do this,
by including the filters in their <tp:dbus-ref
- namespace="ofdT.Client.Handler">HandlerChannelFilter</tp:dbus-ref>
+ namespace="imt1.Client.Handler">HandlerChannelFilter</tp:dbus-ref>
properties):</p>
<ul>
@@ -1485,7 +1494,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:hct name="gtalk-p2p">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The client can implement streaming for streams whose <tp:dbus-ref
- namespace="ofdT.Call1.Stream.Interface.Media">Transport</tp:dbus-ref>
+ namespace="imt1.Call1.Stream.Interface.Media">Transport</tp:dbus-ref>
property is <tp:value-ref type="Stream_Transport_Type">GTalk_P2P</tp:value-ref>.</p>
</tp:docstring>
</tp:hct>
@@ -1493,7 +1502,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:hct name="ice">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The client can implement streaming for streams whose <tp:dbus-ref
- namespace="ofdT.Call1.Stream.Interface.Media">Transport</tp:dbus-ref>
+ namespace="imt1.Call1.Stream.Interface.Media">Transport</tp:dbus-ref>
property is <tp:value-ref type="Stream_Transport_Type">ICE</tp:value-ref>.</p>
</tp:docstring>
</tp:hct>
@@ -1501,7 +1510,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:hct name="wlm-2009">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The client can implement streaming for streams whose <tp:dbus-ref
- namespace="ofdT.Call1.Stream.Interface.Media">Transport</tp:dbus-ref>
+ namespace="imt1.Call1.Stream.Interface.Media">Transport</tp:dbus-ref>
property is <tp:value-ref type="Stream_Transport_Type">WLM_2009</tp:value-ref>.</p>
</tp:docstring>
</tp:hct>
@@ -1509,7 +1518,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:hct name="shm">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The client can implement streaming for streams whose <tp:dbus-ref
- namespace="ofdT.Call1.Stream.Interface.Media">Transport</tp:dbus-ref>
+ namespace="imt1.Call1.Stream.Interface.Media">Transport</tp:dbus-ref>
property is <tp:value-ref type="Stream_Transport_Type">SHM</tp:value-ref>.</p>
</tp:docstring>
</tp:hct>
@@ -1541,15 +1550,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>For example, a client could advertise support for audio and video
calls using Speex, Theora and H264 by having five handler capability
tokens in its <tp:dbus-ref
- namespace="ofdT.Client.Handler">Capabilities</tp:dbus-ref>
+ namespace="imt1.Client.Handler">Capabilities</tp:dbus-ref>
property:</p>
<ul>
- <li><code>org.freedesktop.Telepathy.Channel.Type.Call1/audio</code></li>
- <li><code>org.freedesktop.Telepathy.Channel.Type.Call1/audio/speex</code></li>
- <li><code>org.freedesktop.Telepathy.Channel.Type.Call1/video</code></li>
- <li><code>org.freedesktop.Telepathy.Channel.Type.Call1/video/theora</code></li>
- <li><code>org.freedesktop.Telepathy.Channel.Type.Call1/video/h264</code></li>
+ <li><code>im.telepathy1.Channel.Type.Call1/audio</code></li>
+ <li><code>im.telepathy1.Channel.Type.Call1/audio/speex</code></li>
+ <li><code>im.telepathy1.Channel.Type.Call1/video</code></li>
+ <li><code>im.telepathy1.Channel.Type.Call1/video/theora</code></li>
+ <li><code>im.telepathy1.Channel.Type.Call1/video/h264</code></li>
</ul>
<p>Clients MAY have media signalling abilities without explicitly
diff --git a/spec/Channel_Type_Contact_List.xml b/spec/Channel_Type_Contact_List.xml
deleted file mode 100644
index 348d0bd48..000000000
--- a/spec/Channel_Type_Contact_List.xml
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Channel_Type_Contact_List" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
- <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
- <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
- <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
- </tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Type.ContactList">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Interface.Group"/>
- <tp:deprecated version="0.25.0">Replaced by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.Interface.ContactList</tp:dbus-ref>
- </tp:deprecated>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A channel type for representing a list of people on the server which is
- not used for communication. This is intended for use with the interface
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Interface.Group</tp:dbus-ref>
- for managing buddy lists and privacy lists
- on the server. This channel type has no methods because all of the
- functionality it represents is available via the group interface.</p>
-
- <p>There are currently two types of contact list:
- HANDLE_TYPE_LIST is a &quot;magic&quot; server-defined list, and
- HANDLE_TYPE_GROUP is a user-defined contact group.</p>
-
- <p>For server-defined lists like the subscribe list, singleton instances
- of this channel type should be created by the connection manager at
- connection time if the list exists on the server, or may be requested
- by using the appropriate handle. These handles can be obtained using
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">RequestHandles</tp:dbus-ref>
- with a <tp:type>Handle_Type</tp:type> of HANDLE_TYPE_LIST and one of the
- following identifiers:</p>
-
- <ul>
- <li>subscribe - the group of contacts for whom you receive presence</li>
- <li>publish - the group of contacts who may receive your presence</li>
- <li>hide - a group of contacts who are on the publish list but are temporarily disallowed from receiving your presence</li>
- <li>allow - a group of contacts who may send you messages</li>
- <li>deny - a group of contacts who may not send you messages</li>
- <li>stored - on protocols where the user's contacts are stored, this
- contact list contains all stored contacts regardless of subscription
- status.</li>
- </ul>
-
- <p>A contact can be in several server-defined lists. All lists are optional
- to implement. If <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">RequestHandles</tp:dbus-ref>
- or <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">RequestChannel</tp:dbus-ref>
- for a particular contact list raises an error, this indicates that the
- connection manager makes no particular statement about the list's contents;
- clients MUST NOT consider this to be fatal.</p>
-
- <p>If a client wants to list all of a user's contacts, it is appropriate to
- use the union of the subscribe, publish and stored lists, including the
- local and remote pending members.</p>
-
- <p>For example in XMPP, contacts who have the subscription type "none",
- "from", "to" and "both" can be respectively in the lists:</p>
-
- <ul>
- <li>"none": stored</li>
- <li>"from": stored and publish</li>
- <li>"to": stored and subscribe</li>
- <li>"both": stored, publish and subscribe</li>
- </ul>
-
- <p>These contact list channels may not be closed.</p>
-
- <p>For user-defined contact groups, instances of this channel type should
- be created by the connection manager at connection time for each group
- that exists on the server. New, empty groups can be created by calling
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">RequestHandles</tp:dbus-ref>
- with a <tp:type>Handle_Type</tp:type> of HANDLE_TYPE_GROUP and with the
- name set to the human-readable UTF-8 name of the group.</p>
-
- <p>User-defined groups may be deleted by calling <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref> on the
- channel, but only if
- the group is already empty. Closing a channel to a non-empty group is
- not allowed; its members must be set to the empty set first.</p>
-
- <p>On some protocols (e.g. XMPP) empty groups are not represented on the
- server, so disconnecting from the server and reconnecting might cause
- empty groups to vanish.</p>
- </tp:docstring>
-
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Channel_Type_Contact_Search.xml b/spec/Channel_Type_Contact_Search1.xml
index 98789ab40..4c20a8a7f 100644
--- a/spec/Channel_Type_Contact_Search.xml
+++ b/spec/Channel_Type_Contact_Search1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Type_Contact_Search" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Type_Contact_Search1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright © 2005-2009 Collabora Limited </tp:copyright>
<tp:copyright> Copyright © 2005-2009 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright © 2006 INdT </tp:copyright>
@@ -18,14 +18,17 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Type.ContactSearch">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <interface name="im.telepathy1.Channel.Type.ContactSearch1">
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:added version="0.19.10">
as stable API. Changes from draft 2:
<tp:type>Contact_Search_Result_Map</tp:type> keys are now identifiers
rather than handles; consequently, the values need not include
<tt>x-telepathy-identifier</tt>.
</tp:added>
+ <tp:changed version="UNRELEASED">
+ The requestable channel class now fixes TargetHandleType=NONE.
+ </tp:changed>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A channel type for searching server-stored user directories. A new
@@ -34,31 +37,26 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
found.</p>
<p>Connections that support contact search channels SHOULD have an entry
- in <tp:dbus-ref namespace='ofdT.Connection.Interface.Requests'
+ in <tp:dbus-ref namespace='imt1.Connection.Interface.Requests'
>RequestableChannelClasses</tp:dbus-ref> with the <tp:dbus-ref
- namespace='ofdT.Channel'>ChannelType</tp:dbus-ref> fixed to this
- interface, and no other fixed properties. That requestable
+ namespace='imt1.Channel'>ChannelType</tp:dbus-ref> fixed to this
+ interface,
+ <tp:dbus-ref namespace='imt1.Channel'>TargetHandleType</tp:dbus-ref>
+ fixed to Handle_Type_None, and no other fixed properties. That requestable
channel class MAY also have the Server and Limit properties in its
list of allowed properties, depending on the protocol.</p>
- <tp:rationale>
- <p>The requestable channel class would normally also have <tp:dbus-ref
- namespace='ofdT.Channel'>TargetHandleType</tp:dbus-ref> fixed to
- <code>None</code>, but the initial implementation of ContactSearch
- (in telepathy-gabble) didn't do this.</p>
- </tp:rationale>
-
<p>All channels of this type should have <tp:dbus-ref
- namespace='ofdT.Channel'>TargetHandleType</tp:dbus-ref>
+ namespace='imt1.Channel'>TargetHandleType</tp:dbus-ref>
<code>None</code> (and hence <tp:dbus-ref
- namespace='ofdT.Channel'>TargetHandle</tp:dbus-ref> <code>0</code> and
- <tp:dbus-ref namespace='ofdT.Channel'>TargetID</tp:dbus-ref>
+ namespace='imt1.Channel'>TargetHandle</tp:dbus-ref> <code>0</code> and
+ <tp:dbus-ref namespace='imt1.Channel'>TargetID</tp:dbus-ref>
<code>""</code>).</p>
<p>Requests for channels of this type need only
optionally specify the <tp:member-ref>Server</tp:member-ref> property
(if it is an allowed property in the connection's <tp:dbus-ref
- namespace='ofdT.Connection.Interface.Requests'>RequestableChannelClasses</tp:dbus-ref>).</p>
+ namespace='imt1.Connection.Interface.Requests'>RequestableChannelClasses</tp:dbus-ref>).</p>
<p>Before searching, the
<tp:member-ref>AvailableSearchKeys</tp:member-ref> property should be
@@ -83,11 +81,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:member-ref>Limit</tp:member-ref> results. If allowed by the
connection manager, clients may specify the "page size" by specifying
<tp:member-ref>Limit</tp:member-ref> when calling
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>.
+ <tp:dbus-ref namespace="im.telepathy1.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>.
</p>
<p>The client should call the channel's <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">Close</tp:dbus-ref>
method when it is finished with the channel.</p>
<p>Each channel can only be used for a single search; a new channel
@@ -96,10 +94,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
to the same server, if applicable).</p>
<p>It does not make sense to request this channel type using <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">EnsureChannel</tp:dbus-ref>;
+ namespace="im.telepathy1.Connection.Interface.Requests">EnsureChannel</tp:dbus-ref>;
clients SHOULD request channels of this type using
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>
instead.</p>
<tp:rationale>
@@ -298,7 +296,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:rationale>
It can be in the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">NewChannels</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface.Requests">NewChannels</tp:dbus-ref>
signal for round-trip reduction.
</tp:rationale>
</tp:docstring>
@@ -337,19 +335,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
with the state In_Progress.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The <tp:member-ref>SearchState</tp:member-ref> is no longer
Not_Started, so this method is no longer available.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The search terms included something this connection manager cannot
search for.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
</tp:possible-errors>
</method>
@@ -360,7 +358,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
and continue listing up to <tp:member-ref>Limit</tp:member-ref> more results.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The <tp:member-ref>SearchState</tp:member-ref> is not
<code>More_Available</code>.
@@ -376,7 +374,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
while the SearchState is In_Progress,
<tp:member-ref>SearchStateChanged</tp:member-ref> will be emitted,
with the state Failed and the error
- <code>org.freedesktop.Telepathy.Error.<tp:error-ref>Cancelled</tp:error-ref></code>.</p>
+ <code>im.telepathy1.Error.<tp:error-ref>Cancelled</tp:error-ref></code>.</p>
<p>Calling this method on a search in state Completed or Failed
succeeds, but has no effect.</p>
@@ -394,7 +392,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
results.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The <tp:member-ref>SearchState</tp:member-ref> is Not_Started, so
this method is not yet available.
@@ -427,9 +425,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An array of fields representing information about this
contact, in the same format used in the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">ContactInfo</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface">ContactInfo1</tp:dbus-ref>
interface. It is possible that a separate call to <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.ContactInfo">RequestContactInfo</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface.ContactInfo1">RequestContactInfo</tp:dbus-ref>
would return more information than this signal provides.</p>
</tp:docstring>
</tp:member>
diff --git a/spec/Channel_Type_DBus_Tube.xml b/spec/Channel_Type_DBus_Tube1.xml
index 74e659514..21e4ac42b 100644
--- a/spec/Channel_Type_DBus_Tube.xml
+++ b/spec/Channel_Type_DBus_Tube1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Type_DBus_Tube" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Type_DBus_Tube1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2008-2009 Collabora Limited</tp:copyright>
<tp:copyright>Copyright © 2008-2009 Nokia Corporation</tp:copyright>
<tp:license>
@@ -17,9 +17,9 @@ You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Type.DBusTube">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Interface.Tube"/>
+ <interface name="im.telepathy1.Channel.Type.DBusTube1">
+ <tp:requires interface="im.telepathy1.Channel"/>
+ <tp:requires interface="im.telepathy1.Channel.Interface.Tube1"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A D-Bus tube is an ordered reliable transport, for transporting D-Bus
traffic.</p>
@@ -61,7 +61,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
tp:type="String_Variant_Map">
<tp:docstring>
The dictionary of arbitrary
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface.Tube">Parameters</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel.Interface.Tube1">Parameters</tp:dbus-ref>
to send with the tube offer.
</tp:docstring>
</arg>
@@ -77,8 +77,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The contact associated with this channel doesn't have tubes
capabilities.
@@ -92,7 +92,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Accept a D-Bus tube that's in the "local pending" state. The
connection manager will attempt to open the tube. The tube remains in
the "local pending" state until the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Tube">TubeChannelStateChanged</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Interface.Tube1">TubeChannelStateChanged</tp:dbus-ref>
signal is emitted.
</tp:docstring>
<arg direction="in" name="access_control" type="u" tp:type="Socket_Access_Control">
@@ -136,7 +136,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
other end.</p>
<p>When requesting a channel with
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>,
+ namespace="im.telepathy1.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>,
this property MUST be included in the request.</p>
</tp:docstring>
</property>
@@ -187,7 +187,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:rationale>
<p>When requesting a channel with
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>,
this property MUST NOT be included in the request.</p>
</tp:docstring>
diff --git a/spec/Channel_Type_File_Transfer.xml b/spec/Channel_Type_File_Transfer1.xml
index f50b96344..dbfe5424f 100644
--- a/spec/Channel_Type_File_Transfer.xml
+++ b/spec/Channel_Type_File_Transfer1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Type_File_Transfer" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Type_File_Transfer1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>
Copyright © 2008-2009 Collabora Limited
</tp:copyright>
@@ -18,8 +18,8 @@ Library General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Type.FileTransfer">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <interface name="im.telepathy1.Channel.Type.FileTransfer1">
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:added version="0.17.18">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A channel type for transferring files. The
@@ -70,7 +70,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</li></ul>
<p>If something goes wrong with the transfer,
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.Close</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Channel.Close</tp:dbus-ref>
should be called on the channel.</p>
<p>The File channel type may be requested for handles of type
@@ -80,7 +80,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>Connection managers SHOULD NOT advertise support for file transfer to
other contacts unless it has been indicated by a call to
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.ContactCapabilities">UpdateCapabilities</tp:dbus-ref>.
+ namespace="im.telepathy1.Connection.Interface.ContactCapabilities1">UpdateCapabilities</tp:dbus-ref>.
</p>
<tp:rationale>
<p>People would send us files, and it would always fail. That would be silly.</p>
@@ -102,7 +102,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
been created.</p>
<p>This property is mandatory when requesting the channel with the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
method. Protocols which do not have a content-type property with file
transfers should set this value to application/octet-stream.</p>
</tp:docstring>
@@ -120,7 +120,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
be set to monkey.pdf.</p>
<p>This property is mandatory when requesting the channel with the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
method. This property cannot be empty and MUST be set to a sensible value.</p>
</tp:docstring>
</property>
@@ -138,7 +138,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
to the byte.</p>
<p>This property is mandatory when requesting the channel with the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
method. If this information isn't provided in the protocol, connection managers MUST set it
to UINT64_MAX.</p>
</tp:docstring>
@@ -151,15 +151,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>The type of the <tp:member-ref>ContentHash</tp:member-ref> property.</p>
<p>This property is optional when requesting the channel with the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
method. However, if you wish to include the <tp:member-ref>ContentHash</tp:member-ref>
property you MUST also include this property. If you omit this property from a
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
method call then its value will be assumed to be File_Hash_Type_None.</p>
<p>For each supported hash type, implementations SHOULD include an entry
in <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref>
with this property fixed to that hash type. If the protocol supports
offering a file without a content hash, implementations SHOULD list
this property in Allowed in a requestable channel class, mapping hash
@@ -177,7 +177,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
property.</p>
<p>This property is optional when requesting the channel with the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
method. Its value MUST correspond to the appropriate type of the
<tp:member-ref>ContentHashType</tp:member-ref> property. If the
ContentHashType property is not set, or set to File_Hash_Type_None,
@@ -192,7 +192,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
channel has been created.</p>
<p>This property is optional when requesting the channel with the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
method. If this property was not provided by the remote party, connection managers MUST set it to
the empty string.</p>
</tp:docstring>
@@ -206,7 +206,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
cannot change once the channel has been created</p>
<p>This property is optional when requesting the channel with the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>
method.</p>
</tp:docstring>
</property>
@@ -440,18 +440,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The given address type or access-control mechanism is not supported.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument"/>
<tp:docstring>
Your address type, access control, access control parameter,
offset, or a combination of all four is invalid.
</tp:docstring>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The file transfer is not in the Pending state, there isn't
or there is a local error with acquiring a socket.
@@ -492,17 +492,17 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The given address type or access-control mechanism is not supported.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument"/>
<tp:docstring>
Your address type, access control, access control parameter, or
a combination of all three is invalid.
</tp:docstring>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
Channel is not an outgoing transfer, ProvideFile has already been called,
or there was a local error acquiring the socket.
diff --git a/spec/Channel_Type_Room_List.xml b/spec/Channel_Type_Room_List1.xml
index b2b886f14..f462e3a0b 100644
--- a/spec/Channel_Type_Room_List.xml
+++ b/spec/Channel_Type_Room_List1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Type_Room_List" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Type_Room_List1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright © 2005-2009 Collabora Limited </tp:copyright>
<tp:copyright> Copyright © 2005-2009 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright © 2006 INdT </tp:copyright>
@@ -18,8 +18,8 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Type.RoomList">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <interface name="im.telepathy1.Channel.Type.RoomList1">
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:struct name="Room_Info" array-name="Room_Info_List">
<tp:member type="u" tp:type="Room_Handle" name="Handle"/>
@@ -63,19 +63,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:docstring>
</arg>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Emitted when information about rooms on the server becomes available.
- The array contains the room handle (as can be passed to the
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">RequestChannel</tp:dbus-ref>
- method with HANDLE_TYPE_ROOM), the channel
- type, and a dictionary containing further information about the
- room as available. The following well-known keys and types are
- recommended for use where appropriate:</p>
+ <p>Emitted when information about rooms on the server becomes
+ available. The array contains the room handle (as can be
+ passed to the <tp:dbus-ref
+ namespace="imt1.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>
+ method with <tp:dbus-ref
+ namespace="imt1.Channel">TargetHandleType</tp:dbus-ref>=
+ HANDLE_TYPE_ROOM), the channel type, and a dictionary
+ containing further information about the room as
+ available. The following well-known keys and types are
+ recommended for use where appropriate:</p>
<dl>
<dt>handle-name (s)</dt>
<dd>The identifier of the room (as would be returned by
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">InspectHandles</tp:dbus-ref>)</dd>
+ <tp:dbus-ref namespace="im.telepathy1.Connection">InspectHandles</tp:dbus-ref>)</dd>
<dt>name (s)</dt>
<dd>The human-readable name of the room if different from the handle</dd>
@@ -86,7 +88,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<dt>subject (s)</dt>
<dd>The current subject of conversation in the room (as would
be returned by getting the string part of the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Subject2"
+ namespace="im.telepathy1.Channel.Interface.Subject1"
>Subject</tp:dbus-ref> property)</dd>
<dt>members (u)</dt>
@@ -101,13 +103,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<dt>room-id (s)</dt>
<dd>The human-readable identifier of a chat room (as would be
returned by getting the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Room2"
+ namespace="im.telepathy1.Channel.Interface.Room1"
>RoomName</tp:dbus-ref> property)</dd>
<dt>server (s)</dt>
<dd>The DNS name of the server hosting these channels (as would be
returned by getting the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Room2"
+ namespace="im.telepathy1.Channel.Interface.Room1"
>Server</tp:dbus-ref> property)</dd>
</dl>
</tp:docstring>
@@ -122,10 +124,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
the request is complete.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
</tp:possible-errors>
</method>
<method name="StopListing" tp:name-for-bindings="Stop_Listing">
@@ -148,7 +150,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>A channel type for listing named channels available on the server. Once the
<tp:member-ref>ListRooms</tp:member-ref> method is called, it emits signals for rooms present on the
server, until you <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref> this
+ namespace="im.telepathy1.Channel">Close</tp:dbus-ref> this
channel. In some cases, it may not be possible
to stop the deluge of information from the server. This channel should be
closed when the room information is no longer being displayed, so that the
diff --git a/spec/Channel_Type_Server_Authentication.xml b/spec/Channel_Type_Server_Authentication1.xml
index 76599aa35..461cef023 100644
--- a/spec/Channel_Type_Server_Authentication.xml
+++ b/spec/Channel_Type_Server_Authentication1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Type_Server_Authentication" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Type_Server_Authentication1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright © 2010 Collabora Limited </tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
<p>This library is free software; you can redistribute it and/or
@@ -16,17 +16,17 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Type.ServerAuthentication">
+ <interface name="im.telepathy1.Channel.Type.ServerAuthentication1">
<tp:added version="0.21.5">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The type for a channel representing an authentication step with the
server. The actual authentication functionality is implemented by
the additional interface named in
<tp:member-ref>AuthenticationMethod</tp:member-ref>,
- such as <tp:dbus-ref namespace="ofdT"
- >Channel.Interface.SASLAuthentication</tp:dbus-ref>.</p>
+ such as <tp:dbus-ref namespace="imt1"
+ >Channel.Interface.SASLAuthentication1</tp:dbus-ref>.</p>
<p>Future authentication steps also supported by this channel type might
include solving a captcha and/or agreeing to an EULA or terms-of-use
@@ -35,7 +35,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:member-ref>AuthenticationMethod</tp:member-ref>.</p>
<p>Channels of this type will normally be be signalled and dispatched
- while the <tp:dbus-ref namespace="ofdT">Connection</tp:dbus-ref>
+ while the <tp:dbus-ref namespace="imt1">Connection</tp:dbus-ref>
owning them is in the CONNECTING state. They MAY also appear on a
Connection in the CONNECTED state, for instance if periodic
re-authentication is required.</p>
@@ -46,24 +46,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>Channels of this type cannot be requested with methods such as
<tp:dbus-ref
- namespace="ofdT.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>.
+ namespace="imt1.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>.
They always have <tp:dbus-ref
- namespace="ofdT.Channel">Requested</tp:dbus-ref> = False,
+ namespace="imt1.Channel">Requested</tp:dbus-ref> = False,
<tp:dbus-ref
- namespace="ofdT.Channel">TargetHandleType</tp:dbus-ref> = None
+ namespace="imt1.Channel">TargetHandleType</tp:dbus-ref> = None
and <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">TargetHandle</tp:dbus-ref>
= 0.</p>
<p>While it is CONNECTING, the Connection MUST NOT proceed with
connection, or signal
- <tp:dbus-ref namespace="ofdT.Connection">StatusChanged</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Connection">StatusChanged</tp:dbus-ref>
to the CONNECTED state, until each channel of this type has either
been accepted as having a positive result (for instance, on SASL
channels this is done with the <tp:dbus-ref
- namespace="ofdT.Channel.Interface.SASLAuthentication"
+ namespace="imt1.Channel.Interface.SASLAuthentication1"
>AcceptSASL</tp:dbus-ref> method), or closed with the <tp:dbus-ref
- namespace="ofdT.Channel">Close</tp:dbus-ref> method.</p>
+ namespace="imt1.Channel">Close</tp:dbus-ref> method.</p>
<tp:rationale>
<p>ServerAuthentication channels normally represent the client
@@ -75,7 +75,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:rationale>
<p>If a channel of this type is closed with the <tp:dbus-ref
- namespace="ofdT.Channel">Close</tp:dbus-ref> method before
+ namespace="imt1.Channel">Close</tp:dbus-ref> method before
authentication has succeeded, this indicates that the Handler has
given up its attempts to authenticate or that no Handler is
available.</p>
@@ -83,16 +83,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>If this occurs, the connection manager MAY attempt to continue
connection (for instance, performing SASL authentication by using any
credentials passed to <tp:dbus-ref
- namespace="ofdT.ConnectionManager">RequestConnection</tp:dbus-ref>,
+ namespace="imt1.ConnectionManager">RequestConnection</tp:dbus-ref>,
for instance from the <tp:dbus-ref
- namespace="ofdT">Account.Parameters</tp:dbus-ref>). If this fails
+ namespace="imt1">Account.Parameters</tp:dbus-ref>). If this fails
or has already been tried, the <tp:dbus-ref
- namespace="ofdT">Connection</tp:dbus-ref> will
+ namespace="imt1">Connection</tp:dbus-ref> will
disconnect.</p>
<tp:rationale>
<p>In particular, the <tp:dbus-ref
- namespace="ofdT">ChannelDispatcher</tp:dbus-ref> will close the
+ namespace="imt1">ChannelDispatcher</tp:dbus-ref> will close the
channel if it cannot find a handler.</p>
</tp:rationale>
@@ -108,11 +108,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This property defines the method used for the authentication step
represented by this channel, which MUST be one of this channel's
- <tp:dbus-ref namespace="ofdT.Channel">Interfaces</tp:dbus-ref>.</p>
+ <tp:dbus-ref namespace="imt1.Channel">Interfaces</tp:dbus-ref>.</p>
<p>The initially-defined interface that can be used here is
- <tp:dbus-ref namespace="ofdT"
- >Channel.Interface.SASLAuthentication</tp:dbus-ref>.</p>
+ <tp:dbus-ref namespace="imt1"
+ >Channel.Interface.SASLAuthentication1</tp:dbus-ref>.</p>
</tp:docstring>
</property>
diff --git a/spec/Channel_Type_Server_TLS_Connection.xml b/spec/Channel_Type_Server_TLS_Connection1.xml
index 97efd1b36..89fe43c65 100644
--- a/spec/Channel_Type_Server_TLS_Connection.xml
+++ b/spec/Channel_Type_Server_TLS_Connection1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Type_Server_TLS_Connection"
+<node name="/Channel_Type_Server_TLS_Connection1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright © 2010 Collabora Limited </tp:copyright>
<tp:license>
@@ -18,26 +18,26 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Type.ServerTLSConnection">
+ <interface name="im.telepathy1.Channel.Type.ServerTLSConnection1">
<tp:added version="0.19.13">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A channel type that carries a TLS certificate between a server
and a client connecting to it.</p>
<p>Channels of this kind always have <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Requested</tp:dbus-ref> = False,
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
- = None and <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">Requested</tp:dbus-ref> = False,
+ <tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandleType</tp:dbus-ref>
+ = None and <tp:dbus-ref namespace="im.telepathy1.Channel">TargetHandle</tp:dbus-ref>
= 0, and cannot be requested with methods such as <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>.
+ namespace="im.telepathy1.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>.
Also, they SHOULD be dispatched while the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Connection</tp:dbus-ref>
owning them is in the CONNECTING state.</p>
<p>In this case, handlers SHOULD accept or reject the certificate, using
the relevant methods on the provided object, or MAY just <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref> the channel before doing so, to fall
+ namespace="im.telepathy1.Channel">Close</tp:dbus-ref> the channel before doing so, to fall
back to a non-interactive verification process done inside the CM.</p>
<p>For example, channels of this kind can pop up while a client is
connecting to an XMPP server.</p>
@@ -48,7 +48,7 @@
tp:immutable='yeah'>
<tp:docstring>
<p>A <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Authentication">TLSCertificate</tp:dbus-ref>
+ namespace="im.telepathy1.Authentication">TLSCertificate</tp:dbus-ref>
containing the certificate chain as sent by the server,
and other relevant information.</p>
</tp:docstring>
@@ -87,9 +87,9 @@
contain the value of the <tp:member-ref>Hostname</tp:member-ref>
property. All other identities included in this property MUST be derived from
explicit user input or choices, such as <tp:dbus-ref
- namespace='ofdT.Account'>Parameters</tp:dbus-ref> passed to
+ namespace='imt1.Account'>Parameters</tp:dbus-ref> passed to
<tp:dbus-ref
- namespace='ofdT.ConnectionManager'>RequestConnection</tp:dbus-ref>.</p>
+ namespace='imt1.ConnectionManager'>RequestConnection</tp:dbus-ref>.</p>
<tp:rationale>
<p>The primary use for this property is for XMPP services hosted by
diff --git a/spec/Channel_Type_Stream_Tube.xml b/spec/Channel_Type_Stream_Tube1.xml
index 63e7b2f50..51244a1e6 100644
--- a/spec/Channel_Type_Stream_Tube.xml
+++ b/spec/Channel_Type_Stream_Tube1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Channel_Type_Stream_Tube" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Channel_Type_Stream_Tube1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2008-2009 Collabora Limited</tp:copyright>
<tp:copyright>Copyright © 2008-2009 Nokia Corporation</tp:copyright>
<tp:license>
@@ -17,9 +17,9 @@ You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Type.StreamTube">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Interface.Tube"/>
+ <interface name="im.telepathy1.Channel.Type.StreamTube1">
+ <tp:requires interface="im.telepathy1.Channel"/>
+ <tp:requires interface="im.telepathy1.Channel.Interface.Tube1"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A stream tube is a transport for ordered, reliable data transfer,
similar to SOCK_STREAM sockets.</p>
@@ -63,19 +63,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
tp:type="String_Variant_Map">
<tp:docstring>
The dictionary of arbitrary
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface.Tube">Parameters</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel.Interface.Tube1">Parameters</tp:dbus-ref>
to send with the tube offer.
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The contact associated with this channel doesn't have tube
capabilities.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The connection manager doesn't support the given address type
or access-control type.
@@ -89,7 +89,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Accept a stream tube that's in the "local pending" state. The
connection manager will attempt to open the tube. The tube remains in
the "local pending" state until the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Tube">TubeChannelStateChanged</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Interface.Tube1">TubeChannelStateChanged</tp:dbus-ref>
signal is emitted.
</tp:docstring>
<arg direction="in" name="address_type" type="u" tp:type="Socket_Address_Type">
@@ -123,12 +123,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The access_control_param is invalid with the given access_control.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The given address type or access-control mechanism is not supported.
</tp:docstring>
@@ -149,6 +149,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
The handle of the participant who opened the new connection
</tp:docstring>
</arg>
+ <arg name="Identifier" type="s">
+ <tp:docstring>
+ The identifier of the participant who opened the new connection
+ </tp:docstring>
+ </arg>
<arg name="Connection_Param" type="v">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A parameter which can be used by the listening process to identify
@@ -210,11 +215,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>The following errors can be used:</p>
<ul>
- <li><code>org.freedesktop.Telepathy.Error.Cancelled</code>:
+ <li><code>im.telepathy1.Error.Cancelled</code>:
user closed the socket or the tube.</li>
- <li><code>org.freedesktop.Telepathy.Error.ConnectionLost</code>:
+ <li><code>im.telepathy1.Error.ConnectionLost</code>:
the bytestream relaying connection's data has been broken.</li>
- <li><code>org.freedesktop.Telepathy.Error.ConnectionRefused</code>:
+ <li><code>im.telepathy1.Error.ConnectionRefused</code>:
the tube offer refused the connection.</li>
</ul>
</tp:docstring>
@@ -239,11 +244,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>When the tube is offered, the service name is transmitted to the
other end.</p>
<p>When requesting a channel with
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>,
this property MUST be included in the request.</p>
</tp:docstring>
</property>
+ <tp:mapping name="Supported_Socket_Map">
+ <tp:docstring>The supported socket address and access-control types
+ for tubes. See GetAvailableStreamTubeTypes.</tp:docstring>
+ <tp:member name="Address_Type" type="u" tp:type="Socket_Address_Type"/>
+ <tp:member name="Access_Control" type="au"
+ tp:type="Socket_Access_Control[]"/>
+ </tp:mapping>
+
<property name="SupportedSocketTypes" type="a{uau}"
tp:type="Supported_Socket_Map" access="read"
tp:name-for-bindings="Supported_Socket_Types">
@@ -270,7 +283,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
access control.</p>
<p>When requesting a channel with
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>,
this property MUST NOT be included in the request.</p>
</tp:docstring>
diff --git a/spec/Channel_Type_Streamed_Media.xml b/spec/Channel_Type_Streamed_Media.xml
deleted file mode 100644
index aa2b90345..000000000
--- a/spec/Channel_Type_Streamed_Media.xml
+++ /dev/null
@@ -1,853 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Channel_Type_Streamed_Media" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright> Copyright © 2005-2009 Collabora Limited </tp:copyright>
- <tp:copyright> Copyright © 2005-2009 Nokia Corporation </tp:copyright>
- <tp:copyright> Copyright © 2006 INdT </tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
- <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
- </tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Type.StreamedMedia">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
- <tp:requires interface="org.freedesktop.Telepathy.Channel.Interface.Group"/>
-
- <tp:enum name="Media_Stream_Type" type="u"
- array-name="Media_Stream_Type_List">
- <tp:enumvalue suffix="Audio" value="0">
- <tp:docstring>An audio stream</tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Video" value="1">
- <tp:docstring>A video stream</tp:docstring>
- </tp:enumvalue>
- </tp:enum>
-
- <tp:enum name="Media_Stream_State" type="u">
- <tp:enumvalue suffix="Disconnected" value="0">
- <tp:docstring>The stream is disconnected.</tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Connecting" value="1">
- <tp:docstring>The stream is trying to connect.</tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Connected" value="2">
- <tp:docstring>The stream is connected.</tp:docstring>
- </tp:enumvalue>
- </tp:enum>
-
- <tp:enum name="Media_Stream_Direction" type="u">
- <tp:enumvalue suffix="None" value="0">
- <tp:docstring>Media are not being sent or received</tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Send" value="1">
- <tp:docstring>Media are being sent, but not received</tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Receive" value="2">
- <tp:docstring>Media are being received, but not sent</tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Bidirectional" value="3">
- <tp:docstring>Media are being sent and received</tp:docstring>
- </tp:enumvalue>
- </tp:enum>
-
- <tp:flags name="Media_Stream_Pending_Send" value-prefix="Media_Stream_Pending" type="u">
- <tp:flag suffix="Local_Send" value="1">
- <tp:docstring>
- The local user has been asked to send media by the remote user.
- Call <tp:member-ref>RequestStreamDirection</tp:member-ref> to
- indicate whether or not this is acceptable.
- </tp:docstring>
- </tp:flag>
- <tp:flag suffix="Remote_Send" value="2">
- <tp:docstring>
- The remote user has been asked to send media by the local user.
- The <tp:member-ref>StreamDirectionChanged</tp:member-ref> signal
- will be emitted when the remote user accepts or rejects this
- change.
- </tp:docstring>
- </tp:flag>
- </tp:flags>
-
- <tp:struct name="Media_Stream_Info" array-name="Media_Stream_Info_List">
- <tp:member type="u" tp:type="Stream_ID" name="Identifier"/>
- <tp:member type="u" tp:type="Contact_Handle" name="Contact"/>
- <tp:member type="u" tp:type="Media_Stream_Type" name="Type"/>
- <tp:member type="u" tp:type="Media_Stream_State" name="State"/>
- <tp:member type="u" tp:type="Media_Stream_Direction" name="Direction"/>
- <tp:member type="u" tp:type="Media_Stream_Pending_Send"
- name="Pending_Send_Flags"/>
- </tp:struct>
-
- <tp:simple-type name="Stream_ID" type="u"
- array-name="Stream_ID_List">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>An unsigned integer identifying a stream within a channel.</p>
- </tp:docstring>
- </tp:simple-type>
-
- <method name="ListStreams" tp:name-for-bindings="List_Streams">
- <arg direction="out" type="a(uuuuuu)" tp:type="Media_Stream_Info[]"
- name="Streams">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- An array of structs containing:
- <ul>
- <li>the stream identifier</li>
- <li>the contact handle who the stream is with (or 0 if the stream
- represents more than a single member)</li>
- <li>the type of the stream</li>
- <li>the current stream state</li>
- <li>the current direction of the stream</li>
- <li>the current pending send flags</li>
- </ul>
- </tp:docstring>
- </arg>
- <tp:docstring>
- Returns an array of structs representing the streams currently active
- within this channel. Each stream is identified by an unsigned integer
- which is unique for each stream within the channel.
- </tp:docstring>
- </method>
-
- <method name="RemoveStreams" tp:name-for-bindings="Remove_Streams">
- <arg direction="in" name="Streams" type="au" tp:type="Stream_ID[]">
- <tp:docstring>
- An array of stream identifiers (as defined in
- <tp:member-ref>ListStreams</tp:member-ref>)
- </tp:docstring>
- </arg>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Request that the given streams are removed. If all streams are
- removed, the channel MAY close.</p>
-
- <p>Clients SHOULD NOT attempt to terminate calls by removing all the
- streams; instead, clients SHOULD terminate calls by removing the
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface">Group.SelfHandle</tp:dbus-ref>
- from the channel, using either
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Group">RemoveMembers</tp:dbus-ref>
- or
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Group">RemoveMembersWithReason</tp:dbus-ref>.
- </p>
- </tp:docstring>
-
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- A stream identifier is unknown
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
- <method name="RequestStreamDirection"
- tp:name-for-bindings="Request_Stream_Direction">
- <arg direction="in" name="Stream_ID" type="u">
- <tp:docstring>
- The stream identifier (as defined in
- <tp:member-ref>ListStreams</tp:member-ref>)
- </tp:docstring>
- </arg>
- <arg direction="in" name="Stream_Direction" type="u" tp:type="Media_Stream_Direction">
- <tp:docstring>
- The desired stream direction (a value of MediaStreamDirection)
- </tp:docstring>
- </arg>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Request a change in the direction of an existing stream. In particular,
- this might be useful to stop sending media of a particular type,
- or inform the peer that you are no longer using media that is being
- sent to you.</p>
-
- <p>Depending on the protocol, streams which are no longer sending in
- either direction should be removed and a
- <tp:member-ref>StreamRemoved</tp:member-ref> signal emitted.
- Some direction changes can be enforced locally (for example,
- BIDIRECTIONAL -&gt; RECEIVE can be achieved by merely stopping sending),
- others may not be possible on some protocols, and some need agreement
- from the remote end. In this case, the MEDIA_STREAM_PENDING_REMOTE_SEND
- flag will be set in the
- <tp:member-ref>StreamDirectionChanged</tp:member-ref> signal, and the
- signal
- emitted again without the flag to indicate the resulting direction when
- the remote end has accepted or rejected the change.</p>
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- A stream identifier is unknown
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
- <tp:docstring>
- The requested direction is not available on this stream
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
- <method name="RequestStreams" tp:name-for-bindings="Request_Streams">
- <arg direction="in" name="Contact_Handle" type="u" tp:type="Contact_Handle">
- <tp:docstring>
- A contact handle with whom to establish the streams
- </tp:docstring>
- </arg>
- <arg direction="in" name="Types" type="au" tp:type="Media_Stream_Type[]">
- <tp:docstring>
- An array of stream types (values of MediaStreamType)
- </tp:docstring>
- </arg>
- <arg direction="out" type="a(uuuuuu)" tp:type="Media_Stream_Info[]"
- name="Streams">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- An array of structs (in the same order as the given stream types)
- containing:
- <ul>
- <li>the stream identifier</li>
- <li>the contact handle who the stream is with (or 0 if the stream
- represents more than a single member)</li>
- <li>the type of the stream</li>
- <li>the current stream state</li>
- <li>the current direction of the stream</li>
- <li>the current pending send flags</li>
- </ul>
- </tp:docstring>
- </arg>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Request that streams be established to exchange the given types of
- media with the given member. In general this will try and establish a
- bidirectional stream, but on some protocols it may not be possible to
- indicate to the peer that you would like to receive media, so a
- send-only stream will be created initially. In the cases where the
- stream requires remote agreement (eg you wish to receive media from
- them), the <tp:member-ref>StreamDirectionChanged</tp:member-ref> signal
- will be emitted with the
- MEDIA_STREAM_PENDING_REMOTE_SEND flag set, and the signal emitted again
- with the flag cleared when the remote end has replied.</p>
-
- <p>If streams of the requested types already exist, calling this
- method results in the creation of additional streams. Accordingly,
- clients wishing to have exactly one audio stream or exactly one
- video stream SHOULD check for the current streams using
- <tp:member-ref>ListStreams</tp:member-ref> before calling this
- method.</p>
- </tp:docstring>
- <tp:changed version="0.17.2">
- <p>It is valid to use a handle which is neither
- a current nor pending member in this channel's <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface">Group</tp:dbus-ref>
- interface. If
- so, that handle will be added to the remote-pending set only when
- an attempt has actually been made to contact them. For further
- call-state notification, use the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface">CallState</tp:dbus-ref>
- interface, if
- supported. This usage was not allowed in spec versions below
- 0.17.2.</p>
- </tp:changed>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- A stream type given is invalid.
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
- <tp:docstring>
- A stream type given is not implemented by the connection manager.
- Since 0.17.23, connection managers SHOULD raise this error
- in preference to InvalidArgument.
- <tp:rationale>
- Connection managers can't know whether an unknown number
- is a valid stream type that was introduced in a later spec
- version.
- </tp:rationale>
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
- <tp:docstring>
- That contact's client does not implement one of the given stream
- types. For this method, clients SHOULD consider this error and
- NotCapable to be equivalent.
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotCapable">
- <tp:docstring>
- That contact's client does not implement one of the given stream
- types. Since 0.17.23, connection managers SHOULD raise
- this in preference to NotAvailable.
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
- <signal name="StreamAdded" tp:name-for-bindings="Stream_Added">
- <arg name="Stream_ID" type="u">
- <tp:docstring>
- The stream identifier (as defined in
- <tp:member-ref>ListStreams</tp:member-ref>)
- </tp:docstring>
- </arg>
- <arg name="Contact_Handle" type="u" tp:type="Contact_Handle">
- <tp:docstring>
- The contact handle who the stream is with (or 0 if it
- represents more than a single member)
- </tp:docstring>
- </arg>
- <arg name="Stream_Type" type="u" tp:type="Media_Stream_Type">
- <tp:docstring>
- The stream type (a value from MediaStreamType)
- </tp:docstring>
- </arg>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Emitted when a new stream has been added to this channel.
- Clients SHOULD assume that the stream's
- <tp:type>Media_Stream_State</tp:type> is initially Disconnected.</p>
-
- <p>If a connection manager needs to represent the addition of a stream
- whose state is already Connecting or Connected, it MUST do this
- by emitting StreamAdded, closely followed by
- <tp:member-ref>StreamStateChanged</tp:member-ref> indicating a
- change to the appropriate state.</p>
-
- <tp:rationale>
- <p>Historically, it was not clear from the StreamAdded signal what
- the state of the stream was. telepathy-spec 0.17.22
- clarified this.</p>
- </tp:rationale>
-
- <p>Similarly, clients SHOULD assume that the initial
- <tp:type>Media_Stream_Direction</tp:type> of a newly added stream
- is Receive, and that the initial
- <tp:type>Media_Stream_Pending_Send</tp:type> is
- Pending_Local_Send.</p>
-
- <p>If a connection manager needs to represent the addition of a stream
- whose direction or pending-send differs from those initial values,
- it MUST do so by emitting StreamAdded, closely followed by
- <tp:member-ref>StreamDirectionChanged</tp:member-ref> indicating a
- change to the appropriate direction and pending-send state.</p>
-
- <tp:rationale>
- <p>StreamAdded doesn't itself indicate the stream's direction; this
- is unfortunate, but is preserved for compatibility.</p>
-
- <p>This is the appropriate direction for streams added by a remote
- contact on existing connection managers, and does not violate
- user privacy by automatically sending audio or video (audio streams
- start off muted, video streams start off not sending). For
- streams added by the local user using the client receiving the
- signal, the true direction can also be determined from the return
- value of the <tp:member-ref>RequestStreams</tp:member-ref>
- method.</p>
-
- <p>Existing clients typically operate by maintaining a separate
- idea of the directions that they would like the streams to have,
- and enforcing these intended directions by calling
- <tp:member-ref>RequestStreamDirection</tp:member-ref> whenever
- needed.</p>
- </tp:rationale>
- </tp:docstring>
- </signal>
-
- <signal name="StreamDirectionChanged"
- tp:name-for-bindings="Stream_Direction_Changed">
- <arg name="Stream_ID" type="u">
- <tp:docstring>
- The stream identifier (as defined in <tp:member-ref>ListStreams</tp:member-ref>)
- </tp:docstring>
- </arg>
- <arg name="Stream_Direction" type="u" tp:type="Media_Stream_Direction">
- <tp:docstring>
- The new stream direction (as defined in ListStreams)
- </tp:docstring>
- </arg>
- <arg name="Pending_Flags" type="u" tp:type="Media_Stream_Pending_Send">
- <tp:docstring>
- The new pending send flags (as defined in ListStreams)
- </tp:docstring>
- </arg>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Emitted when the direction or pending flags of a stream are
- changed.</p>
-
- <p>If the MEDIA_STREAM_PENDING_LOCAL_SEND flag is set, the remote user
- has requested that we begin sending on this stream.
- <tp:member-ref>RequestStreamDirection</tp:member-ref>
- should be called to indicate whether or not this change is
- acceptable.</p>
-
- <tp:rationale>
- <p>This allows for a MSN-style user interface, "Fred has asked you
- to enable your webcam. (Accept | Reject)", if desired.</p>
- </tp:rationale>
- </tp:docstring>
- </signal>
-
- <signal name="StreamError" tp:name-for-bindings="Stream_Error">
- <arg name="Stream_ID" type="u">
- <tp:docstring>
- The stream identifier (as defined in
- <tp:member-ref>ListStreams</tp:member-ref>)
- </tp:docstring>
- </arg>
- <arg name="Error_Code" type="u" tp:type="Media_Stream_Error">
- <tp:docstring>
- A stream error number, one of the values of MediaStreamError
- </tp:docstring>
- </arg>
- <arg name="Message" type="s">
- <tp:docstring>
- A string describing the error (for debugging purposes only)
- </tp:docstring>
- </arg>
- <tp:docstring>
- Emitted when a stream encounters an error.
- </tp:docstring>
- </signal>
-
- <signal name="StreamRemoved" tp:name-for-bindings="Stream_Removed">
- <arg name="Stream_ID" type="u">
- <tp:docstring>
- stream_id - the stream identifier (as defined in
- <tp:member-ref>ListStreams</tp:member-ref>)
- </tp:docstring>
- </arg>
- <tp:docstring>
- Emitted when a stream has been removed from this channel.
- </tp:docstring>
- </signal>
-
- <signal name="StreamStateChanged"
- tp:name-for-bindings="Stream_State_Changed">
- <arg name="Stream_ID" type="u">
- <tp:docstring>
- The stream identifier (as defined in
- <tp:member-ref>ListStreams</tp:member-ref>)
- </tp:docstring>
- </arg>
- <arg name="Stream_State" type="u" tp:type="Media_Stream_State">
- <tp:docstring>
- The new stream state (as defined in ListStreams)
- </tp:docstring>
- </arg>
- <tp:docstring>
- Emitted when a member's stream's state changes.
- </tp:docstring>
- </signal>
-
- <property name="InitialAudio" tp:name-for-bindings="Initial_Audio"
- type="b" access="read">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>If set to true in a channel request that will create a new channel,
- the connection manager should immediately attempt to establish an
- audio stream to the remote contact, making it unnecessary for the
- client to call <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.StreamedMedia">RequestStreams</tp:dbus-ref>.</p>
-
- <p>If this property, or InitialVideo, is passed to EnsureChannel
- (as opposed to CreateChannel), the connection manager SHOULD ignore
- these properties when checking whether it can return an existing
- channel as suitable; these properties only become significant when
- the connection manager has decided to create a new channel.</p>
-
- <p>If true on a requested channel, this indicates that the audio
- stream has already been requested and the client does not need to
- call RequestStreams, although it MAY still do so.</p>
-
- <p>If true on an unrequested (incoming) channel, this indicates that
- the remote contact initially requested an audio stream; this does
- not imply that that audio stream is still active (as indicated by
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.StreamedMedia">ListStreams</tp:dbus-ref>).</p>
-
- <p>This property is immutable (cannot change), and therefore SHOULD
- appear wherever immutable properties are reported, e.g. <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">NewChannels</tp:dbus-ref>
- signals.</p>
-
- <tp:rationale><p>This reduces D-Bus round trips.</p></tp:rationale>
-
- <p>Connection managers capable of signalling audio calls to contacts
- SHOULD include a channel class in <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">RequestableChannelClasses</tp:dbus-ref>
- with <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">ChannelType</tp:dbus-ref>
- = <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
- and <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
- = Contact in the fixed properties dictionary, and InitialAudio
- (and also InitialVideo, if applicable) in the allowed properties
- list. Clients wishing to discover whether a connection manager
- can signal audio and/or video calls SHOULD use this information.</p>
-
- <tp:rationale>
- <p>Not all protocols support signalling video calls, and it would be
- possible (although unlikely) to have a protocol where only video,
- and not audio, could be signalled.</p>
- </tp:rationale>
-
- <p>Connection managers that support the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">ContactCapabilities</tp:dbus-ref>
- interface SHOULD represent the capabilities of receiving audio
- and/or video calls by including a channel class in
- a contact's capabilities with ChannelType = StreamedMedia
- in the fixed properties dictionary, and InitialAudio and/or
- InitialVideo in the allowed properties list. Clients wishing to
- discover whether a particular contact is likely to be able to
- receive audio and/or video calls SHOULD use this information.</p>
-
- <tp:rationale>
- <p>Not all clients support video calls, and it would also be
- possible (although unlikely) to have a client which could only
- stream video, not audio.</p>
- </tp:rationale>
-
- <p>Clients that are willing to receive audio and/or video calls
- SHOULD include the following among their channel classes if
- calling <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.ContactCapabilities">UpdateCapabilities</tp:dbus-ref>
- (clients of a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelDispatcher</tp:dbus-ref>
- SHOULD instead arrange for the ChannelDispatcher to do this,
- by including the filters in their <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref>
- properties):</p>
-
- <ul>
- <li>{ ChannelType = StreamedMedia }</li>
- <li>{ ChannelType = StreamedMedia, InitialAudio = true }
- if receiving calls with audio is supported</li>
- <li>{ ChannelType = StreamedMedia, InitialVideo = true }
- if receiving calls with video is supported</li>
- </ul>
-
- <tp:rationale>
- <p>Connection managers for protocols with capability discovery,
- like XMPP, need this information to advertise the appropriate
- capabilities for their protocol.</p>
- </tp:rationale>
- </tp:docstring>
- </property>
-
- <property name="InitialVideo" tp:name-for-bindings="Initial_Video"
- type="b" access="read">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The same as <tp:member-ref>InitialAudio</tp:member-ref>, but for
- a video stream. This property is immutable (cannot change).</p>
-
- <p>In particular, note that if this property is false, this does not
- imply that an active video stream has not been added, only that no
- video stream was active at the time the channel appeared.</p>
-
- <p>This property is the correct way to discover whether connection
- managers, contacts etc. support video calls; it appears in
- capabilities structures in the same way as InitialAudio.</p>
- </tp:docstring>
- </property>
-
- <property name="ImmutableStreams" tp:name-for-bindings="Immutable_Streams"
- type="b" access="read">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>If <tt>True</tt>, once streams have been requested for this channel
- (either by setting <tp:member-ref>InitialAudio</tp:member-ref> or
- <tp:member-ref>InitialVideo</tp:member-ref> when the channel is
- requested, or by calling
- <tp:member-ref>RequestStreams</tp:member-ref> on a channel with no
- streams), a stream of a different content type cannot be added;
- subsequent calls to <tp:member-ref>RequestStreams</tp:member-ref>
- that attempt to do so will fail.</p>
-
- <p>If this property is missing, clients SHOULD assume that it is false,
- and thus that the channel's streams can be changed once the call has
- started.</p>
-
- <p>If this property is present in the "allowed" set in all of the
- StreamedMedia entries in a contact's capabilities, then user
- interfaces MAY choose to show a separate "call" option for each
- class of call.</p>
-
- <tp:rationale>
- <p>For example, once an audio-only Google Talk call has started,
- it is not possible to add a video stream; both audio and video
- must be requested at the start of the call if video is desired.
- User interfaces may use this pseudo-capability as a hint to
- display separate "Audio call" and "Video call" buttons, rather
- than a single "Call" button with the option to add and remove
- video once the call has started for contacts without this flag.
- </p>
- </tp:rationale>
-
- <p>This property is immutable, and therefore SHOULD be announced
- in <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">NewChannels</tp:dbus-ref>,
- etc.</p>
- </tp:docstring>
- </property>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A channel that can send and receive streamed media such as audio or
- video. Provides a number of methods for listing and requesting new
- streams, and signals to indicate when streams have been added, removed
- and changed status. The state of the call (ringing remotely, ringing
- locally, answered, missed, etc.) are represented using the properties
- and signals of the Group interface.</p>
-
- <p>In general this should be used in conjunction with the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface">MediaSignalling</tp:dbus-ref>
- interface to exchange connection candidates and codec choices with
- whichever component is responsible for the streams. However, in certain
- applications where no candidate exchange is necessary (eg the streams
- are handled by specialised hardware which is controlled directly by the
- connection manager), the signalling interface can be omitted and this
- channel type used simply to control the streams.</p>
-
- <h4>Outgoing calls</h4>
-
- <p>To make an audio-only call to a contact <tt>foo@example.com</tt>,
- clients should call:</p>
-
- <blockquote>
- <pre>
-<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">CreateChannel</tp:dbus-ref>({
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">ChannelType</tp:dbus-ref>: <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>,
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>: Contact,
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>: 'foo@example.com',
- <tp:member-ref>InitialAudio</tp:member-ref>: True,
-)</pre></blockquote>
-
- <p>As always, <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref>
- may be used in place of TargetID if the contact's handle is already
- known. To make an audio-and-video call, the client should also specify
- <tp:member-ref>InitialVideo</tp:member-ref>. The connection manager
- SHOULD return a channel whose immutable properties contain the local
- user as the <tp:dbus-ref namespace='ofdT.Channel'>InitiatorHandle</tp:dbus-ref>,
- the remote contact as the <tp:dbus-ref namespace='ofdT.Channel'>TargetHandle</tp:dbus-ref>,
- <tp:dbus-ref namespace='ofdT.Channel'>Requested</tp:dbus-ref> = <code>True</code>
- (indicating that the call is outgoing); the <tp:dbus-ref
- namespace='ofdT.Channel.Interface'>Group</tp:dbus-ref> interface should
- initially have the local user in <tp:dbus-ref
- namespace='ofdT.Channel.Interface.Group'>Members</tp:dbus-ref> and the remote
- contact in <tp:dbus-ref
- namespace='ofdT.Channel.Interface.Group'>RemotePendingMembers</tp:dbus-ref>, to
- indicate that we are awaiting their response.</p>
-
- <p>The contact answering the call is represented by the CM signalling
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Group">MembersChanged</tp:dbus-ref>,
- moving the remote contact to Members, with the remote contact as the
- <var>Actor</var> and <var>Reason</var> <code>None</code>. The contact
- rejecting the call is represented by both contacts being removed from
- the group, with the remote contact as the <var>Actor</var> and
- <var>Reason</var> set appropriately. The local user may hang up at any
- time by calling
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Group">RemoveMembersWithReason</tp:dbus-ref>
- to remove themself, with an appropriate reason; the CM SHOULD relay the
- reason to the remote contact, and emit MembersChanged removing both
- contacts from the group with the self handle as the <var>Actor</var>.</p>
-
- <p>(In the past, several other patterns have been used to place outgoing
- calls; see
- <a href="http://telepathy.freedesktop.org/wiki/Requesting%20StreamedMedia%20channels">'Requesting StreamedMedia Channels' on the Telepathy wiki</a>
- for the details.)</p>
-
- <h4>Incoming calls</h4>
-
- <p>Incoming calls' immutable properties should contain <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
- = Contact, both <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref> and
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">InitiatorHandle</tp:dbus-ref>
- set to the remote contact, <tp:dbus-ref
- namespace='ofdT.Channel'>Requested</tp:dbus-ref> = <code>False</code>
- (indicating that this is an incoming call), and appropriate values of
- <tp:member-ref>InitialAudio</tp:member-ref> and
- <tp:member-ref>InitialVideo</tp:member-ref>; the Group interface should
- initially have the local user in <tp:dbus-ref
- namespace="ofdT.Channel.Interface.Group">LocalPendingMembers</tp:dbus-ref>
- and the remote contact in <tp:dbus-ref
- namespace="ofdT.Channel.Interface.Group">Members</tp:dbus-ref>,
- indicating that the contact is awaiting our response.</p>
-
- <p>To accept the call, use <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Group">AddMembers</tp:dbus-ref>
- to move the local user to the group's members. To reject the call, use
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Group">RemoveMembersWithReason</tp:dbus-ref>
- to remove the local member from the group, with an appropriate reason.
- If the remote user ends the call before it is answered, this is
- represented by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Group">MembersChanged</tp:dbus-ref>
- removing both parties from the group with the remote contact as the
- <var>Actor</var>, and <var>Reason</var> set appropriately.</p>
-
- <p>Note that the call may end with the self handle as the
- <var>Actor</var> without the user having chosen to reject the call, as
- indicated by the nature of the <var>Reason</var>. Specifically, some
- local component may time out the call (indicating this with reason
- <code>No_Answer</code>; for example, the CM may have forwarded the call
- to another number, as configured using <tp:dbus-ref
- namespace='ofdT.Connection.Interface'>Forwarding.DRAFT</tp:dbus-ref>),
- or something may have gone wrong with the call
- (indicated by reason <code>Error</code>). Such calls SHOULD be
- considered missed, just as if the remote contact had hung up before the
- local user answered the call.</p>
-
- <tp:rationale>
- <p>This is a bit awkward, but these are the best ways we can represent
- these situations. It's important to document which calls should be
- considered missed, to ensure that the user can be notified.</p>
- </tp:rationale>
-
- <p>When the local user accepts an incoming call, the connection manager
- SHOULD change the direction of any streams with pending local send
- to be sending, without altering whether those streams are
- receiving.</p>
-
- <tp:rationale>
- <p>This matches existing practice, and means that a client
- can answer incoming calls and get an unmuted microphone/activated
- webcam without having to take additional action to accept the
- stream directions.</p>
-
- <p>It does, however, introduce a race condition: a client believing
- that it is accepting an audio-only call by calling AddMembers
- can inadvertantly accept an audio + video call (and hence activate
- sending from a webcam without the user's permission) if a video
- stream is added just before AddMembers is processed. This race
- should be removed when this specification is revised.</p>
- </tp:rationale>
-
- <h4>During a call</h4>
-
- <p>If <tp:member-ref>ImmutableStreams</tp:member-ref> is
- <code>False</code>, new streams may be requested using
- <tp:member-ref>RequestStreams</tp:member-ref> (to add video to an
- audio-only call, for instance), and existing streams may be removed using
- <tp:member-ref>RemoveStreams</tp:member-ref> (for example, to downgrade
- an audio-video call to audio-only). The call may be ended by calling
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Group">RemoveMembers</tp:dbus-ref>
- or <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Group">RemoveMembersWithReason</tp:dbus-ref>; the call ending is signalled by the CM emitting <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Group">MembersChanged</tp:dbus-ref>,
- removing both parties from the group.</p>
-
- <h4>Handler filters</h4>
-
- <p>For historical reasons, handlers must specify more than one filter if
- they want to correctly advertise support for audio and/or video calls. If
- they can handle channels using the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface">MediaSignalling</tp:dbus-ref>
- interface, they should also advertise various
- <tp:type>Handler_Capability_Token</tp:type>s to indicate which codecs and
- transports they support. See <tp:member-ref>InitialAudio</tp:member-ref>
- and <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface">MediaSignalling/video/h264</tp:dbus-ref>
- for the gory details. In summary:</p>
-
- <dl>
- <dt>To advertise support for streamed media in general, include the
- following filter in <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref>:</dt>
- <dd><pre>
-{ '...Channel.ChannelType': '...Channel.Type.StreamedMedia' ,
- '...Channel.TargetHandleType': Contact,
-}</pre></dd>
-
- <dt>To advertise support for audio calls, also include the following
- filter:</dt>
- <dd><pre>
-{ '...Channel.ChannelType': '...Channel.Type.StreamedMedia' ,
- '...Channel.TargetHandleType': Contact,
- '...Channel.Type.StreamedMedia.InitialAudio': True,
-}</pre></dd>
-
- <dt>To advertise support for video calls, also include the following
- filter:</dt>
- <dd><pre>
-{ '...Channel.ChannelType': '...Channel.Type.StreamedMedia' ,
- '...Channel.TargetHandleType': Contact,
- '...Channel.Type.StreamedMedia.InitialVideo': True,
-}</pre></dd>
-
- <dt>If you use telepathy-farsight, and have H.264 support, you probably
- want these <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">Capabilities</tp:dbus-ref>:</dt>
- <dd><pre>
-[ "org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/ice-udp",
- "org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/gtalk-p2p",
- "org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/video/h264",
-]</pre></dd>
- </dl>
- </tp:docstring>
-
- <tp:flags name="Channel_Media_Capabilities" value-prefix="Channel_Media_Capability" type="u">
- <tp:docstring>
- The channel-type-specific capability flags used for
- Channel.Type.StreamedMedia in the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.Interface.Capabilities</tp:dbus-ref>
- interface. See the <tp:member-ref>InitialAudio</tp:member-ref>
- property for details of the mechanisms that will replace this.
- </tp:docstring>
- <tp:flag suffix="Audio" value="1">
- <tp:docstring>
- The handle is capable of using audio streams within a media channel.
- </tp:docstring>
- </tp:flag>
- <tp:flag suffix="Video" value="2">
- <tp:docstring>
- The handle is capable of using video streams within a media channel.
- </tp:docstring>
- </tp:flag>
- <tp:flag suffix="NAT_Traversal_STUN" value="4">
- <tp:docstring>
- The handle is capable of performing STUN to traverse NATs.
- </tp:docstring>
- </tp:flag>
- <tp:flag suffix="NAT_Traversal_GTalk_P2P" value="8">
- <tp:docstring>
- The handle is capable of establishing Google Talk peer-to-peer
- connections (as implemented in libjingle 0.3) to traverse NATs.
- </tp:docstring>
- </tp:flag>
- <tp:flag suffix="NAT_Traversal_ICE_UDP" value="16">
- <tp:docstring>
- The handle is capable of establishing ICE UDP peer-to-peer
- connections (as defined by the IETF MMUSIC working group) to traverse
- NATs.
- </tp:docstring>
- </tp:flag>
-
- <tp:flag suffix="Immutable_Streams" value="32">
- <tp:docstring>
- Channels whose target handle is this contact will have
- <tp:member-ref>ImmutableStreams</tp:member-ref> = <tt>True</tt>.
- </tp:docstring>
- </tp:flag>
-
- </tp:flags>
-
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Channel_Type_Text.xml b/spec/Channel_Type_Text.xml
index 76123293c..b78c2c3d0 100644
--- a/spec/Channel_Type_Text.xml
+++ b/spec/Channel_Type_Text.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<node name="/Channel_Type_Text" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright> Copyright © 2005-2009 Collabora Limited </tp:copyright>
+ <tp:copyright> Copyright © 2005-2011 Collabora Limited </tp:copyright>
<tp:copyright> Copyright © 2005-2009 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright © 2006 INdT </tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -18,20 +18,19 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Type.Text">
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
- <tp:requires
- interface="org.freedesktop.Telepathy.Channel.Interface.Messages"/>
- <tp:changed version="0.21.5">The Messages interface is now
- mandatory</tp:changed>
+ <interface name="im.telepathy1.Channel.Type.Text">
+ <tp:requires interface="im.telepathy1.Channel"/>
<tp:changed version="0.24.0">This interface used to have a bunch of
- clunky <tp:dbus-ref
- namespace='org.freedesktop'>Telepathy.Properties</tp:dbus-ref>. They have
- been removed in favour of D-Bus properties on the <tp:dbus-ref
- namespace='ofdT.Channel.Interface'>Room2</tp:dbus-ref>, <tp:dbus-ref
- namespace='ofdT.Channel.Interface'>Subject2</tp:dbus-ref> and
- <tp:dbus-ref namespace='ofdT.Channel.Interface'>RoomConfig1</tp:dbus-ref>
+ clunky Telepathy.Properties. They have been removed in favour of
+ D-Bus properties on the <tp:dbus-ref
+ namespace='imt1.Channel.Interface'>Room1</tp:dbus-ref>, <tp:dbus-ref
+ namespace='imt1.Channel.Interface'>Subject1</tp:dbus-ref> and
+ <tp:dbus-ref namespace='imt1.Channel.Interface'>RoomConfig1</tp:dbus-ref>
interfaces.</tp:changed>
+ <tp:changed version="UNRELEASED">Deprecated methods and types have
+ removed from this interface. Additionally, this interface has
+ been merged with the old, now-removed, Messages interface as it
+ was a requirement since version 0.21.5.</tp:changed>
<tp:simple-type name="Message_ID" type="u" array-name="Message_ID_List">
<tp:docstring>
@@ -42,24 +41,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:docstring>
</tp:simple-type>
- <tp:struct name="Pending_Text_Message" array-name="Pending_Text_Message_List">
- <tp:deprecated version="0.21.5">New APIs should use
- an array of <tp:type>Message_Part</tp:type> instead.</tp:deprecated>
- <tp:docstring>A struct (message ID, timestamp in seconds since
- 1970-01-01 00:00 UTC, sender's handle, message type, flags, text)
- representing a pending text message, as returned by
- <tp:member-ref>ListPendingMessages</tp:member-ref>. The arguments of
- the <tp:member-ref>Received</tp:member-ref> signal also match this
- struct's signature.</tp:docstring>
- <tp:member type="u" tp:type="Message_ID" name="Identifier"/>
- <tp:member type="u" tp:type="Unix_Timestamp" name="Unix_Timestamp"/>
- <tp:member type="u" tp:type="Contact_Handle" name="Sender"/>
- <tp:member type="u" tp:type="Channel_Text_Message_Type"
- name="Message_Type"/>
- <tp:member type="u" tp:type="Channel_Text_Message_Flags" name="Flags"/>
- <tp:member type="s" name="Text"/>
- </tp:struct>
-
<method name="AcknowledgePendingMessages"
tp:name-for-bindings="Acknowledge_Pending_Messages">
<arg direction="in" name="IDs" type="au" tp:type="Message_ID[]">
@@ -72,7 +53,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
the user (or equivalent), so they can be removed from the pending queue.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
A given message ID was not found, so no action was taken
</tp:docstring>
@@ -80,448 +61,1423 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:possible-errors>
</method>
- <method name="GetMessageTypes" tp:name-for-bindings="Get_Message_Types">
- <tp:deprecated version="0.21.5">Consulting
- <tp:dbus-ref namespace="ofdT.Channel.Interface.Messages"
- >MessageTypes</tp:dbus-ref> is preferred.
- </tp:deprecated>
- <arg direction="out" type="au" tp:type="Channel_Text_Message_Type[]"
- name="Available_Types">
- <tp:docstring>
- An array of integer message types (ChannelTextMessageType)
- </tp:docstring>
- </arg>
- <tp:docstring>
- Return an array indicating which types of message may be sent on this
- channel.
- </tp:docstring>
- </method>
-
- <method name="ListPendingMessages"
- tp:name-for-bindings="List_Pending_Messages">
- <tp:deprecated version="0.21.5">Consulting
- <tp:dbus-ref namespace="ofdT.Channel.Interface.Messages"
- >PendingMessages</tp:dbus-ref> is preferred.
- </tp:deprecated>
- <arg direction="in" name="Clear" type="b">
- <tp:docstring>
- If true, behave as if
- <tp:member-ref>AcknowledgePendingMessages</tp:member-ref> had also
- been called.
- </tp:docstring>
- <tp:deprecated version="0.17.3">
- Setting this to true is NOT RECOMMENDED for clients that
- have some sort of persistent message storage - clients SHOULD only
- acknowledge messages after they have actually stored them, which is
- impossible if this flag is true.</tp:deprecated>
- </arg>
- <arg direction="out" type="a(uuuuus)" tp:type="Pending_Text_Message[]"
- name="Pending_Messages">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- An array of structs representing the pending queue. Each contains:
- <ul>
- <li>a numeric identifier</li>
- <li>a Unix timestamp indicating when the message was received</li>
- <li>the contact handle for the contact who sent the message</li>
- <li>the message type, taken from ChannelTextMessageType</li>
- <li>the bitwise-OR of the message flags from ChannelTextMessageFlags</li>
- <li>the text of the message</li>
- </ul>
- </tp:docstring>
- </arg>
- <tp:docstring>
- List the messages currently in the pending queue, and optionally
- remove then all.
- </tp:docstring>
- </method>
-
- <signal name="LostMessage" tp:name-for-bindings="Lost_Message">
- <tp:deprecated version="0.21.5">In practice, this signal
- was not emitted, and does not have useful semantics.</tp:deprecated>
- <tp:docstring>
- This signal is emitted to indicate that an incoming message was
- not able to be stored and forwarded by the connection manager
- due to lack of memory.
- </tp:docstring>
- </signal>
-
- <signal name="Received" tp:name-for-bindings="Received">
- <tp:deprecated version="0.21.5">The
- <tp:dbus-ref namespace="ofdT.Channel.Interface.Messages"
- >MessageReceived</tp:dbus-ref> signal is more informative.
- </tp:deprecated>
- <arg name="ID" type="u">
+ <tp:enum name="Channel_Text_Send_Error" type="u">
+ <tp:enumvalue suffix="Unknown" value="0">
<tp:docstring>
- A numeric identifier for acknowledging the message
+ An unknown error occurred
</tp:docstring>
- </arg>
- <arg name="Timestamp" type="u" tp:type="Unix_Timestamp">
+ </tp:enumvalue>
+ <tp:enumvalue suffix="Offline" value="1">
<tp:docstring>
- A Unix timestamp indicating when the message was received
+ The requested contact was offline
</tp:docstring>
- </arg>
- <arg name="Sender" type="u" tp:type="Contact_Handle">
+ </tp:enumvalue>
+ <tp:enumvalue suffix="Invalid_Contact" value="2">
<tp:docstring>
- The handle of the contact who sent the message
+ The requested contact is not valid
</tp:docstring>
- </arg>
- <arg name="Type" type="u" tp:type="Channel_Text_Message_Type">
+ </tp:enumvalue>
+ <tp:enumvalue suffix="Permission_Denied" value="3">
<tp:docstring>
- The type of the message (normal, action, notice, etc.)
+ The user does not have permission to speak on this channel
</tp:docstring>
- </arg>
- <arg name="Flags" type="u" tp:type="Channel_Text_Message_Flags">
+ </tp:enumvalue>
+ <tp:enumvalue suffix="Too_Long" value="4">
<tp:docstring>
- A bitwise OR of the message flags
+ The outgoing message was too long and was rejected by the server
</tp:docstring>
- </arg>
- <arg name="Text" type="s">
+ </tp:enumvalue>
+ <tp:enumvalue suffix="Not_Implemented" value="5">
<tp:docstring>
- The text of the message
+ The channel doesn't support sending text messages to the requested
+ contact
</tp:docstring>
- </arg>
+ </tp:enumvalue>
+ </tp:enum>
+
+ <tp:enum name="Channel_Text_Message_Type" type="u"
+ array-name="Channel_Text_Message_Type_List">
<tp:docstring>
- Signals that a message with the given id, timestamp, sender, type
- and text has been received on this channel. Applications that catch
- this signal and reliably inform the user of the message should
- acknowledge that they have dealt with the message with the
- <tp:member-ref>AcknowledgePendingMessages</tp:member-ref> method.
+ The type of message.
</tp:docstring>
- </signal>
- <method name="Send" tp:name-for-bindings="Send">
- <tp:deprecated version="0.21.5">The
- <tp:dbus-ref namespace="ofdT.Channel.Interface.Messages"
- >SendMessage</tp:dbus-ref> method is more flexible.
- </tp:deprecated>
- <arg direction="in" name="Type" type="u" tp:type="Channel_Text_Message_Type">
+ <tp:enumvalue suffix="Normal" value="0">
<tp:docstring>
- An integer indicating the type of the message
+ An ordinary chat message. Unknown types SHOULD be treated like this.
</tp:docstring>
- </arg>
- <arg direction="in" name="Text" type="s">
+ </tp:enumvalue>
+
+ <tp:enumvalue suffix="Action" value="1">
<tp:docstring>
- The message to send
+ An action which might be presented to the user as
+ "* &lt;sender&gt; &lt;action&gt;", such as an IRC CTCP
+ ACTION (typically selected by the "/me" command). For example, the
+ text of the message might be "drinks more coffee".
</tp:docstring>
- </arg>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Request that a message be sent on this channel. When the message has
- been submitted for delivery, this method will return and the
- <tp:member-ref>Sent</tp:member-ref> signal will be emitted. If the
- message cannot be submitted for delivery, the method returns an error
- and no signal is emitted.</p>
-
- <p>This method SHOULD return before the Sent signal is
- emitted.</p>
-
- <tp:rationale>
- <p>When a Text channel implements the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface">Messages</tp:dbus-ref>
- interface, that "SHOULD" becomes a "MUST".</p>
- </tp:rationale>
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- </tp:possible-errors>
- </method>
+ </tp:enumvalue>
- <tp:enum name="Channel_Text_Send_Error" type="u">
- <tp:enumvalue suffix="Unknown" value="0">
+ <tp:enumvalue suffix="Notice" value="2">
<tp:docstring>
- An unknown error occurred
+ A one-off or automated message not necessarily expecting a reply
</tp:docstring>
</tp:enumvalue>
- <tp:enumvalue suffix="Offline" value="1">
+
+ <tp:enumvalue suffix="Auto_Reply" value="3">
<tp:docstring>
- The requested contact was offline
+ An automatically-generated reply message.
</tp:docstring>
</tp:enumvalue>
- <tp:enumvalue suffix="Invalid_Contact" value="2">
+
+ <tp:enumvalue suffix="Delivery_Report" value="4">
<tp:docstring>
- The requested contact is not valid
+ A delivery report. See <tp:type>Message_Part</tp:type> for
+ the format that delivery reports must take.
</tp:docstring>
</tp:enumvalue>
- <tp:enumvalue suffix="Permission_Denied" value="3">
+
+ </tp:enum>
+
+ <property name="SupportedContentTypes" type="as" access="read"
+ tp:name-for-bindings="Supported_Content_Types"
+ tp:immutable="yes">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>A list of MIME types supported by this channel, with more preferred
+ MIME types appearing earlier in the list. The list MAY include "*/*"
+ to indicate that attachments with arbitrary MIME types can be sent.
+ This list MUST NOT be empty, since all implementations
+ MUST accept messages containing a single "text/plain" part.</p>
+
+ <p>Items in this list MUST be normalized to lower-case.</p>
+
+ <p>Some examples of how this property interacts with the
+ <tp:member-ref>MessagePartSupportFlags</tp:member-ref>:</p>
+
+ <dl>
+ <dt>A simple IM implementation: only plain text messages are
+ allowed</dt>
+ <dd>SupportedContentTypes = ['text/plain'],
+ MessagePartSupportFlags = 0</dd>
+
+ <dt>Formatted text with a plain text alternative is allowed (see the
+ HTML interface draft)</dt>
+ <dd>SupportedContentTypes = ['text/html', 'text/plain'],
+ MessagePartSupportFlags = 0</dd>
+
+ <dt>JPEG or PNG images may be sent, but without any attached
+ text</dt>
+ <dd>SupportedContentTypes = ['text/plain', 'image/jpeg',
+ 'image/png'], MessagePartSupportFlags = 0</dd>
+
+ <dt>Unformatted text to which an optional JPEG or PNG image may be
+ attached</dt>
+ <dd>SupportedContentTypes = ['text/plain', 'image/jpeg',
+ 'image/png'], MessagePartSupportFlags = One_Attachment</dd>
+
+ <dt>Formatted text to which arbitrarily many images may be
+ attached</dt>
+ <dd>SupportedContentTypes = ['text/html', 'text/plain', 'image/jpeg',
+ 'image/png', 'image/x-ms-bmp'], MessagePartSupportFlags =
+ One_Attachment | Multiple_Attachments</dd>
+
+ <dt>A full SIP implementation: arbitrary MIME messages are
+ allowed</dt>
+ <dd>SupportedContentTypes = ['*/*'], MessagePartSupportFlags =
+ One_Attachment | Multiple_Attachments</dd>
+ </dl>
+ </tp:docstring>
+ </property>
+
+ <property name="MessageTypes" type="au"
+ tp:type="Channel_Text_Message_Type[]" access="read"
+ tp:name-for-bindings="Message_Types"
+ tp:immutable="yes">
+ <tp:added version="0.21.5"/>
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>A list of message types which may be sent on this channel.</p>
+ </tp:docstring>
+ </property>
+
+ <property name="MessagePartSupportFlags" type="u"
+ tp:type="Message_Part_Support_Flags" access="read"
+ tp:name-for-bindings="Message_Part_Support_Flags"
+ tp:immutable="yes">
+ <tp:docstring>
+ Flags indicating the level of support for message parts on this
+ channel.
+ </tp:docstring>
+ </property>
+
+ <tp:flags name="Message_Part_Support_Flags"
+ value-prefix="Message_Part_Support_Flag" type="u">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>Flags indicating the level of support for message parts on this
+ channel. They are designed such that setting more flags always
+ implies that the channel has more capabilities.</p>
+
+ <p>If no flags are set, this indicates that messages may contain
+ a single message part whose content-type is any of the types
+ from SupportedContentTypes, possibly with some alternatives.</p>
+
+ <p>There is no flag indicating support for alternatives. This is
+ because the SendMessage implementation can always accept messages
+ containing alternatives, even if the underlying protocol does not,
+ by deleting all alternatives except the first (most preferred)
+ that is supported.</p>
+
+ <tp:rationale>
+ Each of the flags so far implies the previous flag, so we could
+ have used a simple enumeration here; however, we've defined
+ the message-part support indicator as a flag set for future
+ expansion.
+ </tp:rationale>
+
+ <p>See <tp:member-ref>SupportedContentTypes</tp:member-ref> for some
+ examples.</p>
+ </tp:docstring>
+
+ <tp:flag suffix="One_Attachment" value="1">
<tp:docstring>
- The user does not have permission to speak on this channel
+ <tp:member-ref>SendMessage</tp:member-ref> will accept messages
+ containing a textual message body,
+ plus a single attachment of any type listed in the
+ SupportedContentTypes property. It does not make sense for this
+ flag to be set if Message_Part_Support_Flag_Data_Only is not also set
+ (because the connection manager can trivially provide an empty text
+ part if necessary).
</tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Too_Long" value="4">
+ </tp:flag>
+ <tp:flag suffix="Multiple_Attachments" value="2">
<tp:docstring>
- The outgoing message was too long and was rejected by the server
+ SendMessage will accept messages containing a textual message body,
+ plus an arbitrary number of attachments of any type listed in the
+ SupportedContentTypes property. It does not make sense for this
+ flag to be set if Message_Part_Support_Flag_One_Attachment is not
+ also set.
</tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Not_Implemented" value="5">
+ </tp:flag>
+ </tp:flags>
+
+ <tp:mapping name="Message_Part" array-name="Message_Part_List"
+ array-depth="2">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>Part of a message's content. In practice, this mapping never
+ appears in isolation: incoming messages are represented by a list of
+ <tp:type>Message_Part</tp:type> mappings in the
+ <tp:member-ref>MessageReceived</tp:member-ref> signal, and outgoing
+ messages are passed to <tp:member-ref>SendMessage</tp:member-ref> as
+ a list of these mappings.</p>
+
+ <p>The first part of the message contains "headers", which refer
+ to the entire message. The second and subsequent parts contain the
+ message's content, including plain text, formatted text and/or
+ attached files. Well-known keys for the header and body parts are
+ defined by the <tp:type>Message_Header_Key</tp:type> and
+ <tp:type>Message_Body_Key</tp:type> types, respectively. It is an
+ error for a connection manager to put keys referring to the message
+ as a whole in the second or subsequent Message_Part, or keys intended
+ for body parts in the first Message_Part; clients MUST recover from
+ this error by ignoring these mis-placed keys.</p>
+
+ <tp:rationale>
+ <p>Instead of representing messages as aa{sv} where the first
+ dictionary is special (a dictionary of headers), we could have
+ used a signature like (a{sv}aa{sv}) to separate out the headers
+ and the body parts.</p>
+
+ <p>However, this would make access to the messages more awkward.
+ In Python, the syntax for access to a header field would remain
+ <code>message[0]['message-type']</code>, but access to a body
+ field in the second body part would change from
+ <code>message[2]['content'] to message[1][1]['content']</code>. In
+ GLib, the message would change from being a
+ <code>GPtrArray(GHashTable)</code> to being a
+ <code>GValueArray(GHashTable, GPtrArray(GHashTable))</code> which
+ is rather inconvenient to dereference.</p>
+ </tp:rationale>
+
+ <p>In any group of parts with the same non-empty value for the
+ <tt>alternative</tt> key (which represent alternative versions of the
+ same content), more faithful versions of the intended message MUST
+ come before less faithful versions (note that this order is the
+ opposite of MIME <tt>multipart/alternative</tt> parts). Clients
+ SHOULD display the first alternative that they understand.</p>
+
+ <tp:rationale>
+ <p>Specifying the preference order means that if the underlying
+ protocol doesn't support alternatives, the CM can safely delete
+ everything apart from the first supported alternative when
+ sending messages.</p>
+
+ <p>The order is the reverse of MIME because MIME's rationale for
+ placing the "plainest" part first (legibility in pre-MIME UAs)
+ does not apply to us, and placing the most preferred part
+ first simplifies display (a client can iterate the message
+ in order, display the first alternative that it understands,
+ and skip displaying all subsequent parts with the same
+ "alternative" key).</p>
+ </tp:rationale>
+
+ <p>Clients SHOULD present all parts that are not redundant
+ alternatives in the order they appear in this array, possibly
+ excluding parts that are referenced by another displayed part.
+ It is implementation-specific how the parts are presented to the
+ user.</p>
+
+ <tp:rationale>
+ <p>This allows CMs to assume that all parts are actually shown to
+ the user, even if they are not explicitly referenced - we do
+ not yet recommend formatted text, and there is no way for
+ plain text to reference an attachment since it has no concept of
+ markup or references. This also forces clients to do something
+ sensible with messages that consist entirely of "attachments",
+ with no "body" at all.</p>
+
+ <p>For instance, when displaying the above example, a client that
+ understands the HTML part should display the JPEG image once,
+ between the two lines "Here is a photo of my cat:" and
+ "Isn't it cute?"; it may additionally present the image in some
+ way for a second time, after "Isn't it cute?", or may choose
+ not to.</p>
+
+ <p>A client that does not understand HTML, displaying the same
+ message, should display the plain-text part, followed by the JPEG
+ image.</p>
+ </tp:rationale>
+
+ <p>Connection managers, clients and extensions to this specification
+ SHOULD NOT include <tp:type>Handle</tp:type>s as values in a
+ Message_Part, except for <code>message-sender</code> in the
+ header.</p>
+
+ <tp:rationale>
+ <p>Reference-counting handles in clients becomes problematic if
+ the channel proxy cannot know whether particular map values
+ are handles or not.</p>
+ </tp:rationale>
+
+ <h4>Example messages</h4>
+
+ <p>A rich-text message, with an embedded image, might be represented
+ as:</p>
+
+ <pre>
+[
+ {
+ 'message-token': '9de9546a-3400-4419-a505-3ea270cb834c',
+ 'message-sender': 42,
+ 'message-sent': 1210067943,
+ 'message-received': 1210067947,
+ 'message-type': 0, # = Channel_Text_Message_Type_Normal
+ 'pending-message-id': 437,
+ },
+ { 'alternative': 'main',
+ 'content-type': 'text/html',
+ 'content': 'Here is a photo of my cat:&lt;br /&gt;' +
+ '&lt;img src="cid:catphoto" alt="lol!" /&gt;' +
+ '&lt;br /&gt;Isn't it cute?',
+ },
+ { 'alternative': 'main',
+ 'content-type': 'text/plain',
+ 'content': 'Here is a photo of my cat:\n[IMG: lol!]\nIsn't it cute?',
+ },
+ { 'identifier': 'catphoto',
+ 'content-type': 'image/jpeg',
+ 'size': 101000,
+ 'needs-retrieval': True,
+ },
+]</pre>
+
+ <p>telepathy-ring, Nokia's GSM connection manager, represents vCards
+ sent via SMS as:</p>
+
+ <pre>
+[
+ {
+ 'message-token': '9de9546a-3400-4419-a505-3ea270cb834c',
+ 'message-sender': 42,
+ 'message-sent': 1210067943,
+ 'message-received': 1210067947,
+ 'message-type': 0, # = Channel_Text_Message_Type_Normal
+ 'pending-message-id': 437,
+ },
+ { 'content-type': 'text/x-vcard',
+ 'content': [ 0x66, 0x69, 0x71, ...], # vCard data as an array of bytes
+ },
+]</pre>
+
+ <h3>Delivery reports</h3>
+
+ <div>
+ <p>Delivery reports are also represented as messages with the
+ <tt>message-type</tt> header mapping to
+ <tp:type>Channel_Text_Message_Type</tp:type> Delivery_Report.
+ Delivery reports SHOULD contain the <tt>message-sender</tt> header,
+ mapping to the intended recipient of the original message, if
+ possible; other headers specific to delivery reports are defined by
+ the <tp:type>Delivery_Report_Header_Key</tp:type> type. The second
+ and subsequent parts, if present, are a human-readable report from
+ the IM service.</p>
+
+ <p>The result of attempting to send delivery reports using
+ <tp:member-ref>SendMessage</tp:member-ref> is currently
+ undefined.</p>
+
+ <h4>Example delivery reports</h4>
+
+ <dl>
+ <dt>A minimal delivery report indicating permanent failure of the
+ sent message whose token was
+ <code>b9a991bd-8845-4d7f-a704-215186f43bb4</code> for an unknown
+ reason</dt>
+ <dd><pre>
+[{
+# header
+'message-sender': 123,
+'message-type': Channel_Text_Message_Type_Delivery_Report,
+'delivery-status': Delivery_Status_Permanently_Failed,
+'delivery-token': 'b9a991bd-8845-4d7f-a704-215186f43bb4',
+}
+# no body
+]</pre></dd>
+
+ <dt>A delivery report where the failed message is echoed back to the
+ sender rather than being referenced by ID, and the failure reason
+ is that this protocol cannot send messages to offline contacts
+ such as the contact with handle 123</dt>
+ <dd><pre>
+[{ # header
+'message-sender': 123,
+'message-type': Channel_Text_Message_Type_Delivery_Report,
+'delivery-status': Delivery_Status_Temporarily_Failed,
+'delivery-error': Channel_Text_Send_Error_Offline,
+'delivery-echo':
+ [{ # header of original message
+ 'message-sender': 1,
+ 'message-sent': 1210067943,
+ },
+ { # body of original message
+ 'content-type': 'text/plain',
+ 'content': 'Hello, world!',
+ }]
+ ],
+
+# no body
+]</pre></dd>
+
+ <dt>A maximally complex delivery report: the server reports a
+ bilingual human-readable failure message because the user sent
+ a message "Hello, world!" with token
+ <code>b9a991bd-8845-4d7f-a704-215186f43bb4</code> to a contact
+ with handle 123, but that handle represents a contact who does not
+ actually exist</dt>
+ <dd><pre>
+[{ # header
+'message-sender': 123,
+'message-type': Channel_Text_Message_Type_Delivery_Report,
+'delivery-status': Delivery_Status_Permanently_Failed,
+'delivery-error': Channel_Text_Send_Error_Invalid_Contact,
+'delivery-token': 'b9a991bd-8845-4d7f-a704-215186f43bb4',
+'delivery-echo':
+ [{ # header of original message
+ 'message-sender': 1,
+ 'message-sent': 1210067943,
+ },
+ { # body of original message
+ 'content-type': 'text/plain',
+ 'content': 'Hello, world!',
+ }]
+ ],
+},
+{ # message from server (alternative in English)
+'alternative': '404',
+'content-type': 'text/plain',
+'lang': 'en',
+'content': 'I have no contact with that name',
+},
+{ # message from server (alternative in German)
+'alternative': '404'.
+'content-type': 'text/plain',
+'lang': 'de',
+'content', 'Ich habe keinen Kontakt mit diesem Namen',
+}
+]</pre></dd>
+
+ <dt>A minimal delivery report indicating successful delivery
+ of the sent message whose token was
+ <code>b9a991bd-8845-4d7f-a704-215186f43bb4</code></dt>
+ <dd><pre>
+[{
+# header
+'message-sender': 123,
+'message-type': Channel_Text_Message_Type_Delivery_Report,
+'delivery-status': Delivery_Status_Delivered,
+'delivery-token': 'b9a991bd-8845-4d7f-a704-215186f43bb4',
+}
+# no body
+]</pre></dd>
+
+ </dl>
+
+ </div>
+ </tp:docstring>
+
+ <tp:member name="Key" type="s">
<tp:docstring>
- The channel doesn't support sending text messages to the requested
- contact
+ A key, which SHOULD be one of the well-known keys specified by
+ <tp:type>Message_Header_Key</tp:type>,
+ <tp:type>Message_Body_Key</tp:type> or
+ <tp:type>Delivery_Report_Header_Key</tp:type> if possible.
</tp:docstring>
- </tp:enumvalue>
- </tp:enum>
+ </tp:member>
- <signal name="SendError" tp:name-for-bindings="Send_Error">
- <tp:deprecated version="0.21.5">Delivery reporting is now
- provided by the <tp:dbus-ref namespace="ofdT.Channel.Interface"
- >Messages</tp:dbus-ref> interface.
- </tp:deprecated>
- <arg name="Error" type="u" tp:type="Channel_Text_Send_Error">
+ <tp:member name="Value" type="v">
<tp:docstring>
- The error that occurred
+ The value corresponding to the given key, which SHOULD be one of the
+ specified types for well-known keys.
</tp:docstring>
- </arg>
- <arg name="Timestamp" type="u" tp:type="Unix_Timestamp">
+ </tp:member>
+ </tp:mapping>
+
+ <tp:simple-type type="s" name="Message_Header_Key">
+ <tp:added version="0.19.8"/>
+ <tp:changed version="0.21.5">
+ Removed <tt>protocol-token</tt>—which had never been implemented—and
+ respecified <tt>message-token</tt> not to have unimplementable
+ uniqueness guarantees.
+ </tp:changed>
+
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>Well-known keys for the first <tp:type>Message_Part</tp:type> of a
+ message, which contains metadata about the message as a whole, along
+ with the corresponding value types. Some keys make sense for both
+ incoming and outgoing messages, while others are only meaningful for
+ one or the other.</p>
+
+ <dl>
+ <dt>message-token (s -
+ <tp:type>Protocol_Message_Token</tp:type>)
+ </dt>
+ <dd>
+ <p>An opaque identifier for the message, as used by the
+ underlying protocol. For outgoing messages, this SHOULD be
+ globally unique; for incoming messages, this is <em>not</em>
+ guaranteed to uniquely identify a message, <em>even within the
+ scope of a single channel or contact</em>; the only guarantee
+ made is that two messages with different <tt>message-token</tt>
+ headers are different messages.</p>
+
+ <p>Clients wishing to determine whether a new message with the
+ <tt>scrollback</tt> header matches a previously-logged message
+ with the same <tt>message-token</tt> SHOULD compare the
+ message's sender, contents, <tt>message-sent</tt> or
+ <tt>message-received</tt> timestamp, etc. Note that, in XMPP,
+ the server only supplies a timestamp for scrollback messages,
+ not for messages received while you are in a room; thus,
+ non-scrollback messages will lack a <tt>message-sent</tt>
+ timestamp.</p>
+
+ <tp:rationale>
+ <p>In practice, most protocols do not provide globally-unique
+ identifiers for messages. Connection managers, being
+ stateless, do not have the necessary information — namely, IM
+ logs — to generate reliable unique tokens for messages.</p>
+
+ <p>For instance, some XMPP clients (including Gabble) stamp
+ messages they send with unique identifiers, but others number
+ outgoing messages in a conversation from 1 upwards.</p>
+ </tp:rationale>
+ </dd>
+
+ <dt>message-sent (x - <tp:type>Unix_Timestamp64</tp:type>)</dt>
+ <dd>The time the message was sent (if unavailable, the time
+ it arrived at a central server MAY be used). Omitted if no
+ reasonable approximation is available; SHOULD always be present
+ on outgoing messages.</dd>
+
+ <dt>message-received (x - <tp:type>Unix_Timestamp64</tp:type>)</dt>
+ <dd>The time the message was received locally. SHOULD always
+ be present.</dd>
+
+ <dt>message-sender (u - <tp:type>Contact_Handle</tp:type>)</dt>
+ <dd>The contact who sent the message. If 0 or omitted, the contact
+ who sent the message could not be determined.</dd>
+
+ <dt>message-sender-id (s)</dt>
+ <dd>The identifier of the contact who sent the message,
+ i.e. the result of calling <tp:dbus-ref
+ namespace="imt1.Connection">InspectHandles</tp:dbus-ref>
+ on <code>message-sender</code>. If omitted, clients MUST
+ fall back to looking at <code>message-sender</code>.</dd>
+
+ <dt>sender-nickname (s)</dt>
+ <dd>The nickname chosen by the sender of the message, which can be
+ different for each message in a conversation.</dd>
+
+ <dt>message-type (u - <tp:type>Channel_Text_Message_Type</tp:type>)
+ </dt>
+ <dd>The type of message; if omitted,
+ Channel_Text_Message_Type_Normal MUST be assumed. MAY
+ be omitted for normal chat messages.</dd>
+
+ <dt>supersedes (s – <tp:type>Protocol_Message_Token</tp:type>)</dt>
+ <dd>If present, this message supersedes a previous message,
+ identified by its <tt>message-token</tt> header. The user
+ interface MAY, for example, choose to replace the superseded
+ message with this message, or grey out the superseded message.
+
+ <tp:rationale>Skype, for example, allows the user to amend
+ messages they have already sent (to correct typos,
+ etc.).</tp:rationale>
+
+ Connection Managers SHOULD represent repeatedly edited messages
+ in the following form:
+ <pre>
+ message {token = a};
+ message {token = b, supersedes = a};
+ message {token = c, supersedes = a};
+ </pre>
+
+ <tp:rationale>The alternative form is:
+ <pre>
+ message {token = a};
+ message {token = b, supersedes = a};
+ message {token = c, supersedes = b};
+ </pre>
+ but it is more difficult to implement in UIs/loggers, and it
+ breaks irrecoverably if message b is lost. If a CM is forced
+ to use this form, it should be tested extensively for
+ interoperability with existing clients.
+ </tp:rationale>
+
+ Clients should deal gracefully if the original message gets
+ lost, but one or more corrections to it get through:
+ <pre>
+ message {token = x} gets lost;
+ message {token = y, supersedes = x};
+ message {token = z, supersedes = x};
+ </pre>
+
+ <tp:rationale>This is the form that CMs will use to mean "I know
+ that this message was edited, but I don't know what it
+ originally said." It is often in the interests of the
+ remote side for message x to be lost (e.g. to hide
+ embarassing mistakes or sensitive information) so it might not
+ be possible to retrieve it (even on protocols with reliable
+ message-delivery guarantees).</tp:rationale></dd>
+
+ <dt>original-message-sent (x - <tp:type>Unix_Timestamp64</tp:type>)</dt>
+ <dd>The <tt>message-sent</tt> header of the message that this
+ one supersedes.
+ This key should only be present if <tt>supersedes</tt> is also
+ present. It MAY be used as a hint to help clients locate the
+ original message in its logs. If present, comparing the tuple
+ (original-message-sent, supersedes) with (message-sent,
+ message-token) SHOULD be enough to uniquely
+ identify the original message.</dd>
+
+ <dt>original-message-received (x - <tp:type>Unix_Timestamp64</tp:type>)</dt>
+ <dd>The <tt>message-received</tt> header of the message that this
+ one supersedes.
+ This key should only be present if <tt>supersedes</tt> is also
+ present. It MAY be used as a hint in a similar way to
+ <tt>original-message-sent</tt>.</dd>
+
+ <dt>pending-message-id (u - <tp:type>Message_ID</tp:type>)</dt>
+ <dd>The incoming message ID. This MUST NOT be present on outgoing
+ messages. Clients SHOULD NOT store this key - it is only valid
+ for as long as the message remains unacknowledged.</dd>
+
+ <dt>interface (s - <tp:type>DBus_Interface</tp:type>)</dt>
+ <dd>This message is specific to the given interface, which
+ is not Text. It SHOULD be ignored if that interface is
+ not supported. (Note that an 'interface' key can also
+ appear on the second and subsequent parts, where it
+ indicates that that part (only) should be ignored if
+ unsupported.)</dd>
+
+ <dt>scrollback (b)</dt>
+ <dd>If present and true, the incoming message was part of
+ a replay of message history. This flag does not make sense
+ on outgoing messages and SHOULD NOT appear there.</dd>
+
+ <dt>rescued (b)</dt>
+ <dd>If present and true, the incoming message has been seen in
+ a previous channel during the lifetime of the Connection,
+ but had not been acknowledged when that channel closed, causing
+ an identical channel (in which the message now appears) to open.
+ It does not make sense on outgoing messages, and SHOULD NOT
+ appear there.</dd>
+ </dl>
+
+ </tp:docstring>
+ </tp:simple-type>
+
+ <tp:simple-type type="s" name="Message_Body_Key">
+ <tp:added version="0.19.8"/>
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>Well-known keys for the second and subsequent
+ <tp:type>Message_Part</tp:type>s of a message, which contain the
+ message content, along with the corresponding value types.</p>
+
+ <dl>
+ <dt>identifier (s —
+ <tp:type>Protocol_Content_Identifier</tp:type>)</dt>
+ <dd>An opaque identifier for this part.
+ Parts of a message MAY reference other parts by treating
+ this identifier as if it were a MIME Content-ID and using
+ the cid: URI scheme.</dd>
+
+ <dt>alternative (s)</dt>
+ <dd>
+ <p>If present, this part of the message is an alternative for
+ all other parts with the same value for "alternative".
+ Clients SHOULD only display one of them (this is expected to
+ be used for XHTML messages in a future version of this
+ specification).</p>
+
+ <p>If omitted, this part is not an alternative for any other
+ part.</p>
+
+ <p>Parts of a message MAY reference the group of alternatives
+ as a whole (i.e. a reference to whichever of them is chosen)
+ by treating this identifier as if it were the MIME Content-ID
+ of a multipart/alternative part, and using the cid: URI
+ scheme.</p>
+ </dd>
+
+ <dt>content-type (s)</dt>
+ <dd>
+ <p>The MIME type of this part. See the documentation
+ for <tp:member-ref>MessageReceived</tp:member-ref> and
+ <tp:member-ref>MessageSent</tp:member-ref> for notes on the
+ special status of "text/plain" parts.</p>
+
+ <p>Connection managers MUST NOT signal parts without a
+ 'content-type' key; if a protocol provides no way to determine
+ the MIME type, the connection manager is responsible for
+ guessing it, but MAY fall back to "text/plain" for text and
+ "application/octet-stream" for non-text.</p>
+
+ <p>Clients MUST ignore parts without a 'content-type' key, which
+ are reserved for future expansion.</p>
+
+ <p>When sending messages, clients SHOULD normalize the
+ content-type to lower case, but connection managers SHOULD NOT
+ rely on this. When signalling sent or received messages,
+ connection managers MUST normalize the content-type to lower
+ case.</p>
+ </dd>
+
+ <dt>lang (s)</dt>
+ <dd>The natural language of this part, identified by a
+ RFC 3066 language tag.
+
+ <tp:rationale>
+ XMPP allows alternative-selection by language as well as
+ by content-type.
+ </tp:rationale>
+ </dd>
+
+ <dt>size (u)</dt>
+ <dd>The size in bytes (if needs-retrieval is true, this MAY be an
+ estimated or approximate size). SHOULD be omitted if 'content'
+ is provided.
+
+ <tp:rationale>
+ There's no point in providing the size if you're already
+ providing all the content.
+ </tp:rationale>
+ </dd>
+
+ <dt>thumbnail (b)</dt>
+ <dd>
+ <p>This part is a thumbnail. To represent an image together with
+ its thumbnail in a single message, there should be one part for
+ the full image followed by a part for the thumbnail (following
+ the “more complete versions first” requirement), with the same
+ 'alternative' value. For example:</p>
+
+ <pre>
+[ ... ,
+ { 'alternative': 'catphoto',
+ 'content-type': 'image/jpeg',
+ 'size': 150000,
+ 'content': [0xFF, 0xD8, ... 0xFF 0xD9],
+ },
+ { 'alternative': 'catphoto',
+ 'content-type': 'image/jpeg'
+ 'size': 1024,
+ 'thumbnail': True,
+ 'content': [0xFF, 0xD8, ... 0xFF 0xD9],
+ },
+ ...
+]</pre>
+ </dd>
+
+ <dt>needs-retrieval (b)</dt>
+ <dd>If false or omitted, the connection
+ manager already holds this part in memory. If present and true,
+ this part must be retrieved on demand (like MIME's
+ <tt>message/external-body</tt>) by a mechanism to be defined later.
+
+ <tp:rationale>The mechanism was meant to be the now-deprecated
+ GetPendingMessageContent, but that didn't work
+ out. It's worth leaving the header in in preparation
+ for a future mechanism.
+ </tp:rationale>
+ </dd>
+
+ <dt>truncated (b)</dt>
+ <dd>The content available via the 'content' key has been truncated
+ by the server or connection manager (equivalent to
+ Channel_Text_Message_Flag_Truncated in the Text interface).
+ </dd>
+
+ <dt>content (s or ay)</dt>
+ <dd>The part's content, if it is available and
+ sufficiently small to include here (implies that
+ 'needs-retrieval' is false or omitted). Otherwise, omitted.
+ If the part is human-readable text or HTML, the value for this
+ key MUST be a UTF-8 string (D-Bus signature 's').
+ If the part is not text, the value MUST be a byte-array
+ (D-Bus signature 'ay'). If the part is a text-based format
+ that is not the main body of the message (e.g. an iCalendar
+ or an attached XML document), the value SHOULD be a UTF-8 string,
+ transcoding from another charset to UTF-8 if necessary, but
+ MAY be a byte-array (of unspecified character set) if
+ transcoding fails or the source charset is not known.</dd>
+
+ <!-- FIXME: "sufficiently small to include" is not currently
+ defined; we should add some API so clients can tell the
+ CM how large a message it should emit in the signal.-->
+
+ <dt>interface (s - <tp:type>DBus_Interface</tp:type>)</dt>
+ <dd>This part is specific to the given interface, which is
+ not Text. It SHOULD be ignored if that interface is not
+ supported. (Note that an 'interface' key can also appear
+ on the first part, where it indicates that the entire
+ message should be ignored if unsupported.)</dd>
+ </dl>
+ </tp:docstring>
+ </tp:simple-type>
+
+ <tp:simple-type type="s" name="Delivery_Report_Header_Key">
+ <tp:added version="0.19.8"/>
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>Well-known keys for the first <tp:type>Message_Part</tp:type> of a
+ delivery report, along with the corresponding value types. Some of
+ these are special-cases of headers defined by
+ <tp:type>Message_Header_Key</tp:type>.</p>
+
+ <dl>
+ <dt>message-sender (u - <tp:type>Contact_Handle</tp:type>, as
+ defined by <tp:type>Message_Header_Key</tp:type>)</dt>
+ <dd>MUST be the intended recipient of the original message, if
+ available (zero or omitted if the intended recipient is
+ unavailable or is not a contact, e.g. a chatroom), even if the
+ delivery report actually came from an intermediate server.</dd>
+
+ <dt>message-type (u - <tp:type>Channel_Text_Message_Type</tp:type>,
+ as defined by <tp:type>Message_Header_Key</tp:type>)</dt>
+ <dd>MUST be Channel_Text_Message_Type_Delivery_Report.</dd>
+
+ <dt>delivery-status (u - <tp:type>Delivery_Status</tp:type>)</dt>
+ <dd>The status of the message. All delivery reports MUST contain
+ this key in the first Message_Part.</dd>
+
+ <dt>delivery-token (s - <tp:type>Protocol_Message_Token</tp:type>)</dt>
+
+ <dd>
+ <p>An identifier for the message to which this delivery report
+ refers. MUST NOT be an empty string. Omitted if not
+ available.</p>
+
+ <p>Clients may match this against the token produced by the
+ SendMessage method and MessageSent signal. A status report
+ with no token could match any sent message, and a sent
+ message with an empty token could match any status report.
+ If multiple sent messages match, clients SHOULD use some
+ reasonable heuristic.</p>
+
+ <tp:rationale>
+ In an ideal world, we could unambiguously match reports
+ against messages; however, deployed protocols are not ideal,
+ and not all reports and messages can be matched.
+ </tp:rationale>
+ </dd>
+
+ <dt>delivery-error (u -
+ <tp:type>Channel_Text_Send_Error</tp:type>)</dt>
+ <dd>
+ The reason for the failure. MUST be omitted if this was a
+ successful delivery; SHOULD be omitted if it would be
+ Channel_Text_Send_Error_Unknown.
+ </dd>
+
+ <dt>delivery-dbus-error (s -
+ <tp:type>DBus_Error_Name</tp:type>)</dt>
+ <dd>
+ The reason for the failure, specified as a (possibly
+ implementation-specific) D-Bus error. MUST be omitted if this was
+ a successful delivery. If set, the 'delivery-error' key SHOULD be
+ set to the closest available value.
+ </dd>
+
+ <dt>delivery-error-message (s)</dt>
+ <dd>
+ Debugging information on why the message could not be delivered.
+ MUST be omitted if this was a successful delivery; MAY always be
+ omitted.
+ </dd>
+
+ <dt>delivery-echo (aa{sv} - <tp:type>Message_Part[]</tp:type>)</dt>
+ <dd>
+ <p>The message content which can be omitted if no content
+ is available. Content MAY have been truncated, message
+ parts MAY have been removed, and message parts MAY
+ have had their content removed (i.e. the message part
+ metadata is present, but the 'content' key is
+ not).</p>
+
+ <tp:rationale>
+ Some protocols, like XMPP, echo the failing message back to
+ the sender. This is sometimes the only way to match it
+ against the sent message, so we include it here.
+ </tp:rationale>
+ </dd>
+
+ </dl>
+ </tp:docstring>
+ </tp:simple-type>
+
+ <tp:simple-type type="s" name="Protocol_Message_Token"
+ array-name="Protocol_Message_Token_List">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>An opaque token used to identify messages in the underlying.
+ protocol. As a special case, the empty string indicates that there
+ is no particular identification for a message.</p>
+
+ <p>CM implementations SHOULD use an identifier expected to be unique,
+ such as a UUID, for outgoing messages (if possible).</p>
+
+ <p>Some protocols can only track a limited number of messages
+ in a small message-ID space (SMS messages are identified by a single
+ byte), and some implementations send non-unique identifiers (some
+ XMPP clients use very simple message IDs, such as an incrementing
+ integer that resets to 1 at the beginning of each connection). As a
+ result, clients MUST NOT assume that protocol tokens will not be
+ re-used.</p>
+
+ <p>In particular, clients SHOULD use a heuristic to assign delivery
+ reports to messages, such as matching on message content or
+ timestamp (if available), or assuming that the delivery report
+ refers to the most recent message with that ID.</p>
+ </tp:docstring>
+ </tp:simple-type>
+
+ <tp:simple-type name="Protocol_Content_Identifier" type="s">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>A protocol-specific identifier for a blob of content, as used for
+ the <tt>identifier</tt> key in a <tp:type>Message_Part</tp:type>. The
+ same identifier MAY be re-used if the same content, byte-for-byte,
+ appears as a part of several messages.</p>
+
+ <tp:rationale>
+ <p>On XMPP, these identifiers might be Content-IDs for custom
+ smileys implemented using <a
+ href="http://xmpp.org/extensions/xep-0231.html">XEP-0232 Bits of
+ Binary</a>; the same smiley might well appear in multiple
+ messages.</p>
+ </tp:rationale>
+ </tp:docstring>
+ </tp:simple-type>
+
+ <method name="SendMessage" tp:name-for-bindings="Send_Message">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>Submit a message to the server for sending.
+ If this method returns successfully, the message has been submitted
+ to the server and the <tp:member-ref>MessageSent</tp:member-ref>
+ signal is emitted.</p>
+
+ <p>This method MUST return before the MessageSent signal is
+ emitted.</p>
+
+ <tp:rationale>
+ <p>This means that the process sending the message is the first
+ to see the <tp:type>Protocol_Message_Token</tp:type>, and can
+ relate the message to the corresponding
+ <tp:member-ref>MessageSent</tp:member-ref> signal by comparing
+ message tokens (if supported by the protocol).</p>
+ </tp:rationale>
+
+ <p>If this method fails, message submission to the server has failed
+ and no signal on this interface (or the Text interface) is
+ emitted.</p>
+
+ <p>If this method succeeds, message submission to the server has
+ succeeded, but the message has not necessarily reached its intended
+ recipient. If a delivery failure is detected later, this is
+ signalled by receiving a message whose <code>message-type</code>
+ header maps to
+ <tp:value-ref type="Channel_Text_Message_Type">Delivery_Report</tp:value-ref>.
+ Similarly, if delivery is detected to have been successful
+ (which is not possible in all protocols), a successful delivery
+ report will be signalled.</p>
+ </tp:docstring>
+
+ <arg direction="in" type="aa{sv}" tp:type="Message_Part[]"
+ name="Message">
<tp:docstring>
- The Unix timestamp indicating when the message was sent
+ The message content, including any attachments or alternatives.
+ This MUST NOT include the following headers, or any others that
+ do not make sense for a client to specify:
+ <code>message-sender</code>, <code>message-sender-id</code>,
+ <code>message-sent</code>, <code>message-received</code>,
+ <code>pending-message-id</code>.
</tp:docstring>
</arg>
- <arg name="Type" type="u" tp:type="Channel_Text_Message_Type">
+ <arg direction="in" name="Flags" type="u"
+ tp:type="Message_Sending_Flags">
<tp:docstring>
- The message type
+ Flags affecting how the message is sent. The channel MAY ignore some
+ or all flags, depending on
+ <tp:member-ref>DeliveryReportingSupport</tp:member-ref>; the flags
+ that were handled by the CM are provided in
+ <tp:member-ref>MessageSent</tp:member-ref>.
</tp:docstring>
</arg>
- <arg name="Text" type="s">
+
+ <arg direction="out" type="s" tp:type="Protocol_Message_Token"
+ name="Token">
<tp:docstring>
- The text of the message
+ An opaque token used to match any incoming delivery or failure
+ reports against this message, or an empty string if the message
+ is not readily identifiable.
</tp:docstring>
</arg>
+
+ <tp:possible-errors>
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
+ <tp:docstring>
+ The requested message is malformed and cannot be sent.
+ </tp:docstring>
+ </tp:error>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ </tp:possible-errors>
+ </method>
+
+ <tp:flags name="Message_Sending_Flags" value-prefix="Message_Sending_Flag"
+ type="u">
+ <tp:docstring>
+ Flags altering the way a message is sent. The "most usual" action
+ should always be to have these flags unset. Some indication of which
+ flags are supported is provided by the
+ <tp:member-ref>DeliveryReportingSupport</tp:member-ref> property.
+ </tp:docstring>
+
+ <tp:flag suffix="Report_Delivery" value="1">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>Provide a successful delivery report if possible, even if this is
+ not the default for this protocol. Ignored if delivery reports are
+ not possible on this protocol.</p>
+
+ <tp:rationale>
+ <p>In some protocols, like XMPP, it is not conventional to request
+ or send positive delivery notifications.</p>
+ </tp:rationale>
+
+ <p>Delivery failure reports SHOULD always be sent, but if this flag
+ is present, the connection manager MAY also try harder to obtain
+ failed delivery reports or allow them to be matched to outgoing
+ messages.</p>
+ </tp:docstring>
+ </tp:flag>
+
+ <tp:flag suffix="Report_Read" value="2">
+ <tp:added version="0.19.9"/>
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>Provide a delivery report when the message is read by the
+ recipient, even if this is not the default for this protocol.
+ Ignored if read reports are not possible on this protocol.</p>
+ </tp:docstring>
+ </tp:flag>
+
+ <tp:flag suffix="Report_Deleted" value="4">
+ <tp:added version="0.19.9"/>
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>Provide a delivery report when the message is deleted by the
+ recipient, even if this is not the default for this protocol.
+ Ignored if such reports are not possible on this protocol.</p>
+ </tp:docstring>
+ </tp:flag>
+ </tp:flags>
+
+ <signal name="MessageSent" tp:name-for-bindings="Message_Sent">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Signals that an outgoing message has failed to send. The error
- will be one of the values from ChannelTextSendError.</p>
+ <p>Signals that a message has been submitted for sending.</p>
- <p>This signal should only be emitted for messages for which
- <tp:member-ref>Sent</tp:member-ref> has already been emitted and
- <tp:member-ref>Send</tp:member-ref> has already returned success.</p>
+ <p>This SHOULD be emitted as soon as the CM determines it's
+ theoretically possible to send the message (e.g. the parameters are
+ supported and correct).</p>
+
+ <tp:rationale>
+ <p>This signal allows a process that is not the caller of
+ SendMessage to log sent messages.</p>
+ </tp:rationale>
</tp:docstring>
- <tp:changed version="0.17.3">older spec versions claimed that SendError
- was emitted <em>instead of</em> Sent, rather than <em>in addition
- to</em> Sent. However, the 0.17.3+ semantics were what we'd always
- actually implemented.</tp:changed>
- </signal>
- <signal name="Sent" tp:name-for-bindings="Sent">
- <tp:deprecated version="0.21.5">The
- <tp:dbus-ref namespace="ofdT.Channel.Interface.Messages"
- >MessageSent</tp:dbus-ref> signal is more informative.
- </tp:deprecated>
- <arg name="Timestamp" type="u" tp:type="Unix_Timestamp">
- <tp:docstring>
- Unix timestamp indicating when the message was sent
+ <arg type="aa{sv}" tp:type="Message_Part[]" name="Content">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>The message content (see <tp:type>Message_Part</tp:type> for full
+ details). If the message that was passed to
+ <tp:member-ref>SendMessage</tp:member-ref> has a formatted text
+ part that the connection manager recognises, but no
+ <tt>text/plain</tt> alternative, the CM MUST use the formatted text
+ part to generate a <tt>text/plain</tt> alternative which is also
+ included in this signal argument.</p>
+
+ <p>The connection manager SHOULD include the
+ <code>message-sender</code>, <code>message-sender-id</code> and
+ <code>message-sent</code> headers in the representation of the
+ message that is signalled here. If the channel has
+ channel-specific handles, the <code>message-sender</code> and
+ <code>message-sender-id</code> SHOULD reflect the sender that
+ other contacts will see.</p>
+
+ <p>If the connection manager can predict that the message will be
+ altered during transmission, this argument SHOULD reflect what
+ other contacts will receive, rather than being a copy of the
+ argument to SendMessage (if the message is truncated,
+ formatting or alternatives are dropped, etc., then the edited
+ version SHOULD appear in this signal).</p>
</tp:docstring>
</arg>
- <arg name="Type" type="u" tp:type="Channel_Text_Message_Type">
+
+ <arg name="Flags" type="u" tp:type="Message_Sending_Flags">
<tp:docstring>
- The message type (normal, action, notice, etc) from
- ChannelTextMessageType
+ <p>Flags affecting how the message was sent. The flags might be a
+ subset of those passed to SendMessage if the caller requested
+ unsupported flags.</p>
</tp:docstring>
</arg>
- <arg name="Text" type="s">
+
+ <arg name="Message_Token" type="s" tp:type="Protocol_Message_Token">
<tp:docstring>
- The text of the message. If the message was, or will be, altered
- during transmission, this argument SHOULD reflect what other
- contacts will receive rather than being a copy of the argument
- to <tp:member-ref>Send</tp:member-ref>.
+ An opaque token used to match any incoming delivery or failure
+ reports against this message, or an empty string if the message
+ is not readily identifiable.
</tp:docstring>
</arg>
+ </signal>
+
+ <property name="PendingMessages" type="aaa{sv}" access="read"
+ tp:type="Message_Part[][]" tp:name-for-bindings="Pending_Messages">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Signals that a message has been submitted for sending.</p>
+ <p>A list of incoming messages that have neither been acknowledged nor
+ rejected. Its items can be removed using
+ <tp:member-ref>AcknowledgePendingMessages</tp:member-ref>.</p>
+
+ <p>Change notification is via
+ <tp:member-ref>MessageReceived</tp:member-ref> and
+ <tp:member-ref>PendingMessagesRemoved</tp:member-ref>.</p>
+ </tp:docstring>
+ </property>
+
+ <signal name="PendingMessagesRemoved"
+ tp:name-for-bindings="Pending_Messages_Removed">
+ <tp:docstring>
+ The messages with the given IDs have been removed from the
+ <tp:member-ref>PendingMessages</tp:member-ref> list. Clients SHOULD NOT
+ attempt to acknowledge those messages.
+
+ <tp:rationale>
+ This completes change notification for the PendingMessages property
+ (previously, there was change notification when pending messages
+ were added, but not when they were removed).
+ </tp:rationale>
</tp:docstring>
+
+ <arg name="Message_IDs" type="au" tp:type="Message_ID[]">
+ <tp:docstring>
+ The messages that have been removed from the pending message list.
+ </tp:docstring>
+ </arg>
</signal>
- <tp:enum name="Channel_Text_Message_Type" type="u"
- array-name="Channel_Text_Message_Type_List">
+ <signal name="MessageReceived" tp:name-for-bindings="Message_Received">
<tp:docstring>
- The type of message.
+ Signals that a message has been received and added to the pending
+ messages queue.
</tp:docstring>
- <tp:enumvalue suffix="Normal" value="0">
+ <arg type="aa{sv}" tp:type="Message_Part[]" name="Message">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>The message content, including any attachments or alternatives. If
+ the incoming message contains formatted text without a plain text
+ alternative, the connection manager MUST generate a
+ <tt>text/plain</tt> alternative from the formatted text, and
+ include it in this message (both here, and in the
+ <tp:member-ref>PendingMessages</tp:member-ref> property).</p>
+ </tp:docstring>
+ </arg>
+ </signal>
+
+ <tp:enum name="Delivery_Status" value-prefix="Delivery_Status"
+ plural="Delivery_Statuses" type="u">
+ <tp:docstring>
+ <p>The status of a message as indicated by a delivery report.</p>
+
+ <p>If this enum is extended in future specifications, this should
+ only be to add new, non-overlapping conditions (i.e. all failures
+ should still be signalled as either Temporarily_Failed
+ or Permanently_Failed). If additional detail is required (e.g.
+ distinguishing between the various types of permanent failure) this
+ will be done using additional
+ <tp:type>Delivery_Report_Header_Key</tp:type>s.</p>
+ </tp:docstring>
+
+ <tp:enumvalue suffix="Unknown" value="0">
<tp:docstring>
- An ordinary chat message. Unknown types SHOULD be treated like this.
+ The message's disposition is unknown.
+ Clients SHOULD consider all messages to have status
+ Delivery_Status_Unknown unless otherwise specified; connection
+ managers SHOULD NOT signal this delivery status explicitly.
</tp:docstring>
</tp:enumvalue>
- <tp:enumvalue suffix="Action" value="1">
+ <tp:enumvalue suffix="Delivered" value="1">
<tp:docstring>
- An action which might be presented to the user as
- "* &lt;sender&gt; &lt;action&gt;", such as an IRC CTCP
- ACTION (typically selected by the "/me" command). For example, the
- text of the message might be "drinks more coffee".
+ The message has been delivered to the intended recipient.
</tp:docstring>
</tp:enumvalue>
- <tp:enumvalue suffix="Notice" value="2">
+ <tp:enumvalue suffix="Temporarily_Failed" value="2">
<tp:docstring>
- A one-off or automated message not necessarily expecting a reply
+ Delivery of the message has failed. Clients SHOULD notify the user,
+ but MAY automatically try sending another copy of the message.
+
+ <tp:rationale>
+ Similar to errors with type="wait" in XMPP; analogous to
+ 4xx errors in SMTP.
+ </tp:rationale>
</tp:docstring>
</tp:enumvalue>
- <tp:enumvalue suffix="Auto_Reply" value="3">
+ <tp:enumvalue suffix="Permanently_Failed" value="3">
<tp:docstring>
- An automatically-generated reply message.
+ Delivery of the message has failed. Clients SHOULD NOT try again
+ unless by specific user action. If the user does not modify the
+ message or alter configuration before re-sending, this error is
+ likely to happen again.
+
+ <tp:rationale>
+ Similar to errors with type="cancel", type="modify"
+ or type="auth" in XMPP; analogous to 5xx errors in SMTP.
+ </tp:rationale>
</tp:docstring>
</tp:enumvalue>
- <tp:enumvalue suffix="Delivery_Report" value="4">
+ <tp:enumvalue suffix="Accepted" value="4">
<tp:docstring>
- A delivery report. This message type MUST NOT appear unless the
- channel supports the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface">Messages</tp:dbus-ref>
- interface; see <tp:type>Message_Part</tp:type> for the format that
- delivery reports must take.
+ An intermediate server has accepted the message but the message
+ has not been yet delivered to the ultimate recipient. The
+ connection manager might send a Failed report or Delivered report
+ later.
+
+ <tp:rationale>
+ Similar to "202 Accepted" success code in SIP; analogous to
+ 251 and 252 responses in SMTP.
+ </tp:rationale>
+ </tp:docstring>
+ </tp:enumvalue>
+
+ <tp:enumvalue suffix="Read" value="5">
+ <tp:added version="0.19.9"/>
+ <tp:docstring>
+ The message has been read by the intended recipient.
+ </tp:docstring>
+ </tp:enumvalue>
+
+ <tp:enumvalue suffix="Deleted" value="6">
+ <tp:added version="0.19.9"/>
+ <tp:docstring>
+ The message has been deleted by the intended recipient. This MAY be
+ signalled on its own if the message is deleted without being read, or
+ after <code>Read</code> if the message was read before being deleted.
</tp:docstring>
</tp:enumvalue>
</tp:enum>
- <tp:flags name="Channel_Text_Message_Flags" value-prefix="Channel_Text_Message_Flag" type="u">
- <tp:deprecated version="0.21.5">The
- <tp:dbus-ref namespace="ofdT.Channel.Interface"
- >Messages</tp:dbus-ref> interface has an extensible data structure
- including separate booleans for most of these flags.
- </tp:deprecated>
- <tp:flag suffix="Truncated" value="1">
+ <tp:flags name="Delivery_Reporting_Support_Flags"
+ value-prefix="Delivery_Reporting_Support_Flag" type="u">
+ <tp:docstring>
+ Flags indicating the level of support for delivery reporting on this
+ channel, as found on the
+ <tp:member-ref>DeliveryReportingSupport</tp:member-ref> property. Any
+ future flags added to this set will conform to the
+ convention that the presence of an extra flag implies that
+ more operations will succeed. Note that CMs may always provide more
+ reports than are requested in the
+ <tp:type>Message_Sending_Flags</tp:type> passed to
+ <tp:member-ref>SendMessage</tp:member-ref>.
+
+ <tp:rationale>
+ If senders want delivery reports, they should ask for them. If they
+ don't want delivery reports, they can just ignore them, so there's no
+ need to have capability discovery for what will happen if a delivery
+ report isn't requested.
+ </tp:rationale>
+ </tp:docstring>
+
+ <tp:flag suffix="Receive_Failures" value="1">
<tp:docstring>
- The incoming message was truncated to a shorter length by the
- server or the connection manager.
+ Clients MAY expect to receive negative delivery reports if
+ Message_Sending_Flag_Report_Delivery is specified when sending.
</tp:docstring>
</tp:flag>
- <tp:flag suffix="Non_Text_Content" value="2">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The incoming message contained non-text content which cannot be
- represented by this interface, but has been signalled
- in the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface">Messages</tp:dbus-ref>
- interface.</p>
-
- <p>Connection managers SHOULD only set this flag if the non-text
- content appears to be relatively significant (exactly how
- significant is up to the implementor). The intention is that
- if this flag is set, clients using this interface SHOULD inform
- the user that part of the message was not understood.</p>
+ <tp:flag suffix="Receive_Successes" value="2">
+ <tp:docstring>
+ Clients MAY expect to receive positive delivery reports if
+ Message_Sending_Flag_Report_Delivery is specified when sending.
</tp:docstring>
</tp:flag>
- <tp:flag suffix="Scrollback" value="4">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The incoming message was part of a replay of message history.</p>
-
- <tp:rationale>
- <p>In XMPP multi-user chat, a few past messages are replayed
- when you join a chatroom. A sufficiently capable IRC connection
- manager could also set this flag on historical messages when
- connected to a proxy like bip or irssi-proxy. The existence
- of this flag allows loggers and UIs to use better heuristics
- when eliminating duplicates (a simple implementation made
- possible by this flag would be to avoid logging scrollback
- at all).</p>
- </tp:rationale>
+ <tp:flag suffix="Receive_Read" value="4">
+ <tp:added version="0.19.9"/>
+ <tp:docstring>
+ Clients MAY expect to receive <tp:type>Delivery_Status</tp:type>
+ <code>Read</code> reports if Message_Sending_Flag_Report_Read
+ is specified when sending.
</tp:docstring>
</tp:flag>
- <tp:flag suffix="Rescued" value="8">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The incoming message has been seen in a previous channel during
- the lifetime of the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>, but
- had not been acknowledged
- when that channel closed, causing an identical channel (the
- channel in which the message now appears) to open.</p>
-
- <tp:rationale>
- <p>This means that a logger (which should already have seen the
- message in the previous channel) is able to recognise and ignore
- these replayed messages.</p>
- </tp:rationale>
+ <tp:flag suffix="Receive_Deleted" value="8">
+ <tp:added version="0.19.9"/>
+ <tp:docstring>
+ Clients MAY expect to receive <tp:type>Delivery_Status</tp:type>
+ <code>Deleted</code> reports if Message_Sending_Flag_Report_Deleted
+ is specified when sending.
</tp:docstring>
</tp:flag>
</tp:flags>
+ <property name="DeliveryReportingSupport" access="read"
+ tp:type="Delivery_Reporting_Support_Flags" type="u"
+ tp:name-for-bindings="Delivery_Reporting_Support"
+ tp:immutable="yes">
+ <tp:docstring>
+ A bitfield indicating features supported by this channel.
+ </tp:docstring>
+ </property>
+
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A channel type for sending and receiving messages. This channel type
is primarily used for textual messages, but can also be used for
- formatted text, text with "attachments", or binary messages on some
- protocols.</p>
+ more general messages, including:</p>
+
+ <ul>
+ <li>messages with attachments (like MIME multipart/mixed)</li>
+ <li>groups of alternatives (like MIME multipart/alternative)</li>
+ <li>delivery reports, adding support for protocols where the
+ message content is not echoed back to the sender on failure
+ and for receiving positive acknowledgements, as well as
+ ensuring that incoming delivery reports are not lost if no
+ client is handling the channel yet;</li>
+ <li>any extra types of message we need in future</li>
+ </ul>
- <p>Most of the methods and signals on this interface are deprecated,
- since they only support plain-text messages with limited metadata.
- See the mandatory <tp:dbus-ref
- namespace="ofdT.Channel.Interface">Messages</tp:dbus-ref>
- interface for the modern equivalents.</p>
+ <p>Incoming messages, outgoing messages, and delivery reports are all
+ represented as lists of <tp:type>Message_Part</tp:type> structures,
+ with a format reminiscent of e-mail.</p>
<p>When a message is received, an identifier is assigned and a
- <tp:dbus-ref namespace="ofdT.Channel.Interface.Messages"
- >MessageReceived</tp:dbus-ref> signal emitted, and the message
- is placed in a pending queue represented by the
- <tp:dbus-ref namespace="ofdT.Channel.Interface.Messages"
- >PendingMessages</tp:dbus-ref> property.
+ <tp:member-ref>MessageReceived</tp:member-ref> signal emitted,
+ and the message is placed in a pending queue represented by the
+ <tp:member-ref>PendingMessages</tp:member-ref> property.
When the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client">Handler</tp:dbus-ref>
+ namespace="im.telepathy1.Client">Handler</tp:dbus-ref>
for a channel has handled the message by showing it to the user
(or equivalent), it should acknowledge the receipt of that message
using the <tp:member-ref>AcknowledgePendingMessages</tp:member-ref>
method, and the message will then be removed from the pending queue.
Numeric identifiers for received messages may be reused over the
- lifetime of the channel.</p>
+ lifetime of the channel. Only the <tp:dbus-ref
+ namespace="im.telepathy1.Client">Handler</tp:dbus-ref>
+ for a channel should acknowledge messages; <tp:dbus-ref
+ namespace="im.telepathy1.Client">Observer</tp:dbus-ref>s
+ (such as loggers) and <tp:dbus-ref
+ namespace="im.telepathy1.Client">Approver</tp:dbus-ref>s
+ for the channel may listen for incoming messages, and send
+ messages of their own, but SHOULD NOT acknowledge messages.</p>
+
+ <tp:rationale>
+ <p>If observers were allowed to acknowledge messages, then messages
+ might have been acknowledged before the handler even got to see the
+ channel, and hence could not be shown to the user.</p>
+ </tp:rationale>
<p>Sending messages can be requested using the
- <tp:dbus-ref namespace="ofdT.Channel.Interface.Messages"
- >SendMessage</tp:dbus-ref> method, which will return
+ <tp:member-ref>SendMessage</tp:member-ref> method, which will return
successfully when the message has been submitted for sending, or
return an error with no signal emission if there is an immediate
failure. If a message is submitted for sending but delivery of the
message later fails, this is indicated by a delivery report, which
- is received in the same way as an incoming message.</p>
+ is received in the same way as an incoming message. Outgoing
+ messages are announced to other clients which may be
+ interested in the channel by the
+ <tp:member-ref>MessageSent</tp:member-ref> signal.</p>
<p>Simple one-to-one chats (such as streams of private messages in
XMPP or IRC) should be represented by a Text channel whose
- <tp:dbus-ref namespace="ofdT.Channel">TargetHandleType</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Channel">TargetHandleType</tp:dbus-ref>
is <tp:value-ref type="Handle_Type">Contact</tp:value-ref>. The
expected way to request such a channel is to set the <tp:dbus-ref
- namespace='ofdT.Channel'>ChannelType</tp:dbus-ref>, <tp:dbus-ref
- namespace='ofdT.Channel'>TargetHandleType</tp:dbus-ref>,
+ namespace='imt1.Channel'>ChannelType</tp:dbus-ref>, <tp:dbus-ref
+ namespace='imt1.Channel'>TargetHandleType</tp:dbus-ref>,
and either <tp:dbus-ref
- namespace='ofdT.Channel'>TargetHandle</tp:dbus-ref> or <tp:dbus-ref
- namespace='ofdT.Channel'>TargetID</tp:dbus-ref> in a call to
+ namespace='imt1.Channel'>TargetHandle</tp:dbus-ref> or <tp:dbus-ref
+ namespace='imt1.Channel'>TargetID</tp:dbus-ref> in a call to
<tp:dbus-ref
- namespace='ofdT.ChannelDispatcher'>EnsureChannel</tp:dbus-ref>.</p>
+ namespace='imt1.ChannelDispatcher'>EnsureChannel</tp:dbus-ref>.</p>
<p>Named chat rooms whose identity can be saved and used again later
(IRC channels, Jabber MUCs) are expected to be represented by Text
channels with <tp:dbus-ref
- namespace="ofdT.Channel">TargetHandleType</tp:dbus-ref> =
+ namespace="imt1.Channel">TargetHandleType</tp:dbus-ref> =
<tp:value-ref type="Handle_Type">Room</tp:value-ref> and the
- <tp:dbus-ref namespace="ofdT.Channel.Interface">Group</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Channel.Interface">Group1</tp:dbus-ref>
interface. In protocols where a chatroom can be used as a continuation
of one or more one-to-one chats, these channels should also have the
- <tp:dbus-ref namespace="ofdT.Channel.Interface">Conference</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Channel.Interface">Conference1</tp:dbus-ref>
interface.</p>
<p>Unnamed, transient chat rooms which cannot be rejoined by their
unique identifier (e.g. a conversation on MSN which has, or once had,
three or more participants) are expected to be represented by Text
channels with <tp:dbus-ref
- namespace="ofdT.Channel">TargetHandleType</tp:dbus-ref> = <tp:value-ref
+ namespace="imt1.Channel">TargetHandleType</tp:dbus-ref> = <tp:value-ref
type="Handle_Type">None</tp:value-ref> (and hence <tp:dbus-ref
- namespace="ofdT.Channel">TargetHandle</tp:dbus-ref> = 0),
- <tp:dbus-ref namespace="ofdT.Channel.Interface">Group</tp:dbus-ref>
+ namespace="imt1.Channel">TargetHandle</tp:dbus-ref> = 0),
+ <tp:dbus-ref namespace="imt1.Channel.Interface">Group1</tp:dbus-ref>
interface, and optionally the
- <tp:dbus-ref namespace="ofdT.Channel.Interface">Conference</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Channel.Interface">Conference1</tp:dbus-ref>
interface.</p>
<p>On protocols like MSN where a conversation with a user is actually
just a nameless chat room starting with exactly two members, to which
more members can be invited, the initial one-to-one conversation
SHOULD be represented with <tp:dbus-ref
- namespace="ofdT.Channel">TargetHandleType</tp:dbus-ref> =
+ namespace="imt1.Channel">TargetHandleType</tp:dbus-ref> =
<tp:value-ref type="Handle_Type">Contact</tp:value-ref>. If a third
participant
joins or is invited, this SHOULD be represented by signalling
a new <tp:dbus-ref
- namespace="ofdT.Channel.Interface">Conference</tp:dbus-ref> channel
+ namespace="imt1.Channel.Interface">Conference1</tp:dbus-ref> channel
with the one-to-one channel in its <tp:dbus-ref
- namespace="ofdT.Channel.Interface.Conference"
+ namespace="imt1.Channel.Interface.Conference1"
>InitialChannels</tp:dbus-ref>, migrating the underlying protocol
object from the one-to-one channel to the Conference channel,
and creating a new protocol-level conversation if the one-to-one
@@ -540,12 +1496,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
the connection manager MUST allow this, but SHOULD open a new channel
to deliver those messages, signalling it as a new channel with the
<tp:dbus-ref
- namespace="ofdT.Connection.Interface.Requests">NewChannels</tp:dbus-ref>
+ namespace="imt1.Connection.Interface.Requests">NewChannels</tp:dbus-ref>
signal. The new channel should resemble the old channel, but have
- <tp:dbus-ref namespace='ofdT.Channel'>Requested</tp:dbus-ref> = FALSE
+ <tp:dbus-ref namespace='imt1.Channel'>Requested</tp:dbus-ref> = FALSE
regardless of its previous value; the <tp:dbus-ref
- namespace='ofdT.Channel'>InitiatorHandle</tp:dbus-ref>
- and <tp:dbus-ref namespace='ofdT.Channel'>InitiatorID</tp:dbus-ref>
+ namespace='imt1.Channel'>InitiatorHandle</tp:dbus-ref>
+ and <tp:dbus-ref namespace='imt1.Channel'>InitiatorID</tp:dbus-ref>
should correspond to the sender of one of the pending
messages.</p>
@@ -584,7 +1540,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:rationale>
<p>As a result, Text channels SHOULD implement <tp:dbus-ref
- namespace="ofdT">Channel.Interface.Destroyable</tp:dbus-ref>.</p>
+ namespace="imt1">Channel.Interface.Destroyable1</tp:dbus-ref>.</p>
<tp:rationale>
<p>This "respawning" behaviour becomes problematic if there is no
@@ -604,10 +1560,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>Opaquely-named rejoinable chatrooms (such as Skype rooms) are
represented using the properties in the <tp:dbus-ref
- namespace="ofdT.Channel.Interface">Room2</tp:dbus-ref>
+ namespace="imt1.Channel.Interface">Room1</tp:dbus-ref>
interface. Instructions and examples of how to request
such channels are given in said interface's description.</p>
+ <p>Although this specification supports formatted (rich-text)
+ messages with unformatted alternatives, implementations SHOULD NOT
+ attempt to send formatted messages until the Telepathy specification
+ has also been extended to cover capability discovery for message
+ formatting.</p>
+
+ <tp:rationale>
+ We intend to expose all rich-text messages as XHTML-IM, but on some
+ protocols, formatting is an extremely limited subset of that format
+ (e.g. there are protocols where foreground/background colours, font
+ and size can be set, but only for entire messages).
+ Until we can tell UIs what controls to offer to the user, it's
+ unfriendly to offer the user controls that may have no effect.
+ </tp:rationale>
</tp:docstring>
</interface>
</node>
diff --git a/spec/Channel_Type_Tubes.xml b/spec/Channel_Type_Tubes.xml
deleted file mode 100644
index c0a973faa..000000000
--- a/spec/Channel_Type_Tubes.xml
+++ /dev/null
@@ -1,615 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Channel_Type_Tubes" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright>
- Copyright © 2007-2009 Collabora Limited
- </tp:copyright>
- <tp:license>
- This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- </tp:license>
- <interface name="org.freedesktop.Telepathy.Channel.Type.Tubes">
-
- <tp:deprecated version="0.17.25">Client implementations
- SHOULD use <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamTube</tp:dbus-ref> and
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">DBusTube</tp:dbus-ref>
- instead.</tp:deprecated>
-
- <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A "tube" is a mechanism for arbitrary data transfer. Two types of
- data transfer are currently specified: D-Bus messages, and streams of
- bytes. Each tube has a service name, which is a string specifying the
- kind of communication that takes place over it, and a dictionary of
- arbitrary parameters. Tube parameters are commonly used for bootstrap
- information such as usernames and passwords. Each tube is identified
- by a locally unique identifier.</p>
-
- <p>The Tubes channel type may be requested for handles of type
- HANDLE_TYPE_CONTACT and HANDLE_TYPE_ROOM.</p>
-
- <p>Stream tubes specify listening addresses using pairs of parameters
- with signature 'u', 'v', where the integer 'u' is a member of
- Socket_Address_Type and the v is dependent on the type of address.</p>
- </tp:docstring>
-
- <tp:simple-type name="Tube_ID" type="u">
- <tp:docstring>An identifier for a tube. These are local to a Tubes
- channel, and may not be assumed to be the same as the other
- participants' idea of the tube identifier.</tp:docstring>
- </tp:simple-type>
-
- <tp:struct name="Tube_Info" array-name="Tube_Info_List">
- <tp:docstring>A struct (tube ID, initiator handle, tube type,
- service name, parameters, state) representing a tube, as returned
- by ListTubes on the Tubes channel type.</tp:docstring>
- <tp:member type="u" tp:type="Tube_ID" name="Identifier"/>
- <tp:member type="u" tp:type="Contact_Handle" name="Initiator"/>
- <tp:member type="u" tp:type="Tube_Type" name="Type"/>
- <tp:member type="s" name="Service"/>
- <tp:member type="a{sv}" tp:type="String_Variant_Map" name="Parameters"/>
- <tp:member type="u" tp:type="Tube_State" name="State"/>
- </tp:struct>
-
- <tp:struct name="DBus_Tube_Member" array-name="DBus_Tube_Member_List">
- <tp:docstring>Represents a participant in a multi-user D-Bus tube, as
- returned by <tp:member-ref>GetDBusNames</tp:member-ref> and seen in the
- <tp:member-ref>DBusNamesChanged</tp:member-ref> signal.</tp:docstring>
- <tp:member type="u" tp:type="Contact_Handle" name="Handle">
- <tp:docstring>
- The handle of a participant in this D-Bus tube.
- </tp:docstring>
- </tp:member>
- <tp:member type="s" tp:type="DBus_Unique_Name" name="Unique_Name">
- <tp:docstring>
- That participant's unique name.
- </tp:docstring>
- </tp:member>
- </tp:struct>
-
- <tp:enum name="Tube_Type" type="u" array-name="Tube_Type_List">
- <tp:enumvalue suffix="DBus" value="0">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The tube is D-Bus tube as described by the
- org.freedesktop.Telepathy.Channel.Type.DBusTube interface.</p>
- </tp:docstring>
- </tp:enumvalue>
-
- <tp:enumvalue suffix="Stream" value="1">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The tube is stream tube as described by the
- org.freedesktop.Telepathy.Channel.Type.StreamTube interface.</p>
- </tp:docstring>
- </tp:enumvalue>
- </tp:enum>
-
- <tp:enum name="Tube_State" type="u">
- <tp:enumvalue suffix="Local_Pending" value="0">
- <tp:docstring>
- The tube is waiting to be accepted/closed locally.
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Remote_Pending" value="1">
- <tp:docstring>
- The tube is waiting to be accepted/closed remotely.
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Open" value="2">
- <tp:docstring>
- The tube is open for traffic.
- </tp:docstring>
- </tp:enumvalue>
- </tp:enum>
-
- <tp:mapping name="Supported_Socket_Map">
- <tp:docstring>The supported socket address and access-control types
- for tubes. See GetAvailableStreamTubeTypes.</tp:docstring>
- <tp:member name="Address_Type" type="u" tp:type="Socket_Address_Type"/>
- <tp:member name="Access_Control" type="au"
- tp:type="Socket_Access_Control[]"/>
- </tp:mapping>
-
- <method name="GetAvailableStreamTubeTypes"
- tp:name-for-bindings="Get_Available_Stream_Tube_Types">
- <tp:docstring>List the available address types and access-control types
- for stream tubes.</tp:docstring>
- <arg direction="out" type="a{uau}" tp:type="Supported_Socket_Map"
- name="Available_Stream_Tube_Types">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A mapping from address types (members of Socket_Address_Type) to
- arrays of access-control type (members of Socket_Access_Control)
- that the connection manager supports for stream tubes with that
- address type. For simplicity, if a CM supports offering a
- particular type of tube, it is assumed to support accepting it.</p>
-
- <p>A typical value for a host without IPv6 support:</p>
-
- <pre>
- {
- Socket_Address_Type_IPv4:
- [Socket_Access_Control_Localhost, Socket_Access_Control_Port,
- Socket_Access_Control_Netmask],
- Socket_Address_Type_Unix:
- [Socket_Access_Control_Localhost, Socket_Access_Control_Credentials]
- }
- </pre>
-
- <p>If stream tubes are not supported, this will be an empty
- dictionary.</p>
- </tp:docstring>
- </arg>
- </method>
-
- <method name="GetAvailableTubeTypes"
- tp:name-for-bindings="Get_Available_Tube_Types">
- <arg direction="out" type="au" tp:type="Tube_Type[]"
- name="Available_Tube_Types">
- <tp:docstring>
- An array of the available tube types, as defined by the Tube_Type
- enum.
- </tp:docstring>
- </arg>
- </method>
-
- <method name="ListTubes" tp:name-for-bindings="List_Tubes">
- <arg direction="out" type="a(uuusa{sv}u)" tp:type="Tube_Info[]"
- name="Tubes">
- <tp:docstring>
- Return an array of tuples, each representing a tube, with the
- following members:
-
- <ul>
- <li>the tube's ID</li>
- <li>the tube's initiator</li>
- <li>the tube's type</li>
- <li>the tube's service</li>
- <li>the tube's parameters</li>
- <li>the tube's state</li>
- </ul>
- </tp:docstring>
- </arg>
- </method>
-
- <!-- this tp:name-for-bindings is ugly, but compatible with
- the code generation in telepathy-glib versions that did not use
- tp:name-for-bindings -->
- <method name="OfferDBusTube" tp:name-for-bindings="Offer_D_Bus_Tube">
- <tp:docstring>
- Offers a D-Bus tube providing the service specified.
- </tp:docstring>
- <arg direction="in" name="Service" type="s">
- <tp:docstring>
- A string representing the service name that will be used over the
- tube.
- It should be a well-known D-Bus service name, of the form
- com.example.ServiceName.
- </tp:docstring>
- </arg>
- <arg direction="in" name="Parameters" type="a{sv}"
- tp:type="String_Variant_Map">
- <tp:docstring>
- A dictionary of properties for the new tube; the allowable keys,
- types and values are defined by the service. Connection managers
- must support the value being any primitive (non-container)
- D-Bus type, or a byte array 'ay'.
- </tp:docstring>
- </arg>
- <arg direction="out" type="u" tp:type="Tube_ID" name="Tube_ID">
- <tp:docstring>
- The ID of the new tube.
- </tp:docstring>
- </arg>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
- <tp:docstring>
- The contact associated with this channel doesn't have tubes
- capabilities.
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
- <tp:docstring>
- The connection manager doesn't support D-Bus tubes.
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
- <method name="OfferStreamTube" tp:name-for-bindings="Offer_Stream_Tube">
- <tp:docstring>
- Offer a stream tube exporting the local socket specified.
- </tp:docstring>
- <arg direction="in" name="Service" type="s">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- A string representing the service name that will be used over the
- tube.
- It should be a well-known TCP service name as defined by
- <a href="http://www.iana.org/assignments/port-numbers">
- http://www.iana.org/assignments/port-numbers</a> or
- <a href="http://www.dns-sd.org/ServiceTypes.html">
- http://www.dns-sd.org/ServiceTypes.html</a>, for instance
- "rsync" or "daap".
- </tp:docstring>
- </arg>
- <arg direction="in" name="Parameters" type="a{sv}"
- tp:type="String_Variant_Map">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A dictionary of properties for the new tube; the allowable keys,
- types and values are defined by the service. Connection managers
- must support the value being any primitive (non-container)
- D-Bus type, or a byte array 'ay'.</p>
- <p>These should usually be the same key-value pairs specified for
- use in the DNS-SD TXT record for that service.</p>
- </tp:docstring>
- </arg>
- <arg direction="in" name="Address_Type" type="u" tp:type="Socket_Address_Type">
- <tp:docstring>
- The type of the listening address of the local service, as a member of
- Socket_Address_Type.
- </tp:docstring>
- </arg>
- <arg direction="in" name="Address" type="v">
- <tp:docstring>
- The listening address of the local service, as indicated by the
- address_type.
- </tp:docstring>
- </arg>
- <arg direction="in" name="Access_Control" type="u" tp:type="Socket_Access_Control">
- <tp:docstring>
- The access control the local service applies to the local socket,
- specified so the connection manager can behave appropriately
- when it connects.
- </tp:docstring>
- </arg>
- <arg direction="in" name="Access_Control_Param" type="v">
- <tp:docstring>
- A parameter for the access control type, to be interpreted as
- specified in the documentation for the Socket_Access_Control enum.
- </tp:docstring>
- </arg>
- <arg direction="out" type="u" tp:type="Tube_ID" name="Tube_ID">
- <tp:docstring>
- The ID of the new tube.
- </tp:docstring>
- </arg>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
- <tp:docstring>
- The contact associated with this channel doesn't have tube
- capabilities.
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
- <tp:docstring>
- The connection manager doesn't support stream tubes, or
- does not support the given address type or access-control type.
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
- <signal name="NewTube" tp:name-for-bindings="New_Tube">
- <tp:docstring>
- Emitted when a tube is created.
- </tp:docstring>
- <arg name="ID" type="u" tp:type="Tube_ID">
- <tp:docstring>
- The ID of the new tube.
- </tp:docstring>
- </arg>
- <arg name="Initiator" type="u" tp:type="Contact_Handle">
- <tp:docstring>
- The handle of the contact who initiated the tube.
- </tp:docstring>
- </arg>
- <arg name="Type" type="u" tp:type="Tube_Type">
- <tp:docstring>
- The tube type, as defined by the Tube_Type enum.
- </tp:docstring>
- </arg>
- <arg name="Service" type="s">
- <tp:docstring>
- A string representing the service that will be used over the tube.
- </tp:docstring>
- </arg>
- <arg name="Parameters" type="a{sv}" tp:type="String_Variant_Map">
- <tp:docstring>
- The new tube's properties.
- </tp:docstring>
- </arg>
- <arg name="State" type="u" tp:type="Tube_State">
- <tp:docstring>
- The new tube's state.
- </tp:docstring>
- </arg>
- </signal>
-
- <!-- this tp:name-for-bindings is ugly, but compatible with
- the code generation in telepathy-glib versions that did not use
- tp:name-for-bindings -->
- <method name="AcceptDBusTube" tp:name-for-bindings="Accept_D_Bus_Tube">
- <tp:docstring>
- Accept a D-Bus tube that's in the "local pending" state. The
- connection manager will attempt to open the tube. The tube remains in
- the "local pending" state until the TubeStateChanged signal is
- emitted.
- </tp:docstring>
- <arg direction="in" name="ID" type="u" tp:type="Tube_ID">
- <tp:docstring>
- The ID of the tube to accept.
- </tp:docstring>
- </arg>
- <arg direction="out" name="Address" type="s">
- <tp:docstring>
- The string describing the address of the private bus. The client
- should not attempt to connect to the address until the tube is open.
- </tp:docstring>
- </arg>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- The given tube ID is invalid or does not refer to a D-Bus
- tube.
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
- <method name="AcceptStreamTube" tp:name-for-bindings="Accept_Stream_Tube">
- <tp:docstring>
- Accept a stream tube that's in the "local pending" state. The
- connection manager will attempt to open the tube. The tube remains in
- the "local pending" state until the TubeStateChanged signal is
- emitted.
- </tp:docstring>
- <arg direction="in" name="ID" type="u" tp:type="Tube_ID">
- <tp:docstring>
- The ID of the tube to accept.
- </tp:docstring>
- </arg>
- <arg direction="in" name="Address_Type" type="u" tp:type="Socket_Address_Type">
- <tp:docstring>
- The type of address the connection manager should listen on.
- </tp:docstring>
- </arg>
- <arg direction="in" name="Access_Control" type="u" tp:type="Socket_Access_Control">
- <tp:docstring>
- The type of access control the connection manager should apply to
- the socket.
- </tp:docstring>
- </arg>
- <arg direction="in" name="Access_Control_Param" type="v">
- <tp:docstring>
- A parameter for the access control type, to be interpreted as
- specified in the documentation for the Socket_Access_Control enum.
- </tp:docstring>
- </arg>
- <arg direction="out" name="Address" type="v">
- <tp:docstring>
- The address on which the connection manager will listen for
- connections to this tube. The client should not attempt to connect
- to the address until the tube is open.
- </tp:docstring>
- </arg>
-
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- The given tube ID is invalid or does not refer to a stream
- tube.
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
- <tp:docstring>
- The given address type or access-control mechanism is not supported.
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
- <signal name="TubeStateChanged" tp:name-for-bindings="Tube_State_Changed">
- <tp:docstring>
- Emitted when the state of a tube changes.
- </tp:docstring>
- <arg name="ID" type="u" tp:type="Tube_ID">
- <tp:docstring>
- The ID of the tube that changed state.
- </tp:docstring>
- </arg>
- <arg name="State" type="u" tp:type="Tube_State">
- <tp:docstring>
- The new state of the tube; see the Tube_State enumeration.
- </tp:docstring>
- </arg>
- </signal>
-
- <method name="CloseTube" tp:name-for-bindings="Close_Tube">
- <tp:docstring>
- Close a tube.
- </tp:docstring>
- <arg direction="in" name="ID" type="u" tp:type="Tube_ID">
- <tp:docstring>
- The ID of the tube to close.
- </tp:docstring>
- </arg>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument" />
- </tp:possible-errors>
- </method>
-
- <signal name="TubeClosed" tp:name-for-bindings="Tube_Closed">
- <tp:docstring>
- Emitted when a tube has been closed. The ID of a closed tube is no
- longer valid. The ID may later be reused for a new tube.
- </tp:docstring>
- <arg name="ID" type="u" tp:type="Tube_ID">
- <tp:docstring>
- The ID of the tube that was closed.
- </tp:docstring>
- </arg>
- </signal>
-
- <!-- this tp:name-for-bindings is ugly, but compatible with
- the code generation in telepathy-glib versions that did not use
- tp:name-for-bindings -->
- <method name="GetDBusTubeAddress"
- tp:name-for-bindings="Get_D_Bus_Tube_Address">
- <tp:docstring>
- For a D-Bus tube, return a string describing the address of the
- private bus.
- </tp:docstring>
- <arg direction="in" name="ID" type="u" tp:type="Tube_ID">
- <tp:docstring>
- The ID of the tube to get an address for.
- </tp:docstring>
- </arg>
- <arg direction="out" type="s" name="Address">
- <tp:docstring>
- The bus address.
- </tp:docstring>
- </arg>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- The tube is not a D-Bus tube.
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
- <tp:docstring>
- This tube is not in the "open" state.
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
- <!-- this tp:name-for-bindings is ugly, but compatible with
- the code generation in telepathy-glib versions that did not use
- tp:name-for-bindings -->
- <method name="GetDBusNames" tp:name-for-bindings="Get_D_Bus_Names">
- <tp:docstring>
- For a multi-user (i.e. Handle_Type_Room) D-Bus tube, obtain a mapping
- between contact handles and their unique bus names on this tube.
- </tp:docstring>
- <arg direction="in" name="ID" type="u" tp:type="Tube_ID">
- <tp:docstring>
- The ID of the tube to get names for.
- </tp:docstring>
- </arg>
- <arg direction="out" type="a(us)" tp:type="DBus_Tube_Member[]"
- name="DBus_Names">
- <tp:docstring>
- An array of structures, each containing a contact handle and a D-Bus
- bus name.
- </tp:docstring>
- </arg>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- The tube is not a multi-user D-Bus tube.
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
- <tp:docstring>
- This tube is not in the "open" state.
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
- <!-- this tp:name-for-bindings is ugly, but compatible with
- the code generation in telepathy-glib versions that did not use
- tp:name-for-bindings -->
- <signal name="DBusNamesChanged" tp:name-for-bindings="D_Bus_Names_Changed">
- <tp:docstring>
- Emitted on a multi-user (i.e. Handle_Type_Room) D-Bus tube when a
- participant opens or closes the tube.
- </tp:docstring>
- <arg name="ID" type="u" tp:type="Tube_ID">
- <tp:docstring>
- The ID of the tube whose names have changed.
- </tp:docstring>
- </arg>
- <arg name="Added" type="a(us)" tp:type="DBus_Tube_Member[]">
- <tp:docstring>
- Array of handles and D-Bus names of new participants.
- </tp:docstring>
- </arg>
- <arg name="Removed" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- Array of handles of former participants.
- </tp:docstring>
- </arg>
- </signal>
-
- <method name="GetStreamTubeSocketAddress"
- tp:name-for-bindings="Get_Stream_Tube_Socket_Address">
- <tp:docstring>
- For a stream tube, obtain the address of the socket used to
- communicate over this tube.
- </tp:docstring>
- <arg direction="in" name="ID" type="u" tp:type="Tube_ID">
- <tp:docstring>
- The ID of the stream tube to get the socket for.
- </tp:docstring>
- </arg>
- <arg direction="out" name="Address_Type" type="u" tp:type="Socket_Address_Type">
- <tp:docstring>
- The type of the listening address of the socket, as a member of
- Socket_Address_Type.
- </tp:docstring>
- </arg>
- <arg direction="out" name="Address" type="v">
- <tp:docstring>
- The listening address of the socket, as indicated by the
- address_type.
- </tp:docstring>
- </arg>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- The tube is not a stream tube.
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
- <tp:docstring>
- This tube is not in the "open" state.
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
- <signal name="StreamTubeNewConnection"
- tp:name-for-bindings="Stream_Tube_New_Connection">
- <tp:docstring>
- Emitted on a stream tube when a participant opens a new connection
- to its socket.
- </tp:docstring>
- <arg name="ID" type="u" tp:type="Tube_ID">
- <tp:docstring>
- The ID of the tube
- </tp:docstring>
- </arg>
- <arg name="Handle" type="u" tp:type="Contact_Handle">
- <tp:docstring>
- The handle of the participant who opened the new connection
- </tp:docstring>
- </arg>
- </signal>
-
- </interface>
-
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Client.xml b/spec/Client.xml
index 19f691495..77e7bf440 100644
--- a/spec/Client.xml
+++ b/spec/Client.xml
@@ -20,7 +20,7 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Client">
+ <interface name="im.telepathy1.Client">
<tp:added version="0.17.26">(as a stable interface)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -33,7 +33,7 @@
address-book synchronization.</p>
<p>Every running or activatable process with a well-known
- name of the form org.freedesktop.Telepathy.Client.<em>clientname</em>
+ name of the form im.telepathy1.Client.<em>clientname</em>
should be probed by the channel dispatcher to discover its
capabilities. Each client is either an <em>observer</em>, an
<em>approver</em>, a <em>channel handler</em>, or some combination
@@ -54,7 +54,7 @@
<p>The client name, <em>clientname</em>, MUST be a non-empty string of
ASCII digits, letters, dots and/or underscores, starting with a
- letter, and without sets of two consecutive dots or a dot
+ letter or underscore, and without sets of two consecutive dots or a dot
followed by a digit. For non-activatable services, it MAY contain a
part that is generated per instance at runtime.</p>
@@ -62,7 +62,7 @@
<p>If each of a client Foo's instances should be able to manipulate
channels separately, the instance with unique name
<code>:1.25</code> might request a well-known name like
- <code>org.freedesktop.Telepathy.Client.Foo._1._25</code>.</p>
+ <code>im.telepathy1.Client.Foo._1._25</code>.</p>
<p>(Note that well-known bus-name components may not start with a
digit, so o.f.T.Client.Foo.1.25 would not be acceptable.)</p>
@@ -104,9 +104,9 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A list of the extra interfaces provided by this client.
This SHOULD include at least one of
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Client.Observer</tp:dbus-ref>,
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Client.Approver</tp:dbus-ref> or
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Client.Handler</tp:dbus-ref>.</p>
+ <tp:dbus-ref namespace="im.telepathy1">Client.Observer</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1">Client.Approver</tp:dbus-ref> or
+ <tp:dbus-ref namespace="im.telepathy1">Client.Handler</tp:dbus-ref>.</p>
<p>In the <code>.client</code> file, this is represented by key
"<code>Interfaces</code>" in the group named after this interface.
diff --git a/spec/Client_Approver.xml b/spec/Client_Approver.xml
index 12cbc76ac..828066787 100644
--- a/spec/Client_Approver.xml
+++ b/spec/Client_Approver.xml
@@ -20,16 +20,16 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Client.Approver">
+ <interface name="im.telepathy1.Client.Approver">
<tp:added version="0.17.26">(as a stable interface)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Client"/>
+ <tp:requires interface="im.telepathy1.Client"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Approvers are clients that notify the user that new channels have
been created by a contact, and allow the user to accept or reject
those channels. The new channels are represented by a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelDispatchOperation</tp:dbus-ref>
+ namespace="im.telepathy1">ChannelDispatchOperation</tp:dbus-ref>
object, which is passed to the
<tp:member-ref>AddDispatchOperation</tp:member-ref> method.</p>
@@ -59,9 +59,9 @@
<p>Any approver can approve the handling of a channel dispatch operation
with a particular channel handler by calling the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelDispatchOperation">HandleWith</tp:dbus-ref>
+ namespace="im.telepathy1.ChannelDispatchOperation">HandleWith</tp:dbus-ref>
method. Approvers can also attempt to <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelDispatchOperation">Claim</tp:dbus-ref>
+ namespace="im.telepathy1.ChannelDispatchOperation">Claim</tp:dbus-ref>
channels; if this succeeds, the approver may handle the channels
itself (if it is also a Handler), or close the channels in order to
reject them.</p>
@@ -79,7 +79,7 @@
straight away.</p>
<p>Non-interactive approvers can also be implemented as
- <tp:dbus-ref namespace="ofdT.Client">Observer</tp:dbus-ref>s as
+ <tp:dbus-ref namespace="imt1.Client">Observer</tp:dbus-ref>s as
described in the interface description.</p>
</tp:docstring>
@@ -94,7 +94,7 @@
description.</p>
<p>This property works in exactly the same way as the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Client.Observer.ObserverChannelFilter</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Client.Observer.ObserverChannelFilter</tp:dbus-ref>
property. In particular, it cannot change while the approver process
continues to own the corresponding Client bus name.</p>
@@ -134,9 +134,9 @@
type="a(oa{sv})" tp:type="Channel_Details[]">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The initial value of the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelDispatchOperation.Channels</tp:dbus-ref>
+ namespace="im.telepathy1">ChannelDispatchOperation.Channels</tp:dbus-ref>
property, containing the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel</tp:dbus-ref>s
+ namespace="im.telepathy1">Channel</tp:dbus-ref>s
to be dispatched and their properties.</p>
<tp:rationale>
@@ -158,11 +158,11 @@
<p>The actual channels to be dispatched may reduce as channels are
closed: this is signalled by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelDispatchOperation.ChannelLost</tp:dbus-ref>.
+ namespace="im.telepathy1">ChannelDispatchOperation.ChannelLost</tp:dbus-ref>.
</p>
<p>Approvers SHOULD connect to ChannelLost and <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelDispatchOperation.Finished</tp:dbus-ref>.
+ namespace="im.telepathy1">ChannelDispatchOperation.Finished</tp:dbus-ref>.
(if desired) before returning from AddDispatchOperation, since
those signals are guaranteed not to be emitted until after all
AddDispatchOperation calls have returned (with success or failure)
@@ -173,7 +173,7 @@
<arg name="DispatchOperation" type="o" direction="in">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">ChannelDispatchOperation</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">ChannelDispatchOperation</tp:dbus-ref>
to be processed.</p>
</tp:docstring>
</arg>
@@ -186,11 +186,11 @@
properties that could change, SHOULD include as many properties as
possible given that constraint, and MUST include at least the
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelDispatchOperation">Account</tp:dbus-ref>,
+ namespace="im.telepathy1.ChannelDispatchOperation">Account</tp:dbus-ref>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelDispatchOperation">Connection</tp:dbus-ref>
+ namespace="im.telepathy1.ChannelDispatchOperation">Connection</tp:dbus-ref>
and <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelDispatchOperation">PossibleHandlers</tp:dbus-ref>
+ namespace="im.telepathy1.ChannelDispatchOperation">PossibleHandlers</tp:dbus-ref>
properties.</p>
</tp:docstring>
</arg>
diff --git a/spec/Client_Handler.xml b/spec/Client_Handler.xml
index 3a922e8cc..f1ff37d36 100644
--- a/spec/Client_Handler.xml
+++ b/spec/Client_Handler.xml
@@ -20,10 +20,10 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Client.Handler">
+ <interface name="im.telepathy1.Client.Handler">
<tp:added version="0.17.26">(as a stable interface)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Client"/>
+ <tp:requires interface="im.telepathy1.Client"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Handlers are the user interface for a channel. They turn an abstract
@@ -36,19 +36,17 @@
<p>Because each channel is only handled by one Handler, handlers may
perform actions that only make sense to do once, such as acknowledging
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type">Text</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel.Type">Text</tp:dbus-ref>
messages, doing the actual streaming for <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
- channels with the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface">MediaSignalling</tp:dbus-ref>
- interface, or transferring the file in <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">FileTransfer</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type">Call1</tp:dbus-ref>
+ channels, or transferring the file in <tp:dbus-ref
+ namespace="im.telepathy1.Channel.Type">FileTransfer1</tp:dbus-ref>
channels.</p>
<p>When a new incoming channel (one with
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">Requested</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel">Requested</tp:dbus-ref>
= FALSE) is offered to
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client">Approver</tp:dbus-ref>s
+ <tp:dbus-ref namespace="im.telepathy1.Client">Approver</tp:dbus-ref>s
by the channel dispatcher, it also offers the Approvers a list of all
the running or activatable handlers whose
<tp:member-ref>HandlerChannelFilter</tp:member-ref> property
@@ -57,7 +55,7 @@
those channel handlers to handle the channel.</p>
<p>When a new outgoing channel (one with
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">Requested</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Channel">Requested</tp:dbus-ref>
= TRUE) appears, the channel dispatcher passes it to an appropriate
channel handler automatically.
</p>
@@ -69,12 +67,10 @@
type="aa{sv}" access="read" tp:type="Channel_Class[]">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A specification of the channels that this channel handler can
- deal with. It will be offered to approvers as a potential
- channel handler for bundles that contain only suitable channels,
- or for suitable channels that must be handled separately.</p>
+ deal with.</p>
<p>This property works in exactly the same way as the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Client.Observer.ObserverChannelFilter</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Client.Observer.ObserverChannelFilter</tp:dbus-ref>
property. In particular, it cannot change while the handler process
continues to own the corresponding Client bus name.</p>
@@ -91,26 +87,11 @@
<p>If true, channels destined for this handler are automatically
handled, without invoking approvers.</p>
- <tp:rationale>
- <p>The intended usage is to allow a client handling one channel to
- pick up closely related channels. Suppose a client capable of
- handling both Text and StreamedMedia,
- <code>org.freedesktop.Telepathy.Client.Empathy</code>, is
- handling a StreamedMedia channel. That client can take a second
- well-known bus name, say
- <code>org.freedesktop.Telepathy.Client.Empathy._1._42.Bundle1</code>,
- and configure an object at
- <code>/org/freedesktop/Telepathy/Client/Empathy/_1/_42/Bundle1</code>
- with BypassApproval = TRUE,
- whose <tp:member-ref>HandlerChannelFilter</tp:member-ref>
- matches closely related Text channels by their Bundle property.</p>
- </tp:rationale>
-
<p>For service-activatable handlers, this property should be specified
in the handler's <tt>.client</tt> file as follows:</p>
<pre>
-[org.freedesktop.Telepathy.Client.Handler]
+[im.telepathy1.Client.Handler]
BypassApproval=true
</pre>
</tp:docstring>
@@ -133,7 +114,7 @@ BypassApproval=true
</tp:rationale>
<p>So far, all client capabilities are defined by the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface">MediaSignalling</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type">Call1</tp:dbus-ref>
interface.</p>
</tp:docstring>
</tp:simple-type>
@@ -148,7 +129,7 @@ BypassApproval=true
<p>For handlers that have a <code>.client</code> file, the
channel dispatcher may discover this property from the
- <code>org.freedesktop.Telepathy.Client.Handler.Capabilities</code>
+ <code>im.telepathy1.Client.Handler.Capabilities</code>
group; for each capability, that group contains a key
whose name is the capability, with value <code>true</code>.
Keys with other values SHOULD NOT appear in this group.</p>
@@ -158,11 +139,11 @@ BypassApproval=true
and Theora and H264 video might contain this group:</p>
<pre>
-[org.freedesktop.Telepathy.Client.Handler.Capabilities]
-org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/ice-udp=true
-org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/audio/speex=true
-org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/video/theora=true
-org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/video/h264=true
+[im.telepathy1.Client.Handler.Capabilities]
+im.telepathy1.Channel.Interface.MediaSignalling/ice-udp=true
+im.telepathy1.Channel.Interface.MediaSignalling/audio/speex=true
+im.telepathy1.Channel.Interface.MediaSignalling/video/theora=true
+im.telepathy1.Channel.Interface.MediaSignalling/video/h264=true
</pre>
<p>Like the <tp:member-ref>HandlerChannelFilter</tp:member-ref>
@@ -203,10 +184,10 @@ org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/video/h264=true
<p>If closing the channels, it is RECOMMENDED that the channel
dispatcher attempts to close the channels using
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Close</tp:dbus-ref>,
+ namespace="im.telepathy1">Channel.Close</tp:dbus-ref>,
but resorts to calling
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.Interface.Destroyable.Destroy</tp:dbus-ref>
+ namespace="im.telepathy1">Channel.Interface.Destroyable1.Destroy</tp:dbus-ref>
(if available) or ignoring the channel (if not) if the same handler
repeatedly fails to handle channels.</p>
@@ -225,10 +206,10 @@ org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/video/h264=true
<arg name="Account" type="o" direction="in">
<tp:docstring>
The
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Account</tp:dbus-ref>
with which the channels are associated. The
well-known bus name to use is that of the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">AccountManager</tp:dbus-ref>.
+ <tp:dbus-ref namespace="im.telepathy1">AccountManager</tp:dbus-ref>.
</tp:docstring>
</arg>
@@ -256,7 +237,7 @@ org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/video/h264=true
<tp:rationale>
<p>If the handler implements Requests, this tells it
that these channels match previous <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Interface.Requests">AddRequest</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Interface.Requests">AddRequest</tp:dbus-ref>
calls that it may have received.</p>
<p>There can be more than one, if they were EnsureChannel
@@ -284,7 +265,7 @@ org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/video/h264=true
<dl>
<dt><code>request-properties</code> - a{oa{sv}}</dt>
<dd>A map from <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelRequest</tp:dbus-ref>
+ namespace="im.telepathy1">ChannelRequest</tp:dbus-ref>
paths listed in <var>Requests_Satisfied</var> to
<tp:type>Qualified_Property_Value_Map</tp:type>s containing
namespaced immutable properties of each request.</dd>
diff --git a/spec/Client_Handler_Future.xml b/spec/Client_Handler_Future.xml
index 4c1a8b761..dbb9b348d 100644
--- a/spec/Client_Handler_Future.xml
+++ b/spec/Client_Handler_Future.xml
@@ -20,14 +20,14 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Client.Handler.FUTURE"
+ <interface name="im.telepathy1.Client.Handler.FUTURE"
tp:causes-havoc="a staging area for future Handler functionality">
- <tp:requires interface="org.freedesktop.Telepathy.Client.Handler"/>
+ <tp:requires interface="im.telepathy1.Client.Handler"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This interface contains functionality which we intend to incorporate
into the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client">Handler</tp:dbus-ref>
+ namespace="im.telepathy1.Client">Handler</tp:dbus-ref>
interface in future. It should be considered to
be conceptually part of the core Handler interface, but without
API or ABI guarantees.</p>
@@ -50,7 +50,7 @@
in the handler's <tt>.client</tt> file as follows:</p>
<pre>
-[org.freedesktop.Telepathy.Client.Handler]
+[im.telepathy1.Client.Handler]
BypassObservers=true
</pre>
</tp:docstring>
@@ -61,13 +61,13 @@ BypassObservers=true
type="b" access="read">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>If true, channels destined for this handler that have the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface"
- >Conference</tp:dbus-ref> interface, with a channel that
+ <tp:dbus-ref namespace="im.telepathy1.Channel.Interface"
+ >Conference1</tp:dbus-ref> interface, with a channel that
was previously handled by the same client process in their
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface.Conference"
+ <tp:dbus-ref namespace="im.telepathy1.Channel.Interface.Conference1"
>InitialChannels</tp:dbus-ref> property, should bypass the
approval stage. In effect, this is a weaker form of
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Client.Handler"
+ <tp:dbus-ref namespace="im.telepathy1.Client.Handler"
>BypassApproval</tp:dbus-ref>.</p>
<tp:rationale>
diff --git a/spec/Client_Interface_Requests.xml b/spec/Client_Interface_Requests.xml
index 3cecfce49..609e1bb3a 100644
--- a/spec/Client_Interface_Requests.xml
+++ b/spec/Client_Interface_Requests.xml
@@ -20,11 +20,11 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Client.Interface.Requests">
+ <interface name="im.telepathy1.Client.Interface.Requests">
<tp:added version="0.17.26">(as a stable interface)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Client"/>
- <tp:requires interface="org.freedesktop.Telepathy.Client.Handler"/>
+ <tp:requires interface="im.telepathy1.Client"/>
+ <tp:requires interface="im.telepathy1.Client.Handler"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This interface can be implemented by a Handler to be notified about
@@ -47,14 +47,14 @@
a channel request which handler will handle particular channels.
A reasonable heuristic would be to match the request against the
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref>,
+ namespace="im.telepathy1.Client.Handler">HandlerChannelFilter</tp:dbus-ref>,
and respect the preferred handler (if any).</p>
</tp:rationale>
<p>If the request succeeds and is given to the expected Handler,
the Requests_Satisfied parameter to
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandleChannels</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Handler">HandleChannels</tp:dbus-ref>
can be used to match the channel to a previous AddRequest call.</p>
<tp:rationale>
@@ -74,7 +74,7 @@
and if the channel request succeeds, it SHOULD dispatch the channels
to the expected handler, unless the channels do not match that
handler's <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref>.
+ namespace="im.telepathy1.Client.Handler">HandlerChannelFilter</tp:dbus-ref>.
If the channels are not dispatched to the expected handler, the
handler that was expected is notified by the channel dispatcher
calling its <tp:member-ref>RemoveRequest</tp:member-ref> method
@@ -97,11 +97,11 @@
<arg name="Request" type="o" direction="in">
<tp:docstring>
The <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelRequest</tp:dbus-ref>
+ namespace="im.telepathy1">ChannelRequest</tp:dbus-ref>
object, which MUST have been returned by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelDispatcher">CreateChannel</tp:dbus-ref>
+ namespace="im.telepathy1.ChannelDispatcher">CreateChannel</tp:dbus-ref>
or <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelDispatcher">EnsureChannel</tp:dbus-ref>
+ namespace="im.telepathy1.ChannelDispatcher">EnsureChannel</tp:dbus-ref>
before this method is called.
<tp:rationale>
@@ -119,13 +119,13 @@
properties as possible, given that constraint.</p>
<p>In particular, the properties <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelRequest">Requests</tp:dbus-ref>,
+ namespace="im.telepathy1.ChannelRequest">Requests</tp:dbus-ref>,
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelRequest">UserActionTime</tp:dbus-ref>
+ namespace="im.telepathy1.ChannelRequest">UserActionTime</tp:dbus-ref>
and <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelRequest">Account</tp:dbus-ref>
+ namespace="im.telepathy1.ChannelRequest">Account</tp:dbus-ref>
MUST be included, and <tp:dbus-ref
- namespace="ofdT.ChannelRequest">Hints</tp:dbus-ref>
+ namespace="imt1.ChannelRequest">Hints</tp:dbus-ref>
MUST be included if implemented.</p>
</tp:docstring>
</arg>
@@ -157,7 +157,7 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The name of the D-Bus error with which the request failed.</p>
- <p>If this is <code>org.freedesktop.Telepathy.Error.NotYours</code>,
+ <p>If this is <code>im.telepathy1.Error.NotYours</code>,
this indicates that the request succeeded, but all the resulting
channels were given to some other handler.</p>
</tp:docstring>
diff --git a/spec/Client_Observer.xml b/spec/Client_Observer.xml
index b42b3b1df..8be9e4f5c 100644
--- a/spec/Client_Observer.xml
+++ b/spec/Client_Observer.xml
@@ -20,10 +20,10 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Client.Observer">
+ <interface name="im.telepathy1.Client.Observer">
<tp:added version="0.17.26">(as a stable interface)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Client"/>
+ <tp:requires interface="im.telepathy1.Client"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Observers monitor the creation of new channels. This
@@ -48,14 +48,14 @@
each channel, it would not make sense for observers to do things
that can only be done by one process (acknowledging
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">Text</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type">Text</tp:dbus-ref>
messages, carrying out streaming for
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">StreamedMedia</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type">Call1</tp:dbus-ref>
channels, doing the actual data transfer for file transfers,
setting up the out-of-band connection for Tubes). The
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client">Handler</tp:dbus-ref>
+ namespace="im.telepathy1.Client">Handler</tp:dbus-ref>
is responsible for such tasks.</p>
<p>Handlers MAY, of course, delegate responsibility for these
@@ -75,7 +75,7 @@
although of course the ObserverChannelFilter property can be set
to filter on the
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Requested</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">Requested</tp:dbus-ref>
property.</p>
<p>Because it might take time for an observer to become ready (for
@@ -96,12 +96,12 @@
<li><tp:member-ref>ObserveChannels</tp:member-ref>() is called
on the observer.</li>
<li>The observer calls <tp:dbus-ref
- namespace="ofdT.ChannelDispatchOperation">Claim</tp:dbus-ref>()
+ namespace="imt1.ChannelDispatchOperation">Claim</tp:dbus-ref>()
on the CDO.</li>
<li>The observer then returns from
<tp:member-ref>ObserveChannels</tp:member-ref>().</li>
<li><tp:dbus-ref
- namespace="ofdT.ChannelDispatchOperation">Claim</tp:dbus-ref>
+ namespace="imt1.ChannelDispatchOperation">Claim</tp:dbus-ref>
will return successfully if the channels were successfully
claimed, or failure if someone else got there first.</li>
</ol>
@@ -122,7 +122,7 @@
interested. The <tp:member-ref>ObserveChannels</tp:member-ref> method
should be called by the channel dispatcher whenever any of the new
channels in a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">NewChannels</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface.Requests">NewChannels</tp:dbus-ref>
signal match this description.</p>
<p>Only certain D-Bus types have useful semantics for matching like this,
@@ -161,9 +161,9 @@
<p>If an Observer wants to add extra channels to its list of
interests at runtime, it can register an additional Client bus name
- (for instance, the org.freedesktop.Telepathy.Client.Empathy process
+ (for instance, the im.telepathy1.Client.Empathy process
with unique name :1.42 could additionally register
- org.freedesktop.Telepathy.Client.Empathy._1_42) with additional
+ im.telepathy1.Client.Empathy._1_42) with additional
filters. To remove those filters, it can release the bus name;
it could even re-claim the bus name immediately, with different
filters.</p>
@@ -180,7 +180,7 @@
<p>Values in the .client file are encoded in exactly the same way as
the <code>default-<em>p</em></code> keys in .manager files, as
- described in the <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ described in the <tp:dbus-ref namespace="im.telepathy1"
>ConnectionManager</tp:dbus-ref> interface (but note that not all
types supported in .manager files can appear in .client files).</p>
@@ -189,18 +189,18 @@
a local client:</p>
<pre>
-[org.freedesktop.Telepathy.Client]
-Interfaces=org.freedesktop.Telepathy.Client.Observer;
-
-[org.freedesktop.Telepathy.Client.Observer.ObserverChannelFilter 0]
-org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Text
-org.freedesktop.Telepathy.Channel.TargetHandleType u=1
-org.freedesktop.Telepathy.Channel.Requested b=true
-
-[org.freedesktop.Telepathy.Client.Observer.ObserverChannelFilter 1]
-org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Text
-org.freedesktop.Telepathy.Channel.TargetHandleType u=2
-org.freedesktop.Telepathy.Channel.Requested b=true
+[im.telepathy1.Client]
+Interfaces=im.telepathy1.Client.Observer;
+
+[im.telepathy1.Client.Observer.ObserverChannelFilter 0]
+im.telepathy1.Channel.ChannelType s=im.telepathy1.Channel.Type.Text
+im.telepathy1.Channel.TargetHandleType u=1
+im.telepathy1.Channel.Requested b=true
+
+[im.telepathy1.Client.Observer.ObserverChannelFilter 1]
+im.telepathy1.Channel.ChannelType s=im.telepathy1.Channel.Type.Text
+im.telepathy1.Channel.TargetHandleType u=2
+im.telepathy1.Channel.Requested b=true
</pre>
</tp:docstring>
@@ -215,10 +215,10 @@ org.freedesktop.Telepathy.Channel.Requested b=true
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>If true, upon the startup of this observer, <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Observer">ObserveChannels</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Observer">ObserveChannels</tp:dbus-ref>
will be called for every already existing channel matching
its <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Observer">ObserverChannelFilter</tp:dbus-ref></p>
+ namespace="im.telepathy1.Client.Observer">ObserverChannelFilter</tp:dbus-ref></p>
<p>When an activatable client having this property disappears from the
bus and there are channels matching its ObserverChannelFilter,
@@ -227,7 +227,7 @@ org.freedesktop.Telepathy.Channel.Requested b=true
<tt>.client</tt> file as follows:</p>
<pre>
-[org.freedesktop.Telepathy.Client.Observer]
+[im.telepathy1.Client.Observer]
Recover=true
</pre>
@@ -236,7 +236,7 @@ Recover=true
be restarted as soon as possible; while there is an unavoidable
possibility that it will miss some events during this process
(particularly <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">Text</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type">Text</tp:dbus-ref>
messages), this window of event loss is kept to a minimum.</p>
<p>Non-activatable observers can't take advantage of this
@@ -255,7 +255,7 @@ Recover=true
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Called by the channel dispatcher when channels in which the
observer has registered an interest are announced in a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests">NewChannels</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface.Requests">NewChannels</tp:dbus-ref>
signal.</p>
<p>If the same NewChannels signal announces some channels that match
@@ -276,7 +276,7 @@ Recover=true
to avoid the following race: text channel logger (observer) gets
ObserveChannels, text channel handler gets
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandleChannels</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Handler">HandleChannels</tp:dbus-ref>
channel handler starts up faster and acknowledges messages,
logger never sees those messages.</p>
</tp:rationale>
@@ -296,17 +296,17 @@ Recover=true
<arg name="Account" type="o" direction="in">
<tp:docstring>
The
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Account</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Account</tp:dbus-ref>
with which the channels are associated. The
well-known bus name to use is that of the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">AccountManager</tp:dbus-ref>.
+ <tp:dbus-ref namespace="im.telepathy1">AccountManager</tp:dbus-ref>.
</tp:docstring>
</arg>
<arg name="Connection" type="o" direction="in">
<tp:docstring>
The
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Connection</tp:dbus-ref>
with which the channels are associated. The
well-known bus name to use can be derived from this object
path by removing the leading '/' and replacing all subsequent
@@ -318,7 +318,7 @@ Recover=true
direction="in">
<tp:docstring>
The <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel</tp:dbus-ref>s
+ namespace="im.telepathy1">Channel</tp:dbus-ref>s
and their properties. Their well-known bus names are all the same as
that of the Connection.
</tp:docstring>
@@ -327,25 +327,25 @@ Recover=true
<arg name="Dispatch_Operation" type="o" direction="in">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The path to the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelDispatchOperation</tp:dbus-ref>
+ namespace="im.telepathy1">ChannelDispatchOperation</tp:dbus-ref>
for these channels, or the special value '/' if there is no
ChannelDispatchOperation (because the channels were requested, not
incoming).</p>
<p>If the Observer calls <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelDispatchOperation">Claim</tp:dbus-ref>
+ namespace="im.telepathy1.ChannelDispatchOperation">Claim</tp:dbus-ref>
or <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelDispatchOperation">HandleWith</tp:dbus-ref>
+ namespace="im.telepathy1.ChannelDispatchOperation">HandleWith</tp:dbus-ref>
on the dispatch operation, it MUST be careful to avoid deadlock,
since these methods cannot return until the Observer has returned
from <tp:member-ref>ObserveChannels</tp:member-ref>.</p>
<tp:rationale>
<p>This allows an Observer to <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ChannelDispatchOperation">Claim</tp:dbus-ref>
+ namespace="im.telepathy1.ChannelDispatchOperation">Claim</tp:dbus-ref>
a set of channels without having to match up calls to this method
with calls to <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Approver">AddDispatchOperation</tp:dbus-ref>.</p>
+ namespace="im.telepathy1.Client.Approver">AddDispatchOperation</tp:dbus-ref>.</p>
</tp:rationale>
</tp:docstring>
</arg>
@@ -353,14 +353,14 @@ Recover=true
<arg name="Requests_Satisfied" type="ao" direction="in">
<tp:docstring>
The <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelRequest</tp:dbus-ref>s
+ namespace="im.telepathy1">ChannelRequest</tp:dbus-ref>s
satisfied by these channels.
<tp:rationale>
If the same process is an Observer and a Handler, it can be useful
to be given this information as soon as possible (it will also
be passed to <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client">Handler.HandleChannels</tp:dbus-ref>).
+ namespace="im.telepathy1.Client">Handler.HandleChannels</tp:dbus-ref>).
</tp:rationale>
</tp:docstring>
</arg>
@@ -387,7 +387,7 @@ Recover=true
<dt><code>request-properties</code> - a{oa{sv}}</dt>
<dd>A map from <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelRequest</tp:dbus-ref>
+ namespace="im.telepathy1">ChannelRequest</tp:dbus-ref>
paths listed in <var>Requests_Satisfied</var> to
<tp:type>Qualified_Property_Value_Map</tp:type>s containing
namespaced immutable properties of each request.</dd>
@@ -407,14 +407,14 @@ Recover=true
<p>If true, the channel dispatcher will wait for
<tp:member-ref>ObserveChannels</tp:member-ref> to return
before calling <tp:dbus-ref
- namespace="ofdT.Client">Approver.AddDispatchOperation</tp:dbus-ref>
+ namespace="imt1.Client">Approver.AddDispatchOperation</tp:dbus-ref>
on appropriate Approvers.</p>
<p>This property SHOULD be false unless there is a reason
why a channel should not be given to approvers. An example
of this is if an Observer is also a Handler and wants to
<tp:dbus-ref
- namespace="ofdT.ChannelDispatchOperation">Claim</tp:dbus-ref>
+ namespace="imt1.ChannelDispatchOperation">Claim</tp:dbus-ref>
a channel so that it becomes its handler and doesn't want
any approver to be called, this property should be true.</p>
@@ -431,12 +431,8 @@ Recover=true
specified in the observer's <tt>.client</tt> file as
follows:</p>
- <p>If this property is not implemented (telepathy-mission-control
- 5.7.5 and older), the channel dispatcher SHOULD consider it as
- being false.</p>
-
<pre>
-[org.freedesktop.Telepathy.Client.Observer]
+[im.telepathy1.Client.Observer]
DelayApprovers=true
</pre>
</tp:docstring>
diff --git a/spec/Connection.xml b/spec/Connection.xml
index 6a560fc30..b412ec383 100644
--- a/spec/Connection.xml
+++ b/spec/Connection.xml
@@ -21,31 +21,9 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection">
- <tp:requires interface="org.freedesktop.Telepathy.Connection.Interface.Requests"/>
- <tp:requires interface="org.freedesktop.Telepathy.Connection.Interface.Contacts"/>
-
- <tp:struct name="Channel_Info" array-name="Channel_Info_List">
- <tp:deprecated version="0.17.23"/>
- <tp:docstring>A struct representing a channel, as returned by
- ListChannels on the Connection interface.</tp:docstring>
- <tp:member type="o" name="Channel">
- <tp:docstring>The object path of the channel, which is on the
- same bus name as the connection</tp:docstring>
- </tp:member>
- <tp:member type="s" tp:type="DBus_Interface" name="Channel_Type">
- <tp:docstring>The channel's type</tp:docstring>
- </tp:member>
- <tp:member type="u" tp:type="Handle_Type" name="Handle_Type">
- <tp:docstring>The type of the handle that the channel communicates
- with, or Handle_Type_None if there is no associated
- handle</tp:docstring>
- </tp:member>
- <tp:member type="u" tp:type="Handle" name="Handle">
- <tp:docstring>The handle that the channel communicates with,
- or 0 if there is no associated handle</tp:docstring>
- </tp:member>
- </tp:struct>
+ <interface name="im.telepathy1.Connection">
+ <tp:requires interface="im.telepathy1.Connection.Interface.Requests"/>
+ <tp:requires interface="im.telepathy1.Connection.Interface.Contacts"/>
<method name="Connect" tp:name-for-bindings="Connect">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -83,7 +61,7 @@ USA.</p>
<tp:rationale>
<p>In some connection managers, certain capabilities of a connection
are known to be implemented for all connections (e.g. support
- for SimplePresence), and some interfaces (like SimplePresence) can
+ for Presence), and some interfaces (like Presence) can
even be used before connecting. Other capabilities may
or may not exist, depending on server functionality; by the time
the connection goes CONNECTED, the connection manager is expected
@@ -91,59 +69,27 @@ USA.</p>
interfaces for the remainder of the Connection's lifetime.</p>
</tp:rationale>
</tp:docstring>
- <tp:added version="0.19.2">Clients SHOULD fall back
- to calling <tp:member-ref>GetInterfaces</tp:member-ref> if this
- property is not supported.</tp:added>
+ <tp:added version="0.19.2"/>
</property>
- <method name="GetInterfaces" tp:name-for-bindings="Get_Interfaces">
- <arg direction="out" type="as" tp:type="DBus_Interface[]"
- name="Interfaces">
- <tp:docstring>
- The value of the <tp:member-ref>Interfaces</tp:member-ref> property
- </tp:docstring>
- </arg>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Returns the set of optional interfaces supported by this
- connection. See <tp:member-ref>Interfaces</tp:member-ref> for more
- details.</p>
- </tp:docstring>
-
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected">
- <tp:docstring>
- Before version 0.17.8 calling GetInterfaces while
- on a connection that is not yet CONNECTED wasn't allowed. If a
- CM returns this error, its list of interfaces should be regarded
- as empty until it becomes CONNECTED.
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
- <method name="GetProtocol" tp:name-for-bindings="Get_Protocol">
- <arg direction="out" type="s" tp:type="Protocol" name="Protocol">
- <tp:docstring>
- A string identifier for the protocol
- </tp:docstring>
- </arg>
-
+ <property name="Protocol" tp:name-for-bindings="Protocol"
+ access="read" type="s" tp:type="Protocol_Name">
<tp:docstring>
- Get the protocol this connection is using.
+ A string identifier for the protocol.
</tp:docstring>
- </method>
+ </property>
- <signal name="SelfHandleChanged"
- tp:name-for-bindings="Self_Handle_Changed">
+ <signal name="SelfContactChanged"
+ tp:name-for-bindings="Self_Contact_Changed">
<tp:docstring>
- Emitted whenever the <tp:member-ref>SelfHandle</tp:member-ref> property
+ Emitted whenever the <tp:member-ref>SelfHandle</tp:member-ref> and
+ <tp:member-ref>SelfID</tp:member-ref> property
changes. If the connection
is not yet in the CONNECTED state, this signal is not guaranteed
to be emitted.
</tp:docstring>
- <tp:added version="0.17.10">Clients MAY assume that if the
- SelfHandle property exists, this signal will be emitted when
+ <tp:added version="0.UNRELEASED">Clients MAY assume that if the
+ SelfHandle and SelfID property exists, this signal will be emitted when
necessary.</tp:added>
<arg type="u" tp:type="Contact_Handle" name="Self_Handle">
@@ -151,6 +97,11 @@ USA.</p>
The new value of the SelfHandle property.
</tp:docstring>
</arg>
+ <arg type="s" name="Self_ID">
+ <tp:docstring>
+ The new value of the SelfID property.
+ </tp:docstring>
+ </arg>
</signal>
<property name="SelfHandle" tp:name-for-bindings="Self_Handle"
@@ -159,36 +110,25 @@ USA.</p>
The handle which represents the user on this connection, which will
remain valid for the lifetime of this connection, or until a change
in the user's identifier is signalled by the
- <tp:member-ref>SelfHandleChanged</tp:member-ref> signal.
+ <tp:member-ref>SelfContactChanged</tp:member-ref> signal.
If the connection is not yet in the CONNECTED state, the value of
this property MAY be zero.
</tp:docstring>
- <tp:added version="0.17.10">For compatibility with older
- versions, clients should fall back to calling the
- <tp:member-ref>GetSelfHandle</tp:member-ref>
- method.</tp:added>
+ <tp:added version="0.17.10"/>
</property>
- <method name="GetSelfHandle" tp:name-for-bindings="Get_Self_Handle">
- <arg direction="out" type="u" tp:type="Contact_Handle"
- name="Self_Handle">
- <tp:docstring>
- The value of the <tp:member-ref>SelfHandle</tp:member-ref> property
- </tp:docstring>
- </arg>
-
+ <property name="SelfID" tp:name-for-bindings="Self_ID"
+ type="s" access="read">
<tp:docstring>
- Returns the value of the SelfHandle property. Change notification
- is via the SelfHandleChanged signal.
+ The identifier which represents the user on this connection, which will
+ remain valid for the lifetime of this connection, or until a change
+ in the user's identifier is signalled by the
+ <tp:member-ref>SelfContactChanged</tp:member-ref> signal.
+ If the connection is not yet in the CONNECTED state, the value of
+ this property MAY be empty string.
</tp:docstring>
- <tp:deprecated version="0.17.10">Use GetAll to get the
- SelfHandle property (and all other Connection properties)
- instead.</tp:deprecated>
-
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- </tp:possible-errors>
- </method>
+ <tp:added version="0.UNRELEASED"/>
+ </property>
<property name="Status" tp:name-for-bindings="Status"
access="read" type="u" tp:type="Connection_Status">
@@ -202,82 +142,9 @@ USA.</p>
SHOULD be removed from the bus entirely, meaning that retrieval of
this property SHOULD fail.</p>
</tp:docstring>
- <tp:added version="0.19.2">Clients SHOULD fall back
- to calling <tp:member-ref>GetStatus</tp:member-ref> if this
- property is not supported.</tp:added>
+ <tp:added version="0.19.2"/>
</property>
- <method name="GetStatus" tp:name-for-bindings="Get_Status">
- <arg direction="out" type="u" tp:type="Connection_Status"
- name="Status">
- <tp:docstring>
- The value of the <tp:member-ref>Status</tp:member-ref> property
- </tp:docstring>
- </arg>
-
- <tp:docstring>
- Get the current status as defined in the
- <tp:member-ref>StatusChanged</tp:member-ref> signal.
- </tp:docstring>
- </method>
-
- <method name="HoldHandles" tp:name-for-bindings="Hold_Handles">
- <tp:changed version="0.21.6">If
- <tp:member-ref>HasImmortalHandles</tp:member-ref> is true,
- this method no longer does anything.</tp:changed>
- <arg direction="in" name="Handle_Type" type="u" tp:type="Handle_Type">
- <tp:docstring>
- The type of handle to be held
- </tp:docstring>
- </arg>
-
- <arg direction="in" name="Handles" type="au" tp:type="Handle[]">
- <tp:docstring>
- A array of integer handles to hold
- </tp:docstring>
- </arg>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>If <tp:member-ref>HasImmortalHandles</tp:member-ref> is true,
- which SHOULD always be the case in this version of telepathy-spec,
- this method does nothing and returns successfully, unless
- the given handle type or any of the given handles is invalid.</p>
-
- <p>In older connection managers, this method
- notifies the connection manger that your client is holding a copy
- of handles which may not be in use in any existing channel or
- list, and were not obtained by using the
- <tp:member-ref>RequestHandles</tp:member-ref> method. For
- example, a handle observed in an emitted signal, or displayed
- somewhere in the UI that is not associated with a channel. The
- connection manager must not deallocate a handle where any clients
- have used this method to indicate it is in use until the
- <tp:member-ref>ReleaseHandles</tp:member-ref>
- method is called, or the clients disappear from the bus.</p>
-
- <p>Note that HoldHandles is idempotent - calling it multiple times
- is equivalent to calling it once. If a handle is "referenced" by
- several components which share a D-Bus unique name, the client
- should perform reference counting internally, and only call
- ReleaseHandles when none of the cooperating components need the
- handle any longer.</p>
- </tp:docstring>
-
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- The handle type is invalid
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
- <tp:docstring>
- One of the given handles is not valid
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
<method name="InspectHandles" tp:name-for-bindings="Inspect_Handles">
<arg direction="in" name="Handle_Type" type="u" tp:type="Handle_Type">
<tp:docstring>
@@ -303,13 +170,13 @@ USA.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The handle type is invalid
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
+ <tp:error name="im.telepathy1.Error.InvalidHandle">
<tp:docstring>
One of the given handles is not valid
</tp:docstring>
@@ -317,265 +184,6 @@ USA.</p>
</tp:possible-errors>
</method>
- <method name="ListChannels" tp:name-for-bindings="List_Channels">
- <tp:deprecated version="0.17.23">Use the
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">Requests.Channels</tp:dbus-ref>
- property instead.
- </tp:deprecated>
-
- <arg direction="out" type="a(osuu)" tp:type="Channel_Info[]"
- name="Channel_Info">
- <tp:docstring>
- An array of structs representing channels.
- </tp:docstring>
- </arg>
-
- <tp:docstring>
- List all the channels which currently exist on this connection.
- </tp:docstring>
-
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- </tp:possible-errors>
- </method>
-
- <signal name="NewChannel" tp:name-for-bindings="New_Channel">
- <tp:deprecated version="0.17.23">Connection managers MUST still
- emit this signal, but clients SHOULD listen for the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">Requests.NewChannels</tp:dbus-ref>
- signal instead.
- </tp:deprecated>
-
- <arg name="Object_Path" type="o">
- <tp:docstring>
- A D-Bus object path for the channel object on this service
- </tp:docstring>
- </arg>
-
- <arg name="Channel_Type" type="s" tp:type="DBus_Interface">
- <tp:docstring>
- A D-Bus interface name representing the channel type
- </tp:docstring>
- </arg>
-
- <arg name="Handle_Type" type="u" tp:type="Handle_Type">
- <tp:docstring>
- An integer representing the type of handle this channel
- communicates with, or Handle_Type_None if no handle is specified
- </tp:docstring>
- </arg>
-
- <arg name="Handle" type="u" tp:type="Handle">
- <tp:docstring>
- A handle indicating the specific contact, room or list this
- channel communicates with, or zero if no handle is specified
- </tp:docstring>
- </arg>
-
- <arg name="Suppress_Handler" type="b">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>If true, the channel was requested by a client that intends to
- present it to the user itself (i.e. it passed suppress_handler=TRUE
- to the <tp:member-ref>RequestChannel</tp:member-ref> method), so no
- other handler should be
- launched. Clients MAY assume that channels where this is true
- were created by a user request.</p>
-
- <p>If false, either the channel was created due to incoming
- information from the service, or the channel was requested by
- a local client that does not intend to handle the channel itself
- (this usage is deprecated).</p>
-
- <p>Clients MUST NOT assume that only incoming channels will have
- this flag set to false.</p>
- </tp:docstring>
- </arg>
-
- <tp:docstring>
- Emitted when a new Channel object is created, either through user
- request or incoming information from the service.
- </tp:docstring>
- </signal>
-
- <method name="ReleaseHandles" tp:name-for-bindings="Release_Handles">
- <tp:changed version="0.21.6">If
- <tp:member-ref>HasImmortalHandles</tp:member-ref> is true,
- this method no longer does anything.</tp:changed>
- <arg direction="in" name="Handle_Type" type="u" tp:type="Handle_Type">
- <tp:docstring>
- An integer handle type (as defined in RequestHandle)
- </tp:docstring>
- </arg>
-
- <arg direction="in" name="Handles" type="au" tp:type="Handle[]">
- <tp:docstring>
- An array of integer handles being held by the client
- </tp:docstring>
- </arg>
-
- <tp:docstring>
- <p>If <tp:member-ref>HasImmortalHandles</tp:member-ref> is true,
- which SHOULD always be the case in this version of telepathy-spec,
- this method does nothing and returns successfully, unless
- the given handle type or any of the given handles is invalid.</p>
-
- <p>In older connection managers, this method
- explicitly notifies the connection manager that your client is no
- longer holding any references to the given handles, and that they
- may be deallocated if they are not held by any other clients or
- referenced by any existing channels. See
- <tp:member-ref>HoldHandles</tp:member-ref> for notes.</p>
- </tp:docstring>
-
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- The handle type is invalid
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
- <tp:docstring>
- One of the given handles is not valid
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
- <method name="RequestChannel" tp:name-for-bindings="Request_Channel">
- <tp:deprecated version="0.17.23">Use
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">Requests.CreateChannel</tp:dbus-ref>
- or <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">Requests.EnsureChannel</tp:dbus-ref>
- instead. Connection managers MAY implement RequestChannel by
- raising NotImplemented, or implement fewer types of channel via
- this API.</tp:deprecated>
-
- <arg direction="in" name="Type" type="s" tp:type="DBus_Interface">
- <tp:docstring>
- A D-Bus interface name representing base channel type
- </tp:docstring>
- </arg>
-
- <arg direction="in" name="Handle_Type" type="u" tp:type="Handle_Type">
- <tp:docstring>
- An integer representing the handle type, or Handle_Type_None if
- no handle is specified
- </tp:docstring>
- </arg>
-
- <arg direction="in" name="Handle" type="u" tp:type="Handle">
- <tp:docstring>
- A nonzero integer handle representing a contact, room, list etc.
- according to handle_type, or zero if the handle_type is
- Handle_Type_None
- </tp:docstring>
- </arg>
-
- <arg direction="in" name="Suppress_Handler" type="b">
- <tp:docstring>
- <p>Clients SHOULD always set this to true.</p>
-
- <tp:rationale>
- <p>The historical meaning was that clients that did not
- intend to take responsibility for displaying the channel to
- the user could set this to FALSE, in which case the channel
- dispatcher would launch an appropriate channel handler.</p>
-
- <p>However, clients whose functionality relies on having a
- working channel dispatcher should obtain that functionality by
- calling methods on the channel dispatcher, so that they will
- get an appropriate error if the channel dispatcher is missing
- or not working.</p>
-
- <p>The channel dispatcher itself should set this to true too,
- so that it will ignore the
- <tp:member-ref>NewChannel</tp:member-ref> signal that results
- from the creation of the channel. It can then dispatch the
- channel returned from this method to an
- appropriate handler.</p>
-
- <p>So, there is no sensible use-case for setting this to false,
- and setting it to false can result in unhandled channels (in
- the case where clients assume that a channel dispatcher is
- present, but it isn't).</p>
- </tp:rationale>
- </tp:docstring>
- </arg>
-
- <arg direction="out" type="o" name="Object_Path">
- <tp:docstring>
- The D-Bus object path for the channel created or retrieved
- </tp:docstring>
- </arg>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Request a channel satisfying the specified type and communicating
- with the contact, room, list etc. indicated by the given
- handle_type and handle. The handle_type and handle may both be
- zero to request the creation of a new, empty channel, which may
- or may not be possible, depending on the protocol and channel
- type.</p>
-
- <p>On success, the returned channel will always be of the requested
- type (i.e. implement the requested channel-type interface).</p>
-
- <p>If a new, empty channel is requested, on success the returned
- channel will always be an "anonymous" channel for which the type
- and handle are both zero.</p>
-
- <p>If a channel to a contact, room etc. is requested, on success, the
- returned channel may either be a new or existing channel to
- the requested entity (i.e. its
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>
- and <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref>
- properties are the
- requested handle type and handle), or a newly created "anonymous"
- channel associated with the requested handle in some
- implementation-specific way.</p>
-
- <p>For example, for a contact handle, the returned channel
- might be "anonymous", but implement the groups interface and have
- the requested contact already present among the members.</p>
-
- <p>If the request cannot be satisfied, an error is raised and no
- channel is created.</p>
- </tp:docstring>
-
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
- <tp:docstring>
- Unknown channel type
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
- <tp:docstring>
- The given handle does not exist or cannot be created
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
- <tp:docstring>
- The requested channel type cannot be created with the given handle
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotCapable">
- <tp:docstring>
- The requested channel cannot be created because contact doesn't
- have the required capabilities.
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.Banned"/>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.Full"/>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.InviteOnly"/>
- </tp:possible-errors>
- </method>
-
<tp:enum name="Handle_Type" type="u">
<tp:enumvalue suffix="None" value="0">
<tp:docstring>
@@ -594,22 +202,6 @@ USA.</p>
A chat room
</tp:docstring>
</tp:enumvalue>
- <tp:enumvalue suffix="List" value="3">
- <tp:deprecated version="0.25.0">Replaced by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.Interface.ContactList</tp:dbus-ref>
- </tp:deprecated>
- <tp:docstring>
- A server-generated contact list (see Channel.Interface.Group)
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Group" value="4">
- <tp:deprecated version="0.25.0">Replaced by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.Interface.ContactList</tp:dbus-ref>
- </tp:deprecated>
- <tp:docstring>
- A user-defined contact list (see Channel.Interface.Group)
- </tp:docstring>
- </tp:enumvalue>
</tp:enum>
<tp:simple-type name="Handle" type="u" array-name="Handle_List">
@@ -629,28 +221,7 @@ USA.</p>
Handle_Type_Room</tp:docstring>
</tp:simple-type>
- <tp:simple-type name="List_Handle" type="u"
- array-name="List_Handle_List">
- <tp:deprecated version="0.25.0">Replaced by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.Interface.ContactList</tp:dbus-ref>
- </tp:deprecated>
- <tp:docstring>An unsigned 32-bit integer representing a handle of type
- Handle_Type_List</tp:docstring>
- </tp:simple-type>
-
- <tp:simple-type name="Group_Handle" type="u"
- array-name="Group_Handle_List">
- <tp:deprecated version="0.25.0">Replaced by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.Interface.ContactList</tp:dbus-ref>
- </tp:deprecated>
- <tp:docstring>An unsigned 32-bit integer representing a handle of type
- Handle_Type_Group</tp:docstring>
- </tp:simple-type>
-
<method name="RequestHandles" tp:name-for-bindings="Request_Handles">
- <tp:changed version="0.21.6">If
- <tp:member-ref>HasImmortalHandles</tp:member-ref> is true,
- this method no longer has its reference-counting effect.</tp:changed>
<arg direction="in" name="Handle_Type" type="u" tp:type="Handle_Type">
<tp:docstring>
The type of handle required
@@ -673,25 +244,11 @@ USA.</p>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Request several handles from the connection manager which represent a
number of contacts, rooms or server-stored lists on the service.</p>
-
- <p>If <tp:member-ref>HasImmortalHandles</tp:member-ref> is true,
- which SHOULD always be the case in this version of telepathy-spec,
- the handles remain valid until the connection disconnects.</p>
-
- <p>The implementation of this method in older connection managers
- must record that these handles are in use by the
- client who invokes this method, and must not deallocate the handles
- until the client disconnects from the bus or calls the
- <tp:member-ref>ReleaseHandles</tp:member-ref>
- method. Where the identifier refers to an entity that already has a
- handle in this connection manager, this handle should be returned
- instead. The handle number 0 must not be returned by the connection
- manager.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle">
<tp:docstring>
The given identifier does not identify a valid entity of the given
type.
@@ -703,7 +260,7 @@ USA.</p>
</tp:rationale>
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The given handle type is not valid, or is not implemented on this
connection.
@@ -733,13 +290,13 @@ USA.</p>
</tp:enumvalue>
<tp:enumvalue suffix="Disconnected" value="2">
<tp:docstring>
- If this is retrieved from <tp:member-ref>GetStatus</tp:member-ref> or
- <tp:member-ref>Status</tp:member-ref>, it indicates that connection
- has not yet been attempted. If seen in a
- <tp:member-ref>StatusChanged</tp:member-ref> signal, it indicates
- that the connection has failed; the Connection object SHOULD be
- removed from D-Bus immediately, and all subsequent method calls
- SHOULD fail.
+ If this is retrieved from
+ <tp:member-ref>Status</tp:member-ref>, it indicates that
+ connection has not yet been attempted. If seen in a
+ <tp:member-ref>StatusChanged</tp:member-ref> signal, it
+ indicates that the connection has failed; the Connection
+ object SHOULD be removed from D-Bus immediately, and all
+ subsequent method calls SHOULD fail.
</tp:docstring>
</tp:enumvalue>
</tp:enum>
@@ -757,7 +314,7 @@ USA.</p>
reasons SHOULD be treated like this reason.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.<tp:error-ref>Disconnected</tp:error-ref></code>.</p>
+ <code>im.telepathy1.Error.<tp:error-ref>Disconnected</tp:error-ref></code>.</p>
</tp:docstring>
</tp:enumvalue>
@@ -769,7 +326,7 @@ USA.</p>
if and only if the disconnection was requested by the user.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Cancelled</code>.</p>
+ <code>im.telepathy1.Error.Cancelled</code>.</p>
</tp:docstring>
</tp:enumvalue>
@@ -779,15 +336,15 @@ USA.</p>
<p>When the status changes from Connecting to Disconnected for this
reason, the equivalent D-Bus error is either
- <code>org.freedesktop.Telepathy.Error.NetworkError</code>,
- <code>org.freedesktop.Telepathy.Error.ConnectionRefused</code>,
- <code>org.freedesktop.Telepathy.Error.ConnectionFailed</code>
+ <code>im.telepathy1.Error.NetworkError</code>,
+ <code>im.telepathy1.Error.ConnectionRefused</code>,
+ <code>im.telepathy1.Error.ConnectionFailed</code>
or some more specific error.</p>
<p>When the status changes from Connected to Disconnected for this
reason, the equivalent D-Bus error is either
- <code>org.freedesktop.Telepathy.Error.NetworkError</code>,
- <code>org.freedesktop.Telepathy.Error.ConnectionLost</code>
+ <code>im.telepathy1.Error.NetworkError</code>,
+ <code>im.telepathy1.Error.ConnectionLost</code>
or some more specific error.</p>
</tp:docstring>
</tp:enumvalue>
@@ -797,7 +354,7 @@ USA.</p>
<p>The username or password was invalid.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.AuthenticationFailed</code>.
+ <code>im.telepathy1.Error.AuthenticationFailed</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -809,9 +366,9 @@ USA.</p>
connection was created.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.EncryptionNotAvailable</code>
+ <code>im.telepathy1.Error.EncryptionNotAvailable</code>
if encryption was not available at all, or
- <code>org.freedesktop.Telepathy.Error.EncryptionError</code>
+ <code>im.telepathy1.Error.EncryptionError</code>
if encryption failed.</p>
</tp:docstring>
</tp:enumvalue>
@@ -828,7 +385,7 @@ USA.</p>
and true, the requested account could not be created on the
server because it already exists.
The equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.RegistrationExists</code>.
+ <code>im.telepathy1.Error.RegistrationExists</code>.
</li>
<li>If the status change is from Connecting to Disconnected
@@ -836,7 +393,7 @@ USA.</p>
manager could not connect to the specified account because
a connection to that account already exists.
The equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.AlreadyConnected</code>.
+ <code>im.telepathy1.Error.AlreadyConnected</code>.
<tp:rationale>
In some protocols, like XMPP (when connecting with the same
@@ -850,7 +407,7 @@ USA.</p>
a new connection to the same account (perhaps from a different
client or location) was established.
The equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.ConnectionReplaced</code>.
+ <code>im.telepathy1.Error.ConnectionReplaced</code>.
<tp:rationale>
In some protocols, like MSNP (when connecting twice with the
@@ -867,7 +424,7 @@ USA.</p>
<p>The server did not provide a SSL certificate.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Cert.NotProvided</code>.
+ <code>im.telepathy1.Error.Cert.NotProvided</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -880,7 +437,7 @@ USA.</p>
that.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Cert.Untrusted</code>.
+ <code>im.telepathy1.Error.Cert.Untrusted</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -890,7 +447,7 @@ USA.</p>
<p>The server's SSL certificate has expired.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Cert.Expired</code>.
+ <code>im.telepathy1.Error.Cert.Expired</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -900,7 +457,7 @@ USA.</p>
<p>The server's SSL certificate is not yet valid.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Cert.NotActivated</code>.
+ <code>im.telepathy1.Error.Cert.NotActivated</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -910,7 +467,7 @@ USA.</p>
<p>The server's SSL certificate did not match its hostname.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Cert.HostnameMismatch</code>.
+ <code>im.telepathy1.Error.Cert.HostnameMismatch</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -921,7 +478,7 @@ USA.</p>
fingerprint.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Cert.FingerprintMismatch</code>.
+ <code>im.telepathy1.Error.Cert.FingerprintMismatch</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -931,7 +488,7 @@ USA.</p>
<p>The server's SSL certificate is self-signed.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Cert.SelfSigned</code>.
+ <code>im.telepathy1.Error.Cert.SelfSigned</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -942,7 +499,7 @@ USA.</p>
certificate.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Cert.Invalid</code>.
+ <code>im.telepathy1.Error.Cert.Invalid</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -952,7 +509,7 @@ USA.</p>
<p>The server's SSL certificate has been revoked.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Cert.Revoked</code>.
+ <code>im.telepathy1.Error.Cert.Revoked</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -963,7 +520,7 @@ USA.</p>
or is cryptographically weak.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Cert.Insecure</code>.
+ <code>im.telepathy1.Error.Cert.Insecure</code>.
</p>
</tp:docstring>
</tp:enumvalue>
@@ -975,7 +532,7 @@ USA.</p>
library.</p>
<p>When disconnected for this reason, the equivalent D-Bus error is
- <code>org.freedesktop.Telepathy.Error.Cert.LimitExceeded</code>
+ <code>im.telepathy1.Error.Cert.LimitExceeded</code>
</p>
</tp:docstring>
</tp:enumvalue>
@@ -1020,7 +577,7 @@ USA.</p>
<tp:type>Connection_Status_Reason</tp:type>, or may be a more
specific Telepathy error
(such as
- <code>org.freedesktop.Telepathy.Error.ConnectionRefused</code>
+ <code>im.telepathy1.Error.ConnectionRefused</code>
for Connection_Status_Reason_Network_Error)
or a protocol-specific or connection-manager-specific error in a
suitable namespace.
@@ -1086,7 +643,7 @@ USA.</p>
<p>The same string that would be returned by
<tp:member-ref>InspectHandles</tp:member-ref>. As a special case,
this is always present in the result of <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Contacts">GetContactAttributes</tp:dbus-ref>,
+ namespace="im.telepathy1.Connection.Interface.Contacts">GetContactAttributes</tp:dbus-ref>,
whether it was explicitly requested or not.</p>
</tp:docstring>
</tp:contact-attribute>
@@ -1131,8 +688,8 @@ USA.</p>
there is no active subscription.</p>
<p>One situation where this is useful is <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface"
- >Location</tp:dbus-ref>: on XMPP, location updates are received
+ namespace="im.telepathy1.Connection.Interface"
+ >Location1</tp:dbus-ref>: on XMPP, location updates are received
over PEP. If the Connection advertises the
<code>geoloc+notify</code> capability, it will be sent location
updates for all contacts. To avoid consuming resources for this,
@@ -1142,8 +699,8 @@ USA.</p>
<p>Another example of a protocol that benefits from this method is
the Google XMPP Mail Notification extension, which can be used
to implement <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface"
- >MailNotification</tp:dbus-ref>. In this protocol, the CM
+ namespace="im.telepathy1.Connection.Interface"
+ >MailNotification1</tp:dbus-ref>. In this protocol, the CM
receives a notification that something has changed, but to get
more information, the CM must request this information. Knowing
that nobody is currently interested in this information, the CM
@@ -1210,18 +767,6 @@ USA.</p>
</arg>
</method>
- <property name="HasImmortalHandles"
- tp:name-for-bindings="Has_Immortal_Handles"
- access="read" type="b">
- <tp:added version="0.21.6"/>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>True if handles last for the whole lifetime of the Connection.
- This SHOULD be the case in all connection managers, but clients
- MUST interoperate with older connection managers
- (which reference-count handles).</p>
- </tp:docstring>
- </property>
-
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This models a connection to a single user account on a communication
service. Its basic capability is to provide the facility to request and
@@ -1230,17 +775,17 @@ USA.</p>
<p>In order to allow Connection objects to be discovered by new clients,
the object path and well-known bus name MUST be of the form
- <code>/org/freedesktop/Telepathy/Connection/cmname/proto/account</code>
+ <code>/im/telepathy1/Connection/cmname/proto/account</code>
and
- <code>org.freedesktop.Telepathy.Connection.cmname.proto.account</code>
+ <code>im.telepathy1.Connection.cmname.proto.account</code>
where:</p>
<ul>
<li><em>cmname</em> is the same
<tp:type>Connection_Manager_Name</tp:type> that appears
in the connection manager's object path and well-known bus name</li>
- <li><em>proto</em> is the <tp:type>Protocol</tp:type> name as seen in
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.ConnectionManager">ListProtocols</tp:dbus-ref>,
+ <li><em>proto</em> is the <tp:type>Protocol_Name</tp:type> as seen in
+ <tp:dbus-ref namespace="imt1.ConnectionManager">Protocols</tp:dbus-ref>,
but with "-" replaced with "_" to get a valid
object path/bus name</li>
<li><em>account</em> is some non-empty sequence of ASCII letters,
@@ -1263,12 +808,12 @@ USA.</p>
<p>As well as the methods and signatures below, arbitrary interfaces may be
provided by the Connection object to represent extra connection-wide
- functionality, such as the Connection.Interface.SimplePresence for
+ functionality, such as the Connection.Interface.Presence for
receiving and
reporting presence information, and Connection.Interface.Aliasing for
connections where contacts may set and change an alias for themselves.
These interfaces can be discovered using the
- <tp:member-ref>GetInterfaces</tp:member-ref> method.</p>
+ <tp:member-ref>Interfaces</tp:member-ref> property.</p>
<p>Contacts, rooms, and server-stored lists (such as subscribed contacts,
block lists, or allow lists) on a service are all represented by
@@ -1280,19 +825,10 @@ USA.</p>
<p>Zero as a handle value is sometimes used as a "null" value to mean
the absence of a contact, room, etc.</p>
- <p>Handles have per-type uniqueness, meaning that
- every (handle type, handle number) tuple is guaranteed to be unique within
- a connection and that a handle alone (without its type) is meaningless or
- ambiguous. Connection manager implementations should reference count these
- handles to determine if they are in use either by any active clients or any
- open channels, and may deallocate them when this ceases to be true. Clients
- may request handles of a given type and identifier with the
- <tp:member-ref>RequestHandles</tp:member-ref> method, inspect the entity
- identifier with the <tp:member-ref>InspectHandles</tp:member-ref>
- method, keep handles from being released with
- <tp:member-ref>HoldHandles</tp:member-ref>, and notify that they are no
- longer storing handles with
- <tp:member-ref>ReleaseHandles</tp:member-ref>.</p>
+ <p>Handles have per-type uniqueness, meaning that every (handle
+ type, handle number) tuple is guaranteed to be unique within a
+ connection for the lifetime of the connection and that a handle
+ alone (without its type) is meaningless or ambiguous.</p>
</tp:docstring>
<tp:changed version="0.17.10">Previously, the account part of
@@ -1306,6 +842,10 @@ USA.</p>
are now mandatory. Their functionality will be merged into the main
Connection interface at some point in future.</tp:changed>
+ <tp:changed version="UNRELEASED">All deprecated types, methods,
+ and signals have been removed from this interface including
+ anything to do with handle reference counting.</tp:changed>
+
</interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Connection_Future.xml b/spec/Connection_Future.xml
index 6b5291efd..bf6b2f2d1 100644
--- a/spec/Connection_Future.xml
+++ b/spec/Connection_Future.xml
@@ -20,9 +20,9 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.FUTURE"
+ <interface name="im.telepathy1.Connection.FUTURE"
tp:causes-havoc='experimental'>
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <tp:requires interface="im.telepathy1.Connection"/>
<method name="EnsureSidecar" tp:name-for-bindings="Ensure_Sidecar">
<tp:added version="0.19.0">(as a draft)</tp:added>
@@ -75,12 +75,12 @@ USA.</p>
in a dictionary, build a proxy object from the value). More
“plural” plugins are likely to want to implement new types of
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel</tp:dbus-ref>
+ namespace="im.telepathy1">Channel</tp:dbus-ref>
instead.</p>
</tp:rationale>
</tp:docstring>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The requested sidecar is not implemented by this connection manager,
or a necessary server-side component does not exist. (FIXME: split
@@ -91,7 +91,7 @@ USA.</p>
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.ServiceBusy">
+ <tp:error name="im.telepathy1.Error.ServiceBusy">
<tp:docstring>
A server-side component needed by the requested sidecar reported it
is currently too busy, or did not respond for some
@@ -99,7 +99,7 @@ USA.</p>
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.Cancelled">
+ <tp:error name="im.telepathy1.Error.Cancelled">
<tp:docstring>
The connection was disconnected while the sidecar was being set up.
</tp:docstring>
diff --git a/spec/Connection_Interface_Addressing.xml b/spec/Connection_Interface_Addressing1.xml
index 129e6716d..8e359f66c 100644
--- a/spec/Connection_Interface_Addressing.xml
+++ b/spec/Connection_Interface_Addressing1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Addressing" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Connection_Interface_Addressing1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright (C) 2010-2012 Collabora Limited </tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
<p>This library is free software; you can redistribute it and/or modify it
@@ -16,9 +16,9 @@
along with this library; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Addressing1">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
- <tp:requires interface="org.freedesktop.Telepathy.Connection.Interface.Contacts"/>
+ <interface name="im.telepathy1.Connection.Interface.Addressing1">
+ <tp:requires interface="im.telepathy1.Connection"/>
+ <tp:requires interface="im.telepathy1.Connection.Interface.Contacts"/>
<tp:added version="0.25.2">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This interface deals with the multiple address types that can
@@ -38,7 +38,7 @@
<p>The vCard field of the addresses we are requesting. The
field name SHOULD be in lower case. Supported
fields can be found in
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Protocol.Interface.Addressing">AddressableVCardFields</tp:dbus-ref>.</p>
+ <tp:dbus-ref namespace="im.telepathy1.Protocol.Interface.Addressing1">AddressableVCardFields</tp:dbus-ref>.</p>
<p>The <code>url</code> vCard field MUST NOT appear here; see
<tp:member-ref>GetContactsByURI</tp:member-ref> instead.</p>
@@ -65,13 +65,13 @@
activity, will be in the reply.</p>
<p>Attributes from this interface and from
- <tp:dbus-ref>org.freedesktop.Telepathy.Connection</tp:dbus-ref>
+ <tp:dbus-ref>im.telepathy1.Connection</tp:dbus-ref>
are always returned, and need not be requested
explicitly.</p>
<p>The behavior of this parameter is similar to the same
parameter in
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">Contacts.GetContactAttributes</tp:dbus-ref>.</p>
+ <tp:dbus-ref namespace="im.telepathy1.Connection.Interface">Contacts.GetContactAttributes</tp:dbus-ref>.</p>
</tp:docstring>
</arg>
@@ -101,7 +101,7 @@
<p>Each contact's attributes will always include at least the
identifier that would be obtained by inspecting the handle
- (<code>org.freedesktop.Telepathy.Connection/contact-id</code>).
+ (<code>im.telepathy1.Connection/contact-id</code>).
</p>
</tp:docstring>
</arg>
@@ -109,17 +109,10 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Request contacts and retrieve their attributes using a given field
in their vCards.</p>
-
- <p>The connection manager should record that these handles are in
- use by the client who invokes this method, and must not
- deallocate the handles until the client disconnects from the
- bus or calls the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.ReleaseHandles</tp:dbus-ref>
- method.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
</tp:possible-errors>
</method>
@@ -129,7 +122,7 @@
<tp:docstring>
The URI addresses to get contact handles for. Supported
schemes can be found in
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Protocol.Interface.Addressing">AddressableURISchemes</tp:dbus-ref>.
+ <tp:dbus-ref namespace="im.telepathy1.Protocol.Interface.Addressing1">AddressableURISchemes</tp:dbus-ref>.
</tp:docstring>
</arg>
<arg direction="in" name="Interfaces" type="as"
@@ -141,13 +134,13 @@
activity, will be in the reply.</p>
<p>Attributes from this interface and from
- <tp:dbus-ref>org.freedesktop.Telepathy.Connection</tp:dbus-ref>
+ <tp:dbus-ref>im.telepathy1.Connection</tp:dbus-ref>
are always returned, and need not be requested
explicitly.</p>
<p>The behavior of this parameter is similar to the same
parameter in
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">Contacts.GetContactAttributes</tp:dbus-ref>.</p>
+ <tp:dbus-ref namespace="im.telepathy1.Connection.Interface">Contacts.GetContactAttributes</tp:dbus-ref>.</p>
</tp:docstring>
</arg>
@@ -176,24 +169,17 @@
<p>Each contact's attributes will always include at least the
identifier that would be obtained by inspecting the handle
- (<code>org.freedesktop.Telepathy.Connection/contact-id</code>).
+ (<code>im.telepathy1.Connection/contact-id</code>).
</p>
</tp:docstring>
</arg>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Request contacts and retrieve their attributes using URI addresses.</p>
-
- <p>The connection manager should record that these handles are in
- use by the client who invokes this method, and must not
- deallocate the handles until the client disconnects from the
- bus or calls the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.ReleaseHandles</tp:dbus-ref>
- method.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
</tp:possible-errors>
</method>
diff --git a/spec/Connection_Interface_Aliasing.xml b/spec/Connection_Interface_Aliasing1.xml
index 967577135..676f04e14 100644
--- a/spec/Connection_Interface_Aliasing.xml
+++ b/spec/Connection_Interface_Aliasing1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Aliasing" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Connection_Interface_Aliasing1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
<tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
@@ -18,8 +18,8 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Aliasing">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <interface name="im.telepathy1.Connection.Interface.Aliasing1">
+ <tp:requires interface="im.telepathy1.Connection"/>
<tp:mapping name="Alias_Map" array-name="">
<tp:docstring>A dictionary whose keys are contact handles and whose
@@ -82,7 +82,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
connection.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
</tp:possible-errors>
</method>
<method name="RequestAliases" tp:name-for-bindings="Request_Aliases">
@@ -100,10 +100,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
Request the value of several contacts' aliases at once.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
</tp:possible-errors>
</method>
<method name="GetAliases" tp:name-for-bindings="Get_Aliases">
@@ -126,8 +126,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:member-ref>AliasesChanged</tp:member-ref>.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
</tp:possible-errors>
</method>
<method name="SetAliases" tp:name-for-bindings="Set_Aliases">
@@ -142,15 +142,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
indicated by emitting an <tp:member-ref>AliasesChanged</tp:member-ref>
signal. On connections where the CONNECTION_ALIAS_FLAG_USER_SET flag is
not set, this method will only ever succeed if the contact is the
- user's own handle (as returned by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.GetSelfHandle</tp:dbus-ref>).
+ user's own handle (as returned by the <tp:dbus-ref
+ namespace="im.telepathy1">Connection.SelfHandle</tp:dbus-ref>
+ property).
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
</tp:possible-errors>
</method>
diff --git a/spec/Connection_Interface_Anonymity.xml b/spec/Connection_Interface_Anonymity1.xml
index 704263cb9..8e626d06e 100644
--- a/spec/Connection_Interface_Anonymity.xml
+++ b/spec/Connection_Interface_Anonymity1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Anonymity"
+<node name="/Connection_Interface_Anonymity1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2008-2010 Nokia Corporation</tp:copyright>
@@ -21,7 +21,7 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Anonymity">
+ <interface name="im.telepathy1.Connection.Interface.Anonymity1">
<tp:added version="0.19.7">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -118,7 +118,7 @@
by the CM and any intermediaries between the local and remote contacts.
If this is set to true but anonymity settings cannot be followed, then
the session MUST be denied with a
- <code>org.freedesktop.Telepathy.Error.<tp:error-ref>WouldBreakAnonymity</tp:error-ref></code>
+ <code>im.telepathy1.Error.<tp:error-ref>WouldBreakAnonymity</tp:error-ref></code>
error.
Any client that sets <tp:member-ref>AnonymityModes</tp:member-ref>
SHOULD also set this property first (rather than accepting the CM's
@@ -137,7 +137,7 @@
<tp:member-ref>AnonymityModesChanged</tp:member-ref> signal.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
An unsupported mode was supplied. Supported modes are specified
in the SupportedAnonymityModes property, and this should be
diff --git a/spec/Connection_Interface_Avatars.xml b/spec/Connection_Interface_Avatars1.xml
index 3b9290e1d..e20409849 100644
--- a/spec/Connection_Interface_Avatars.xml
+++ b/spec/Connection_Interface_Avatars1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Avatars" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Connection_Interface_Avatars1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright (C) 2005-2008 Collabora Limited</tp:copyright>
<tp:copyright>Copyright (C) 2005-2008 Nokia Corporation</tp:copyright>
<tp:copyright>Copyright (C) 2006 INdT</tp:copyright>
@@ -18,8 +18,11 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Avatars">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <interface name="im.telepathy1.Connection.Interface.Avatars1">
+ <tp:requires interface="im.telepathy1.Connection"/>
+ <tp:changed version="UNRELEASED">The deprecated method,
+ GetAvatarRequirements, has been removed in favour of using the
+ D-Bus properties instead.</tp:changed>
<tp:simple-type name="Avatar_Token" type="s"
array-name="Avatar_Token_List">
@@ -45,7 +48,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:rationale>
<p>This means that clients MAY use the triple
(<tp:type>Connection_Manager_Name</tp:type>,
- <tp:type>Protocol</tp:type>, avatar token) as a key for
+ <tp:type>Protocol_Name</tp:type>, avatar token) as a key for
their avatar cache. For instance, an avatar for a
telepathy-gabble Jabber contact might be stored in a file
.../gabble/jabber/4e199b4a1c40b497a95fcd1cd896351733849949.png.</p>
@@ -128,9 +131,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<property name="SupportedAvatarMIMETypes"
tp:name-for-bindings="Supported_Avatar_MIME_Types"
type="as" access="read">
- <tp:added version="0.17.22">Fall back to calling
- <tp:member-ref>GetAvatarRequirements</tp:member-ref> if getting this
- property fails.</tp:added>
+ <tp:added version="0.17.22"/>
<tp:docstring>
An array of supported MIME types (e.g. "image/jpeg").
Clients MAY assume that the first type in this array is preferred.
@@ -142,9 +143,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<property name="MinimumAvatarHeight"
tp:name-for-bindings="Minimum_Avatar_Height"
type="u" access="read">
- <tp:added version="0.17.22">Fall back to calling
- <tp:member-ref>GetAvatarRequirements</tp:member-ref> if getting this
- property fails.</tp:added>
+ <tp:added version="0.17.22"/>
<tp:docstring>
The minimum height in pixels of an avatar on this protocol, which MAY
be 0.
@@ -156,9 +155,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<property name="MinimumAvatarWidth"
tp:name-for-bindings="Minimum_Avatar_Width"
type="u" access="read">
- <tp:added version="0.17.22">Fall back to calling
- <tp:member-ref>GetAvatarRequirements</tp:member-ref> if getting this
- property fails.</tp:added>
+ <tp:added version="0.17.22"/>
<tp:docstring>
The minimum width in pixels of an avatar on this protocol, which MAY
be 0.
@@ -206,9 +203,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<property name="MaximumAvatarHeight"
tp:name-for-bindings="Maximum_Avatar_Height"
type="u" access="read">
- <tp:added version="0.17.22">Fall back to calling
- <tp:member-ref>GetAvatarRequirements</tp:member-ref> if getting this
- property fails.</tp:added>
+ <tp:added version="0.17.22"/>
<tp:docstring>
The maximum height in pixels of an avatar on this protocol, or 0 if
there is no limit.
@@ -220,9 +215,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<property name="MaximumAvatarWidth"
tp:name-for-bindings="Maximum_Avatar_Width"
type="u" access="read">
- <tp:added version="0.17.22">Fall back to calling
- <tp:member-ref>GetAvatarRequirements</tp:member-ref> if getting this
- property fails.</tp:added>
+ <tp:added version="0.17.22"/>
<tp:docstring>
The maximum width in pixels of an avatar on this protocol, or 0 if
there is no limit.
@@ -234,9 +227,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<property name="MaximumAvatarBytes"
tp:name-for-bindings="Maximum_Avatar_Bytes"
type="u" access="read">
- <tp:added version="0.17.22">Fall back to calling
- <tp:member-ref>GetAvatarRequirements</tp:member-ref> if getting this
- property fails.</tp:added>
+ <tp:added version="0.17.22"/>
<tp:docstring>
The maximum size in bytes of an avatar on this protocol, or 0 if
there is no limit.
@@ -245,81 +236,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:docstring>
</property>
- <method name="GetAvatarRequirements"
- tp:name-for-bindings="Get_Avatar_Requirements">
- <tp:deprecated version="0.17.22">Use GetAll to retrieve the
- D-Bus properties on this interface, falling back to this method
- on failure.</tp:deprecated>
- <arg direction="out" type="as" name="MIME_Types">
- <tp:docstring>
- An array of supported MIME types (eg image/jpeg)
- </tp:docstring>
- </arg>
- <arg direction="out" type="q" name="Min_Width">
- <tp:docstring>
- The minimum image width in pixels
- </tp:docstring>
- </arg>
- <arg direction="out" type="q" name="Min_Height">
- <tp:docstring>
- The minimum image height in pixels
- </tp:docstring>
- </arg>
- <arg direction="out" type="q" name="Max_Width">
- <tp:docstring>
- The maximum image width in pixels, or 0 if there is no limit
- </tp:docstring>
- </arg>
- <arg direction="out" type="q" name="Max_Height">
- <tp:docstring>
- The maximum image height in pixels, or 0 if there is no limit
- </tp:docstring>
- </arg>
- <arg direction="out" type="u" name="Max_Bytes">
- <tp:docstring>
- The maximum image size in bytes, or 0 if there is no limit
- </tp:docstring>
- </arg>
- <tp:docstring>
- Get the required format of avatars on this connection.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- </tp:possible-errors>
- </method>
-
- <method name="GetAvatarTokens" tp:name-for-bindings="Get_Avatar_Tokens">
- <arg direction="in" name="Contacts" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- An array of handles representing contacts
- </tp:docstring>
- </arg>
- <arg direction="out" type="as" name="Tokens" tp:type="Avatar_Token[]">
- <tp:docstring>
- An array of avatar tokens or empty strings (if no avatar is set) in the
- same order as the given array of contact handles
- </tp:docstring>
- </arg>
- <tp:deprecated version="0.15.5">Use GetKnownAvatarTokens
- instead.</tp:deprecated>
- <tp:docstring>
- Get the unique tokens for all of the given contacts' avatars.
-
- Using this method in new Telepathy clients is deprecated; use
- <tp:member-ref>GetKnownAvatarTokens</tp:member-ref> instead.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- </tp:possible-errors>
- </method>
-
<method name="GetKnownAvatarTokens"
tp:name-for-bindings="Get_Known_Avatar_Tokens">
<arg direction="in" name="Contacts" type="au" tp:type="Contact_Handle[]">
@@ -345,47 +261,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
map until an avatar is explicitly set or cleared.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- </tp:possible-errors>
- </method>
-
- <method name="RequestAvatar" tp:name-for-bindings="Request_Avatar">
- <arg direction="in" name="Contact" type="u" tp:type="Contact_Handle">
- <tp:docstring>
- An integer handle for the contact to request the avatar for
- </tp:docstring>
- </arg>
- <arg direction="out" type="ay" name="Data">
- <tp:docstring>
- An array of bytes containing the image data
- </tp:docstring>
- </arg>
- <arg direction="out" type="s" name="MIME_Type">
- <tp:docstring>
- A string containing the image MIME type (eg image/jpeg), or empty if
- unknown
- </tp:docstring>
- </arg>
- <tp:deprecated version="0.15.5">Use RequestAvatars
- instead.</tp:deprecated>
- <tp:docstring>
- Request the avatar for a given contact. Using this method in new
- Telepathy clients is deprecated; use RequestAvatars instead.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
- <tp:docstring>
- The contact does not currently have an avatar.
- </tp:docstring>
- </tp:error>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
</tp:possible-errors>
</method>
@@ -404,8 +284,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
avatar) the AvatarRetrieved signal is not emitted for that contact.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
</tp:possible-errors>
</method>
@@ -427,15 +307,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</arg>
<tp:docstring>
Set a new avatar image for this connection. The avatar image must
- respect the requirements obtained by
- <tp:member-ref>GetAvatarRequirements</tp:member-ref>.
+ respect the requirements obtained by the properties on this
+ interface.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
</tp:possible-errors>
</method>
@@ -445,8 +325,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
Remove the avatar image for this connection.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
</tp:possible-errors>
</method>
@@ -473,7 +353,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>Avatars are identified by a string, the <tp:type>Avatar_Token</tp:type>,
which represents a particular avatar. Tokens MUST be chosen by the
connection manager in such a way that the triple
- (<tp:type>Connection_Manager_Name</tp:type>, <tp:type>Protocol</tp:type>,
+ (<tp:type>Connection_Manager_Name</tp:type>,
+ <tp:type>Protocol_Name</tp:type>,
<tp:type>Avatar_Token</tp:type>) uniquely identifies an avatar.
An empty token means that an avatar has not been set for this contact, and
a changed token implies the contact's avatar has changed, but the strings
@@ -492,9 +373,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>To publish an avatar, a client should use
<tp:member-ref>SetAvatar</tp:member-ref> to provide an image which meets
- the requirements returned by the
- <tp:member-ref>GetAvatarRequirements</tp:member-ref>
- function. On some protocols the avatar is stored on the server, so setting
+ the requirements returned by the the properties on the interface.
+ On some protocols the avatar is stored on the server, so setting
the avatar is persistent, but on others it is transferred via a peer to
peer mechanism, so needs to be set every connection. Hence, on every
connection, clients should inspect the avatar token of the connection's
diff --git a/spec/Connection_Interface_Balance.xml b/spec/Connection_Interface_Balance1.xml
index 974c651fd..a01b82414 100644
--- a/spec/Connection_Interface_Balance.xml
+++ b/spec/Connection_Interface_Balance1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Balance"
+<node name="/Connection_Interface_Balance1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright © 2009 Nokia Corporation</tp:copyright>
@@ -19,8 +19,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Balance">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <interface name="im.telepathy1.Connection.Interface.Balance1">
+ <tp:requires interface="im.telepathy1.Connection"/>
<tp:added version="0.19.0">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -82,7 +82,7 @@
access="read" type="(ius)" tp:type="Currency_Amount">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The user's balance on the account corresponding to this <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>.
+ namespace="im.telepathy1">Connection</tp:dbus-ref>.
A negative amount may be possible on some services, and indicates
that the user owes money to the service provider.</p>
diff --git a/spec/Connection_Interface_Capabilities.xml b/spec/Connection_Interface_Capabilities.xml
deleted file mode 100644
index 8e5eb3357..000000000
--- a/spec/Connection_Interface_Capabilities.xml
+++ /dev/null
@@ -1,254 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Connection_Interface_Capabilities" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
- <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
- <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
- <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
- </tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Capabilities">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
- <tp:requires interface="org.freedesktop.Telepathy.Connection.Interface.ContactCapabilities"/>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>An interface for connections where it is possible to know what channel
- types may be requested before the request is made to the connection
- object. Each capability represents a commitment by the connection
- manager that it will ordinarily be able to create a channel when given
- a request with the given type and handle.</p>
-
- <p>Capabilities pertain to particular contact handles, and represent
- activities such as having a text chat or a voice call with the user.
- The activities are represented by the D-Bus interface name of the
- channel type for that activity.</p>
-
- <p>The generic capability flags are defined by
- <tp:type>Connection_Capability_Flags</tp:type>.</p>
-
- <p>In addition, channel types may have type specific capability flags of
- their own, which are described in the documentation for each channel
- type.</p>
-
- <p>This interface also provides for user interfaces notifying the
- connection manager of what capabilities to advertise for the user. This
- is done by using the
- <tp:member-ref>AdvertiseCapabilities</tp:member-ref> method, and deals
- with the
- interface names of channel types and the type specific flags pertaining
- to them which are implemented by available client processes.</p>
- </tp:docstring>
-
- <tp:changed version="0.17.8">Previously, this interface
- also expressed capabilities of the connection itself, indicating what
- sorts of channels could be requested (for instance, the ability to
- open chatroom lists or chatrooms). However, this was never very
- well-defined or consistent, and as far as we know it was never
- implemented correctly. This usage is now deprecated.</tp:changed>
-
- <tp:deprecated version="0.19.8">Client implementations SHOULD use <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">ContactCapabilities</tp:dbus-ref>
- instead.</tp:deprecated>
- <tp:changed version="0.19.8">Connection managers implementing
- Capabilities MUST implement ContactCapabilities too.</tp:changed>
-
- <tp:flags name="Connection_Capability_Flags"
- value-prefix="Connection_Capability_Flag" type="u">
- <tp:flag suffix="Create" value="1">
- <tp:docstring>
- The given channel type and handle can be given to <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">RequestChannel</tp:dbus-ref>
- to create a new channel of this type.
- </tp:docstring>
- </tp:flag>
- <tp:flag suffix="Invite" value="2">
- <tp:docstring>
- The given contact can be invited to an existing channel of this type.
- </tp:docstring>
- </tp:flag>
- </tp:flags>
-
- <tp:struct name="Capability_Pair" array-name="Capability_Pair_List">
- <tp:docstring>A pair (channel type, type-specific flags) as passed to
- <tp:member-ref>AdvertiseCapabilities</tp:member-ref> on the
- Capabilities interface.</tp:docstring>
- <tp:member type="s" tp:type="DBus_Interface" name="Channel_Type"/>
- <tp:member type="u" name="Type_Specific_Flags"/>
- </tp:struct>
-
- <tp:struct name="Contact_Capability" array-name="Contact_Capability_List">
- <tp:docstring>A struct (contact handle, channel type, generic flags,
- type-specific flags) representing a capability posessed by a contact,
- as returned by <tp:member-ref>GetCapabilities</tp:member-ref> on the
- Capabilities interface.</tp:docstring>
- <tp:member type="u" tp:type="Contact_Handle" name="Handle"/>
- <tp:member type="s" tp:type="DBus_Interface" name="Channel_Type"/>
- <tp:member type="u" tp:type="Connection_Capability_Flags"
- name="Generic_Flags"/>
- <tp:member type="u" name="Type_Specific_Flags"/>
- </tp:struct>
-
- <tp:struct name="Capability_Change" array-name="Capability_Change_List">
- <tp:docstring>A struct (contact handle, channel type, old generic flags,
- new generic flags, old type-specific flags, new type-specific flags)
- representing a change to one of a contact's capabilities, as seen in the
- <tp:member-ref>CapabilitiesChanged</tp:member-ref> signal on the
- Capabilities interface.</tp:docstring>
- <tp:member type="u" tp:type="Contact_Handle" name="Handle"/>
- <tp:member type="s" tp:type="DBus_Interface" name="Channel_Type"/>
- <tp:member type="u" tp:type="Connection_Capability_Flags"
- name="Old_Generic_Flags"/>
- <tp:member type="u" tp:type="Connection_Capability_Flags"
- name="New_Generic_Flags"/>
- <tp:member type="u" name="Old_Type_Specific_Flags"/>
- <tp:member type="u" name="New_Type_Specific_Flags"/>
- </tp:struct>
-
- <method name="AdvertiseCapabilities"
- tp:name-for-bindings="Advertise_Capabilities">
- <arg direction="in" name="Add" type="a(su)" tp:type="Capability_Pair[]">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- An array of structures containing:
- <ul>
- <li>a string channel type</li>
- <li>a bitwise OR of type specific capability flags</li>
- </ul>
- </tp:docstring>
- </arg>
- <arg direction="in" name="Remove" type="as" tp:type="DBus_Interface[]">
- <tp:docstring>
- An array of D-Bus interface names of channel types to remove
- </tp:docstring>
- </arg>
- <arg direction="out" type="a(su)" tp:type="Capability_Pair[]"
- name="Self_Capabilities">
- <tp:docstring>
- An array of structures describing the current capabilities containing:
- <ul>
- <li>a string channel type</li>
- <li>a bitwise OR of type specific capability flags</li>
- </ul>
- </tp:docstring>
- </arg>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Used by user interfaces to indicate which channel types they are able
- to handle on this connection. Because these may be provided by
- different client processes, this method accepts channel types to add
- and remove from the set already advertised on this connection. The type
- of advertised capabilities (create versus invite) is protocol-dependent
- and hence cannot be set by the this method. In the case of a client
- adding an already advertised channel type but with new channel type
- specific flags, the connection manager should simply add the new flags
- to the set of advertised capabilities.</p>
-
- <p>Upon a successful invocation of this method, the
- <tp:member-ref>CapabilitiesChanged</tp:member-ref>
- signal will be emitted for the user's own handle ( <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.GetSelfHandle</tp:dbus-ref>)
- by the connection manager to indicate the changes
- that have been made. This signal should also be monitored to ensure
- that the set is kept accurate - for example, a client may remove
- capabilities or type specific capability flags when it exits
- which are still provided by another client.</p>
-
- <p>On connections managed by the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelDispatcher</tp:dbus-ref>,
- this method SHOULD NOT be used by clients other than the
- ChannelDispatcher itself.</p>
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- </tp:possible-errors>
- </method>
-
- <signal name="CapabilitiesChanged"
- tp:name-for-bindings="Capabilities_Changed">
- <arg name="Caps" type="a(usuuuu)" tp:type="Capability_Change[]">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- An array of structures containing:
- <ul>
- <li>an integer handle representing the contact</li>
- <li>a string channel type</li>
- <li>a bitwise OR of the contact's old generic capability flags</li>
- <li>a bitwise OR of the contact's new generic capability flags</li>
- <li>a bitwise OR of the contact's old type specific capability flags</li>
- <li>a bitwise OR of the contact's new type specific capability flags</li>
- </ul>
- </tp:docstring>
- </arg>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Announce that there has been a change of capabilities on the
- given handle.</p>
-
- <p>If the handle is zero, the capabilities refer to the connection
- itself, in some poorly defined way. This usage is deprecated and
- clients should ignore it.</p>
- </tp:docstring>
- </signal>
-
- <method name="GetCapabilities" tp:name-for-bindings="Get_Capabilities">
- <arg direction="in" name="Handles" type="au" tp:type="Contact_Handle[]">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>An array of contact handles for this connection.</p>
-
- <p>This may include zero, which originally meant a query for
- capabilities available on the connection itself. This usage
- is deprecated; clients SHOULD NOT do this, and connection managers
- SHOULD proceed as though zero had not been present in this
- list.</p>
- </tp:docstring>
- </arg>
- <arg direction="out" type="a(usuu)" tp:type="Contact_Capability[]"
- name="Contact_Capabilities">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- An array of structures containing:
- <ul>
- <li>an integer handle representing the contact</li>
- <li>a string channel type</li>
- <li>a bitwise OR of generic capability flags for the type</li>
- <li>a bitwise OR of type specific capability flags for the type</li>
- </ul>
- </tp:docstring>
- </arg>
- <tp:docstring>
- Returns an array of capabilities for the given contact handles.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
- <tp:docstring>
- The handle does not represent a contact and is not zero
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- </tp:possible-errors>
- </method>
-
- <tp:contact-attribute name="caps"
- type="a(usuu)" tp:type="Contact_Capability[]">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The same structs that would be returned by
- <tp:member-ref>GetCapabilities</tp:member-ref>
- (all of them will redundantly have the contact's handle as the
- first member). Omitted from the result if the contact's capabilities
- are not known; present in the result as an empty array if the
- contact is known to have no capabilities at all.</p>
- </tp:docstring>
- </tp:contact-attribute>
-
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Connection_Interface_Cellular.xml b/spec/Connection_Interface_Cellular1.xml
index e9b10e3c5..d5f66974a 100644
--- a/spec/Connection_Interface_Cellular.xml
+++ b/spec/Connection_Interface_Cellular1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Cellular"
+<node name="/Connection_Interface_Cellular1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2008-2010 Nokia Corporation</tp:copyright>
@@ -21,7 +21,7 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Cellular">
+ <interface name="im.telepathy1.Connection.Interface.Cellular1">
<tp:added version="0.19.8">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
diff --git a/spec/Connection_Interface_Client_Types.xml b/spec/Connection_Interface_Client_Types1.xml
index 97908561a..753da3c8f 100644
--- a/spec/Connection_Interface_Client_Types.xml
+++ b/spec/Connection_Interface_Client_Types1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Client_Types"
+<node name="/Connection_Interface_Client_Types1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright (C) 2010 Collabora Ltd.</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -17,9 +17,9 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.ClientTypes">
+ <interface name="im.telepathy1.Connection.Interface.ClientTypes1">
<tp:added version="0.21.1">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <tp:requires interface="im.telepathy1.Connection"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface on connections to support protocols which allows users to
@@ -61,7 +61,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
client types of the most available resource will be returned. In
other words, the returned client types are those for the resource whose
presence will be retreived using the
- <tp:dbus-ref namespace="ofdT.Connection.Interface">SimplePresence</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Connection.Interface">Presence1</tp:dbus-ref>
interface.</p>
<p>For example, if a contact has two resources:</p>
@@ -133,8 +133,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
</tp:possible-errors>
</method>
@@ -167,10 +167,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied">
<tp:docstring>
The requested contact does not allow the local user to see their
client type information.
diff --git a/spec/Connection_Interface_Communication_Policy.xml b/spec/Connection_Interface_Communication_Policy1.xml
index 31343de68..33e9c56f9 100644
--- a/spec/Connection_Interface_Communication_Policy.xml
+++ b/spec/Connection_Interface_Communication_Policy1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Communication_Policy"
+<node name="/Connection_Interface_Communication_Policy1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2010 Collabora Limited</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -19,10 +19,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:license>
<interface
- name="org.freedesktop.Telepathy.Connection.Interface.CommunicationPolicy.DRAFT"
+ name="im.telepathy1.Connection.Interface.CommunicationPolicy1"
tp:causes-havoc="experimental">
<tp:added version="0.21.1">(draft 1)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Connection.Interface.SimplePresence"/>
+ <tp:requires interface="im.telepathy1.Connection.Interface.Presence1"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>
@@ -79,8 +79,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<pre>
{
- 'org.freedesktop.Telepathy.Channel.Type.Text' : Access_Control_Type_Open,
- 'org.freedesktop.Telepathy.Channel.Type.Call' : Access_Control_Type_Publish_List
+ 'im.telepathy1.Channel.Type.Text' : Access_Control_Type_Open,
+ 'im.telepathy1.Channel.Type.Call' : Access_Control_Type_Publish_List
}
</pre>
diff --git a/spec/Connection_Interface_Contact_Blocking.xml b/spec/Connection_Interface_Contact_Blocking1.xml
index 756fd4db8..594aff31c 100644
--- a/spec/Connection_Interface_Contact_Blocking.xml
+++ b/spec/Connection_Interface_Contact_Blocking1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Contact_Blocking" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Connection_Interface_Contact_Blocking1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009–2011 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright © 2009 Nokia Corporation</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -18,9 +18,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.ContactBlocking">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
- <tp:requires interface="org.freedesktop.Telepathy.Connection.Interface.ContactList"/>
+ <interface name="im.telepathy1.Connection.Interface.ContactBlocking1">
+ <tp:requires interface="im.telepathy1.Connection"/>
<tp:added version='0.21.13'>Changes from the draft:
methods and signals now return <tp:type>Handle_Identifier_Map</tp:type>
(<code>a{us}</code>) rather than bare lists of contact handles
@@ -46,22 +45,6 @@
to implement this interface using an on-disk file of blocked
contacts or some other means to store blocked contacts between
connections.</p>
-
- <p>This interface is intended to replace the
- <tp:dbus-ref namespace="ofdT.Channel.Type">ContactList</tp:dbus-ref>
- channel with <tp:dbus-ref
- namespace='ofdT.Channel'>TargetHandleType</tp:dbus-ref>
- <code>List</code> and <tp:dbus-ref
- namespace='ofdT.Channel'>TargetID</tp:dbus-ref> <code>"deny"</code>
- (along with the <tp:dbus-ref
- namespace='ofdT.Connection.Interface'>ContactList</tp:dbus-ref> and
- <tp:dbus-ref
- namespace='ofdT.Connection.Interface'>ContactGroups</tp:dbus-ref>
- interfaces replacing other channels with <tp:dbus-ref
- namespace='ofdT.Channel'>TargetHandleType</tp:dbus-ref>
- <code>List</code> and <tp:dbus-ref
- namespace='ofdT.Channel'>TargetHandleType</tp:dbus-ref>
- <code>Group</code>, respectively).</p>
</tp:docstring>
<method name="BlockContacts" tp:name-for-bindings="Block_Contacts">
@@ -186,7 +169,7 @@
<p>Note that there is no capability for supporting blocking itself:
the presence of this interface on a <tp:dbus-ref
- namespace='ofdT'>Connection</tp:dbus-ref> indicates that blocking
+ namespace='imt1'>Connection</tp:dbus-ref> indicates that blocking
contacts is supported.</p>
</tp:docstring>
</property>
diff --git a/spec/Connection_Interface_Contact_Capabilities.xml b/spec/Connection_Interface_Contact_Capabilities1.xml
index fb13c37d7..4a04f3060 100644
--- a/spec/Connection_Interface_Contact_Capabilities.xml
+++ b/spec/Connection_Interface_Contact_Capabilities1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Contact_Capabilities" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Connection_Interface_Contact_Capabilities1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright (C) 2005, 2006, 2008 Collabora Limited </tp:copyright>
<tp:copyright> Copyright (C) 2005, 2006, 2008 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
@@ -18,8 +18,8 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.ContactCapabilities">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <interface name="im.telepathy1.Connection.Interface.ContactCapabilities1">
+ <tp:requires interface="im.telepathy1.Connection"/>
<tp:added version="0.17.28">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -58,7 +58,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:member name="Well_Known_Name" type="s" tp:type="DBus_Well_Known_Name">
<tp:docstring>
For implementations of the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Client</tp:dbus-ref>
+ namespace="im.telepathy1">Client</tp:dbus-ref>
interface, the well-known bus name name of the client; for any other
process, any other reversed domain name that uniquely identifies it.
</tp:docstring>
@@ -69,7 +69,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
An array of channel classes that can be handled by this client.
This will usually be a copy of the client's <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">HandlerChannelFilter</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Handler">HandlerChannelFilter</tp:dbus-ref>
property.
</tp:docstring>
</tp:member>
@@ -80,7 +80,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
An array of client capabilities supported by this client, to be
used by the connection manager to determine what capabilities to
advertise. This will usually be a copy of the client's <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Client.Handler">Capabilities</tp:dbus-ref>
+ namespace="im.telepathy1.Client.Handler">Capabilities</tp:dbus-ref>
property.
</tp:docstring>
</tp:member>
@@ -96,7 +96,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
than the ChannelDispatcher SHOULD NOT call this method, and the
ChannelDispatcher SHOULD use this method to advertise the
capabilities of all the registered <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Client.Handler</tp:dbus-ref>
+ namespace="im.telepathy1">Client.Handler</tp:dbus-ref>
implementations.On connections not managed by the ChannelDispatcher,
clients MAY use this method directly, to indicate the channels they
will handle and the extra capabilities they have.</p>
@@ -105,7 +105,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
will only emit the
<tp:member-ref>ContactCapabilitiesChanged</tp:member-ref> signal
for the user's <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">SelfHandle</tp:dbus-ref>
+ namespace="im.telepathy1.Connection">SelfHandle</tp:dbus-ref>
if, in the underlying protocol, the new capabilities are distinct
from the previous state.</p>
@@ -155,7 +155,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
</tp:possible-errors>
</method>
@@ -187,8 +187,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
expected to succeed.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle">
<tp:docstring>
The handle does not represent a contact. Zero is always invalid.
</tp:docstring>
@@ -231,7 +231,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The contact's capabilities. These should be represented
in the same way as in <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests"
+ namespace="im.telepathy1.Connection.Interface.Requests"
>RequestableChannelClasses</tp:dbus-ref>,
except that they may have more fixed properties or fewer allowed
properties, to represent contacts who do not have all the
@@ -239,7 +239,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>In particular, requestable channel classes for channels with
target handle type Contact MUST list <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel"
+ namespace="im.telepathy1.Channel"
>TargetHandleType</tp:dbus-ref> among their fixed properties when
they appear here, and clients MAY assume that this will be the
case.</p>
@@ -254,9 +254,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>Channel classes with target handle type Handle_Type_Contact
indicate that a request that matches the channel class, and also
either has the contact's handle as <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel"
+ namespace="im.telepathy1.Channel"
>TargetHandle</tp:dbus-ref> or the contact's identifier as
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel"
+ <tp:dbus-ref namespace="im.telepathy1.Channel"
>TargetID</tp:dbus-ref>, can be expected to succeed. Connection
managers SHOULD NOT include the TargetHandle or TargetID as a
fixed property in contact capabilities.</p>
diff --git a/spec/Connection_Interface_Contact_Groups.xml b/spec/Connection_Interface_Contact_Groups1.xml
index 5282a8272..68ee9cc15 100644
--- a/spec/Connection_Interface_Contact_Groups.xml
+++ b/spec/Connection_Interface_Contact_Groups1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Contact_Groups" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Connection_Interface_Contact_Groups1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009-2010 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright © 2009 Nokia Corporation</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -18,9 +18,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.ContactGroups">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
- <tp:requires interface="org.freedesktop.Telepathy.Connection.Interface.ContactList"/>
+ <interface name="im.telepathy1.Connection.Interface.ContactGroups1">
+ <tp:requires interface="im.telepathy1.Connection"/>
+ <tp:requires interface="im.telepathy1.Connection.Interface.ContactList1"/>
<tp:added version="0.21.0">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -33,7 +33,7 @@
<tp:token-ref>groups</tp:token-ref> contact attribute (this should
usually be done by connecting to the GroupsChanged signal, then
calling <tp:dbus-ref
- namespace="ofdT.Connection.Interface.ContactList"
+ namespace="imt1.Connection.Interface.ContactList1"
>GetContactListAttributes</tp:dbus-ref> with this interface
included in the Interfaces argument). Simple user interfaces can
limit themselves to displaying that information, and ignore the rest
@@ -148,7 +148,7 @@
receiving <tp:member-ref>GroupRenamed</tp:member-ref>.</p>
<p>This property's value is not meaningful until the
- <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList"
+ <tp:dbus-ref namespace="imt1.Connection.Interface.ContactList1"
>ContactListState</tp:dbus-ref> has become Success.</p>
</tp:docstring>
</property>
@@ -263,11 +263,11 @@
this method call MUST be emitted before the method returns.</p>
<p>This method SHOULD NOT be called until the
- <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList"
+ <tp:dbus-ref namespace="imt1.Connection.Interface.ContactList1"
>ContactListState</tp:dbus-ref> changes to Success.
If the ContactListState is Failure, this method SHOULD raise the
same error as
- <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList"
+ <tp:dbus-ref namespace="imt1.Connection.Interface.ContactList1"
>GetContactListAttributes</tp:dbus-ref>.</p>
</tp:docstring>
@@ -281,21 +281,21 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>Raised if <tp:member-ref>DisjointGroups</tp:member-ref>
is true and the list of groups has more than one
member.</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
Raised if <tp:member-ref>GroupStorage</tp:member-ref>
is Contact_Metadata_Storage_Type_None, i.e. groups cannot be edited.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYet"/>
+ <tp:error name="im.telepathy1.Error.NotYet"/>
</tp:possible-errors>
</method>
@@ -324,11 +324,11 @@
this method call MUST be emitted before the method returns.</p>
<p>This method SHOULD NOT be called until the
- <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList"
+ <tp:dbus-ref namespace="imt1.Connection.Interface.ContactList1"
>ContactListState</tp:dbus-ref> changes to Success.
If the ContactListState is Failure, this method SHOULD raise the
same error as
- <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList"
+ <tp:dbus-ref namespace="imt1.Connection.Interface.ContactList1"
>GetContactListAttributes</tp:dbus-ref>.</p>
</tp:docstring>
@@ -342,16 +342,16 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
Raised if <tp:member-ref>GroupStorage</tp:member-ref>
is Contact_Metadata_Storage_Type_None, i.e. groups cannot be edited.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYet"/>
+ <tp:error name="im.telepathy1.Error.NotYet"/>
</tp:possible-errors>
</method>
@@ -374,11 +374,11 @@
this method call MUST be emitted before the method returns.</p>
<p>This method SHOULD NOT be called until the
- <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList"
+ <tp:dbus-ref namespace="imt1.Connection.Interface.ContactList1"
>ContactListState</tp:dbus-ref> changes to Success.
If the ContactListState is Failure, this method SHOULD raise the
same error as
- <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList"
+ <tp:dbus-ref namespace="imt1.Connection.Interface.ContactList1"
>GetContactListAttributes</tp:dbus-ref>.</p>
</tp:docstring>
@@ -391,16 +391,16 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
Raised if <tp:member-ref>GroupStorage</tp:member-ref>
is Contact_Metadata_Storage_Type_None, i.e. groups cannot be edited.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYet"/>
+ <tp:error name="im.telepathy1.Error.NotYet"/>
</tp:possible-errors>
</method>
@@ -418,11 +418,11 @@
this method call MUST be emitted before the method returns.</p>
<p>This method SHOULD NOT be called until the
- <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList"
+ <tp:dbus-ref namespace="imt1.Connection.Interface.ContactList1"
>ContactListState</tp:dbus-ref> changes to Success.
If the ContactListState is Failure, this method SHOULD raise the
same error as
- <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList"
+ <tp:dbus-ref namespace="imt1.Connection.Interface.ContactList1"
>GetContactListAttributes</tp:dbus-ref>.</p>
</tp:docstring>
@@ -440,16 +440,16 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
Raised if <tp:member-ref>GroupStorage</tp:member-ref>
is Contact_Metadata_Storage_Type_None, i.e. groups cannot be edited.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYet"/>
+ <tp:error name="im.telepathy1.Error.NotYet"/>
</tp:possible-errors>
</method>
@@ -464,11 +464,11 @@
this method call MUST be emitted before the method returns.</p>
<p>This method SHOULD NOT be called until the
- <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList"
+ <tp:dbus-ref namespace="imt1.Connection.Interface.ContactList1"
>ContactListState</tp:dbus-ref> changes to Success.
If the ContactListState is Failure, this method SHOULD raise the
same error as
- <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList"
+ <tp:dbus-ref namespace="imt1.Connection.Interface.ContactList1"
>GetContactListAttributes</tp:dbus-ref>.</p>
</tp:docstring>
@@ -477,15 +477,15 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
Raised if <tp:member-ref>GroupStorage</tp:member-ref>
is Contact_Metadata_Storage_Type_None, i.e. groups cannot be edited.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYet"/>
+ <tp:error name="im.telepathy1.Error.NotYet"/>
</tp:possible-errors>
</method>
@@ -507,11 +507,11 @@
this method call MUST be emitted before the method returns.</p>
<p>This method SHOULD NOT be called until the
- <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList"
+ <tp:dbus-ref namespace="imt1.Connection.Interface.ContactList1"
>ContactListState</tp:dbus-ref> changes to Success.
If the ContactListState is Failure, this method SHOULD raise the
same error as
- <tp:dbus-ref namespace="ofdT.Connection.Interface.ContactList"
+ <tp:dbus-ref namespace="imt1.Connection.Interface.ContactList1"
>GetContactListAttributes</tp:dbus-ref>.</p>
</tp:docstring>
@@ -524,23 +524,23 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
Raised if <tp:member-ref>GroupStorage</tp:member-ref>
is Contact_Metadata_Storage_Type_None, i.e. groups cannot be edited.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.DoesNotExist">
+ <tp:error name="im.telepathy1.Error.DoesNotExist">
<tp:docstring>Raised if there is no group with that
name.</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>Raised if there is already a group with the new
name.</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYet"/>
+ <tp:error name="im.telepathy1.Error.NotYet"/>
</tp:possible-errors>
</method>
diff --git a/spec/Connection_Interface_Contact_Info.xml b/spec/Connection_Interface_Contact_Info1.xml
index 527d32522..6056b6ad0 100644
--- a/spec/Connection_Interface_Contact_Info.xml
+++ b/spec/Connection_Interface_Contact_Info1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Contact_Info" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Connection_Interface_Contact_Info1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright (C) 2008 Collabora Limited </tp:copyright>
<tp:copyright> Copyright (C) 2008 Nokia Corporation </tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -17,9 +17,9 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.ContactInfo">
+ <interface name="im.telepathy1.Connection.Interface.ContactInfo1">
<tp:added version="0.19.4">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <tp:requires interface="im.telepathy1.Connection"/>
<tp:struct name="Contact_Info_Field" array-name="Contact_Info_Field_List">
<tp:member type="s" name="Field_Name">
@@ -233,8 +233,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:rationale>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
</tp:possible-errors>
</method>
@@ -262,10 +262,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:rationale>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The contact's information could not be retrieved.
</tp:docstring>
@@ -288,16 +288,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
Setting your own information is not supported on this protocol.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The supplied fields do not match the restrictions specified by
<tp:member-ref>SupportedFields</tp:member-ref>.
@@ -475,9 +475,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Indicates that this field will be overwritten when the user's alias
is changed with <tp:dbus-ref
- namespace="ofdT.Connection.Interface.Aliasing">SetAliases</tp:dbus-ref>
+ namespace="imt1.Connection.Interface.Aliasing1">SetAliases</tp:dbus-ref>
or when the Account's <tp:dbus-ref
- namespace="ofdT.Account">Nickname</tp:dbus-ref>
+ namespace="imt1.Account">Nickname</tp:dbus-ref>
is updated. Clients that allow the editing of the Alias and the
ContactInfo in the same location should hide fields with this flag.</p>
<tp:rationale>
diff --git a/spec/Connection_Interface_Contact_List.xml b/spec/Connection_Interface_Contact_List1.xml
index 50a2634cb..72ace7cfa 100644
--- a/spec/Connection_Interface_Contact_List.xml
+++ b/spec/Connection_Interface_Contact_List1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Contact_List" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Connection_Interface_Contact_List1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009-2010 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright © 2009 Nokia Corporation</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -18,9 +18,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.ContactList">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <interface name="im.telepathy1.Connection.Interface.ContactList1">
+ <tp:requires interface="im.telepathy1.Connection"/>
<tp:added version="0.21.0">(as stable API)</tp:added>
+ <tp:changed version="UNRELEASED">The deprecated ContactsChanged
+ signal has been replaced with the ContactsChangedWithID
+ version.</tp:changed>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface for connections that have any concept of a list of
@@ -35,9 +38,7 @@
any server or roster, it's possible to list "nearby" contacts.</p>
<p>In Telepathy 0.20 and older, we represented contact lists as a
- collection of <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type"
- >ContactList</tp:dbus-ref> channels. This is remarkably difficult to
+ collection of ContactList channels. This is remarkably difficult to
work with in practice - every client that cares about contact lists
has to take the union of some hard-to-define set of these
channels - and conflicts with the idea that channels that cannot
@@ -163,7 +164,7 @@
<p>A list of strings indicating which D-Bus interfaces the calling
process is interested in. Equivalent to the corresponding argument
to <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Contacts"
+ namespace="im.telepathy1.Connection.Interface.Contacts"
>GetContactAttributes</tp:dbus-ref>,
except that if this list does not contain the ContactList
interface itself, it is treated as though that interface was also
@@ -171,38 +172,27 @@
</tp:docstring>
</arg>
- <arg direction="in" name="Hold" type="b">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>If true, all handles that appear as keys in the result have been
- held on behalf of the calling process, as if by a call to
- <tp:dbus-ref namespace="ofdT">Connection.HoldHandles</tp:dbus-ref>.
- (If <tp:dbus-ref namespace="ofdT.Connection"
- >HasImmortalHandles</tp:dbus-ref> is true, which SHOULD be the
- case in all new connection managers, this has no effect.)</p>
- </tp:docstring>
- </arg>
-
<arg direction="out" type="a{ua{sv}}" name="Attributes"
tp:type="Contact_Attributes_Map">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A dictionary mapping the contact handles to contact attributes,
equivalent to the result of <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Contacts"
+ namespace="im.telepathy1.Connection.Interface.Contacts"
>GetContactAttributes</tp:dbus-ref>.</p>
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.ServiceBusy"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYet">
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.ServiceBusy"/>
+ <tp:error name="im.telepathy1.Error.NotYet">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The <tp:member-ref>ContactListState</tp:member-ref> is
None or Waiting. In particular, this error is raised if the
- <tp:dbus-ref namespace="ofdT.Connection">Status</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Connection">Status</tp:dbus-ref>
is not yet Connection_Status_Connected.</p>
</tp:docstring>
</tp:error>
@@ -266,7 +256,7 @@
<p>If this attribute is not Yes, the local user cannot generally
expect to receive presence from this contact. Their presence status
as returned by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.SimplePresence">GetPresences</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface.Presence1">GetPresences</tp:dbus-ref>
is likely to be (Unknown, "unknown", ""), unless the local user
can temporarily see their presence for some other reason (for
instance, on XMPP, contacts seen in chatrooms will temporarily
@@ -576,8 +566,8 @@
</tp:member>
</tp:mapping>
- <signal name="ContactsChangedWithID"
- tp:name-for-bindings="Contacts_Changed_With_ID">
+ <signal name="ContactsChanged"
+ tp:name-for-bindings="Contacts_Changed">
<tp:added version="0.21.8"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Emitted when the contact list becomes available, when contacts'
@@ -631,40 +621,6 @@
</arg>
</signal>
- <signal name="ContactsChanged"
- tp:name-for-bindings="Contacts_Changed">
- <tp:deprecated version="0.21.8">Connection managers MUST still
- emit this signal, but clients SHOULD listen for the
- <tp:member-ref>ContactsChangedWithID</tp:member-ref> signal in
- addition, and ignore this signal after ContactsChangedWithID has been
- emitted at least once.
- </tp:deprecated>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Emitted immediately after
- <tp:member-ref>ContactsChangedWithID</tp:member-ref>, under the same
- circumstances.</p>
-
- <p>If clients receive this signal without first receiving a
- corresponding <tp:member-ref>ContactsChangedWithID</tp:member-ref>,
- they MUST assume that only this signal will be emitted.</p>
- </tp:docstring>
-
- <arg type="a{u(uus)}" name="Changes" tp:type="Contact_Subscription_Map">
- <tp:docstring>
- The same as the corresponding argument to
- <tp:member-ref>ContactsChangedWithID</tp:member-ref>.
- </tp:docstring>
- </arg>
-
- <arg name="Removals" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- The same as the corresponding argument to
- <tp:member-ref>ContactsChangedWithID</tp:member-ref>, except that it
- only includes handles and not identifiers.
- </tp:docstring>
- </arg>
- </signal>
-
<property name="CanChangeContactList" type="b" access="read"
tp:name-for-bindings="Can_Change_Contact_List">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -675,7 +631,7 @@
<tp:member-ref>RemoveContacts</tp:member-ref> methods.</p>
<p>If false, all of those methods will always fail; they SHOULD raise
- the error org.freedesktop.Telepathy.Error.NotImplemented.</p>
+ the error im.telepathy1.Error.NotImplemented.</p>
<tp:rationale>
<p>In XEP-0174 "Serverless Messaging" (link-local XMPP), presence is
@@ -708,11 +664,11 @@
</tp:rationale>
<p>Before calling this method on a connection where <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Aliasing"
+ namespace="im.telepathy1.Connection.Interface.Aliasing1"
>GetAliasFlags</tp:dbus-ref> returns the <code>User_Set</code> flag,
user interfaces SHOULD obtain, from the user, an alias to
identify the contact in future, and store it using <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Aliasing"
+ namespace="im.telepathy1.Connection.Interface.Aliasing1"
>SetAliases</tp:dbus-ref>.</p>
<p>The user MAY be
@@ -799,16 +755,16 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYet">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotYet">
<tp:docstring>
The <tp:member-ref>ContactListState</tp:member-ref> is None
or Waiting.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
It was not possible to perform the requested action, because
<tp:member-ref>CanChangeContactList</tp:member-ref> is false.
@@ -937,16 +893,16 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
It was not possible to perform the requested action, because
<tp:member-ref>CanChangeContactList</tp:member-ref> is false.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYet">
+ <tp:error name="im.telepathy1.Error.NotYet">
<tp:docstring>
The <tp:member-ref>ContactListState</tp:member-ref> is None
or Waiting.
@@ -999,16 +955,16 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
It was not possible to perform the requested action because
<tp:member-ref>CanChangeContactList</tp:member-ref> is false.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYet">
+ <tp:error name="im.telepathy1.Error.NotYet">
<tp:docstring>
The <tp:member-ref>ContactListState</tp:member-ref> is None
or Waiting.
@@ -1048,10 +1004,10 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
It was not possible to perform the requested action because
<tp:member-ref>CanChangeContactList</tp:member-ref> is false.
@@ -1091,16 +1047,16 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
It was not possible to perform the requested action because
<tp:member-ref>CanChangeContactList</tp:member-ref> is false.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotYet">
+ <tp:error name="im.telepathy1.Error.NotYet">
<tp:docstring>
The <tp:member-ref>ContactListState</tp:member-ref> is None
or Waiting.
@@ -1118,9 +1074,9 @@
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented"/>
</tp:possible-errors>
</method>
diff --git a/spec/Connection_Interface_Contacts.xml b/spec/Connection_Interface_Contacts.xml
index ccbdb843a..c2be7ff9d 100644
--- a/spec/Connection_Interface_Contacts.xml
+++ b/spec/Connection_Interface_Contacts.xml
@@ -18,8 +18,8 @@
along with this library; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Contacts">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <interface name="im.telepathy1.Connection.Interface.Contacts">
+ <tp:requires interface="im.telepathy1.Connection"/>
<tp:added version="0.17.9"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -126,7 +126,7 @@
</tp:rationale>
<p>Attributes from the interface
- <tp:dbus-ref>org.freedesktop.Telepathy.Connection</tp:dbus-ref>
+ <tp:dbus-ref>im.telepathy1.Connection</tp:dbus-ref>
are always returned, and need not be requested explicitly.</p>
<p>As well as returning cached information immediately, the
@@ -134,12 +134,12 @@
values for the contact attributes. If better values are later
obtained by this process, they will be indicated with the usual
signals (such as <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Aliasing">AliasesChanged</tp:dbus-ref>).</p>
+ namespace="im.telepathy1.Connection.Interface.Aliasing1">AliasesChanged</tp:dbus-ref>).</p>
<tp:rationale>
For instance, an XMPP connection manager could download vCards
in response to a request for <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">Aliasing</tp:dbus-ref>
+ namespace="im.telepathy1.Connection.Interface">Aliasing1</tp:dbus-ref>
attributes.
</tp:rationale>
</tp:docstring>
@@ -151,21 +151,6 @@
</tp:changed>
</arg>
- <arg direction="in" name="Hold" type="b">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>If true, all handles that appear as keys in the result have been
- held on behalf of the calling process, as if by a call to
- <tp:dbus-ref namespace="ofdT">Connection.HoldHandles</tp:dbus-ref>.
- (If <tp:dbus-ref namespace="ofdT.Connection"
- >HasImmortalHandles</tp:dbus-ref> is true, which SHOULD be the
- case in all new connection managers, this has no effect.)</p>
-
- <tp:rationale>
- <p>For further round-trip avoidance.</p>
- </tp:rationale>
- </tp:docstring>
- </arg>
-
<arg direction="out" type="a{ua{sv}}" name="Attributes"
tp:type="Contact_Attributes_Map">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -178,12 +163,12 @@
<p>Each contact's attributes will always include at least the
identifier that would be obtained by inspecting the handle
- (<code>org.freedesktop.Telepathy.Connection/contact-id</code>).</p>
+ (<code>im.telepathy1.Connection/contact-id</code>).</p>
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
</tp:possible-errors>
</method>
diff --git a/spec/Connection_Interface_Forwarding.xml b/spec/Connection_Interface_Forwarding1.xml
index 32c7e1cbb..60aab7a55 100644
--- a/spec/Connection_Interface_Forwarding.xml
+++ b/spec/Connection_Interface_Forwarding1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Forwarding"
+<node name="/Connection_Interface_Forwarding1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2005-2010 Nokia Corporation</tp:copyright>
@@ -22,7 +22,7 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Forwarding.DRAFT"
+ <interface name="im.telepathy1.Connection.Interface.Forwarding1"
tp:causes-havoc="experimental">
<tp:added version="0.19.6">(draft version, not API-stable)</tp:added>
@@ -87,12 +87,12 @@
20s to accept the channel.</p>
<p>When an unanswered <tp:dbus-ref
- namespace='ofdT.Channel.Type'>StreamedMedia</tp:dbus-ref> call is
+ namespace='imt1.Channel.Type'>Call1</tp:dbus-ref> call is
forwarded, both the contact and the self handle should be removed from
the group with the self handle as the actor, and
<tp:type>Channel_Group_Change_Reason</tp:type> <code>No_Answer</code> or
<code>Busy</code>, as appropriate. For <tp:dbus-ref
- namespace='ofdT.Channel.Type'>Call1</tp:dbus-ref> channels, the
+ namespace='imt1.Channel.Type'>Call1</tp:dbus-ref> channels, the
<tp:type>Call_State_Change_Reason</tp:type> <code>Forwarded</code>
should be used.</p>
</tp:docstring>
@@ -322,9 +322,9 @@
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The specified Condition is not supported by this connection,
or the number of chained
@@ -333,7 +333,7 @@
<tp:member-ref>SetForwardingRule</tp:member-ref>.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
+ <tp:error name="im.telepathy1.Error.InvalidHandle">
<tp:docstring>
A Handle that has been supplied is invalid.
</tp:docstring>
diff --git a/spec/Connection_Interface_Keepalive.xml b/spec/Connection_Interface_Keepalive1.xml
index 9f4ac6833..e2c32dcb1 100644
--- a/spec/Connection_Interface_Keepalive.xml
+++ b/spec/Connection_Interface_Keepalive1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Keepalive"
+<node name="/Connection_Interface_Keepalive1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2010 Collabora Ltd.</tp:copyright>
@@ -21,9 +21,9 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Keepalive.DRAFT"
+ <interface name="im.telepathy1.Connection.Interface.Keepalive1"
tp:causes-havoc="experimental">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <tp:requires interface="im.telepathy1.Connection"/>
<tp:added version="0.21.2">(draft 1)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -47,10 +47,10 @@
<tp:member-ref>KeepaliveInterval</tp:member-ref> property which
controls the frequency of keepalive pings, if any. Connection managers
implementing this property should also include it in <tp:dbus-ref
- namespace='org.freedesktop.Telepathy'>Protocol.Parameters</tp:dbus-ref>
+ namespace='im.telepathy1'>Protocol.Parameters</tp:dbus-ref>
with the <code>DBus_Property</code> flag, allowing the desired value to
be stored in <tp:dbus-ref
- namespace='org.freedesktop.Telepathy'>Account.Parameters</tp:dbus-ref>
+ namespace='im.telepathy1'>Account.Parameters</tp:dbus-ref>
and passed onto the connection by the account manager.</p>
</tp:docstring>
diff --git a/spec/Connection_Interface_Location.xml b/spec/Connection_Interface_Location1.xml
index c4fd68c3b..1f717eb3b 100644
--- a/spec/Connection_Interface_Location.xml
+++ b/spec/Connection_Interface_Location1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Location"
+<node name="/Connection_Interface_Location1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright (C) 2008 Collabora Ltd.</tp:copyright>
<tp:copyright>Copyright (C) 2008 Nokia Corporation</tp:copyright>
@@ -18,9 +18,9 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Location">
+ <interface name="im.telepathy1.Connection.Interface.Location1">
<tp:added version="0.17.27">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <tp:requires interface="im.telepathy1.Connection"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface on connections to support protocols which allow users to
@@ -49,11 +49,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
possible.</p>
<p>Clients of this interface SHOULD register an interest in it by calling
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>Connection.AddClientInterest</tp:dbus-ref> with an argument
containing the name of this interface,
before calling any Location method. If they do so, they SHOULD also call
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>Connection.RemoveClientInterest</tp:dbus-ref> after use to allow
the CM to release resources associated with this interface.</p>
</tp:docstring>
@@ -275,12 +275,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>For backwards compatibility, if this method is called by a client
whose "interest count" for this interface, as defined by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
+ namespace="im.telepathy1"
>Connection.AddClientInterest</tp:dbus-ref>, is zero, the
Connection SHOULD behave as if AddClientInterest had been called for
this interface just before that method call. Clients that do not
explicitly call AddClientInterest SHOULD NOT call <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
+ namespace="im.telepathy1"
>Connection.RemoveClientInterest</tp:dbus-ref> either.</p>
</tp:docstring>
@@ -301,8 +301,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
</tp:possible-errors>
</method>
@@ -334,10 +334,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied">
<tp:docstring>
The requested contact does not allow the local user to see their
location information.
@@ -383,8 +383,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The user's server does not support publishing their own location.
If it is possible to determine this ahead of time, the
@@ -392,18 +392,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:member-ref>SupportedLocationFeatures</tp:member-ref>.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
</tp:possible-errors>
</method>
<property name="LocationAccessControlTypes" type="au" access="read"
- tp:type="Rich_Presence_Access_Control_Type[]" tp:name-for-bindings="Location_Access_Control_Types">
+ tp:type="Access_Control_Type[]" tp:name-for-bindings="Location_Access_Control_Types">
<tp:docstring>The types of access control that are supported by this
connection.</tp:docstring>
</property>
<property name="LocationAccessControl" type="(uv)" access="readwrite"
- tp:type="Rich_Presence_Access_Control" tp:name-for-bindings="Location_Access_Control">
+ tp:type="Access_Control" tp:name-for-bindings="Location_Access_Control">
<tp:docstring>The current access control mechanism and settings
for this connection. Before publishing location for the first time,
if this has not been set by a client, implementations SHOULD
@@ -418,7 +418,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
Indicates the Location features supported by this connection. This
property MAY be undefined before <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">Status</tp:dbus-ref>
+ namespace="im.telepathy1.Connection">Status</tp:dbus-ref>
becomes <code>Connected</code>, but MUST remain constant thereafter.
</tp:docstring>
</property>
@@ -449,12 +449,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>For backwards compatibility, if contact attributes that include
this interface are requested
by a client whose "interest count" for this interface, as defined by
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>Connection.AddClientInterest</tp:dbus-ref>, is zero, the
Connection SHOULD behave as if AddClientInterest was called for this
interface just before that request. Clients that do not explicitly
call AddClientInterest SHOULD NOT call <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
+ namespace="im.telepathy1"
>Connection.RemoveClientInterest</tp:dbus-ref> either.</p>
</tp:docstring>
</tp:contact-attribute>
diff --git a/spec/Connection_Interface_Mail_Notification.xml b/spec/Connection_Interface_Mail_Notification1.xml
index 395e1019d..b8ef504e8 100644
--- a/spec/Connection_Interface_Mail_Notification.xml
+++ b/spec/Connection_Interface_Mail_Notification1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Mail_Notification"
+<node name="/Connection_Interface_Mail_Notification1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
>
<tp:copyright> Copyright (C) 2007 Collabora Limited </tp:copyright>
@@ -19,8 +19,8 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
<interface
- name="org.freedesktop.Telepathy.Connection.Interface.MailNotification">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ name="im.telepathy1.Connection.Interface.MailNotification1">
+ <tp:requires interface="im.telepathy1.Connection"/>
<tp:added version="0.21.3">(as stable API)</tp:added>
<tp:client-interest>
@@ -500,9 +500,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:rationale>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented"/>
</tp:possible-errors>
</method>
@@ -538,10 +538,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:rationale>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument"/>
</tp:possible-errors>
</method>
@@ -555,12 +555,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>To use this interface, a client MUST first subscribe by passing the
name of this interface to the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
+ namespace="im.telepathy1"
>Connection.AddClientInterest</tp:dbus-ref> method. The subscription
mechanic aims at reducing network traffic and memory footprint in the
situation where nobody is currently interesting in provided
information. When done with this interface, clients SHOULD call
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>Connection.RemoveClientInterest</tp:dbus-ref> to allow the CM to
release resources.</p>
diff --git a/spec/Connection_Interface_Power_Saving.xml b/spec/Connection_Interface_Power_Saving1.xml
index 571bf6d51..c49138078 100644
--- a/spec/Connection_Interface_Power_Saving.xml
+++ b/spec/Connection_Interface_Power_Saving1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Power_Saving"
+<node name="/Connection_Interface_Power_Saving1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
>
<tp:copyright> Copyright © 2007-2010 Collabora Limited </tp:copyright>
@@ -19,7 +19,7 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
<interface
- name="org.freedesktop.Telepathy.Connection.Interface.PowerSaving">
+ name="im.telepathy1.Connection.Interface.PowerSaving1">
<tp:added version="0.21.5">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Some protocols support mechanisms for reducing bandwidth usage—and
@@ -72,12 +72,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The current connection has no power saving features.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented"/>
</tp:possible-errors>
</method>
diff --git a/spec/Connection_Interface_Presence.xml b/spec/Connection_Interface_Presence.xml
deleted file mode 100644
index 8a344d416..000000000
--- a/spec/Connection_Interface_Presence.xml
+++ /dev/null
@@ -1,346 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Connection_Interface_Presence" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright>
- Copyright (C) 2005, 2006 Collabora Limited
- </tp:copyright>
- <tp:copyright>
-Copyright (C) 2005, 2006 Nokia Corporation
- </tp:copyright>
- <tp:copyright>
-Copyright (C) 2006 INdT
- </tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
- <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
- </tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Presence">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
- <tp:requires interface="org.freedesktop.Telepathy.Connection.Interface.SimplePresence"/>
-
- <tp:mapping name="Multiple_Status_Map">
- <tp:docstring>Mapping used in
- <tp:type>Last_Activity_And_Statuses</tp:type> and passed to
- <tp:member-ref>SetStatus</tp:member-ref>, representing a collection of
- statuses. Use of this mapping with more than one member is
- deprecated.</tp:docstring>
- <tp:member type="s" name="Status"/>
- <tp:member type="a{sv}" tp:type="String_Variant_Map" name="Parameters"/>
- </tp:mapping>
- <tp:struct name="Last_Activity_And_Statuses" array-name="">
- <tp:docstring>Structure representing a contact's presence, containing
- a last-activity time (deprecated) and a Multiple_Status_Map.
- </tp:docstring>
- <tp:member type="u" tp:type="Unix_Timestamp" name="Last_Activity"/>
- <tp:member type="a{sa{sv}}" tp:type="Multiple_Status_Map"
- name="Statuses"/>
- </tp:struct>
- <tp:mapping name="Contact_Presences">
- <tp:docstring>Mapping returned by
- <tp:member-ref>GetPresence</tp:member-ref> and signalled by
- <tp:member-ref>PresenceUpdate</tp:member-ref>, where the keys are
- contacts and the values represent their presences.</tp:docstring>
- <tp:member type="u" tp:type="Contact_Handle" name="Contact"/>
- <tp:member type="(ua{sa{sv}})" tp:type="Last_Activity_And_Statuses"
- name="Presence"/>
- </tp:mapping>
- <tp:struct name="Status_Spec" array-name="">
- <tp:member type="u" tp:type="Connection_Presence_Type" name="Type"/>
- <tp:member type="b" name="May_Set_On_Self"/>
- <tp:member type="b" name="Exclusive"/>
- <tp:member type="a{ss}" tp:type="String_String_Map"
- name="Parameter_Types"/>
- </tp:struct>
- <tp:mapping name="Status_Spec_Map">
- <tp:member type="s" name="Identifier"/>
- <tp:member type="(ubba{ss})" tp:type="Status_Spec" name="Spec"/>
- </tp:mapping>
-
- <method name="AddStatus" tp:name-for-bindings="Add_Status">
- <arg direction="in" name="Status" type="s">
- <tp:docstring>
- The string identifier of the desired status
- </tp:docstring>
- </arg>
- <arg direction="in" name="Parameters" type="a{sv}" tp:type="String_Variant_Map">
- <tp:docstring>
- A dictionary of optional parameter names mapped to their variant-boxed values
- </tp:docstring>
- </arg>
- <tp:docstring>
- Request that a single presence status is published for the user, along
- with any desired parameters. Changes will be indicated by
- <tp:member-ref>PresenceUpdate</tp:member-ref> signals being emitted.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- </tp:possible-errors>
- </method>
- <method name="ClearStatus" tp:name-for-bindings="Clear_Status">
- <tp:docstring>
- Request that all of a user's presence statuses be removed. Be aware
- that this request may simply result in the statuses being replaced by a
- default available status. Changes will be indicated by
- <tp:member-ref>PresenceUpdate</tp:member-ref> signals being emitted.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- </tp:possible-errors>
- </method>
- <method name="GetPresence" tp:name-for-bindings="Get_Presence">
- <arg direction="in" name="Contacts" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- An array of the contacts whose presence should be obtained
- </tp:docstring>
- </arg>
- <arg direction="out" name="Presence" type="a{u(ua{sa{sv}})}"
- tp:type="Contact_Presences">
- <tp:docstring>
- Presence information in the same format as for the
- <tp:member-ref>PresenceUpdate</tp:member-ref> signal
- </tp:docstring>
- </arg>
- <tp:docstring>
- Get presence previously emitted by
- <tp:member-ref>PresenceUpdate</tp:member-ref> for the given contacts.
- Data is returned in the same structure as the PresenceUpdate signal.
- Using this method in favour of
- <tp:member-ref>RequestPresence</tp:member-ref> has the advantage that
- it will not wake up each client connected to the PresenceUpdate signal.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- </tp:possible-errors>
- </method>
- <method name="GetStatuses" tp:name-for-bindings="Get_Statuses">
- <arg direction="out" type="a{s(ubba{ss})}" tp:type="Status_Spec_Map"
- name="Available_Statuses">
- <tp:docstring>
- A dictionary of string identifiers mapped to a struct for each status, containing:
- <ul>
- <li>a type value from one of the values above</li>
- <li>a boolean to indicate if this status may be set on yourself</li>
- <li>a boolean to indicate if this is an exclusive status which you
- may not set alongside any other</li>
- <li>a dictionary of valid optional string argument names mapped to
- their types</li>
- </ul>
- </tp:docstring>
- </arg>
- <tp:docstring>
- Get a dictionary of the valid presence statuses for this connection.
- This is only available when online because only some statuses will
- be available on some servers.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
- <signal name="PresenceUpdate" tp:name-for-bindings="Presence_Update">
- <arg name="Presence" type="a{u(ua{sa{sv}})}" tp:type="Contact_Presences">
- <tp:docstring>
- A dictionary of contact handles mapped to a struct containing
- a UNIX timestamp of the last activity time (in UTC), and
- a dictionary mapping the contact's current status identifiers to
- a dictionary of optional parameter names mapped to their
- variant-boxed values
- </tp:docstring>
- </arg>
- <tp:docstring>
- This signal should be emitted when your own presence has been changed,
- or the presence of the member of any of the connection's channels has
- been changed, or when the presence requested by
- <tp:member-ref>RequestPresence</tp:member-ref> is available.
- </tp:docstring>
- </signal>
- <method name="RemoveStatus" tp:name-for-bindings="Remove_Status">
- <arg direction="in" name="Status" type="s">
- <tp:docstring>
- The string identifier of the status not to publish anymore for the user
- </tp:docstring>
- </arg>
- <tp:docstring>
- Request that the given presence status is no longer published for the
- user. Changes will be indicated by
- <tp:member-ref>PresenceUpdate</tp:member-ref> signals being emitted. As
- with <tp:member-ref>ClearStatus</tp:member-ref>, removing a status may
- actually result in it being replaced by a default available status.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>The status requested is not currently set</tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
- <method name="RequestPresence" tp:name-for-bindings="Request_Presence">
- <arg direction="in" name="Contacts" type="au" tp:type="Contact_Handle[]">
- <tp:docstring>
- An array of the contacts whose presence should be obtained
- </tp:docstring>
- </arg>
- <tp:docstring>
- Request the presence for contacts on this connection. A <tp:member-ref>PresenceUpdate</tp:member-ref>
- signal will be emitted when they are received. This is not the same as
- subscribing to the presence of a contact, which must be done using the
- 'subscription' <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">ContactList</tp:dbus-ref>,
- and on some protocols presence information may not be available unless
- a subscription exists.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
- <tp:docstring>
- The presence of the requested contacts is not reported to this connection
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
- <method name="SetLastActivityTime"
- tp:name-for-bindings="Set_Last_Activity_Time">
- <arg direction="in" name="Time" type="u" tp:type="Unix_Timestamp">
- <tp:docstring>
- A UNIX timestamp of the user's last activity time (in UTC)
- </tp:docstring>
- </arg>
- <tp:docstring>
- Request that the recorded last activity time for the user be updated on
- the server.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
- <tp:docstring>
- This protocol has no concept of idle time
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
- <method name="SetStatus" tp:name-for-bindings="Set_Status">
- <arg direction="in" name="Statuses" type="a{sa{sv}}" tp:type="Multiple_Status_Map">
- <tp:docstring>
- A dictionary mapping status identifiers to dictionaries, which
- map optional parameter names to their variant-boxed values
- </tp:docstring>
- </arg>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Request that the user's presence be changed to the given statuses
- and desired parameters. Changes will be reflected by
- <tp:member-ref>PresenceUpdate</tp:member-ref>
- signals being emitted.</p>
-
- <p>Statuses whose <tp:type>Connection_Presence_Type</tp:type>
- is Offline, Error or Unknown MUST NOT be passed to this
- function. Connection managers SHOULD reject these statuses.</p>
-
- <tp:rationale>
- <p>The same rationale as for <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">SimplePresence.SetPresence</tp:dbus-ref>
- applies.</p>
- </tp:rationale>
-
- <p>On certain protocols, this method may be
- called on a newly-created connection which is still in the
- DISCONNECTED state, and will sign on with the requested status.
- If the requested status is not available after signing on,
- NotAvailable will be returned and the connection will remain
- offline, or if the protocol does not support signing on with
- a certain status, Disconnected will be returned.</p>
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- </tp:possible-errors>
- </method>
-
- <tp:deprecated version="0.17.21">Client implementations
- SHOULD use <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">SimplePresence</tp:dbus-ref>
- instead.</tp:deprecated>
- <tp:changed version="0.17.23">Connection managers implementing
- Presence MUST implement SimplePresence too.</tp:changed>
-
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
-
- <p>This interface is for services which have a concept of presence which
- can be published for yourself and monitored on your contacts.
- Telepathy's definition of presence is based on that used by
- <a href="http://www.galago-project.org/">the Galago project</a>.</p>
-
- <p>Presence on an individual (yourself or one of your contacts) is modelled as
- a last activity time along with a set of zero or more statuses, each of
- which may have arbitrary key/value parameters. Valid statuses are defined
- per connection, and a list of them can be obtained with the
- <tp:member-ref>GetStatuses</tp:member-ref> method.</p>
-
- <p>(The SimplePresence interface which replaces this one restricts
- presences to one status per contact, with an optional message, which is
- in practice all that was implemented on this interface.)</p>
-
- <p>Each status has an arbitrary string identifier which should have an agreed
- meaning between the connection manager and any client which is expected to
- make use of it. The well-known values defined by the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">SimplePresence</tp:dbus-ref>
- interface SHOULD be used where possible</p>
-
- <p>As well as these well-known status identifiers, every status also has a
- numerical type value chosen from
- <tp:type>Connection_Presence_Type</tp:type> which can be used by the client
- to classify even unknown statuses into different fundamental types.</p>
-
- <p>These numerical types exist so that even if a client does not understand
- the string identifier being used, and hence cannot present the presence to
- the user to set on themselves, it may display an approximation of the
- presence if it is set on a contact.</p>
-
- <p>The dictionary of variant types allows the connection manager to exchange
- further protocol-specific information with the client. It is recommended
- that the string (s) argument 'message' be interpreted as an optional
- message which can be associated with a presence status.</p>
-
- <p>If the connection has a 'subscribe' contact list,
- <tp:member-ref>PresenceUpdate</tp:member-ref> signals should be emitted to
- indicate changes of contacts on this list, and should also be emitted for
- changes in your own presence. Depending on the protocol, the signal may
- also be emitted for others such as people with whom you are communicating,
- and any user interface should be updated accordingly.</p>
-
- <p>On some protocols, <tp:member-ref>RequestPresence</tp:member-ref> may
- only succeed on contacts on your 'subscribe' list, and other contacts will
- cause a PermissionDenied error. On protocols where there is no 'subscribe'
- list, and RequestPresence succeeds, a client may poll the server
- intermittently to update any display of presence information.</p>
- </tp:docstring>
-
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Connection_Interface_Simple_Presence.xml b/spec/Connection_Interface_Presence1.xml
index 0860f5fea..1e27cc2ea 100644
--- a/spec/Connection_Interface_Simple_Presence.xml
+++ b/spec/Connection_Interface_Presence1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Simple_Presence" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Connection_Interface_Presence1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright (C) 2005-2008 Collabora Limited </tp:copyright>
<tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
@@ -19,10 +19,10 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.SimplePresence">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <interface name="im.telepathy1.Connection.Interface.Presence1">
+ <tp:requires interface="im.telepathy1.Connection"/>
- <tp:struct name="Simple_Presence">
+ <tp:struct name="Presence">
<tp:docstring>
A struct representing the presence of a contact.
</tp:docstring>
@@ -62,7 +62,7 @@
</tp:member>
</tp:struct>
- <tp:mapping name="Simple_Contact_Presences">
+ <tp:mapping name="Contact_Presence_Map">
<tp:docstring>
Mapping returned by <tp:member-ref>GetPresences</tp:member-ref>
and signalled by <tp:member-ref>PresencesChanged</tp:member-ref>,
@@ -73,14 +73,14 @@
A contact
</tp:docstring>
</tp:member>
- <tp:member type="(uss)" tp:type="Simple_Presence" name="Presence">
+ <tp:member type="(uss)" tp:type="Presence" name="Presence">
<tp:docstring>
The contact's presence
</tp:docstring>
</tp:member>
</tp:mapping>
- <tp:struct name="Simple_Status_Spec">
+ <tp:struct name="Status_Spec">
<tp:docstring>
A struct containing information about a status.
</tp:docstring>
@@ -112,7 +112,7 @@
</tp:member>
</tp:struct>
- <tp:mapping name="Simple_Status_Spec_Map">
+ <tp:mapping name="Status_Spec_Map">
<tp:docstring>
A mapping describing possible statuses.
</tp:docstring>
@@ -122,7 +122,7 @@
The string identifier of this status.
</tp:docstring>
</tp:member>
- <tp:member type="(ubb)" tp:type="Simple_Status_Spec" name="Spec">
+ <tp:member type="(ubb)" tp:type="Status_Spec" name="Spec">
<tp:docstring>
Details of this status.
</tp:docstring>
@@ -158,7 +158,7 @@
<tp:rationale>
<p>To go offline, call <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">Disconnect</tp:dbus-ref>
+ namespace="im.telepathy1.Connection">Disconnect</tp:dbus-ref>
instead. The "error" and "unknown" statuses make no sense.</p>
</tp:rationale>
</tp:docstring>
@@ -186,8 +186,8 @@
presences might change upon connecting.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
Either the specified status is not supported, the specified
status cannot be set on the user themselves, or a non-empty
@@ -195,7 +195,7 @@
accept a message.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
</tp:possible-errors>
</method>
@@ -206,7 +206,7 @@
</tp:docstring>
</arg>
<arg direction="out" name="Presence" type="a{u(uss)}"
- tp:type="Simple_Contact_Presences">
+ tp:type="Contact_Presence_Map">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Presence information in the same format as for the
<tp:member-ref>PresencesChanged</tp:member-ref> signal.
@@ -227,20 +227,20 @@
PresencesChanged signal; no additional network requests are made.
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.NetworkError">
<tp:docstring>
While discovering the subscribe list in order to distinguish
between Unknown and Offline statuses, a network error occurred.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
</tp:possible-errors>
</method>
<property name="Statuses" tp:name-for-bindings="Statuses" access="read"
- type="a{s(ubb)}" tp:type="Simple_Status_Spec_Map">
+ type="a{s(ubb)}" tp:type="Status_Spec_Map">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A dictionary where the keys are the presence statuses that are
available on this connection, and the values are the corresponding
@@ -320,7 +320,7 @@
</property>
<signal name="PresencesChanged" tp:name-for-bindings="Presences_Changed">
- <arg name="Presence" type="a{u(uss)}" tp:type="Simple_Contact_Presences">
+ <arg name="Presence" type="a{u(uss)}" tp:type="Contact_Presence_Map">
<tp:docstring>
A dictionary of contact handles mapped to the status,
presence type and status message.
@@ -337,12 +337,7 @@
<tp:enumvalue suffix="Unset" value="0">
<tp:docstring>
An invalid presence type used as a null value. This value MUST NOT
- appear in the <tp:member-ref>Statuses</tp:member-ref> property,
- or in the result of <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Presence">GetStatuses</tp:dbus-ref>
- on the deprecated <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">Presence</tp:dbus-ref>
- interface.
+ appear in the <tp:member-ref>Statuses</tp:member-ref> property.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Offline" value="1">
@@ -397,11 +392,9 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A type for communication access control. These control
policies are used in
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">CommunicationPolicy.DRAFT</tp:dbus-ref>
- as well as most rich presence interfaces.</p>
-
- <p>New interfaces should use this type, and NOT
- <tp:type>Rich_Presence_Access_Control_Type</tp:type>.</p>
+ <tp:dbus-ref namespace="imt1.Connection.Interface">CommunicationPolicy1</tp:dbus-ref>
+ and in rich presence interfaces such as
+ <tp:dbus-ref namespace="imt1.Connection.Interface">Location1</tp:dbus-ref>.</p>
</tp:docstring>
<tp:enumvalue suffix="Whitelist" value="0">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -415,17 +408,21 @@
</tp:enumvalue>
<tp:enumvalue suffix="Publish_List" value="1">
<tp:docstring>
- Allow contacts in the user's 'publish' list. The associated
- variant in <tp:type>Access_Control</tp:type> is ignored.
+ Allow contacts whose
+ <tp:token-ref namespace="imt1.Connection.Interface.ContactList1">publish</tp:token-ref>
+ state is Yes, i.e. those who can normally see the local user's presence.
+ The associated variant in <tp:type>Access_Control</tp:type> is ignored.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Group" value="2">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Only allow contacts that are in a certain group.</p>
+ <p>Only allow contacts that are in a certain user-defined group, as
+ configured by the <tp:dbus-ref
+ namespace="imt1.Connection.Interface">ContactGroups1</tp:dbus-ref>
+ interface.</p>
- <p>The associated variant in <tp:type>Access_Control</tp:type> is a
- <tp:type>Group_Handle</tp:type> representing the permitted
- group.</p>
+ <p>The associated variant in <tp:type>Access_Control</tp:type> is
+ a string (D-Bus type 's'), the name of a contact group.</p>
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Open" value="3">
@@ -436,9 +433,12 @@
</tp:enumvalue>
<tp:enumvalue suffix="Subscribe_Or_Publish_List" value="4">
<tp:docstring>
- Allow all contacts in the user's 'subscribe' or 'publish'
- list. The associated variant in <tp:type>Access_Control</tp:type> is
- ignored.
+ Allow contacts whose
+ <tp:token-ref namespace="imt1.Connection.Interface.ContactList1">subscribe</tp:token-ref>
+ and/or <tp:token-ref namespace="imt1.Connection.Interface.ContactList1">publish</tp:token-ref>
+ state is Yes, i.e. those whose presence can normally be seen by the
+ local user, and those who can normally see the local user's presence.
+ The associated variant in <tp:type>Access_Control</tp:type> is ignored.
</tp:docstring>
</tp:enumvalue>
<tp:enumvalue suffix="Closed" value="5">
@@ -466,59 +466,12 @@
</tp:enumvalue>
</tp:enum>
- <tp:enum name="Rich_Presence_Access_Control_Type" type="u"
- array-name="Rich_Presence_Access_Control_Type_List">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A type of access control for Rich_Presence_Access_Control.
- For most types, the exact access control is given by an associated
- variant.</p>
-
- <tp:rationale>
- <p>These are the access control types from XMPP publish/subscribe
- (XEP-0060).</p>
- </tp:rationale>
-
- <p><tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">Location</tp:dbus-ref>
- uses this for historical reasons, new interfaces will use
- <tp:type>Access_Control_Type</tp:type>.</p>
- </tp:docstring>
-
- <tp:enumvalue suffix="Whitelist" value="0">
- <tp:docstring>
- The associated variant is a list of contacts (signature 'au',
- Contact_Handle[]) who can see the extended presence information.
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Publish_List" value="1">
- <tp:docstring>
- All contacts in the user's 'publish' contact list can see the
- extended presence information. The associated variant is ignored.
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Group" value="2">
- <tp:docstring>
- The associated variant is a handle of type Group (signature 'u',
- Group_Handle) representing a group of contacts who can see the
- extended presence information.
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Open" value="3">
- <tp:docstring>
- Anyone with access to the service can see the extended presence
- information.
- </tp:docstring>
- </tp:enumvalue>
- </tp:enum>
-
<tp:struct name="Access_Control">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An access control mode for extended presence items like geolocation.
- This type isn't actually used by the SimplePresence interface, but
+ This type isn't actually used by the Presence interface, but
it's included here so it can be referenced by rich presence
interfaces.</p>
-
- <p>New interfaces should use this type, and NOT
- <tp:type>Rich_Presence_Access_Control</tp:type>.</p>
</tp:docstring>
<tp:member name="Type" type="u" tp:type="Access_Control_Type">
@@ -535,40 +488,13 @@
</tp:member>
</tp:struct>
- <tp:struct name="Rich_Presence_Access_Control">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>An access control mode for extended presence items like geolocation.
- This type isn't actually used by the SimplePresence interface, but
- it's included here so it can be referenced by rich presence interfaces
- such as <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">Location</tp:dbus-ref>.</p>
-
- <p><tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">Location</tp:dbus-ref>
- uses this for historical reasons, new interfaces will use
- <tp:type>Access_Control_Type</tp:type>.</p>
- </tp:docstring>
-
- <tp:member name="Type" type="u" tp:type="Rich_Presence_Access_Control_Type">
- <tp:docstring>
- The type of access control to apply.
- </tp:docstring>
- </tp:member>
- <tp:member name="Detail" type="v">
- <tp:docstring>
- Any additional information required by the Type. The required
- type and semantics are defined for each
- <tp:type>Rich_Presence_Access_Control_Type</tp:type>.
- </tp:docstring>
- </tp:member>
- </tp:struct>
-
<tp:contact-attribute name="presence"
- type="(uss)" tp:type="Simple_Presence">
+ type="(uss)" tp:type="Presence">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The same struct that would be returned by
<tp:member-ref>GetPresences</tp:member-ref>
(always present with some value if information from the
- SimplePresence interface was requested)</p>
+ Presence interface was requested)</p>
</tp:docstring>
</tp:contact-attribute>
diff --git a/spec/Connection_Interface_Privacy.xml b/spec/Connection_Interface_Privacy.xml
deleted file mode 100644
index b89d968f4..000000000
--- a/spec/Connection_Interface_Privacy.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Connection_Interface_Privacy" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
- <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
- <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
- <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
- </tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Privacy"
- tp:causes-havoc='not well-tested'>
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
- <method name="GetPrivacyMode" tp:name-for-bindings="Get_Privacy_Mode">
- <arg direction="out" type="s">
- <tp:docstring>
- A string representing the current privacy mode
- </tp:docstring>
- </arg>
- <tp:docstring>
- Return the current privacy mode, which must be one of the values
- returned by GetPrivacyModes.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
- <method name="GetPrivacyModes" tp:name-for-bindings="Get_Privacy_Modes">
- <arg direction="out" type="as">
- <tp:docstring>
- An array of valid privacy modes for this connection
- </tp:docstring>
- </arg>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- Returns the privacy modes available on this connection. The following
- well-known names should be used where appropriate:
- <dl>
- <dt>allow-all</dt><dd>any contact may initiate communication</dd>
- <dt>allow-specified</dt><dd>only contacts on your 'allow' list may initiate communication</dd>
- <dt>allow-subscribed</dt><dd>only contacts on your subscription list may initiate communication</dd>
- </dl>
- </tp:docstring>
- </method>
- <signal name="PrivacyModeChanged"
- tp:name-for-bindings="Privacy_Mode_Changed">
- <arg name="Mode" type="s">
- <tp:docstring>
- The current privacy mode
- </tp:docstring>
- </arg>
- <tp:docstring>
- Emitted when the privacy mode is changed or the value has been
- initially received from the server.
- </tp:docstring>
- </signal>
- <method name="SetPrivacyMode" tp:name-for-bindings="Set_Privacy_Mode">
- <arg direction="in" name="Mode" type="s">
- <tp:docstring>
- The desired privacy mode
- </tp:docstring>
- </arg>
- <tp:docstring>
- Request that the privacy mode be changed to the given value, which
- must be one of the values returned by GetPrivacyModes. Success is
- indicated by the method returning and the PrivacyModeChanged
- signal being emitted.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
- </tp:possible-errors>
- </method>
- <tp:docstring>
- An interface to support getting and setting privacy modes to configure
- situations such as not being contactable by people who are not on your
- subscribe list. If this interface is not implemented, the default can be
- presumed to be allow-all (as defined in GetPrivacyModes).
- </tp:docstring>
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Connection_Interface_Renaming.xml b/spec/Connection_Interface_Renaming1.xml
index d08b748d9..15b7a9ac5 100644
--- a/spec/Connection_Interface_Renaming.xml
+++ b/spec/Connection_Interface_Renaming1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Renaming" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Connection_Interface_Renaming1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
<tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
@@ -18,9 +18,9 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Renaming"
+ <interface name="im.telepathy1.Connection.Interface.Renaming1"
tp:causes-havoc='not well-tested'>
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <tp:requires interface="im.telepathy1.Connection"/>
<signal name="Renamed" tp:name-for-bindings="Renamed">
<arg name="Original" type="u" tp:type="Contact_Handle">
<tp:docstring>
@@ -51,7 +51,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
a channel which has the groups interface, it will be removed from
the channel and the new handle will be added. The resulting
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.Group">MembersChanged</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Interface.Group1">MembersChanged</tp:dbus-ref>
signal must be emitted <em>after</em> the
<tp:member-ref>Renamed</tp:member-ref> signal; the reason should be
RENAMED.
@@ -73,18 +73,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Request that the user's own identifier is changed on the server.
If successful, a <tp:member-ref>Renamed</tp:member-ref> signal will
- be emitted for the current "self handle" as returned by <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection">GetSelfHandle</tp:dbus-ref>.</p>
+ be emitted for the current "self handle" as returned by the <tp:dbus-ref
+ namespace="im.telepathy1.Connection">SelfHandle</tp:dbus-ref>
+ property.</p>
<p>It is protocol-dependent how the identifier that's actually
used will be derived from the supplied identifier; some sort of
normalization might take place.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotAvailable"/>
+ <tp:error name="im.telepathy1.Error.InvalidArgument"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
</tp:possible-errors>
</method>
<tp:docstring>
diff --git a/spec/Connection_Interface_Requests.xml b/spec/Connection_Interface_Requests.xml
index c8dc32804..e8aadec8d 100644
--- a/spec/Connection_Interface_Requests.xml
+++ b/spec/Connection_Interface_Requests.xml
@@ -21,8 +21,8 @@
USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Requests">
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <interface name="im.telepathy1.Connection.Interface.Requests">
+ <tp:requires interface="im.telepathy1.Connection"/>
<tp:added version="0.17.11">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -30,12 +30,6 @@
represent bundles of channels that should be dispatched together, and
does not assume any particular properties by which channels are
uniquely identifiable.</p>
-
- <p>If this interface is implemented on a connection, then
- <tp:member-ref>NewChannels</tp:member-ref> MUST be emitted for
- all new channels, even those created with <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection"
- >RequestChannel</tp:dbus-ref>.</p>
</tp:docstring>
<tp:struct name="Channel_Details" array-name="Channel_Details_List">
@@ -84,12 +78,12 @@
</tp:rationale>
<p>Each dictionary MUST contain the keys
- <tp:dbus-ref>org.freedesktop.Telepathy.Channel.ChannelType</tp:dbus-ref>,
- <tp:dbus-ref>org.freedesktop.Telepathy.Channel.TargetHandleType</tp:dbus-ref>,
- <tp:dbus-ref>org.freedesktop.Telepathy.Channel.TargetHandle</tp:dbus-ref>,
- <tp:dbus-ref>org.freedesktop.Telepathy.Channel.TargetID</tp:dbus-ref>
+ <tp:dbus-ref>im.telepathy1.Channel.ChannelType</tp:dbus-ref>,
+ <tp:dbus-ref>im.telepathy1.Channel.TargetHandleType</tp:dbus-ref>,
+ <tp:dbus-ref>im.telepathy1.Channel.TargetHandle</tp:dbus-ref>,
+ <tp:dbus-ref>im.telepathy1.Channel.TargetID</tp:dbus-ref>
and
- <tp:dbus-ref>org.freedesktop.Telepathy.Channel.Requested</tp:dbus-ref>.
+ <tp:dbus-ref>im.telepathy1.Channel.Requested</tp:dbus-ref>.
</p>
<tp:rationale>
@@ -108,16 +102,6 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Request that an entirely new channel is created.</p>
-
- <tp:rationale>
- <p>There is deliberately no flag corresponding to the
- suppress_handler argument to
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.RequestChannel</tp:dbus-ref>,
- because passing a FALSE value for that argument is deprecated.
- Requests made using this interface always behave as though
- suppress_handler was TRUE.</p>
- </tp:rationale>
-
</tp:docstring>
<arg direction="in" name="Request" type="a{sv}"
@@ -125,7 +109,7 @@
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A dictionary containing desirable properties, which MUST include
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">ChannelType</tp:dbus-ref>.
+ namespace="im.telepathy1.Channel">ChannelType</tp:dbus-ref>.
Some properties
are defined such that only an exact match makes sense, and
connection managers MUST NOT satisfy a request with a channel
@@ -184,9 +168,9 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The channel request was one that can never succeed,
such as requesting an unsupported channel type, or requesting
@@ -194,42 +178,42 @@
the given target handle type.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
+ <tp:error name="im.telepathy1.Error.InvalidHandle">
<tp:docstring>
An invalid handle was requested as the value of a property whose
value is a handle (like
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.TargetHandle</tp:dbus-ref>),
+ <tp:dbus-ref namespace="im.telepathy1">Channel.TargetHandle</tp:dbus-ref>),
or a syntactically invalid identifier was requested as the value
of a property whose value is the string corresponding to a handle
(like <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.TargetID</tp:dbus-ref>).
+ namespace="im.telepathy1">Channel.TargetID</tp:dbus-ref>).
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The request matched the fixed properties of a
<tp:type>Requestable_Channel_Class</tp:type> in
<tp:member-ref>RequestableChannelClasses</tp:member-ref>, but the
allowed arguments did not make sense; for example, a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">RoomList</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type">RoomList1</tp:dbus-ref>
was requested, but the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.RoomList">Server</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type.RoomList1">Server</tp:dbus-ref>
property provided was not a valid DNS name.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotCapable">
+ <tp:error name="im.telepathy1.Error.NotCapable">
<tp:docstring>
The requested channel cannot be created because the requested
contact is using a client that lacks a particular feature.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.Offline">
+ <tp:error name="im.telepathy1.Error.Offline">
<tp:docstring>
The requested channel cannot be created because the target is
offline.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The requested channel cannot be created, but in
principle, a similar request might succeed in future.
@@ -242,17 +226,15 @@
<li>a channel matching the request has already been requested
(by a previous call to CreateChannel,
<tp:member-ref>EnsureChannel</tp:member-ref>,
- <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.RequestChannel</tp:dbus-ref>
or similar) and the protocol requires that only one such
channel can exist at a time</li>
</ul>
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.Banned"/>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.Full"/>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.InviteOnly"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.Channel.Banned"/>
+ <tp:error name="im.telepathy1.Error.Channel.Full"/>
+ <tp:error name="im.telepathy1.Error.Channel.InviteOnly"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
</tp:possible-errors>
</method>
@@ -330,9 +312,9 @@
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The channel request was one that can never succeed,
such as requesting an unsupported channel type, or requesting
@@ -340,58 +322,58 @@
the given target handle type.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
+ <tp:error name="im.telepathy1.Error.InvalidHandle">
<tp:docstring>
An invalid handle was requested as the value of a property whose
value is a handle (like
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.TargetHandle</tp:dbus-ref>),
+ <tp:dbus-ref namespace="im.telepathy1">Channel.TargetHandle</tp:dbus-ref>),
or a syntactically invalid identifier was requested as the value
of a property whose value is the string corresponding to a handle
(like <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Channel.TargetID</tp:dbus-ref>).
+ namespace="im.telepathy1">Channel.TargetID</tp:dbus-ref>).
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The request matched the fixed properties of a
<tp:type>Requestable_Channel_Class</tp:type> in
<tp:member-ref>RequestableChannelClasses</tp:member-ref>, but the
allowed arguments did not make sense; for example, a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">RoomList</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type">RoomList1</tp:dbus-ref>
was requested, but the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.RoomList">Server</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type.RoomList1">Server</tp:dbus-ref>
property provided was not a valid DNS name.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotCapable">
+ <tp:error name="im.telepathy1.Error.NotCapable">
<tp:docstring>
The requested channel cannot be created because the requested
contact is using a client that lacks a particular feature.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.Offline">
+ <tp:error name="im.telepathy1.Error.Offline">
<tp:docstring>
The requested channel cannot be created because the target is
offline.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The requested channel cannot be created, but in
principle, a similar request might succeed in future.
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.Banned"/>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.Full"/>
- <tp:error name="org.freedesktop.Telepathy.Error.Channel.InviteOnly"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
+ <tp:error name="im.telepathy1.Error.Channel.Banned"/>
+ <tp:error name="im.telepathy1.Error.Channel.Full"/>
+ <tp:error name="im.telepathy1.Error.Channel.InviteOnly"/>
+ <tp:error name="im.telepathy1.Error.PermissionDenied"/>
</tp:possible-errors>
</method>
<signal name="NewChannels" tp:name-for-bindings="New_Channels">
<tp:added version="0.17.11">(as stable API)</tp:added>
<tp:changed version="0.17.14">Added a guarantee of ordering
- relative to NewChannel</tp:changed>
+ relative to the old NewChannel signal (now removed)</tp:changed>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>New channels have been created. The connection manager SHOULD emit
@@ -407,35 +389,14 @@
<tp:rationale>
<p>Joining a MUC Tube in XMPP requires joining the corresponding
MUC (chatroom), so a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type">Text</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Type">Text</tp:dbus-ref>
channel can be created as a side-effect.</p>
</tp:rationale>
-
- <p>Every time NewChannels is emitted, it MUST be followed by
- a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection.NewChannel</tp:dbus-ref>
- signal for each channel.</p>
-
- <tp:rationale>
- <p>The double signal emission is for the benefit of older Telepathy
- clients, which won't be listening for NewChannels.</p>
-
- <p>The more informative NewChannels signal comes first so that
- clients that did not examine the connection to find
- out whether Requests is supported will see the more informative
- signal for each channel first, and then ignore the less
- informative signal because it announces a new channel of which
- they are already aware.</p>
- </tp:rationale>
</tp:docstring>
<arg name="Channels" type="a(oa{sv})" tp:type="Channel_Details[]">
<tp:docstring>
- The channels and their details. All channels that are signalled
- together like this MUST have the same
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.FUTURE">Bundle</tp:dbus-ref>
- property, which may
- either refer to an existing bundle, or establish a new bundle.
+ The channels and their details.
</tp:docstring>
</arg>
</signal>
@@ -459,7 +420,7 @@
<tp:rationale>
This is redundant with the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel">Closed</tp:dbus-ref>
+ namespace="im.telepathy1.Channel">Closed</tp:dbus-ref>
signal on the channel itself, but it does provide full change
notification for the Channels property.
</tp:rationale>
@@ -483,13 +444,9 @@
a subset of their properties.</p>
<p>Channel classes SHOULD always include the keys
- <tp:dbus-ref>org.freedesktop.Telepathy.Channel.ChannelType</tp:dbus-ref>
+ <tp:dbus-ref>im.telepathy1.Channel.ChannelType</tp:dbus-ref>
and
- <tp:dbus-ref>org.freedesktop.Telepathy.Channel.TargetHandleType</tp:dbus-ref>.
- (One exception is that <tp:dbus-ref namespace="ofdT.Channel.Type"
- >ContactSearch</tp:dbus-ref> channels do not have TargetHandleType
- <code>None</code> in their requestable channel classes, for
- historical reasons.)</p>
+ <tp:dbus-ref>im.telepathy1.Channel.TargetHandleType</tp:dbus-ref>.</p>
</tp:docstring>
<tp:member type="s" name="Key" tp:type="DBus_Qualified_Member">
@@ -586,15 +543,6 @@
between the properties, so we do not have separate arrays
of required and optional properties.</p>
</tp:rationale>
-
- <p>If this array contains the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.FUTURE">Bundle</tp:dbus-ref>
- property, then this class of channel can be combined with other
- channels with that property in a request, or added to an existing
- bundle. If not, this signifies that the connection manager is
- unable to mark channels of this class as part of a bundle - this
- means that to the remote contact they are likely to be
- indistinguishable from channels requested separately.</p>
</tp:docstring>
</tp:member>
</tp:struct>
diff --git a/spec/Connection_Interface_Resources.xml b/spec/Connection_Interface_Resources1.xml
index 716089cd6..ca7dddd3b 100644
--- a/spec/Connection_Interface_Resources.xml
+++ b/spec/Connection_Interface_Resources1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Resources"
+<node name="/Connection_Interface_Resources1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2010 Collabora Ltd.</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -17,10 +17,10 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.Resources.DRAFT"
+ <interface name="im.telepathy1.Connection.Interface.Resources1"
tp:causes-havoc="experimental">
<tp:added version="0.21.1">(draft 1)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
+ <tp:requires interface="im.telepathy1.Connection"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface on connections to show contact attributes for
@@ -45,16 +45,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
attempts to change this.</p>
<p>When using this interface, it is a little like using the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface"
+ <tp:dbus-ref namespace="im.telepathy1.Connection.Interface"
>Contacts</tp:dbus-ref> interface, but only resource-specific
attributes are ever returned. The resource-specific contact
attributes are decided on by the CM, but XMPP's are listed
below:</p>
<ul>
- <li><tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">SimplePresence/presence</tp:dbus-ref></li>
- <li><tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">ContactCapabilities/capabilities</tp:dbus-ref></li>
- <li><tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">ClientTypes/client-types</tp:dbus-ref></li>
+ <li><tp:dbus-ref namespace="im.telepathy1.Connection.Interface">Presence1/presence</tp:dbus-ref></li>
+ <li><tp:dbus-ref namespace="im.telepathy1.Connection.Interface">ContactCapabilities1/capabilities</tp:dbus-ref></li>
+ <li><tp:dbus-ref namespace="im.telepathy1.Connection.Interface">ClientTypes1/client-types</tp:dbus-ref></li>
</ul>
</tp:docstring>
@@ -91,8 +91,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
+ <tp:error name="im.telepathy1.Error.Disconnected"/>
+ <tp:error name="im.telepathy1.Error.InvalidHandle"/>
</tp:possible-errors>
</method>
diff --git a/spec/Connection_Interface_Service_Point.xml b/spec/Connection_Interface_Service_Point1.xml
index b135c04c7..a650141bc 100644
--- a/spec/Connection_Interface_Service_Point.xml
+++ b/spec/Connection_Interface_Service_Point1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Interface_Service_Point" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+<node name="/Connection_Interface_Service_Point1" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright> Copyright © 2005-2010 Nokia Corporation </tp:copyright>
<tp:copyright> Copyright © 2005-2010 Collabora Ltd </tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -17,7 +17,7 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Connection.Interface.ServicePoint">
+ <interface name="im.telepathy1.Connection.Interface.ServicePoint1">
<tp:added version="0.19.7">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -43,7 +43,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
A list of IDs that are mapped to this service. This is provided as
a convenience for the UIs, but the preferred method for
requesting channel to a service is by setting the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Interface.ServicePoint">InitialServicePoint</tp:dbus-ref>
+ namespace="im.telepathy1.Channel.Interface.ServicePoint1">InitialServicePoint</tp:dbus-ref>
property in a channel request.
</tp:docstring>
</tp:member>
diff --git a/spec/Connection_Interface_Sidecars1.xml b/spec/Connection_Interface_Sidecars1.xml
new file mode 100644
index 000000000..08fe37daa
--- /dev/null
+++ b/spec/Connection_Interface_Sidecars1.xml
@@ -0,0 +1,114 @@
+<?xml version="1.0" ?>
+<node name="/Connection_Interface_Sidecars1"
+ xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
+
+ <tp:copyright>Copyright © 2012 Collabora Ltd.</tp:copyright>
+ <tp:license xmlns="http://www.w3.org/1999/xhtml">
+ <p>This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.</p>
+
+ <p>This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.</p>
+
+ <p>You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA.</p>
+ </tp:license>
+
+ <interface name="im.telepathy1.Connection.Interface.Sidecars1">
+ <tp:requires interface="im.telepathy1.Connection"/>
+ <tp:added version="0.UNRELEASED">from Connection.FUTURE</tp:added>
+
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>A <a href="http://en.wikipedia.org/wiki/Sidecar">sidecar</a>
+ is an object with a particular interface which provides
+ additional connection-specific functionality. This interface
+ serves as a way to ensure these sidecars.</p>
+ </tp:docstring>
+
+ <method name="EnsureSidecar" tp:name-for-bindings="Ensure_Sidecar">
+ <tp:added version="0.19.0">(as a draft)</tp:added>
+
+ <arg direction="in" name="Main_Interface" type="s"
+ tp:type="DBus_Interface">
+ <tp:docstring>
+ The "primary" interface implemented by an object attached
+ to a connection. For example, a Gabble plugin implementing
+ fine-grained control of XEP-0016 privacy lists might expose an object
+ implementing <tt>com.example.PrivacyLists</tt>.
+ </tp:docstring>
+ </arg>
+
+ <arg direction="out" name="Path" type="o">
+ <tp:docstring>The object path of the sidecar, exported by the same bus
+ name as the Connection to which it is attached.</tp:docstring>
+ </arg>
+ <arg direction="out" name="Properties" type="a{sv}"
+ tp:type="Qualified_Property_Value_Map">
+ <tp:docstring>Immutable properties of the sidecar.</tp:docstring>
+ </arg>
+
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ <p>Request an object with a particular interface providing additional
+ connection-specific functionality, together with its immutable
+ properties. These will often be implemented by plug-ins to the
+ connection managers; for example, support for an XMPP XEP for which
+ no generic Telepathy interface exists might be implemented by a
+ Gabble plugin exposing a sidecar with a particular interface.</p>
+
+ <p>This method may be called at any point during the lifetime of a
+ connection, even before its <tp:type>Connection_Status</tp:type>
+ changes to Connected. It MAY take a long time to
+ return—perhaps it needs to wait for a connection to be established
+ and for all the services supported by the server to be discovered
+ before determining whether necessary server-side support is
+ available—so callers SHOULD override the default method timeout (25
+ seconds) with a much higher value (perhaps even MAX_INT32, meaning
+ “no timeout” in recent versions of libdbus).</p>
+
+ <tp:rationale>
+ <p>There is an implicit assumption that any connection
+ manager plugin will only want to export one “primary” object per
+ feature it implements, since there is a one-to-one mapping between
+ interface and object. This is reasonable since Sidecars are
+ (intended to be) analogous to extra interfaces on the connection,
+ providing once-per-connection shared functionality; it also makes
+ client code straightforward (look up the interface you care about
+ in a dictionary, build a proxy object from the value). More
+ “plural” plugins are likely to want to implement new types of
+ <tp:dbus-ref
+ namespace="im.telepathy1">Channel</tp:dbus-ref>
+ instead.</p>
+ </tp:rationale>
+ </tp:docstring>
+
+ <tp:error name="im.telepathy1.Error.NotImplemented">
+ <tp:docstring>
+ The requested sidecar is not implemented by this connection manager,
+ or a necessary server-side component does not exist.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="im.telepathy1.Error.ServiceBusy">
+ <tp:docstring>
+ A server-side component needed by the requested sidecar reported it
+ is currently too busy, or did not respond for some
+ implementation-defined time. The caller may wish to try again later.
+ </tp:docstring>
+ </tp:error>
+
+ <tp:error name="im.telepathy1.Error.Cancelled">
+ <tp:docstring>
+ The connection was disconnected while the sidecar was being set up.
+ </tp:docstring>
+ </tp:error>
+ </method>
+
+ </interface>
+</node>
+<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Connection_Manager.xml b/spec/Connection_Manager.xml
index ada5057d3..090908a31 100644
--- a/spec/Connection_Manager.xml
+++ b/spec/Connection_Manager.xml
@@ -18,7 +18,7 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.ConnectionManager">
+ <interface name="im.telepathy1.ConnectionManager">
<tp:simple-type name="Connection_Manager_Name" type="s">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -56,11 +56,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
characters were not specified</tp:changed>
</tp:simple-type>
- <tp:simple-type name="Protocol" type="s" array-name="Protocol_List">
+ <tp:simple-type name="Protocol_Name" type="s" array-name="Protocol_Name_List">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An instant messaging protocol. It must consist only of ASCII
- letters, digits and hyphen/minus signs (U+002D "-"), and must start
- with a letter. Where possible, this SHOULD be
+ letters, digits and underscores, and must start
+ with a letter or underscore. Where possible, this SHOULD be
chosen from the following well-known values:</p>
<ul>
@@ -70,7 +70,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<li>icq - ICQ (OSCAR)</li>
<li>irc - Internet Relay Chat (RFC 1459, 2810-2813)</li>
<li>jabber - XMPP (RFC 3920, 3921) or Jabber</li>
- <li>local-xmpp - Link-local XMPP (XEP-0174) (Bonjour, Salut)</li>
+ <li>local_xmpp - Link-local XMPP (XEP-0174) (Bonjour, Salut)</li>
<li>msn - MSNP (Windows Live Messenger)</li>
<li>myspace - MySpaceIM</li>
<li>mxit - MXit</li>
@@ -89,14 +89,28 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<li>yahoojp - Japanese version of YMSG</li>
<li>zephyr - Zephyr</li>
</ul>
+
+ <tp:rationale>
+ <p>Identifiers formed with letters, digits and underscores and not
+ starting with a digit are valid in all syntactically-restricted
+ strings used in D-Bus, and non-problematic in filenames.</p>
+
+ <p>Telepathy 0.x used hyphen/minus instead of underscore in the
+ canonical form of a protocol name, which meant that protocol
+ names often had to be transformed between their canonical form,
+ and a form that used underscores for use in a D-Bus name.</p>
+ </tp:rationale>
</tp:docstring>
<tp:changed version="0.17.1">Prior to version 0.17.1, the allowed
characters were not specified</tp:changed>
+ <tp:changed version="UNRELEASED">
+ In Telepathy 0.x, protocol names could contain hyphen/minus signs,
+ but not underscores.
+ </tp:changed>
</tp:simple-type>
<tp:struct name="Param_Spec" array-name="Param_Spec_List">
- <tp:docstring>A struct representing an allowed parameter, as returned
- by GetParameters on the ConnectionManager interface.</tp:docstring>
+ <tp:docstring>A struct representing an allowed parameter.</tp:docstring>
<tp:member type="s" name="Name">
<tp:docstring>A string parameter name</tp:docstring>
</tp:member>
@@ -128,9 +142,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:flag>
<tp:flag suffix="Has_Default" value="4">
<tp:docstring>
- This parameter has a default value, which is returned in
- GetParameters; not providing this parameter is equivalent to
- providing the default.
+ This parameter has a default value; not providing this
+ parameter is equivalent to providing the default.
</tp:docstring>
</tp:flag>
<tp:flag suffix="Secret" value="8">
@@ -150,7 +163,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>This parameter is also a D-Bus property on the resulting
<tp:dbus-ref
- namespace="ofdT">Connection</tp:dbus-ref>; a
+ namespace="imt1">Connection</tp:dbus-ref>; a
parameter named <code>com.example.Duck.Macaroni</code> with this
flag corresponds to the <code>Macaroni</code> property on the
<code>com.example.Duck</code> interface. Its value can be queried
@@ -158,7 +171,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<code>org.freedesktop.DBus.Properties</code> interface.</p>
<p>When a new value for a parameter with this flag is passed to
- <tp:dbus-ref namespace="ofdT">Account.UpdateParameters</tp:dbus-ref>,
+ <tp:dbus-ref namespace="imt1">Account.UpdateParameters</tp:dbus-ref>,
the account manager will attempt to update its value on any running
connections. Similarly, if the parameter also has the
<code>Has_Default</code> flag, and is passed in the second argument
@@ -166,16 +179,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
to any running
connections. Thus, clients generally do not need to directly access
or update the connection property; instead, they SHOULD manipulate
- <tp:dbus-ref namespace="ofdT">Account.Parameters</tp:dbus-ref>.</p>
+ <tp:dbus-ref namespace="imt1">Account.Parameters</tp:dbus-ref>.</p>
<tp:rationale>
<p>This allows runtime-configurable options to be stored and
maintained by the <tp:dbus-ref
- namespace='ofdT'>AccountManager</tp:dbus-ref>, without needing to
+ namespace='imt1'>AccountManager</tp:dbus-ref>, without needing to
invent a separate account preference for “properties that should
be set on the connection as soon as it is created”. It was
originally invented to manage <tp:dbus-ref
- namespace='ofdT.Connection.Interface'>Cellular</tp:dbus-ref>
+ namespace='imt1.Connection.Interface'>Cellular1</tp:dbus-ref>
preferences.</p>
</tp:rationale>
</tp:docstring>
@@ -183,46 +196,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:flag>
</tp:flags>
- <method name="GetParameters" tp:name-for-bindings="Get_Parameters">
- <arg direction="in" name="Protocol" type="s" tp:type="Protocol">
- <tp:docstring>
- The required protocol name
- </tp:docstring>
- </arg>
- <arg direction="out" type="a(susv)" tp:type="Param_Spec[]"
- name="Parameters">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- An array of structs representing possible parameters.
- </tp:docstring>
- </arg>
- <tp:docstring>
- Get a list of the parameters which may be specified in the
- <tp:dbus-ref namespace='ofdT.Account'>Parameters</tp:dbus-ref> of an
- <tp:dbus-ref namespace='ofdT'>Account</tp:dbus-ref> (or, for
- specialised applications which do not use the account manager, passed
- to <tp:member-ref>RequestConnection</tp:member-ref>). Some parameters
- are mandatory, and some parameters only make sense when registering new
- accounts with the server; see the <tp:type>Param_Spec</tp:type>
- documentation for more details.
- </tp:docstring>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
- <tp:docstring>
- The requested protocol is not supported by this manager
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
-
<tp:mapping name="Protocol_Properties_Map">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A map from protocol identifiers supported by a connection
manager to the immutable properties of the corresponding
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>Protocol</tp:dbus-ref> objects.</p>
</tp:docstring>
- <tp:member name="Protocol" type="s" tp:type="Protocol">
+ <tp:member name="Name" type="s" tp:type="Protocol_Name">
<tp:docstring>A protocol name</tp:docstring>
</tp:member>
@@ -239,7 +221,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A map from protocol identifiers supported by this connection
manager to the immutable properties of the corresponding
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>Protocol</tp:dbus-ref> objects.</p>
<tp:rationale>
@@ -248,25 +230,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
most clients will only need one D-Bus round trip to interrogate
the ConnectionManager about all its protocols.</p>
</tp:rationale>
-
- <p>If this map is empty or missing, clients SHOULD fall back to
- calling <tp:member-ref>ListProtocols</tp:member-ref> and
- <tp:member-ref>GetParameters</tp:member-ref>.</p>
</tp:docstring>
</property>
- <method name="ListProtocols" tp:name-for-bindings="List_Protocols">
- <arg direction="out" type="as" tp:type="Protocol[]" name="Protocols">
- <tp:docstring>
- The keys of the <tp:member-ref>Protocols</tp:member-ref> map.
- </tp:docstring>
- </arg>
- <tp:docstring>
- Get a list of protocol identifiers that are implemented by this
- connection manager.
- </tp:docstring>
- </method>
-
<signal name="NewConnection" tp:name-for-bindings="New_Connection">
<arg name="Bus_Name" type="s" tp:type="DBus_Bus_Name">
<tp:docstring>
@@ -278,20 +244,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
The object path of the Connection object on this service
</tp:docstring>
</arg>
- <arg name="Protocol" type="s" tp:type="Protocol">
+ <arg name="Protocol" type="s" tp:type="Protocol_Name">
<tp:docstring>
The identifier for the protocol this connection uses
</tp:docstring>
</arg>
<tp:docstring>
Emitted when a new <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref> object
+ namespace="im.telepathy1">Connection</tp:dbus-ref> object
is created.
</tp:docstring>
</signal>
<method name="RequestConnection" tp:name-for-bindings="Request_Connection">
- <arg direction="in" name="Protocol" type="s" tp:type="Protocol">
+ <arg direction="in" name="Protocol" type="s" tp:type="Protocol_Name">
<tp:docstring>
The protocol identifier
</tp:docstring>
@@ -299,9 +265,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<arg direction="in" name="Parameters" type="a{sv}"
tp:type="String_Variant_Map">
<tp:docstring>
- A dictionary mapping parameter names to values of the appropriate
- type, as indicated by <tp:member-ref>GetParameters</tp:member-ref>
- and the well-known list of names and value types documented on the
+ A dictionary mapping parameter names to values of the
+ appropriate type, as indicated by the <tp:dbus-ref
+ namespace="imt1.Protocol">Parameters</tp:dbus-ref> property
+ (which can be retrieved by getting the
+ <tp:member-ref>Protocols</tp:member-ref> property) and the
+ well-known list of names and value types documented on the
<tp:type>Connection_Parameter_Name</tp:type> type.
</tp:docstring>
</arg>
@@ -317,31 +286,34 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</arg>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Request a
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1">Connection</tp:dbus-ref>
object representing a given account on a given
protocol with the given parameters. The method returns the bus name
and the object path where the new Connection object can be found,
which should have the status of Connection_Status_Disconnected, to
allow signal handlers to be attached before connecting is started
with the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">Connect</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Connection">Connect</tp:dbus-ref>
method.</p>
<p><strong>Most applications should not use this method</strong>: they
should instead use the the <tp:dbus-ref
- namespace='ofdT.Account'>Connection</tp:dbus-ref> property on an
- <tp:dbus-ref namespace='ofdT'>Account</tp:dbus-ref> object obtained
+ namespace='imt1.Account'>Connection</tp:dbus-ref> property on an
+ <tp:dbus-ref namespace='imt1'>Account</tp:dbus-ref> object obtained
from the <tp:dbus-ref
- namespace='ofdT'>AccountManager</tp:dbus-ref>. This method is used
+ namespace='imt1'>AccountManager</tp:dbus-ref>. This method is used
internally by the account manager to create connections when
needed.</p>
- <p>The parameters which must and may be provided in the parameters
- dictionary can be discovered with the
- <tp:member-ref>GetParameters</tp:member-ref> method. These
- parameters, their types, and their default values may be cached
- in files so that all available connection managers do not need to be
- started to discover which protocols are available.</p>
+ <p>The parameters which must and may be provided in the
+ parameters dictionary can be discovered by looking at the
+ <tp:dbus-ref
+ namespace="imt1.Protocol">Parameters</tp:dbus-ref> property by
+ getting the <tp:member-ref>Protocols</tp:member-ref>
+ property. These parameters, their types, and their default
+ values may be cached in files so that all available connection
+ managers do not need to be started to discover which protocols
+ are available.</p>
<p>To request values for these parameters from the user, a client must
have prior knowledge of the meaning of the parameter names, so the
@@ -367,18 +339,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
the creation of new connections.</p>
</tp:docstring>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NetworkError"/>
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The requested protocol is not supported by this manager
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+ <tp:error name="im.telepathy1.Error.NotAvailable">
<tp:docstring>
The requested connection already appears to exist
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
Unrecognised connection parameters
</tp:docstring>
@@ -392,7 +364,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>Well-known connection parameter names, along with their expected
type. Where possible, connection managers should use names and types
from this list in the <tp:dbus-ref
- namespace='ofdT.Protocol'>Parameters</tp:dbus-ref> that may be passed
+ namespace='imt1.Protocol'>Parameters</tp:dbus-ref> that may be passed
to <tp:member-ref>RequestConnection</tp:member-ref>.</p>
<dl>
@@ -446,7 +418,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
pings.</p>
<p>This parameter is superseded by the <tp:dbus-ref
- namespace='ofdT.Connection.Interface.Keepalive.DRAFT'>KeepaliveInterval</tp:dbus-ref>
+ namespace='imt1.Connection.Interface.Keepalive1'>KeepaliveInterval</tp:dbus-ref>
property, which can be updated on an already-established
connection as well as being specified when requesting the
connection. Clients SHOULD provide that parameter instead, if
@@ -475,10 +447,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
defined; it's provided as a hook for possible future
functionality.</p>
- <p>To be compatible with older connection managers, if retrieving
- this property fails, clients SHOULD assume that its value is
- an empty list.</p>
-
<p>Connection managers with a non-empty list of Interfaces MUST
represent them in the <code>.manager</code> file, if they have one,
as an <code>Interfaces</code> key in the
@@ -497,7 +465,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:type>Connection_Manager_Name</tp:type> for syntax).</p>
<p>The connection manager must then provide a well-known bus name of
- <code>org.freedesktop.Telepathy.ConnectionManager.<em>cmname</em></code>
+ <code>im.telepathy1.ConnectionManager.<em>cmname</em></code>
where <em>cmname</em> is its connection manager name. If it makes sense
to start the connection manager using D-Bus service activation, it
must register that well-known name for service activation by installing
@@ -512,14 +480,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<p>When the connection manager is running, it must have an object
implementing the ConnectionManager interface at the object path
- <code>/org/freedesktop/Telepathy/ConnectionManager/<em>cmname</em></code>.
+ <code>/im/telepathy1/ConnectionManager/<em>cmname</em></code>.
</p>
<p>Connection managers' capabilities can be determined dynamically by
- calling their <tp:member-ref>ListProtocols</tp:member-ref> method, then
- for each protocol of interest, calling
- <tp:member-ref>GetParameters</tp:member-ref> to discover the required and
- optional parameters.
+ getting the <tp:member-ref>Protocols</tp:member-ref> property.
However, since it is inefficient to activate all possible connection
managers on the system just to find out what they can do, there
is a standard mechanism to store static information about CMs in
@@ -533,7 +498,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
colon-separated paths from $XDG_DATA_DIRS, defaulting to
/usr/local/share:/usr/share if unset) for the first file named
<code>telepathy/managers/<em>cmname</em>.manager</code> that can be
- read without error. This file has the same syntax as a
+ read without error and contains a group whose name is the name of this
+ interface. This file has the same syntax as a
<a href="http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html">freedesktop.org Desktop Entry file</a>.</p>
<p>Clients must still support connection managers for which no
@@ -544,31 +510,24 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
a plugin architecture) should not install a <code>.manager</code>
file.</p>
- <p>The <code>.manager</code> file SHOULD have a group headed
- <code>[ConnectionManager]</code>, containing a key
+ <p>The <code>.manager</code> file MUST have a group headed
+ <code>[im.telepathy1.ConnectionManager]</code>, containing a key
<code>Interfaces</code> representing
<tp:member-ref>Interfaces</tp:member-ref> as a sequence of strings
each followed by a semicolon (the "localestrings" type from the Desktop
Entry Specification).</p>
- <p>The <code>[ConnectionManager]</code> group SHOULD NOT contain keys
- <code>ObjectPath</code> or <code>BusName</code>. If it does, they MUST
- be ignored.</p>
-
- <tp:rationale>
- <p>The object path and bus name are derivable from the connection
- manager's name, which is part of the filename, so these keys are
- redundant. They were required in very old versions of Telepathy.</p>
- </tp:rationale>
-
<p>For each protocol name <em>proto</em> that would be returned by
- ListProtocols, the .manager file contains a group
- headed <code>[Protocol <em>proto</em>]</code>. For each parameter
- <em>p</em> that would be returned by GetParameters(<em>proto</em>), the
- .manager file contains a key <code>param-<em>p</em></code> with a value
- consisting of a D-Bus signature (a single complete type), optionally
- followed by a space and a space-separated list of flags. The supported
- flags are:</p>
+ the keys of the <tp:member-ref>Protocols</tp:member-ref> property,
+ the .manager file contains a group headed <code>[im.telepathy1.Protocol
+ <em>proto</em>]</code>. For each parameter <em>p</em> that would
+ be in the <tp:dbus-ref
+ namespace="imt1.Protocol">Parameters</tp:dbus-ref> property
+ (retrievable using the <tp:member-ref>Protocols</tp:member-ref>
+ property), the .manager file contains a key
+ <code>param-<em>p</em></code> with a value consisting of a D-Bus
+ signature (a single complete type), optionally followed by a space
+ and a space-separated list of flags. The supported flags are:</p>
<ul>
<li><code>required</code>, corresponding to
@@ -630,6 +589,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:changed version="0.25.2">Prior to version 0.25.2 the
serialization of object-path arrays (signature 'ao') was not
defined</tp:changed>
+ <tp:changed version="0.UNRELEASED">GetParameters and ListProtocols
+ have been removed in favour of the
+ <tp:member-ref>Protocols</tp:member-ref> property.</tp:changed>
</interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Connection_Manager_Interface_Account_Storage.xml b/spec/Connection_Manager_Interface_Account_Storage1.xml
index 2f4f4bf78..a3af965d6 100644
--- a/spec/Connection_Manager_Interface_Account_Storage.xml
+++ b/spec/Connection_Manager_Interface_Account_Storage1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Connection_Manager_Interface_Account_Storage"
+<node name="/Connection_Manager_Interface_Account_Storage1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2011 Collabora Ltd.</tp:copyright>
@@ -20,20 +20,20 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.ConnectionManager.Interface.AccountStorage.DRAFT"
+ <interface name="im.telepathy1.ConnectionManager.Interface.AccountStorage1"
tp:causes-havoc="experimental">
<tp:added version="0.21.10">(draft 1)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.ConnectionManager"/>
+ <tp:requires interface="im.telepathy1.ConnectionManager"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface for connection managers that store account details
internally. At the moment this consists only of storing an account's
credentials, but other functionality may be added in the future.</p>
- <p><tp:dbus-ref namespace="ofdT">Account</tp:dbus-ref> objects
+ <p><tp:dbus-ref namespace="imt1">Account</tp:dbus-ref> objects
representing accounts on a connection manager that implements this
interface should implement the
- <tp:dbus-ref namespace="ofdT.Account.Interface">ExternalPasswordStorage.DRAFT</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Account.Interface">ExternalPasswordStorage1</tp:dbus-ref>
interface.</p>
</tp:docstring>
@@ -80,12 +80,12 @@
type="s">
<tp:docstring>
An account id as returned from
- <tp:dbus-ref namespace="ofdT">Protocol.IdentifyAccount</tp:dbus-ref>.
+ <tp:dbus-ref namespace="imt1">Protocol.IdentifyAccount</tp:dbus-ref>.
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The account id is invalid.
</tp:docstring>
@@ -103,12 +103,12 @@
type="s">
<tp:docstring>
An account id as returned from
- <tp:dbus-ref namespace="ofdT">Protocol.IdentifyAccount</tp:dbus-ref>.
+ <tp:dbus-ref namespace="imt1">Protocol.IdentifyAccount</tp:dbus-ref>.
</tp:docstring>
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The account id is invalid.
</tp:docstring>
diff --git a/spec/Debug.xml b/spec/Debug1.xml
index 70a82e903..ae98c2db6 100644
--- a/spec/Debug.xml
+++ b/spec/Debug1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Debug"
+<node name="/Debug1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright (C) 2009 Collabora Ltd.</tp:copyright>
<tp:license xmlns="http://www.w3.org/1999/xhtml">
@@ -17,14 +17,14 @@ Lesser General Public License for more details.</p>
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Debug">
+ <interface name="im.telepathy1.Debug1">
<tp:added version="0.17.27">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface for providing debug messages.</p>
<p>This interface is primarily provided by one object per
- service, at the path <tt>/org/freedesktop/Telepathy/debug</tt>.</p>
+ service, at the path <tt>/im/telepathy1/Debug</tt>.</p>
</tp:docstring>
<property name="Enabled" type="b" access="readwrite"
diff --git a/spec/Makefile.am b/spec/Makefile.am
index ea7899a07..fd2673a37 100644
--- a/spec/Makefile.am
+++ b/spec/Makefile.am
@@ -1,73 +1,65 @@
EXTRA_DIST = \
Account.xml \
- Account_Interface_Addressing.xml \
- Account_Interface_Avatar.xml \
- Account_Interface_External_Password_Storage.xml \
- Account_Interface_Hidden.xml \
- Account_Interface_Storage.xml \
+ Account_Interface_Addressing1.xml \
+ Account_Interface_Avatar1.xml \
+ Account_Interface_External_Password_Storage1.xml \
+ Account_Interface_Hidden1.xml \
+ Account_Interface_Storage1.xml \
Account_Manager.xml \
- Account_Manager_Interface_Hidden.xml \
+ Account_Manager_Interface_Hidden1.xml \
Authentication_TLS_Certificate.xml \
- Call_Content.xml \
- Call_Content_Interface_DTMF.xml \
- Call_Content_Interface_Media.xml \
- Call_Content_Interface_Audio_Control.xml \
- Call_Content_Interface_Video_Control.xml \
- Call_Content_Media_Description.xml \
- Call_Content_Media_Description_Interface_RTCP_Extended_Reports.xml \
- Call_Content_Media_Description_Interface_RTCP_Feedback.xml \
- Call_Content_Media_Description_Interface_RTP_Header_Extensions.xml \
- Call_Interface_Mute.xml \
- Call_Stream.xml \
- Call_Stream_Endpoint.xml \
- Call_Stream_Interface_Media.xml \
+ Call1_Content.xml \
+ Call1_Content_Interface_Audio_Control1.xml \
+ Call1_Content_Interface_DTMF1.xml \
+ Call1_Content_Interface_Media.xml \
+ Call1_Content_Interface_Audio_Control1.xml \
+ Call1_Content_Interface_Video_Control1.xml \
+ Call1_Content_Media_Description.xml \
+ Call1_Content_Media_Description_Interface_RTCP_Extended_Reports1.xml \
+ Call1_Content_Media_Description_Interface_RTCP_Feedback1.xml \
+ Call1_Content_Media_Description_Interface_RTP_Header_Extensions1.xml \
+ Call1_Interface_Mute.xml \
+ Call1_Stream.xml \
+ Call1_Stream_Endpoint.xml \
+ Call1_Stream_Interface_Media.xml \
Channel.xml \
Channel_Dispatch_Operation.xml \
Channel_Dispatcher.xml \
- Channel_Dispatcher_Interface_Operation_List.xml \
- Channel_Future.xml \
- Channel_Handler.xml \
- Channel_Interface_Addressing.xml \
- Channel_Interface_Anonymity.xml \
- Channel_Interface_Call_State.xml \
- Channel_Interface_Captcha_Authentication.xml \
- Channel_Interface_Chat_State.xml \
- Channel_Interface_Conference.xml \
- Channel_Interface_Credentials_Storage.xml \
- Channel_Interface_DTMF.xml \
- Channel_Interface_Destroyable.xml \
- Channel_Interface_File_Transfer_Metadata.xml \
- Channel_Interface_Group.xml \
- Channel_Interface_HTML.xml \
- Channel_Interface_Hold.xml \
- Channel_Interface_Media_Signalling.xml \
- Channel_Interface_Mergeable_Conference.xml \
- Channel_Interface_Messages.xml \
- Channel_Interface_Password.xml \
- Channel_Interface_Picture.xml \
- Channel_Interface_Room.xml \
- Channel_Interface_Room_Config.xml \
- Channel_Interface_SASL_Authentication.xml \
- Channel_Interface_SMS.xml \
- Channel_Interface_Securable.xml \
- Channel_Interface_Service_Point.xml \
- Channel_Interface_Splittable.xml \
- Channel_Interface_Subject.xml \
- Channel_Interface_Transfer.xml \
- Channel_Interface_Tube.xml \
+ Channel_Dispatcher_Interface_Operation_List1.xml \
+ Channel_Interface_Addressing1.xml \
+ Channel_Interface_Anonymity1.xml \
+ Channel_Interface_Captcha_Authentication1.xml \
+ Channel_Interface_Chat_State1.xml \
+ Channel_Interface_Conference1.xml \
+ Channel_Interface_Credentials_Storage1.xml \
+ Channel_Interface_DTMF1.xml \
+ Channel_Interface_Destroyable1.xml \
+ Channel_Interface_File_Transfer_Metadata1.xml \
+ Channel_Interface_Group1.xml \
+ Channel_Interface_HTML1.xml \
+ Channel_Interface_Hold1.xml \
+ Channel_Interface_Mergeable_Conference1.xml \
+ Channel_Interface_Password1.xml \
+ Channel_Interface_Picture1.xml \
+ Channel_Interface_Room1.xml \
+ Channel_Interface_Room_Config1.xml \
+ Channel_Interface_SASL_Authentication1.xml \
+ Channel_Interface_SMS1.xml \
+ Channel_Interface_Securable1.xml \
+ Channel_Interface_Service_Point1.xml \
+ Channel_Interface_Splittable1.xml \
+ Channel_Interface_Subject1.xml \
+ Channel_Interface_Tube1.xml \
Channel_Request.xml \
- Channel_Type_Call.xml \
- Channel_Type_Contact_List.xml \
- Channel_Type_Contact_Search.xml \
- Channel_Type_DBus_Tube.xml \
- Channel_Type_File_Transfer.xml \
- Channel_Type_Room_List.xml \
- Channel_Type_Server_Authentication.xml \
- Channel_Type_Server_TLS_Connection.xml \
- Channel_Type_Stream_Tube.xml \
- Channel_Type_Streamed_Media.xml \
+ Channel_Type_Call1.xml \
+ Channel_Type_Contact_Search1.xml \
+ Channel_Type_DBus_Tube1.xml \
+ Channel_Type_File_Transfer1.xml \
+ Channel_Type_Room_List1.xml \
+ Channel_Type_Server_Authentication1.xml \
+ Channel_Type_Server_TLS_Connection1.xml \
+ Channel_Type_Stream_Tube1.xml \
Channel_Type_Text.xml \
- Channel_Type_Tubes.xml \
Client.xml \
Client_Approver.xml \
Client_Handler.xml \
@@ -76,43 +68,37 @@ EXTRA_DIST = \
Client_Observer.xml \
Connection.xml \
Connection_Future.xml \
- Connection_Interface_Addressing.xml \
- Connection_Interface_Aliasing.xml \
- Connection_Interface_Anonymity.xml \
- Connection_Interface_Avatars.xml \
- Connection_Interface_Balance.xml \
- Connection_Interface_Capabilities.xml \
- Connection_Interface_Cellular.xml \
- Connection_Interface_Client_Types.xml \
- Connection_Interface_Communication_Policy.xml \
- Connection_Interface_Contact_Blocking.xml \
- Connection_Interface_Contact_Capabilities.xml \
- Connection_Interface_Contact_Groups.xml \
- Connection_Interface_Contact_Info.xml \
- Connection_Interface_Contact_List.xml \
+ Connection_Interface_Addressing1.xml \
+ Connection_Interface_Aliasing1.xml \
+ Connection_Interface_Anonymity1.xml \
+ Connection_Interface_Avatars1.xml \
+ Connection_Interface_Balance1.xml \
+ Connection_Interface_Cellular1.xml \
+ Connection_Interface_Client_Types1.xml \
+ Connection_Interface_Communication_Policy1.xml \
+ Connection_Interface_Contact_Blocking1.xml \
+ Connection_Interface_Contact_Capabilities1.xml \
+ Connection_Interface_Contact_Groups1.xml \
+ Connection_Interface_Contact_Info1.xml \
+ Connection_Interface_Contact_List1.xml \
Connection_Interface_Contacts.xml \
- Connection_Interface_Forwarding.xml \
- Connection_Interface_Keepalive.xml \
- Connection_Interface_Location.xml \
- Connection_Interface_Mail_Notification.xml \
- Connection_Interface_Power_Saving.xml \
- Connection_Interface_Presence.xml \
- Connection_Interface_Privacy.xml \
- Connection_Interface_Renaming.xml \
+ Connection_Interface_Forwarding1.xml \
+ Connection_Interface_Keepalive1.xml \
+ Connection_Interface_Location1.xml \
+ Connection_Interface_Mail_Notification1.xml \
+ Connection_Interface_Power_Saving1.xml \
+ Connection_Interface_Presence1.xml \
+ Connection_Interface_Renaming1.xml \
Connection_Interface_Requests.xml \
- Connection_Interface_Resources.xml \
- Connection_Interface_Service_Point.xml \
- Connection_Interface_Simple_Presence.xml \
+ Connection_Interface_Resources1.xml \
+ Connection_Interface_Service_Point1.xml \
Connection_Manager.xml \
- Connection_Manager_Interface_Account_Storage.xml \
- Debug.xml \
- Media_Session_Handler.xml \
- Media_Stream_Handler.xml \
- Properties_Interface.xml \
+ Connection_Manager_Interface_Account_Storage1.xml \
+ Debug1.xml \
Protocol.xml \
- Protocol_Interface_Addressing.xml \
- Protocol_Interface_Avatars.xml \
- Protocol_Interface_Presence.xml \
+ Protocol_Interface_Addressing1.xml \
+ Protocol_Interface_Avatars1.xml \
+ Protocol_Interface_Presence1.xml \
all.xml \
errors.xml \
generic-types.xml \
diff --git a/spec/Media_Session_Handler.xml b/spec/Media_Session_Handler.xml
deleted file mode 100644
index 70aa75073..000000000
--- a/spec/Media_Session_Handler.xml
+++ /dev/null
@@ -1,81 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Media_Session_Handler" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
- <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
- <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
- <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
- </tp:license>
- <interface name="org.freedesktop.Telepathy.Media.SessionHandler">
- <method name="Error" tp:name-for-bindings="Error">
- <arg direction="in" name="Error_Code" type="u"
- tp:type="Media_Stream_Error"/>
- <arg direction="in" name="Message" type="s"/>
- <tp:deprecated version="0.13.4">
- Use <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Media">StreamHandler.Error</tp:dbus-ref>
- on each StreamHandler object instead.
- </tp:deprecated>
- <tp:docstring>
- Informs the connection manager that an error occured in this session.
- If used, the connection manager must terminate the session and all of
- the streams within it, and may also emit a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Channel.Type.StreamedMedia">StreamError</tp:dbus-ref>
- signal on the channel for each stream within the session.
- </tp:docstring>
- </method>
- <signal name="NewStreamHandler" tp:name-for-bindings="New_Stream_Handler">
- <arg name="Stream_Handler" type="o">
- <tp:docstring>
- The path of a new object implementing the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Media">StreamHandler</tp:dbus-ref>
- interface.
- </tp:docstring>
- </arg>
- <arg name="ID" type="u">
- <tp:docstring>
- The unique ID of the new stream
- </tp:docstring>
- </arg>
- <arg name="Media_Type" type="u" tp:type="Media_Stream_Type">
- <tp:docstring>
- Type of media that this stream should handle
- </tp:docstring>
- </arg>
- <arg name="Direction" type="u" tp:type="Media_Stream_Direction">
- <tp:docstring>
- Direction of this stream
- </tp:docstring>
- </arg>
- <tp:docstring>
- Emitted when a new stream handler has been created for this
- session.
- </tp:docstring>
- </signal>
- <method name="Ready" tp:name-for-bindings="Ready">
- <tp:docstring>
- Inform the connection manager that a client is ready to handle
- this session handler (i.e. that it has connected to the
- <tp:member-ref>NewStreamHandler</tp:member-ref> signal and done any
- other necessary setup).
- </tp:docstring>
- </method>
- <tp:docstring>
- An media session handler is an object that handles a number of synchronised
- media streams.
- </tp:docstring>
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Media_Stream_Handler.xml b/spec/Media_Stream_Handler.xml
deleted file mode 100644
index 0a833709a..000000000
--- a/spec/Media_Stream_Handler.xml
+++ /dev/null
@@ -1,906 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Media_Stream_Handler" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright> Copyright (C) 2005-2008 Collabora Limited </tp:copyright>
- <tp:copyright> Copyright (C) 2005-2008 Nokia Corporation </tp:copyright>
- <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
- <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
- </tp:license>
- <interface name="org.freedesktop.Telepathy.Media.StreamHandler">
-
- <tp:docstring>
- Handles signalling the information pertaining to a specific media stream.
- A client should provide information to this handler as and when it is
- available.
- </tp:docstring>
-
- <tp:struct name="Media_Stream_Handler_Candidate"
- array-name="Media_Stream_Handler_Candidate_List">
- <tp:member type="s" name="Name"/>
- <tp:member type="a(usuussduss)" name="Transports"
- tp:type="Media_Stream_Handler_Transport[]"/>
- </tp:struct>
-
- <tp:struct name="Media_Stream_Handler_Transport"
- array-name="Media_Stream_Handler_Transport_List">
- <tp:member type="u" name="Component_Number"/>
- <tp:member type="s" name="IP_Address"/>
- <tp:member type="u" name="Port"/>
- <tp:member type="u" tp:type="Media_Stream_Base_Proto" name="Protocol"/>
- <tp:member type="s" name="Subtype"/>
- <tp:member type="s" name="Profile"/>
- <tp:member type="d" name="Preference_Value"/>
- <tp:member type="u" tp:type="Media_Stream_Transport_Type"
- name="Transport_Type"/>
- <tp:member type="s" name="Username"/>
- <tp:member type="s" name="Password"/>
- </tp:struct>
-
- <tp:struct name="Media_Stream_Handler_Codec"
- array-name="Media_Stream_Handler_Codec_List">
- <tp:docstring>
- Information about a codec supported by a client or a peer's client.
- </tp:docstring>
-
- <tp:member type="u" name="Codec_ID">
- <tp:docstring>
- The codec's payload identifier, as per RFC 3551 (static or dynamic)
- </tp:docstring>
- </tp:member>
- <tp:member type="s" name="Name">
- <tp:docstring>The codec's name</tp:docstring>
- </tp:member>
- <tp:member type="u" tp:type="Media_Stream_Type" name="Media_Type">
- <tp:docstring>Type of stream this codec supports</tp:docstring>
- </tp:member>
- <tp:member type="u" name="Clock_Rate">
- <tp:docstring>Sampling frequency in Hertz</tp:docstring>
- </tp:member>
- <tp:member type="u" name="Number_Of_Channels">
- <tp:docstring>Number of supported channels</tp:docstring>
- </tp:member>
- <tp:member type="a{ss}" name="Parameters" tp:type="String_String_Map">
- <tp:docstring>Codec-specific optional parameters</tp:docstring>
- </tp:member>
- </tp:struct>
-
- <property name="STUNServers" tp:name-for-bindings="STUN_Servers"
- type="a(sq)" tp:type="Socket_Address_IP[]" access="read">
- <tp:added version="0.17.22"/>
- <tp:docstring>
- The IP addresses of possible STUN servers to use for NAT traversal, as
- dotted-quad IPv4 address literals or RFC2373 IPv6 address literals.
- This property cannot change once the stream has been created, so there
- is no change notification. The IP addresses MUST NOT be given as DNS
- hostnames.
-
- <tp:rationale>
- High-quality connection managers already need an asynchronous
- DNS resolver, so they might as well resolve this name to an IP
- to make life easier for streaming implementations.
- </tp:rationale>
- </tp:docstring>
- </property>
-
- <property name="CreatedLocally" tp:name-for-bindings="Created_Locally"
- type="b" access="read">
- <tp:added version="0.17.22"/>
- <tp:docstring>
- True if we were the creator of this stream, false otherwise.
- <tp:rationale>
- This information is needed for some nat traversal mechanisms, such
- as ICE-UDP, where the creator gets the role of the controlling agent.
- </tp:rationale>
- </tp:docstring>
- </property>
-
- <property name="NATTraversal" tp:name-for-bindings="NAT_Traversal"
- type="s" access="read">
- <tp:added version="0.17.22"/>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>The transport (NAT traversal technique) to be used for this
- stream. Well-known values include:</p>
-
- <dl>
- <dt>none</dt>
- <dd>Raw UDP, with or without STUN, should be used. If the
- <tp:member-ref>STUNServers</tp:member-ref> property is non-empty,
- STUN SHOULD be used.</dd>
-
- <dt>stun</dt>
- <dd>A deprecated synonym for 'none'.</dd>
-
- <dt>gtalk-p2p</dt>
- <dd>Google Talk peer-to-peer connectivity establishment should be
- used, as implemented in libjingle 0.3.</dd>
-
- <dt>ice-udp</dt>
- <dd>Interactive Connectivity Establishment should be used,
- as defined by the IETF MMUSIC working group.</dd>
-
- <dt>wlm-8.5</dt>
- <dd>The transport used by Windows Live Messenger 8.5 or later,
- which resembles ICE draft 6, should be used.</dd>
-
- <dt>wlm-2009</dt>
- <dd>The transport used by Windows Live Messenger 2009 or later,
- which resembles ICE draft 19, should be used.</dd>
- </dl>
-
- <p>This property cannot change once the stream has been created, so
- there is no change notification.</p>
- </tp:docstring>
- </property>
-
- <property name="RelayInfo" type="aa{sv}" access="read"
- tp:type="String_Variant_Map[]" tp:name-for-bindings="Relay_Info">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>A list of mappings describing TURN or Google relay servers
- available for the client to use in its candidate gathering, as
- determined from the protocol. Map keys are:</p>
-
- <dl>
- <dt><code>ip</code> - s</dt>
- <dd>The IP address of the relay server as a dotted-quad IPv4
- address literal or an RFC2373 IPv6 address literal. This MUST NOT
- be a DNS hostname.
-
- <tp:rationale>
- High-quality connection managers already need an asynchronous
- DNS resolver, so they might as well resolve this name to an IP
- and make life easier for streaming implementations.
- </tp:rationale>
- </dd>
-
- <dt><code>type</code> - s</dt>
- <dd>
- <p>Either <code>udp</code> for UDP (UDP MUST be assumed if this
- key is omitted), <code>tcp</code> for TCP, or
- <code>tls</code>.</p>
-
- <p>The precise meaning of this key depends on the
- <tp:member-ref>NATTraversal</tp:member-ref> property: if
- NATTraversal is <code>ice-udp</code>, <code>tls</code> means
- TLS over TCP as referenced by ICE draft 19, and if
- NATTraversal is <code>gtalk-p2p</code>, <code>tls</code> means
- a fake SSL session over TCP as implemented by libjingle.</p>
- </dd>
-
- <dt><code>port</code> - q</dt>
- <dd>The UDP or TCP port of the relay server as an ASCII unsigned
- integer</dd>
-
- <dt><code>username</code> - s</dt>
- <dd>The username to use</dd>
-
- <dt><code>password</code> - s</dt>
- <dd>The password to use</dd>
-
- <dt><code>component</code> - u</dt>
- <dd>The component number to use this relay server for, as an
- ASCII unsigned integer; if not included, this relay server
- may be used for any or all components.
-
- <tp:rationale>
- In ICE draft 6, as used by Google Talk, credentials are only
- valid once, so each component needs relaying separately.
- </tp:rationale>
- </dd>
- </dl>
-
- <tp:rationale>
- <p>An equivalent of the gtalk-p2p-relay-token property on
- MediaSignalling channels is not included here. The connection
- manager should be responsible for making the necessary HTTP
- requests to turn the token into a username and password.</p>
- </tp:rationale>
-
- <p>The type of relay server that this represents depends on
- the value of the <tp:member-ref>NATTraversal</tp:member-ref>
- property. If NATTraversal is ice-udp, this is a TURN server;
- if NATTraversal is gtalk-p2p, this is a Google relay server;
- otherwise, the meaning of RelayInfo is undefined.</p>
-
- <p>If relaying is not possible for this stream, the list is empty.</p>
-
- <p>This property cannot change once the stream has been created, so
- there is no change notification.</p>
- </tp:docstring>
- </property>
-
- <signal name="AddRemoteCandidate"
- tp:name-for-bindings="Add_Remote_Candidate">
- <arg name="Candidate_ID" type="s">
- <tp:docstring>
- String identifier for this candidate
- </tp:docstring>
- </arg>
- <arg name="Transports" type="a(usuussduss)"
- tp:type="Media_Stream_Handler_Transport[]">
- <tp:docstring>
- Array of transports for this candidate with fields,
- as defined in NewNativeCandidate
- </tp:docstring>
- </arg>
- <tp:docstring>
- Signal emitted when the connection manager wishes to inform the
- client of a new remote candidate.
- </tp:docstring>
- </signal>
- <signal name="Close" tp:name-for-bindings="Close">
- <tp:docstring>
- Signal emitted when the connection manager wishes the stream to be
- closed.
- </tp:docstring>
- </signal>
- <method name="CodecChoice" tp:name-for-bindings="Codec_Choice">
- <arg direction="in" name="Codec_ID" type="u"/>
- <tp:docstring>
- Inform the connection manager of codec used to receive data.
- </tp:docstring>
- </method>
- <method name="Error" tp:name-for-bindings="Error">
- <arg direction="in" name="Error_Code" type="u" tp:type="Media_Stream_Error">
- <tp:docstring>
- ID of error, from the MediaStreamError enumeration
- </tp:docstring>
- </arg>
- <arg direction="in" name="Message" type="s">
- <tp:docstring>
- String describing the error
- </tp:docstring>
- </arg>
- <tp:docstring>
- Inform the connection manager that an error occured in this stream. The
- connection manager should emit the StreamError signal for the stream on
- the relevant channel, and remove the stream from the session.
- </tp:docstring>
- </method>
- <tp:enum name="Media_Stream_Error" type="u">
- <tp:enumvalue suffix="Unknown" value="0">
- <tp:docstring>
- An unknown error occured.
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="EOS" value="1">
- <tp:docstring>
- The end of the stream was reached.
- </tp:docstring>
- <tp:deprecated version="0.17.27">
- This error has no use anywhere. In Farsight 1 times, it was used to
- indicate a GStreamer EOS (when the end of a file is reached). But
- since this is for live calls, it makes no sense.
- </tp:deprecated>
- </tp:enumvalue>
- <tp:enumvalue suffix="Codec_Negotiation_Failed" value="2">
- <tp:added version="0.17.27"/>
- <tp:docstring>
- There are no common codecs between the local side
- and the other particpants in the call. The possible codecs are not
- signalled here: the streaming implementation is assumed to report
- them in an implementation-dependent way, e.g. Farsight should use
- GstMissingElement.
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Connection_Failed" value="3">
- <tp:added version="0.17.27"/>
- <tp:docstring>
- A network connection for the Media could not be established or was
- lost.
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Network_Error" value="4">
- <tp:added version="0.17.27"/>
- <tp:docstring>
- There was an error in the networking stack
- (other than the connection failure).
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="No_Codecs" value="5">
- <tp:added version="0.17.27"/>
- <tp:docstring>
- There are no installed codecs for this media type.
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Invalid_CM_Behavior" value="6">
- <tp:added version="0.17.27"/>
- <tp:docstring>
- The CM is doing something wrong.
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Media_Error" value="7">
- <tp:added version="0.17.27"/>
- <tp:docstring>
- There was an error in the media processing stack.
- </tp:docstring>
- </tp:enumvalue>
- </tp:enum>
- <method name="NativeCandidatesPrepared"
- tp:name-for-bindings="Native_Candidates_Prepared">
- <tp:docstring>
- Informs the connection manager that all possible native candisates
- have been discovered for the moment.
- </tp:docstring>
- </method>
- <method name="NewActiveCandidatePair"
- tp:name-for-bindings="New_Active_Candidate_Pair">
- <arg direction="in" name="Native_Candidate_ID" type="s"/>
- <arg direction="in" name="Remote_Candidate_ID" type="s"/>
- <tp:docstring>
- Informs the connection manager that a valid candidate pair
- has been discovered and streaming is in progress.
- </tp:docstring>
- </method>
- <method name="NewActiveTransportPair"
- tp:name-for-bindings="New_Active_Transport_Pair">
- <arg direction="in" name="Native_Candidate_ID" type="s"/>
- <arg direction="in" name="Native_Transport" type="(usuussduss)"
- tp:type="Media_Stream_Handler_Transport"/>
- <arg direction="in" name="Remote_Candidate_ID" type="s"/>
- <arg direction="in" name="Remote_Transport" type="(usuussduss)"
- tp:type="Media_Stream_Handler_Transport"/>
- <tp:docstring>
- <p>Informs the connection manager that a valid transport pair
- has been discovered and streaming is in progress. Component
- id MUST be the same for both transports and the pair is
- only valid for that component.</p>
-
- <tp:rationale>
- <p>The connection manager might need to send the details of
- the active transport pair (e.g. c and o parameters of SDP
- body need to contain address of selected native RTP transport
- as stipulated by RFC 5245). However, the candidate ID might
- not be enough to determine these info if the transport was
- found after <tp:member-ref>NativeCandidatesPrepared</tp:member-ref>
- has been called (e.g. peer reflexive ICE candidate). </p>
- </tp:rationale>
-
- <p>This method must be called before
- <tp:member-ref>NewActiveCandidatePair</tp:member-ref>.</p>
-
- <tp:rationale>
- <p>This way, connection managers supporting this method can
- safely ignore subsequent
- <tp:member-ref>NewActiveCandidatePair</tp:member-ref> call.</p>
- </tp:rationale>
-
- <p>Connection managers SHOULD NOT implement this method unless
- they need to inform the peer about selected transports. As a
- result, streaming implementations MUST NOT treat errors raised
- by this method as fatal.</p>
-
- <tp:rationale>
- <p>Usually, connection managers only need to do one answer/offer
- round-trip. However, some protocols give the possibility to
- to send an updated offer (e.g. ICE defines such mechanism to
- avoid some race conditions and to properly set the state of
- gateway devices).</p>
- </tp:rationale>
- </tp:docstring>
- </method>
- <tp:enum name="Media_Stream_Base_Proto" type="u">
- <tp:enumvalue suffix="UDP" value="0">
- <tp:docstring>UDP (User Datagram Protocol)</tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="TCP" value="1">
- <tp:docstring>TCP (Transmission Control Protocol)</tp:docstring>
- </tp:enumvalue>
- </tp:enum>
- <method name="NewNativeCandidate"
- tp:name-for-bindings="New_Native_Candidate">
- <arg direction="in" name="Candidate_ID" type="s">
- <tp:docstring>
- String identifier for this candidate
- </tp:docstring>
- </arg>
- <arg direction="in" name="Transports" type="a(usuussduss)"
- tp:type="Media_Stream_Handler_Transport[]">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- Array of transports for this candidate, with fields:
- <ul>
- <li>component number</li>
- <li>IP address (as a string)</li>
- <li>port</li>
- <li>base network protocol (one of the values of MediaStreamBaseProto)</li>
- <li>proto subtype (e.g. RTP)</li>
- <li>proto profile (e.g. AVP)</li>
- <li>our preference value of this transport (double in range 0.0-1.0
- inclusive); 1 signals the most preferred transport</li>
- <li>transport type, one of the values of MediaStreamTransportType</li>
- <li>username if authentication is required</li>
- <li>password if authentication is required</li>
- </ul>
- </tp:docstring>
- </arg>
- <tp:docstring>
- Inform this MediaStreamHandler that a new native transport candidate
- has been ascertained.
- </tp:docstring>
- </method>
- <tp:enum name="Media_Stream_Transport_Type" type="u">
- <tp:enumvalue suffix="Local" value="0">
- <tp:docstring>
- A local address
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Derived" value="1">
- <tp:docstring>
- An external address derived by a method such as STUN
- </tp:docstring>
- </tp:enumvalue>
- <tp:enumvalue suffix="Relay" value="2">
- <tp:docstring>
- An external stream relay
- </tp:docstring>
- </tp:enumvalue>
- </tp:enum>
- <method name="Ready" tp:name-for-bindings="Ready">
- <arg direction="in" name="Codecs" type="a(usuuua{ss})"
- tp:type="Media_Stream_Handler_Codec[]">
- <tp:docstring>
- Locally-supported codecs.
- </tp:docstring>
- </arg>
- <tp:docstring>
- Inform the connection manager that a client is ready to handle
- this StreamHandler. Also provide it with info about all supported
- codecs.
- </tp:docstring>
- </method>
- <method name="SetLocalCodecs" tp:name-for-bindings="Set_Local_Codecs">
- <arg name="Codecs" type="a(usuuua{ss})" direction="in"
- tp:type="Media_Stream_Handler_Codec[]">
- <tp:docstring>
- Locally-supported codecs
- </tp:docstring>
- </arg>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Used to provide codecs after Ready(), so the media client can go
- ready for an incoming call and exchange candidates/codecs before
- knowing what local codecs are available.</p>
-
- <p>This is useful for gatewaying calls between two connection managers.
- Given an incoming call, you need to call
- <tp:member-ref>Ready</tp:member-ref> to get the remote codecs before
- you can use them as the "local" codecs to place the outgoing call,
- and hence receive the outgoing call's remote codecs to use as the
- incoming call's "local" codecs.</p>
-
- <p>In this situation, you would pass an empty list of codecs to the
- incoming call's Ready method, then later call SetLocalCodecs on the
- incoming call in order to respond to the offer.</p>
- </tp:docstring>
- </method>
- <signal name="RemoveRemoteCandidate"
- tp:name-for-bindings="Remove_Remote_Candidate">
- <arg name="Candidate_ID" type="s">
- <tp:docstring>
- String identifier for remote candidate to drop
- </tp:docstring>
- </arg>
- <tp:deprecated version="0.17.18">
- There is no case where you want to release candidates (except
- for an ICE reset, and there you'd want to replace then all,
- using <tp:member-ref>SetRemoteCandidateList</tp:member-ref>).
- </tp:deprecated>
- <tp:docstring>
- Signal emitted when the connection manager wishes to inform the
- client that the remote end has removed a previously usable
- candidate.
-
- <tp:rationale>
- It seemed like a good idea at the time, but wasn't.
- </tp:rationale>
- </tp:docstring>
- </signal>
- <signal name="SetActiveCandidatePair"
- tp:name-for-bindings="Set_Active_Candidate_Pair">
- <arg name="Native_Candidate_ID" type="s"/>
- <arg name="Remote_Candidate_ID" type="s"/>
- <tp:docstring>
- Emitted by the connection manager to inform the client that a
- valid candidate pair has been discovered by the remote end
- and streaming is in progress.
- </tp:docstring>
- </signal>
- <signal name="SetRemoteCandidateList"
- tp:name-for-bindings="Set_Remote_Candidate_List">
- <arg name="Remote_Candidates" type="a(sa(usuussduss))"
- tp:type="Media_Stream_Handler_Candidate[]">
- <tp:docstring>
- A list of candidate id and a list of transports
- as defined in NewNativeCandidate
- </tp:docstring>
- </arg>
- <tp:docstring>
- Signal emitted when the connection manager wishes to inform the
- client of all the available remote candidates at once.
- </tp:docstring>
- </signal>
- <signal name="SetRemoteCodecs" tp:name-for-bindings="Set_Remote_Codecs">
- <arg name="Codecs" type="a(usuuua{ss})"
- tp:type="Media_Stream_Handler_Codec[]">
- <tp:docstring>
- Codecs supported by the remote peer.
- </tp:docstring>
- </arg>
- <tp:docstring>
- Signal emitted when the connection manager wishes to inform the
- client of the codecs supported by the remote end.
- If these codecs are compatible with the remote codecs, then the client
- must call <tp:member-ref>SupportedCodecs</tp:member-ref>,
- otherwise call <tp:member-ref>Error</tp:member-ref>.
- </tp:docstring>
- </signal>
- <signal name="SetStreamPlaying" tp:name-for-bindings="Set_Stream_Playing">
- <arg name="Playing" type="b"/>
- <tp:docstring>
- If emitted with argument TRUE, this means that the connection manager
- wishes to set the stream playing; this means that the streaming
- implementation should expect to receive data. If emitted with argument
- FALSE this signal is basically meaningless and should be ignored.
-
- <tp:rationale>
- We're very sorry.
- </tp:rationale>
- </tp:docstring>
- </signal>
- <signal name="SetStreamSending" tp:name-for-bindings="Set_Stream_Sending">
- <arg name="Sending" type="b"/>
- <tp:docstring>
- Signal emitted when the connection manager wishes to set whether or not
- the stream sends to the remote end.
- </tp:docstring>
- </signal>
- <signal name="StartTelephonyEvent"
- tp:name-for-bindings="Start_Telephony_Event">
- <arg name="Event" type="y" tp:type="DTMF_Event">
- <tp:docstring>
- A telephony event code.
- </tp:docstring>
- </arg>
- <tp:docstring>
- Request that a telephony event (as defined by RFC 4733) is transmitted
- over this stream until StopTelephonyEvent is called.
- </tp:docstring>
- </signal>
- <signal name="StartNamedTelephonyEvent"
- tp:name-for-bindings="Start_Named_Telephony_Event">
- <tp:added version="0.21.2"/>
- <arg name="Event" type="y" tp:type="DTMF_Event">
- <tp:docstring>
- A telephony event code as defined by RFC 4733.
- </tp:docstring>
- </arg>
- <arg name="Codec_ID" type="u">
- <tp:docstring>
- The payload type to use when sending events. The value 0xFFFFFFFF
- means to send with the already configured event type instead of using
- the specified one.
- </tp:docstring>
- </arg>
- <tp:docstring>
- Request that a telephony event (as defined by RFC 4733) is transmitted
- over this stream until StopTelephonyEvent is called. This differs from
- StartTelephonyEvent in that you force the event to be transmitted
- as a RFC 4733 named event, not as sound. You can also force a specific
- Codec ID.
- </tp:docstring>
- </signal>
- <signal name="StartSoundTelephonyEvent"
- tp:name-for-bindings="Start_Sound_Telephony_Event">
- <tp:added version="0.21.2"/>
- <arg name="Event" type="y" tp:type="DTMF_Event">
- <tp:docstring>
- A telephony event code as defined by RFC 4733.
- </tp:docstring>
- </arg>
- <tp:docstring>
- Request that a telephony event (as defined by RFC 4733) is transmitted
- over this stream until StopTelephonyEvent is called. This differs from
- StartTelephonyEvent in that you force the event to be transmitted
- as sound instead of as a named event.
- </tp:docstring>
- </signal>
- <signal name="StopTelephonyEvent"
- tp:name-for-bindings="Stop_Telephony_Event">
- <tp:docstring>
- Request that any ongoing telephony events (as defined by RFC 4733)
- being transmitted over this stream are stopped.
- </tp:docstring>
- </signal>
- <method name="StreamState" tp:name-for-bindings="Stream_State">
- <arg direction="in" name="State" type="u" tp:type="Media_Stream_State"/>
- <tp:docstring>
- Informs the connection manager of the stream's current state, as
- as specified in Channel.Type.StreamedMedia::ListStreams.
- </tp:docstring>
- </method>
-
- <method name="SupportedCodecs" tp:name-for-bindings="Supported_Codecs">
- <arg direction="in" name="Codecs" type="a(usuuua{ss})"
- tp:type="Media_Stream_Handler_Codec[]">
- <tp:docstring>
- Locally supported codecs.
- </tp:docstring>
- </arg>
- <tp:docstring>
- Inform the connection manager of the supported codecs for this session.
- This is called after the connection manager has emitted SetRemoteCodecs
- to notify what codecs are supported by the peer, and will thus be an
- intersection of all locally supported codecs (passed to Ready)
- and those supported by the peer.
- </tp:docstring>
- </method>
-
- <method name="CodecsUpdated" tp:name-for-bindings="Codecs_Updated">
- <arg direction="in" name="Codecs" type="a(usuuua{ss})"
- tp:type="Media_Stream_Handler_Codec[]">
- <tp:docstring>
- Locally supported codecs, which SHOULD be the same as were previously
- in effect, but possibly with different parameters.
- </tp:docstring>
- </arg>
- <tp:docstring>
- Inform the connection manager that the parameters of the supported
- codecs for this session have changed. The connection manager should
- send the new parameters to the remote contact.
-
- <tp:rationale>
- This is required for H.264 and Theora, for example.
- </tp:rationale>
- </tp:docstring>
- </method>
-
- <signal name="SetStreamHeld" tp:name-for-bindings="Set_Stream_Held">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Emitted when the connection manager wishes to place the stream on
- hold (so the streaming client should free hardware or software
- resources) or take the stream off hold (so the streaming client
- should reacquire the necessary resources).</p>
-
- <p>When placing a channel's streams on hold, the connection manager
- SHOULD notify the remote contact that this will be done (if
- appropriate in the protocol) before it emits this signal.</p>
-
- <tp:rationale>
- <p>It is assumed that relinquishing a resource will not fail.
- If it does, the call is probably doomed anyway.</p>
- </tp:rationale>
-
- <p>When unholding a channel's streams, the connection manager
- SHOULD emit this signal and wait for success to be indicated
- via HoldState before it notifies the remote contact that the
- channel has been taken off hold.</p>
-
- <tp:rationale>
- <p>This means that if a resource is unavailable, the remote
- contact will never even be told that we tried to acquire it.</p>
- </tp:rationale>
- </tp:docstring>
- <tp:added version="0.17.3"/>
-
- <arg name="Held" type="b">
- <tp:docstring>
- If true, the stream is to be placed on hold.
- </tp:docstring>
- </arg>
- </signal>
-
- <method name="HoldState" tp:name-for-bindings="Hold_State">
- <tp:docstring>
- Notify the connection manager that the stream's hold state has
- been changed successfully in response to SetStreamHeld.
- </tp:docstring>
- <tp:added version="0.17.3"/>
- <arg direction="in" name="Held" type="b">
- <tp:docstring>
- If true, the stream is now on hold.
- </tp:docstring>
- </arg>
- </method>
-
- <method name="UnholdFailure" tp:name-for-bindings="Unhold_Failure">
- <tp:docstring>
- Notify the connection manager that an attempt to reacquire the
- necessary hardware or software resources to unhold the stream,
- in response to SetStreamHeld, has failed.
- </tp:docstring>
- <tp:added version="0.17.3"/>
- </method>
-
- <tp:struct name="RTCP_Feedback_Message_Properties">
- <tp:added version="0.22.1"/>
- <tp:changed version="0.23.4">This struct is also used by Call, but
- in call, the CM should know about RTP profiles, and never use MAXUINT
- as a default value, because it complicates things unnecessarily.
- </tp:changed>
- <tp:member type="u" name="RTCPMinimumInterval">
- <tp:docstring>
- The minimum interval between two regular RTCP packets in
- milliseconds for this content. If no special value is desired, one
- should put MAXUINT (0xFFFFFFFF).
-
- Implementors and users of Call's <tp:dbus-ref
- namespace="ofdT.Call1.Content.MediaDescription.Interface"
- >RTCPFeedback</tp:dbus-ref> should not use the MAXUINT default.
- Instead, in RTP/AVP, the default should be 5000 (5 seconds).
- If using the RTP/AVPF profile, it can be set to a lower value,
- the default being 0.
- </tp:docstring>
- </tp:member>
- <tp:member type="a(sss)" tp:type="RTCP_Feedback_Message[]"
- name="Messages">
- <tp:docstring>
- The RTCP feedback messages for this codec.
- </tp:docstring>
- </tp:member>
- </tp:struct>
-
- <tp:struct name="RTCP_Feedback_Message"
- array-name="RTCP_Feedback_Message_List">
- <tp:added version="0.22.1"/>
- <tp:docstring>
- A struct defining an RTCP feedback message.
- </tp:docstring>
- <tp:member type="s" name="Type">
- <tp:docstring>
- Feedback type, for example "ack", "nack", or "ccm".
- </tp:docstring>
- </tp:member>
- <tp:member type="s" name="Subtype">
- <tp:docstring>
- Feedback subtype, according to the Type, can be an empty string (""),
- if there is no subtype.
- For example, generic nack is Type="nack" Subtype="".
- </tp:docstring>
- </tp:member>
- <tp:member type="s" name="Parameters">
- <tp:docstring>
- Feedback parameters as a string. Format is defined in the relevant RFC
- </tp:docstring>
- </tp:member>
- </tp:struct>
-
- <tp:mapping name="RTCP_Feedback_Message_Map">
- <tp:added version="0.22.1"/>
- <tp:docstring>
- A map of codec and its feedback properties.
- </tp:docstring>
- <tp:member type="u" name="Codec_Identifier">
- <tp:docstring>
- Numeric identifier for the codec. This will be used as the
- PT in the SDP or content description.
- </tp:docstring>
- </tp:member>
- <tp:member type="(ua(sss))" tp:type="RTCP_Feedback_Message_Properties"
- name="Properties">
- <tp:docstring>
- The RTCP feedback properties for this codec.
- </tp:docstring>
- </tp:member>
- </tp:mapping>
-
- <signal name="SetRemoteFeedbackMessages"
- tp:name-for-bindings="Set_Remote_Feedback_Messages">
- <tp:added version="0.22.1"/>
- <arg name="Messages" type="a{u(ua(sss))}"
- tp:type="RTCP_Feedback_Message_Map">
- <tp:docstring>
- Remote Feedback messages desired by the remote side
- </tp:docstring>
- </arg>
- <tp:docstring>
- Signal emitted when the connection manager wishes to inform the
- client of the feedback messages supported by the remote end.
- This signal is emitted before
- <tp:member-ref>SetRemoteCodecs</tp:member-ref>. If the client
- supports any of these messages, it must call
- <tp:member-ref>SupportedFeedbackMessages</tp:member-ref> before calling
- <tp:member-ref>SupportedCodecs</tp:member-ref>.
- </tp:docstring>
- </signal>
-
- <method name="SupportedFeedbackMessages"
- tp:name-for-bindings="Supported_Feedback_Messages">
- <tp:added version="0.22.1"/>
- <arg name="Messages" direction="in" type="a{u(ua(sss))}"
- tp:type="RTCP_Feedback_Message_Map">
- <tp:docstring>
- Locally supported feedback messages.
- </tp:docstring>
- </arg>
- <tp:docstring>
- Inform the connection manager of the supported feedback messages
- for this session.
- This is called a before calling
- <tp:member-ref>SupportedCodecs</tp:member-ref>,
- <tp:member-ref>Ready</tp:member-ref> or
- <tp:member-ref>CodecsUpdated</tp:member-ref> to indicate the local,
- or negotiated feedback messages.
- </tp:docstring>
- </method>
-
- <tp:struct name="RTP_Header_Extension"
- array-name="RTP_Header_Extensions_List">
- <tp:added version="0.22.1"/>
- <tp:docstring>
- A struct defining a RTP Header extension
- </tp:docstring>
- <tp:member type="u" name="ID">
- <tp:docstring>
- Identifier to be negotiated
- </tp:docstring>
- </tp:member>
- <tp:member type="u" tp:type="Media_Stream_Direction" name="Direction">
- <tp:docstring>
- Direction in which the Header Extension is negotiated.
- </tp:docstring>
- </tp:member>
- <tp:member type="s" name="URI">
- <tp:docstring>
- URI defining the extension
- </tp:docstring>
- </tp:member>
- <tp:member type="s" name="Parameters">
- <tp:docstring>
- Feedback parameters as a string. Format is defined in the relevant RFC
- </tp:docstring>
- </tp:member>
- </tp:struct>
-
- <signal name="SetRemoteHeaderExtensions"
- tp:name-for-bindings="Set_Remote_Header_Extensions">
- <tp:added version="0.22.1"/>
- <arg name="Header_Extensions" type="a(uuss)"
- tp:type="RTP_Header_Extension[]">
- <tp:docstring>
- Header extensions desired by the remote side
- </tp:docstring>
- </arg>
- <tp:docstring>
- Signal emitted when the connection manager wishes to inform the
- client of the RTP header extensions supported by the remote end.
- This signal is emitted before
- <tp:member-ref>SetRemoteCodecs</tp:member-ref>. If the client
- supports any of these messages, it must call
- <tp:member-ref>SupportedHeaderExtensions</tp:member-ref> before calling
- <tp:member-ref>SupportedCodecs</tp:member-ref>.
- </tp:docstring>
- </signal>
-
- <method name="SupportedHeaderExtensions"
- tp:name-for-bindings="Supported_Header_Extensions">
- <tp:added version="0.22.1"/>
- <arg name="Header_Extensions" direction="in" type="a(uuss)"
- tp:type="RTP_Header_Extension[]">
- <tp:docstring>
- Locally supported RTP header extensions.
- </tp:docstring>
- </arg>
- <tp:docstring>
- Inform the connection manager of the supported RTP header extensions
- for this session.
- This is called before calling
- <tp:member-ref>SupportedCodecs</tp:member-ref>,
- <tp:member-ref>Ready</tp:member-ref> or
- <tp:member-ref>CodecsUpdated</tp:member-ref> to indicate the local
- or negotiated RTP header extensions.
- </tp:docstring>
- </method>
-
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Properties_Interface.xml b/spec/Properties_Interface.xml
deleted file mode 100644
index 09ce3b9c2..000000000
--- a/spec/Properties_Interface.xml
+++ /dev/null
@@ -1,196 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Properties_Interface" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
- <tp:copyright> Copyright (C) 2005-2007 Collabora Limited </tp:copyright>
- <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
- <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
- <tp:license xmlns="http://www.w3.org/1999/xhtml">
- <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
- </tp:license>
- <interface name="org.freedesktop.Telepathy.Properties">
- <tp:deprecated version="0.24.0">All uses of this interface have been
- expunged, and it may now be laid to rest.</tp:deprecated>
-
- <tp:struct name="Property_Spec" array-name="Property_Spec_List">
- <tp:docstring>A struct (property ID, property name, D-Bus signature,
- flags) representing a property, as returned by ListProperties on the
- Properties interface.</tp:docstring>
- <tp:member type="u" name="Property_ID"/>
- <tp:member type="s" name="Name"/>
- <tp:member type="s" tp:type="DBus_Signature" name="Signature"/>
- <tp:member type="u" tp:type="Property_Flags" name="Flags"/>
- </tp:struct>
-
- <tp:struct name="Property_Flags_Change"
- array-name="Property_Flags_Change_List">
- <tp:docstring>A struct (property ID, flags) representing a change to
- a property's flags, as seen in the PropertyFlagsChanged signal on
- the Properties interface.</tp:docstring>
- <tp:member type="u" name="Property_ID"/>
- <tp:member type="u" name="New_Flags"/>
- </tp:struct>
-
- <tp:simple-type name="Property_ID" type="u" array-name="Property_ID_List">
- <tp:docstring>
- An unsigned integer used to represent a Telepathy property.
- </tp:docstring>
- </tp:simple-type>
-
- <tp:struct name="Property_Value" array-name="Property_Value_List">
- <tp:docstring>A struct (property ID, value) representing a
- property's value, as seen in the PropertiesChanged signal on
- the Properties interface, returned by the GetProperties method
- and passed to the SetProperties method.</tp:docstring>
- <tp:member type="u" tp:type="Property_ID" name="Identifier"/>
- <tp:member type="v" name="Value"/>
- </tp:struct>
-
- <method name="GetProperties" tp:name-for-bindings="Get_Properties">
- <tp:docstring>
- Returns an array of (identifier, value) pairs containing the current
- values of the given properties.
- </tp:docstring>
- <arg direction="in" name="Properties" type="au" tp:type="Property_ID[]">
- <tp:docstring>An array of property identifiers</tp:docstring>
- </arg>
- <arg direction="out" type="a(uv)" tp:type="Property_Value[]"
- name="Values">
- <!-- XXX: if we're ever breaking API compatibility, make this a{uv} -->
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>An array of structs containing:</p>
- <ul>
- <li>integer identifiers</li>
- <li>variant boxed values</li>
- </ul>
- </tp:docstring>
- </arg>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
- <tp:docstring>
- Some property identifier requested is invalid
- </tp:docstring>
- </tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied">
- <tp:docstring>
- Some property requested does not have the PROPERTY_FLAG_READ flag
- </tp:docstring>
- </tp:error>
- </tp:possible-errors>
- </method>
- <method name="ListProperties" tp:name-for-bindings="List_Properties">
- <tp:docstring>
- Returns a dictionary of the properties available on this channel.
- </tp:docstring>
- <arg direction="out" type="a(ussu)" tp:type="Property_Spec[]"
- name="Available_Properties">
- <!-- XXX: if we're ever breaking API compatibility, make this
- a{u(ssu)} ? -->
- <tp:docstring>
- An array of structs containing:
- <ul>
- <li>an integer identifier</li>
- <li>a string property name</li>
- <li>a string representing the D-Bus signature of this property</li>
- <li>a bitwise OR of the flags applicable to this property</li>
- </ul>
- </tp:docstring>
- </arg>
- </method>
- <signal name="PropertiesChanged" tp:name-for-bindings="Properties_Changed">
- <tp:docstring>
- Emitted when the value of readable properties has changed.
- </tp:docstring>
- <arg name="Properties" type="a(uv)" tp:type="Property_Value[]">
- <!-- XXX: if we're ever breaking API compatibility, make this a{uv} -->
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>An array of structs containing:</p>
- <ul>
- <li>integer identifiers</li>
- <li>variant boxed values</li>
- </ul>
- <p>The array should contain only properties whose values have
- actually changed.</p>
- </tp:docstring>
- </arg>
- </signal>
- <signal name="PropertyFlagsChanged"
- tp:name-for-bindings="Property_Flags_Changed">
- <tp:docstring>
- Emitted when the flags of some room properties have changed.
- </tp:docstring>
- <arg name="Properties" type="a(uu)" tp:type="Property_Flags_Change[]">
- <!-- XXX: if we're ever breaking API compatibility, make this a{uu} -->
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>An array of structs containing:</p>
- <ul>
- <li>integer identifiers</li>
- <li>a bitwise OR of the current flags</li>
- </ul>
- <p>The array should contain only properties whose flags have actually
- changed.</p>
- </tp:docstring>
- </arg>
- </signal>
- <method name="SetProperties" tp:name-for-bindings="Set_Properties">
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Takes an array of (identifier, value) pairs containing desired
- values to set the given properties. In the case of any errors, no
- properties will be changed. When the changes have been acknowledged
- by the server, the PropertiesChanged signal will be emitted.</p>
-
- <p>All properties given must have the PROPERTY_FLAG_WRITE flag, or
- PermissionDenied will be returned. If any variants are of the wrong
- type, NotAvailable will be returned. If any given property identifiers
- are invalid, InvalidArgument will be returned.</p>
- </tp:docstring>
-
- <arg direction="in" name="Properties" type="a(uv)"
- tp:type="Property_Value[]">
- <!-- XXX: if we're ever breaking API compatibility, make this a{uv} -->
- <tp:docstring>
- An array mapping integer property identifiers to boxed values
- </tp:docstring>
- </arg>
- <tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
- <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
- <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
- </tp:possible-errors>
- </method>
- <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Interface for channels and other objects, to allow querying and setting
- properties. ListProperties returns which properties are valid for
- the given channel, including their type, and an integer handle used to
- refer to them in GetProperties, SetProperties, and the PropertiesChanged
- signal. The values are represented by D-Bus variant types, and are
- accompanied by flags indicating whether or not the property is readable or
- writable.</p>
-
- <p>Each property also has a flags value to indicate what methods are
- available. This is a bitwise OR of PropertyFlags values.</p>
- </tp:docstring>
- <tp:flags name="Property_Flags" value-prefix="Property_Flag" type="u">
- <tp:flag suffix="Read" value="1">
- <tp:docstring>The property can be read</tp:docstring>
- </tp:flag>
- <tp:flag suffix="Write" value="2">
- <tp:docstring>The property can be written</tp:docstring>
- </tp:flag>
- </tp:flags>
- </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
diff --git a/spec/Protocol.xml b/spec/Protocol.xml
index 6cc10aa63..7197b81dd 100644
--- a/spec/Protocol.xml
+++ b/spec/Protocol.xml
@@ -20,31 +20,26 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Protocol">
+ <interface name="im.telepathy1.Protocol">
<tp:added version="0.19.10">(as stable API)</tp:added>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An object representing a protocol for which this <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ConnectionManager</tp:dbus-ref>
+ namespace="im.telepathy1">ConnectionManager</tp:dbus-ref>
can create <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>s.</p>
+ namespace="im.telepathy1">Connection</tp:dbus-ref>s.</p>
<p>Each Protocol object has the same well-known bus name as its parent
ConnectionManager. Its object path is formed by taking the
- ConnectionManager's object path and appending '/', followed by the
- <tp:type>Protocol</tp:type> name with any hyphen/minus '-' converted
- to underscores '_'.</p>
-
- <tp:rationale>
- <p>This is the same as the representation of protocol names
- in Account object paths, and in Connection object paths and bus
- names. For instance, telepathy-gabble and telepathy-salut would
- implement objects at
- <code>/org/freedesktop/Telepathy/ConnectionManager/gabble/jabber</code>
- and
- <code>/org/freedesktop/Telepathy/ConnectionManager/salut/local_xmpp</code>,
- respectively.</p>
- </tp:rationale>
+ ConnectionManager's object path and appending '/' followed by the
+ <tp:type>Protocol_Name</tp:type>.</p>
+
+ <p>For instance, telepathy-gabble and telepathy-salut would
+ implement objects at
+ <code>/im/telepathy1/ConnectionManager/gabble/jabber</code>
+ and
+ <code>/im/telepathy1/ConnectionManager/salut/local_xmpp</code>,
+ respectively.</p>
<p>If the ConnectionManager has a <tt>.manager</tt> file, each
Protocol's immutable properties must be represented in that file;
@@ -58,19 +53,19 @@ Interfaces=
[Protocol example]
Interfaces=
-ConnectionInterfaces=org.freedesktop.Telepathy.Connection.Interface.Requests;
+ConnectionInterfaces=im.telepathy1.Connection.Interface.Requests;
param-account=s required
param-password=s required secret
RequestableChannelClasses=text;
VCardField=x-example
EnglishName=Example
Icon=im-example
-AuthenticationTypes=org.freedesktop.Telepathy.Channel.Type.ServerTLSConnection;org.freedesktop.Telepathy.Channel.Interface.SASLAuthentication;
+AuthenticationTypes=im.telepathy1.Channel.Type.ServerTLSConnection;im.telepathy1.Channel.Interface.SASLAuthentication;
[text]
-org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Text
-org.freedesktop.Telepathy.Channel.TargetHandleType u=1
-allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;
+im.telepathy1.Channel.ChannelType s=im.telepathy1.Channel.Type.Text
+im.telepathy1.Channel.TargetHandleType u=1
+allowed=im.telepathy1.Channel.TargetHandle;im.telepathy1.Channel.TargetID;
</pre>
</tp:docstring>
@@ -87,7 +82,7 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
<p>Connection managers with a <code>.manager</code> file
(as described as part of the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>ConnectionManager</tp:dbus-ref> interface) MUST cache this
property in the protocol's section of the <code>.manager</code>
file, using the key <code>Interfaces</code>. The corresponding value
@@ -100,23 +95,23 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
tp:immutable="yes">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The parameters which may be specified in the
- <tp:dbus-ref namespace='ofdT.Account'>Parameters</tp:dbus-ref> of an
- <tp:dbus-ref namespace='ofdT'>Account</tp:dbus-ref> (or, for
+ <tp:dbus-ref namespace='imt1.Account'>Parameters</tp:dbus-ref> of an
+ <tp:dbus-ref namespace='imt1'>Account</tp:dbus-ref> (or, for
specialised applications which do not use the account manager, passed
to <tp:dbus-ref
- namespace='ofdT.ConnectionManager'>RequestConnection</tp:dbus-ref>).
+ namespace='imt1.ConnectionManager'>RequestConnection</tp:dbus-ref>).
Some parameters are mandatory, and some parameters only make sense
when registering new accounts with the server; see the
<tp:type>Param_Spec</tp:type> documentation for more details.</p>
<p>Connection managers with a <code>.manager</code> file
(as described as part of the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>ConnectionManager</tp:dbus-ref> interface) MUST cache this
property in the protocol's section of the <code>.manager</code>
file via keys of the form <code>param-<em>p</em></code> and
<code>default-<em>p</em></code>, as documented in the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>ConnectionManager</tp:dbus-ref> interface.</p>
</tp:docstring>
</property>
@@ -127,9 +122,9 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
tp:immutable="yes">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A list of interface names which might be in the
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection"
+ <tp:dbus-ref namespace="im.telepathy1.Connection"
>Interfaces</tp:dbus-ref> property of a
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>Connection</tp:dbus-ref> to this protocol. Whether a Connection
will have all, some or none of these interfaces depends on server
capabilities.</p>
@@ -151,10 +146,10 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
tp:immutable="yes">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A list of channel classes which might be requestable from a
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>Connection</tp:dbus-ref> to this protocol (i.e. they will,
or might, appear in the Connection's <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface.Requests"
+ namespace="im.telepathy1.Connection.Interface.Requests"
>RequestableChannelClasses</tp:dbus-ref> property).</p>
<p>Whether a Connection will have all, some or none of these
@@ -184,7 +179,7 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
"<code><em>propertyname</em> <em>type</em></code>", and the value
is encoded in the same way as for the <code>default-<em>p</em></code>
keys described in the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
+ namespace="im.telepathy1"
>ConnectionManager</tp:dbus-ref> documentation.</p>
<p>Connection managers that have channel classes whose fixed
@@ -193,7 +188,7 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
<p>For instance, this <code>.manager</code> file could represent
a connection manager that supports 1-1 Text messages and
- StreamedMedia audio calls:</p>
+ Call audio calls:</p>
<pre>[Protocol jabber]
param-account=s required
@@ -201,14 +196,14 @@ param-password=s required
RequestableChannelClasses=rcc0;rcc1;
[rcc0]
-org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Text
-org.freedesktop.Telepathy.Channel.TargetHandleType u=1
-allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;
+im.telepathy1.Channel.ChannelType s=im.telepathy1.Channel.Type.Text
+im.telepathy1.Channel.TargetHandleType u=1
+allowed=im.telepathy1.Channel.TargetHandle;im.telepathy1.Channel.TargetID;
[rcc1]
-org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.StreamedMedia
-org.freedesktop.Telepathy.Channel.TargetHandleType u=1
-allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;org.freedesktop.Telepathy.Channel.Type.StreamedMedia.InitialAudio;
+im.telepathy1.Channel.ChannelType s=im.telepathy1.Channel.Type.Call1
+im.telepathy1.Channel.TargetHandleType u=1
+allowed=im.telepathy1.Channel.TargetHandle;im.telepathy1.Channel.TargetID;im.telepathy1.Channel.Type.Call1.InitialAudio;
</pre>
</tp:docstring>
</property>
@@ -226,7 +221,7 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
<p>A more exhaustive list of addressable vCard fields can be found in
the Protocol's Addressing interface's
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Protocol.Interface.Addressing">AddressableVCardFields</tp:dbus-ref>.</p>
+ <tp:dbus-ref namespace="im.telepathy1.Protocol.Interface.Addressing1">AddressableVCardFields</tp:dbus-ref>.</p>
<p>It is not necessarily valid to interpret contacts' identifiers
as values of this vCard field. For instance, telepathy-sofiasip
@@ -235,7 +230,7 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
both be represented by any single vCard field. Arbitrary
handles/identifiers as vCard fields are represented
through the Connection's
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">Addressing1</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Connection.Interface">Addressing1</tp:dbus-ref>
contact attributes.</p>
<tp:rationale>
@@ -268,9 +263,9 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
<p>This is effectively in the C locale (international English);
user interfaces requiring a localized protocol name SHOULD look
one up in their own message catalog based on either the Telepathy
- <tp:type>Protocol</tp:type> name or this property, but SHOULD use
- this English version as a fallback if no translated version can be
- found.</p>
+ <tp:type>Protocol_Name</tp:type> name or this property, but SHOULD
+ use this English version as a fallback if no translated version can
+ be found.</p>
<tp:rationale>
<p>Many protocols are named after a company or product which isn't
@@ -280,8 +275,8 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
</tp:rationale>
<p>If this property's value is empty, clients MAY fall back to using
- the Telepathy <tp:type>Protocol</tp:type> name, possibly with its
- capitalization adjusted.</p>
+ the Telepathy <tp:type>Protocol_Name</tp:type> name, possibly with
+ its capitalization adjusted.</p>
<p>Connection managers with a <code>.manager</code> file
MUST cache this property in the protocol's section of the
@@ -300,15 +295,15 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
<tp:rationale>
<p>This can be used as a default if the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account">Icon</tp:dbus-ref>
+ namespace="im.telepathy1.Account">Icon</tp:dbus-ref>
property is not set on an Account, or used by the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">AccountManager</tp:dbus-ref>
+ namespace="im.telepathy1">AccountManager</tp:dbus-ref>
to choose a default icon if none is set during account
creation.</p>
</tp:rationale>
<p>If this property's value is empty, clients MAY fall back to
- generating a name based on the <tp:type>Protocol</tp:type> name.</p>
+ generating a name based on the <tp:type>Protocol_Name</tp:type>.</p>
<p>Connection managers with a <code>.manager</code> file
MUST cache this property in the protocol's section of the
@@ -338,7 +333,7 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
type="a{sv}" tp:type="String_Variant_Map">
<tp:docstring>
A set of parameters as would be provided to <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.ConnectionManager"
+ namespace="im.telepathy1.ConnectionManager"
>RequestConnection</tp:dbus-ref>
</tp:docstring>
</arg>
@@ -346,7 +341,7 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
<arg direction="out" name="Account_ID" type="s">
<tp:docstring>
<p>An opaque string suitable for use as the account-specific part of
- an <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ an <tp:dbus-ref namespace="im.telepathy1"
>Account</tp:dbus-ref>'s object path. This is not necessarily
globally unique, but should represent a "best-effort"
identification of the account.</p>
@@ -363,7 +358,7 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The IdentifyAccount method is not supported by this connection
manager. The caller SHOULD fall back to deriving identification
@@ -379,12 +374,12 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
<p>Attempt to normalize the given contact ID. Where possible, this
SHOULD return the same thing that would be returned by
InspectHandles(RequestHandles(CONTACT, [Contact_ID])) on a connected
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
+ <tp:dbus-ref namespace="im.telepathy1"
>Connection</tp:dbus-ref>.</p>
<p>If full normalization requires network activity or is otherwise
impossible to do without a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>,
+ namespace="im.telepathy1">Connection</tp:dbus-ref>,
this method SHOULD perform a best-effort normalization.</p>
<tp:rationale>
@@ -428,7 +423,7 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The NormalizeContact method is not supported by this connection
manager. The caller MAY recover by using the contact ID as-is.
@@ -449,14 +444,14 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
<p>These can either be channel types, or where the channel
type isn't enough information to be useful, interfaces
indicating a specific use of a channel type. For example,
- <tp:dbus-ref namespace="ofdT.Channel.Type">ServerTLSConnection</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Channel.Type">ServerTLSConnection1</tp:dbus-ref>
channels are obviously about TLS certificates so the channel
type would appear in this list. However, a
- <tp:dbus-ref namespace="ofdT.Channel.Type">ServerAuthentication</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Channel.Type">ServerAuthentication1</tp:dbus-ref>
channel type alone does not explain enough about the authentication type
in use as it is merely a base for the channel interfaces that appear in
said channels. In this case, CMs should use the value of the
- <tp:dbus-ref namespace="ofdT.Channel.Type">ServerAuthentication.AuthenticationMethod</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Channel.Type">ServerAuthentication1.AuthenticationMethod</tp:dbus-ref>
property in this list.</p>
<p>For example, if a protocol's
@@ -465,19 +460,19 @@ allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy
<blockquote>
<pre>
-[ ...<tp:dbus-ref namespace="ofdT">Channel.Type.ServerTLSConnection</tp:dbus-ref>,
- ...<tp:dbus-ref namespace="ofdT">Channel.Interface.SASLAuthentication</tp:dbus-ref> ]</pre></blockquote>
+[ ...<tp:dbus-ref namespace="imt1">Channel.Type.ServerTLSConnection1</tp:dbus-ref>,
+ ...<tp:dbus-ref namespace="imt1">Channel.Interface.SASLAuthentication1</tp:dbus-ref> ]</pre></blockquote>
<p>This tells a client that before the connection status
reached CONNECTED, a <tp:dbus-ref
- namespace="ofdT.Channel.Type">ServerTLSConnection</tp:dbus-ref>
+ namespace="imt1.Channel.Type">ServerTLSConnection1</tp:dbus-ref>
could appear carrying a TLS certificate. It also tells the
client that before the connection status reaches CONNECTED, a
<tp:dbus-ref
- namespace="ofdT.Channel.Type">ServerAuthentication</tp:dbus-ref>
+ namespace="imt1.Channel.Type">ServerAuthentication1</tp:dbus-ref>
channel could also appear, where <tp:dbus-ref
- namespace="ofdT.Channel.Type">ServerAuthentication.AuthenticationMethod</tp:dbus-ref>=<tp:dbus-ref
- namespace="ofdT.Channel.Interface">SASLAuthentication</tp:dbus-ref>. A
+ namespace="imt1.Channel.Type">ServerAuthentication1.AuthenticationMethod</tp:dbus-ref>=<tp:dbus-ref
+ namespace="imt1.Channel.Interface">SASLAuthentication1</tp:dbus-ref>. A
hypothetical future Channel.Interface.Captcha interface would
also appear in this list if the CM might require the user
solve a captcha before connecting.</p>
diff --git a/spec/Protocol_Interface_Addressing.xml b/spec/Protocol_Interface_Addressing1.xml
index 55ee71cb0..d3abe0621 100644
--- a/spec/Protocol_Interface_Addressing.xml
+++ b/spec/Protocol_Interface_Addressing1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Protocol_Interface_Addressing"
+<node name="/Protocol_Interface_Addressing1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2010 Collabora Ltd.</tp:copyright>
@@ -21,7 +21,7 @@
</tp:license>
<interface
- name="org.freedesktop.Telepathy.Protocol.Interface.Addressing">
+ name="im.telepathy1.Protocol.Interface.Addressing1">
<tp:added version="0.25.1">(as stable API). From the draft,
NormalizeURI was renamed to NormalizeContactURI, clarifying that
it removes any actions from the URI.</tp:added>
@@ -116,7 +116,7 @@ AddressableURISchemes=tel;sip;
offline. When it is connected the addressable URI schemes should be
retrieved from the
<tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Connection.Interface">Requests.RequestableChannelClasses</tp:dbus-ref>'s
+ namespace="im.telepathy1.Connection.Interface">Requests.RequestableChannelClasses</tp:dbus-ref>'s
TargetURIScheme fixed-property instead.</p>
<p>Connection managers with a <code>.manager</code> file
@@ -144,20 +144,20 @@ AddressableURISchemes=tel;sip;
For example: <code>xmpp:julien@example.com</code>.</dd>
<dt><code>msnim</code></dt>
<dd>For the purposes of
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Protocol.Interface.Addressing</tp:dbus-ref>,
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Addressing1</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1">Protocol.Interface.Addressing1</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Addressing1</tp:dbus-ref>,
and
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.Interface.Addressing1</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1">Channel.Interface.Addressing1</tp:dbus-ref>,
the verb part is ignored, and SHOULD be <code>add</code>; the
<code>contact</code> field in the query string is used to
identify the contact.
For example: <code>msnim:add?contact=julien</code>.</dd>
<dt><code>aim</code></dt>
<dd>For the purposes of
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Protocol.Interface.Addressing</tp:dbus-ref>,
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Addressing1</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1">Protocol.Interface.Addressing1</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Addressing1</tp:dbus-ref>,
and
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.Interface.Addressing1</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1">Channel.Interface.Addressing1</tp:dbus-ref>,
the verb part is ignored, and SHOULD be <code>addbuddy</code>; the
<code>screenname</code> field in the query string is used to
identify the contact.
@@ -167,10 +167,10 @@ AddressableURISchemes=tel;sip;
For example: <code>skype:julien</code>.</dd>
<dt><code>ymsgr</code></dt>
<dd>For the purposes of
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Protocol.Interface.Addressing</tp:dbus-ref>,
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Addressing1</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1">Protocol.Interface.Addressing1</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1">Connection.Interface.Addressing1</tp:dbus-ref>,
and
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Channel.Interface.Addressing1</tp:dbus-ref>,
+ <tp:dbus-ref namespace="im.telepathy1">Channel.Interface.Addressing1</tp:dbus-ref>,
the verb part is ignored, and SHOULD be <code>addfriend</code>; the
query string is used to identify the contact.
For example: <code>ymsgr:addfriend?julien</code>.</dd>
@@ -186,14 +186,14 @@ AddressableURISchemes=tel;sip;
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Attempt to normalize the given vCard address. Where possible, this
SHOULD return an address that would appear in the
- <code>org.freedesktop.Telepathy.Connection.Interface.Addressing1/addresses</code>
+ <code>im.telepathy1.Connection.Interface.Addressing1/addresses</code>
attribute for a contact on a connected
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>.
+ <tp:dbus-ref namespace="im.telepathy1">Connection</tp:dbus-ref>.
</p>
<p>If full normalization requires network activity or is otherwise
impossible to do without a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>,
+ namespace="im.telepathy1">Connection</tp:dbus-ref>,
this method SHOULD perform a best-effort normalization.</p>
<p>An example would be a vCard TEL field with a formatted
@@ -226,14 +226,14 @@ AddressableURISchemes=tel;sip;
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The vCard field is not supported (it is not in
<tp:member-ref>AddressableVCardFields</tp:member-ref>).
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
The address is syntactically incorrect.
</tp:docstring>
@@ -247,14 +247,14 @@ AddressableURISchemes=tel;sip;
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Attempt to normalize the given contact URI. Where possible, this
SHOULD return an address that would appear in the
- <code>org.freedesktop.Telepathy.Connection.Interface.Addressing1/uris</code>
+ <code>im.telepathy1.Connection.Interface.Addressing1/uris</code>
attribute for a contact on a connected
- <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>.
+ <tp:dbus-ref namespace="im.telepathy1">Connection</tp:dbus-ref>.
</p>
<p>If full normalization requires network activity or is otherwise
impossible to do without a <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">Connection</tp:dbus-ref>,
+ namespace="im.telepathy1">Connection</tp:dbus-ref>,
this method SHOULD perform a best-effort normalization.</p>
<p>If the URI has extra information beyond what's necessary to
@@ -308,14 +308,14 @@ AddressableURISchemes=tel;sip;
</arg>
<tp:possible-errors>
- <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+ <tp:error name="im.telepathy1.Error.NotImplemented">
<tp:docstring>
The URI scheme is not supported (it is not in
<tp:member-ref>AddressableURISchemes</tp:member-ref>).
</tp:docstring>
</tp:error>
- <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+ <tp:error name="im.telepathy1.Error.InvalidArgument">
<tp:docstring>
<p>The URI is syntactically incorrect or cannot be interpreted
as a reference to a contact.</p>
diff --git a/spec/Protocol_Interface_Avatars.xml b/spec/Protocol_Interface_Avatars1.xml
index 1bf0515ef..9faefe64f 100644
--- a/spec/Protocol_Interface_Avatars.xml
+++ b/spec/Protocol_Interface_Avatars1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Protocol_Interface_Avatars"
+<node name="/Protocol_Interface_Avatars1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009-2010 Collabora Ltd.</tp:copyright>
@@ -20,9 +20,9 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Protocol.Interface.Avatars">
+ <interface name="im.telepathy1.Protocol.Interface.Avatars1">
<tp:added version="0.21.5">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Protocol"/>
+ <tp:requires interface="im.telepathy1.Protocol"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface for protocols where it might be possible to set the
@@ -32,9 +32,9 @@
<tp:rationale>
<p>If the avatar requirements cannot be discovered while offline,
it's impossible to avoid setting the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
+ namespace="im.telepathy1"
>Account</tp:dbus-ref>'s <tp:dbus-ref
- namespace="org.freedesktop.Telepathy.Account.Interface.Avatar"
+ namespace="im.telepathy1.Account.Interface.Avatar1"
>Avatar</tp:dbus-ref> property to an unsupported avatar.</p>
</tp:rationale>
@@ -52,7 +52,7 @@
<code>.manager</code> file:</p>
<pre>[Protocol jabber]
-Interfaces=org.freedesktop.Telepathy.Protocol.Interface.Avatars;
+Interfaces=im.telepathy1.Protocol.Interface.Avatars;
param-account=s required
param-password=s required
SupportedAvatarMIMETypes=image/png;image/jpeg;image/gif;
@@ -71,8 +71,8 @@ MaximumAvatarBytes=8192
type="as" access="read" tp:immutable="yes">
<tp:docstring>
The expected value of the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
- >Connection.Interface.Avatars.SupportedAvatarMIMETypes</tp:dbus-ref>
+ namespace="im.telepathy1"
+ >Connection.Interface.Avatars1.SupportedAvatarMIMETypes</tp:dbus-ref>
property on connections to this protocol.
</tp:docstring>
</property>
@@ -82,8 +82,8 @@ MaximumAvatarBytes=8192
type="u" access="read" tp:immutable="yes">
<tp:docstring>
The expected value of the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
- >Connection.Interface.Avatars.MinimumAvatarHeight</tp:dbus-ref>
+ namespace="im.telepathy1"
+ >Connection.Interface.Avatars1.MinimumAvatarHeight</tp:dbus-ref>
property on connections to this protocol.
</tp:docstring>
</property>
@@ -93,8 +93,8 @@ MaximumAvatarBytes=8192
type="u" access="read" tp:immutable="yes">
<tp:docstring>
The expected value of the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
- >Connection.Interface.Avatars.MinimumAvatarWidth</tp:dbus-ref>
+ namespace="im.telepathy1"
+ >Connection.Interface.Avatars1.MinimumAvatarWidth</tp:dbus-ref>
property on connections to this protocol.
</tp:docstring>
</property>
@@ -104,8 +104,8 @@ MaximumAvatarBytes=8192
type="u" access="read" tp:immutable="yes">
<tp:docstring>
The expected value of the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
- >Connection.Interface.Avatars.RecommendedAvatarHeight</tp:dbus-ref>
+ namespace="im.telepathy1"
+ >Connection.Interface.Avatars1.RecommendedAvatarHeight</tp:dbus-ref>
property on connections to this protocol.
</tp:docstring>
</property>
@@ -115,8 +115,8 @@ MaximumAvatarBytes=8192
type="u" access="read" tp:immutable="yes">
<tp:docstring>
The expected value of the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
- >Connection.Interface.Avatars.RecommendedAvatarWidth</tp:dbus-ref>
+ namespace="im.telepathy1"
+ >Connection.Interface.Avatars1.RecommendedAvatarWidth</tp:dbus-ref>
property on connections to this protocol.
</tp:docstring>
</property>
@@ -126,8 +126,8 @@ MaximumAvatarBytes=8192
type="u" access="read" tp:immutable="yes">
<tp:docstring>
The expected value of the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
- >Connection.Interface.Avatars.MaximumAvatarHeight</tp:dbus-ref>
+ namespace="im.telepathy1"
+ >Connection.Interface.Avatars1.MaximumAvatarHeight</tp:dbus-ref>
property on connections to this protocol.
</tp:docstring>
</property>
@@ -137,8 +137,8 @@ MaximumAvatarBytes=8192
type="u" access="read" tp:immutable="yes">
<tp:docstring>
The expected value of the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
- >Connection.Interface.Avatars.MaximumAvatarWidth</tp:dbus-ref>
+ namespace="im.telepathy1"
+ >Connection.Interface.Avatars1.MaximumAvatarWidth</tp:dbus-ref>
property on connections to this protocol.
</tp:docstring>
</property>
@@ -148,8 +148,8 @@ MaximumAvatarBytes=8192
type="u" access="read" tp:immutable="yes">
<tp:docstring>
The expected value of the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
- >Connection.Interface.Avatars.MaximumAvatarBytes</tp:dbus-ref>
+ namespace="im.telepathy1"
+ >Connection.Interface.Avatars1.MaximumAvatarBytes</tp:dbus-ref>
property on connections to this protocol.
</tp:docstring>
</property>
diff --git a/spec/Protocol_Interface_Presence.xml b/spec/Protocol_Interface_Presence1.xml
index 447d2cee4..a0cc12588 100644
--- a/spec/Protocol_Interface_Presence.xml
+++ b/spec/Protocol_Interface_Presence1.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Protocol_Interface_Presence"
+<node name="/Protocol_Interface_Presence1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2009-2010 Collabora Ltd.</tp:copyright>
@@ -20,9 +20,9 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Protocol.Interface.Presence">
+ <interface name="im.telepathy1.Protocol.Interface.Presence1">
<tp:added version="0.21.3">(as stable API)</tp:added>
- <tp:requires interface="org.freedesktop.Telepathy.Protocol"/>
+ <tp:requires interface="im.telepathy1.Protocol"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface for protocols where it might be possible to set the
@@ -47,14 +47,14 @@
<dl>
<dt>settable</dt>
<dd>If present, the user can set this status on themselves using
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.SimplePresence"
+ <tp:dbus-ref namespace="im.telepathy1.Connection.Interface.Presence1"
>SetPresence</tp:dbus-ref>; this corresponds to May_Set_On_Self
- in the <tp:type>Simple_Status_Spec</tp:type> struct.</dd>
+ in the <tp:type>Status_Spec</tp:type> struct.</dd>
<dt>message</dt>
<dd>If present, the user can set a non-empty message for this status;
this corresponds to Can_Have_Message in the
- <tp:type>Simple_Status_Spec</tp:type> struct.</dd>
+ <tp:type>Status_Spec</tp:type> struct.</dd>
</dl>
<p>Unrecognised tokens MUST be ignored.</p>
@@ -63,7 +63,7 @@
<code>.manager</code> file:</p>
<pre>[Protocol jabber]
-Interfaces=org.freedesktop.Telepathy.Protocol.Interface.Presence;
+Interfaces=im.telepathy1.Protocol.Interface.Presence;
param-account=s required
param-password=s required
status-offline=1
@@ -96,14 +96,14 @@ status-chat=2 settable message
<property name="Statuses"
tp:name-for-bindings="Statuses"
- type="a{s(ubb)}" tp:type="Simple_Status_Spec_Map" access="read"
+ type="a{s(ubb)}" tp:type="Status_Spec_Map" access="read"
tp:immutable="yes">
<tp:docstring>
<p>The statuses that might appear in the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy"
- >Connection.Interface.SimplePresence.Statuses</tp:dbus-ref>
+ namespace="im.telepathy1"
+ >Connection.Interface.Presence1.Statuses</tp:dbus-ref>
property on a connection to this protocol that supports
- SimplePresence. This property is immutable.</p>
+ Presence. This property is immutable.</p>
<p>Depending on server capabilities, it is possible that not all
of these will actually appear on the Connection.</p>
diff --git a/spec/all.xml b/spec/all.xml
index 31aaff6fb..2c3051d2c 100644
--- a/spec/all.xml
+++ b/spec/all.xml
@@ -3,7 +3,7 @@
xmlns:xi="http://www.w3.org/2001/XInclude">
<tp:title>Telepathy D-Bus Interface Specification</tp:title>
-<tp:version>0.27.0</tp:version>
+<tp:version>0.99.0.1</tp:version>
<tp:copyright>Copyright © 2005-2012 Collabora Limited</tp:copyright>
<tp:copyright>Copyright © 2005-2011 Nokia Corporation</tp:copyright>
@@ -32,11 +32,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</p>
</tp:docstring>
<xi:include href="Connection_Manager.xml"/>
- <xi:include href="Connection_Manager_Interface_Account_Storage.xml"/>
+ <xi:include href="Connection_Manager_Interface_Account_Storage1.xml"/>
<xi:include href="Protocol.xml"/>
- <xi:include href="Protocol_Interface_Addressing.xml"/>
- <xi:include href="Protocol_Interface_Avatars.xml"/>
- <xi:include href="Protocol_Interface_Presence.xml"/>
+ <xi:include href="Protocol_Interface_Addressing1.xml"/>
+ <xi:include href="Protocol_Interface_Avatars1.xml"/>
+ <xi:include href="Protocol_Interface_Presence1.xml"/>
<tp:section name="Connection Object">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -48,7 +48,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</p>
</tp:docstring>
<xi:include href="Connection.xml"/>
- <xi:include href="Connection_Future.xml"/>
<xi:include href="Connection_Interface_Contacts.xml"/>
<xi:include href="Connection_Interface_Requests.xml"/>
@@ -62,9 +61,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</p>
</tp:docstring>
- <xi:include href="Connection_Interface_Contact_List.xml"/>
- <xi:include href="Connection_Interface_Contact_Groups.xml"/>
- <xi:include href="Connection_Interface_Contact_Blocking.xml"/>
+ <xi:include href="Connection_Interface_Contact_List1.xml"/>
+ <xi:include href="Connection_Interface_Contact_Groups1.xml"/>
+ <xi:include href="Connection_Interface_Contact_Blocking1.xml"/>
</tp:section>
<tp:section name="Contact metadata interfaces">
@@ -77,17 +76,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</p>
</tp:docstring>
- <xi:include href="Connection_Interface_Aliasing.xml"/>
- <xi:include href="Connection_Interface_Avatars.xml"/>
- <xi:include href="Connection_Interface_Capabilities.xml"/>
- <xi:include href="Connection_Interface_Client_Types.xml"/>
- <xi:include href="Connection_Interface_Contact_Capabilities.xml"/>
- <xi:include href="Connection_Interface_Contact_Info.xml"/>
- <xi:include href="Connection_Interface_Location.xml"/>
- <xi:include href="Connection_Interface_Presence.xml"/>
- <xi:include href="Connection_Interface_Renaming.xml"/>
- <xi:include href="Connection_Interface_Resources.xml"/>
- <xi:include href="Connection_Interface_Simple_Presence.xml"/>
+ <xi:include href="Connection_Interface_Aliasing1.xml"/>
+ <xi:include href="Connection_Interface_Avatars1.xml"/>
+ <xi:include href="Connection_Interface_Client_Types1.xml"/>
+ <xi:include href="Connection_Interface_Contact_Capabilities1.xml"/>
+ <xi:include href="Connection_Interface_Contact_Info1.xml"/>
+ <xi:include href="Connection_Interface_Location1.xml"/>
+ <xi:include href="Connection_Interface_Presence1.xml"/>
+ <xi:include href="Connection_Interface_Renaming1.xml"/>
+ <xi:include href="Connection_Interface_Resources1.xml"/>
</tp:section>
<tp:section name="Connection feature interfaces">
@@ -98,21 +95,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</p>
</tp:docstring>
- <xi:include href="Connection_Interface_Addressing.xml"/>
- <xi:include href="Connection_Interface_Anonymity.xml"/>
- <xi:include href="Connection_Interface_Balance.xml"/>
- <xi:include href="Connection_Interface_Cellular.xml"/>
- <xi:include href="Connection_Interface_Communication_Policy.xml"/>
- <xi:include href="Connection_Interface_Forwarding.xml"/>
- <xi:include href="Connection_Interface_Keepalive.xml"/>
- <xi:include href="Connection_Interface_Mail_Notification.xml"/>
- <xi:include href="Connection_Interface_Power_Saving.xml"/>
- <xi:include href="Connection_Interface_Service_Point.xml"/>
+ <xi:include href="Connection_Interface_Addressing1.xml"/>
+ <xi:include href="Connection_Interface_Anonymity1.xml"/>
+ <xi:include href="Connection_Interface_Balance1.xml"/>
+ <xi:include href="Connection_Interface_Cellular1.xml"/>
+ <xi:include href="Connection_Interface_Communication_Policy1.xml"/>
+ <xi:include href="Connection_Interface_Forwarding1.xml"/>
+ <xi:include href="Connection_Interface_Keepalive1.xml"/>
+ <xi:include href="Connection_Interface_Mail_Notification1.xml"/>
+ <xi:include href="Connection_Interface_Power_Saving1.xml"/>
+ <xi:include href="Connection_Interface_Service_Point1.xml"/>
+ <xi:include href="Connection_Interface_Sidecars1.xml"/>
</tp:section>
</tp:section>
- <xi:include href="Channel_Bundle.xml"/>
-
<tp:section name="Channel Object">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>
@@ -127,7 +123,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</p>
</tp:docstring>
<xi:include href="Channel.xml"/>
- <xi:include href="Channel_Future.xml"/>
<tp:section name="Channel Types">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -135,18 +130,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
Each Channel implements one of the following types:
</p>
</tp:docstring>
- <xi:include href="Channel_Type_Call.xml"/>
- <xi:include href="Channel_Type_Contact_List.xml"/>
- <xi:include href="Channel_Type_Contact_Search.xml"/>
- <xi:include href="Channel_Type_DBus_Tube.xml"/>
- <xi:include href="Channel_Type_File_Transfer.xml"/>
- <xi:include href="Channel_Type_Room_List.xml"/>
- <xi:include href="Channel_Type_Server_Authentication.xml"/>
- <xi:include href="Channel_Type_Server_TLS_Connection.xml"/>
- <xi:include href="Channel_Type_Stream_Tube.xml"/>
- <xi:include href="Channel_Type_Streamed_Media.xml"/>
+ <xi:include href="Channel_Type_Call1.xml"/>
+ <xi:include href="Channel_Type_Contact_Search1.xml"/>
+ <xi:include href="Channel_Type_DBus_Tube1.xml"/>
+ <xi:include href="Channel_Type_File_Transfer1.xml"/>
+ <xi:include href="Channel_Type_Room_List1.xml"/>
+ <xi:include href="Channel_Type_Server_Authentication1.xml"/>
+ <xi:include href="Channel_Type_Server_TLS_Connection1.xml"/>
+ <xi:include href="Channel_Type_Stream_Tube1.xml"/>
<xi:include href="Channel_Type_Text.xml"/>
- <xi:include href="Channel_Type_Tubes.xml"/>
</tp:section>
<tp:section name="Channel interfaces">
@@ -159,65 +151,56 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</p>
</tp:docstring>
- <xi:include href="Channel_Interface_Addressing.xml"/>
- <xi:include href="Channel_Interface_Anonymity.xml"/>
- <xi:include href="Channel_Interface_Destroyable.xml"/>
- <xi:include href="Channel_Interface_File_Transfer_Metadata.xml"/>
- <xi:include href="Channel_Interface_Group.xml"/>
- <xi:include href="Channel_Interface_Password.xml"/>
- <xi:include href="Channel_Interface_Room.xml"/>
- <xi:include href="Channel_Interface_Room_Config.xml"/>
- <xi:include href="Channel_Interface_SASL_Authentication.xml"/>
- <xi:include href="Channel_Interface_Captcha_Authentication.xml"/>
- <xi:include href="Channel_Interface_Credentials_Storage.xml"/>
- <xi:include href="Channel_Interface_Securable.xml"/>
- <xi:include href="Channel_Interface_Service_Point.xml"/>
- <xi:include href="Channel_Interface_Subject.xml"/>
- <xi:include href="Channel_Interface_Picture.xml"/>
- <xi:include href="Channel_Interface_Tube.xml"/>
+ <xi:include href="Channel_Interface_Addressing1.xml"/>
+ <xi:include href="Channel_Interface_Anonymity1.xml"/>
+ <xi:include href="Channel_Interface_Captcha_Authentication1.xml"/>
+ <xi:include href="Channel_Interface_Destroyable1.xml"/>
+ <xi:include href="Channel_Interface_File_Transfer_Metadata1.xml"/>
+ <xi:include href="Channel_Interface_Group1.xml"/>
+ <xi:include href="Channel_Interface_Password1.xml"/>
+ <xi:include href="Channel_Interface_Room1.xml"/>
+ <xi:include href="Channel_Interface_Room_Config1.xml"/>
+ <xi:include href="Channel_Interface_SASL_Authentication1.xml"/>
+ <xi:include href="Channel_Interface_Credentials_Storage1.xml"/>
+ <xi:include href="Channel_Interface_Securable1.xml"/>
+ <xi:include href="Channel_Interface_Service_Point1.xml"/>
+ <xi:include href="Channel_Interface_Subject1.xml"/>
+ <xi:include href="Channel_Interface_Picture1.xml"/>
+ <xi:include href="Channel_Interface_Tube1.xml"/>
<tp:section name="Text-specific interfaces">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>These interfaces may only appear on channels of type <tp:dbus-ref
- namespace='ofdT.Channel.Type'>Text</tp:dbus-ref>.</p>
+ namespace='imt1.Channel.Type'>Text</tp:dbus-ref>.</p>
</tp:docstring>
- <xi:include href="Channel_Interface_Chat_State.xml"/>
- <xi:include href="Channel_Interface_HTML.xml"/>
- <xi:include href="Channel_Interface_Messages.xml"/>
- <xi:include href="Channel_Interface_SMS.xml"/>
+ <xi:include href="Channel_Interface_Chat_State1.xml"/>
+ <xi:include href="Channel_Interface_HTML1.xml"/>
+ <xi:include href="Channel_Interface_SMS1.xml"/>
</tp:section>
- <tp:section name="Streamed Media/Call-related interfaces">
+ <tp:section name="Call-related interfaces">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>These interfaces are only applicable to channels of type <tp:dbus-ref
- namespace='ofdT.Channel.Type'>StreamedMedia</tp:dbus-ref>, with the
- exception of the <tp:dbus-ref
- namespace='ofdT.Channel.Interface'>Hold</tp:dbus-ref> and
- <tp:dbus-ref namespace="ofdT.Channel.Interface">DTMF</tp:dbus-ref>
- interfaces, which may also appear on <tp:dbus-ref
- namespace='ofdT.Channel.Type'>Call1</tp:dbus-ref> channels.</p>
+ namespace='imt1.Channel.Type'>Call1</tp:dbus-ref>.</p>
</tp:docstring>
- <xi:include href="Channel_Interface_Call_State.xml"/>
- <xi:include href="Channel_Interface_DTMF.xml"/>
- <xi:include href="Channel_Interface_Hold.xml"/>
- <xi:include href="Channel_Interface_Media_Signalling.xml"/>
+ <xi:include href="Channel_Interface_DTMF1.xml"/>
+ <xi:include href="Channel_Interface_Hold1.xml"/>
</tp:section>
<tp:section name="Conference-related interfaces">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>These interfaces provide functionality for ad-hoc conference calls and
chat rooms. They are primarily intended for <tp:dbus-ref
- namespace='ofdT.Channel.Type'>Text</tp:dbus-ref>, <tp:dbus-ref
- namespace='ofdT.Channel.Type'>StreamedMedia</tp:dbus-ref> and
- <tp:dbus-ref namespace='ofdT.Channel.Type'>Call1</tp:dbus-ref>
+ namespace='imt1.Channel.Type'>Text</tp:dbus-ref> and
+ <tp:dbus-ref namespace='imt1.Channel.Type'>Call1</tp:dbus-ref>
channels, but may also appear on other types of channel.</p>
</tp:docstring>
- <xi:include href="Channel_Interface_Conference.xml"/>
- <xi:include href="Channel_Interface_Splittable.xml"/>
- <xi:include href="Channel_Interface_Mergeable_Conference.xml"/>
+ <xi:include href="Channel_Interface_Conference1.xml"/>
+ <xi:include href="Channel_Interface_Splittable1.xml"/>
+ <xi:include href="Channel_Interface_Mergeable_Conference1.xml"/>
</tp:section>
</tp:section>
</tp:section>
@@ -233,16 +216,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<xi:include href="Authentication_TLS_Certificate.xml"/>
</tp:section>
- <tp:section name="Media">
- <xi:include href="Media_Session_Handler.xml"/>
- <xi:include href="Media_Stream_Handler.xml"/>
- </tp:section>
-
<tp:section name="Calls">
- <xi:include href="Call_Content.xml"/>
- <xi:include href="Call_Content_Interface_DTMF.xml"/>
- <xi:include href="Call_Stream.xml"/>
- <xi:include href="Call_Interface_Mute.xml"/>
+ <xi:include href="Call1_Content.xml"/>
+ <xi:include href="Call1_Stream.xml"/>
+ <xi:include href="Call1_Content_Interface_DTMF1.xml"/>
+ <xi:include href="Call1_Interface_Mute.xml"/>
</tp:section>
<tp:section name="Call media interfaces">
@@ -255,20 +233,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
implement the media streaming aspects of a call.
</p>
</tp:docstring>
- <xi:include href="Call_Content_Interface_Media.xml"/>
- <xi:include href="Call_Content_Interface_Video_Control.xml"/>
- <xi:include href="Call_Content_Interface_Audio_Control.xml"/>
- <xi:include href="Call_Content_Media_Description.xml"/>
- <xi:include href="Call_Content_Media_Description_Interface_RTP_Header_Extensions.xml"/>
- <xi:include href="Call_Content_Media_Description_Interface_RTCP_Feedback.xml"/>
+ <xi:include href="Call1_Content_Interface_Media.xml"/>
+ <xi:include href="Call1_Content_Interface_Video_Control1.xml"/>
+ <xi:include href="Call1_Content_Interface_Audio_Control1.xml"/>
+ <xi:include href="Call1_Content_Media_Description.xml"/>
+ <xi:include href="Call1_Content_Media_Description_Interface_RTP_Header_Extensions1.xml"/>
+ <xi:include href="Call1_Content_Media_Description_Interface_RTCP_Feedback1.xml"/>
<xi:include
- href="Call_Content_Media_Description_Interface_RTCP_Extended_Reports.xml"/>
- <xi:include href="Call_Stream_Interface_Media.xml"/>
- <xi:include href="Call_Stream_Endpoint.xml"/>
+ href="Call1_Content_Media_Description_Interface_RTCP_Extended_Reports1.xml"/>
+ <xi:include href="Call1_Stream_Interface_Media.xml"/>
+ <xi:include href="Call1_Stream_Endpoint.xml"/>
</tp:section>
<tp:section name="Debugging">
- <xi:include href="Debug.xml"/>
+ <xi:include href="Debug1.xml"/>
</tp:section>
</tp:section>
@@ -282,13 +260,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</p>
</tp:docstring>
<xi:include href="Account_Manager.xml"/>
- <xi:include href="Account_Manager_Interface_Hidden.xml"/>
+ <xi:include href="Account_Manager_Interface_Hidden1.xml"/>
<xi:include href="Account.xml"/>
- <xi:include href="Account_Interface_Addressing.xml"/>
- <xi:include href="Account_Interface_Avatar.xml"/>
- <xi:include href="Account_Interface_Hidden.xml"/>
- <xi:include href="Account_Interface_Storage.xml"/>
- <xi:include href="Account_Interface_External_Password_Storage.xml"/>
+ <xi:include href="Account_Interface_Addressing1.xml"/>
+ <xi:include href="Account_Interface_Avatar1.xml"/>
+ <xi:include href="Account_Interface_Hidden1.xml"/>
+ <xi:include href="Account_Interface_Storage1.xml"/>
+ <xi:include href="Account_Interface_External_Password_Storage1.xml"/>
</tp:section>
<tp:section name="The Channel Dispatcher">
@@ -300,7 +278,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</p>
</tp:docstring>
<xi:include href="Channel_Dispatcher.xml"/>
- <xi:include href="Channel_Dispatcher_Interface_Operation_List.xml"/>
+ <xi:include href="Channel_Dispatcher_Interface_Operation_List1.xml"/>
<xi:include href="Channel_Dispatch_Operation.xml"/>
<xi:include href="Channel_Request.xml"/>
</tp:section>
@@ -318,18 +296,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<xi:include href="Client_Handler.xml"/>
<xi:include href="Client_Handler_Future.xml"/>
<xi:include href="Client_Interface_Requests.xml"/>
-
- <xi:include href="Channel_Handler.xml"/>
</tp:section>
-<xi:include href="Properties_Interface.xml"/>
-
<xi:include href="errors.xml"/>
<xi:include href="generic-types.xml"/>
-<!-- Never implemented, vague
-<xi:include href="Connection_Interface_Privacy.xml"/> -->
-<!-- Causes havoc, never implemented, unclear requirements
-<xi:include href="Channel_Interface_Transfer.xml"/> -->
-
</tp:spec>
diff --git a/spec/errors.xml b/spec/errors.xml
index d802152a4..747dbe88e 100644
--- a/spec/errors.xml
+++ b/spec/errors.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" ?>
-<tp:errors xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" namespace="org.freedesktop.Telepathy.Error">
+<tp:errors xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" namespace="im.telepathy1.Error">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The D-Bus errors used in Telepathy all start with
- <code>org.freedesktop.Telepathy.Error.</code>. They are used in
+ <code>im.telepathy1.Error.</code>. They are used in
D-Bus messages of type ERROR, and also as plain strings annotated with
the <tp:type>DBus_Error_Name</tp:type> type.</p>
@@ -16,7 +16,7 @@
indicate specialized failure conditions. For better interoperability,
if a suitable Telepathy error exists, it should be preferred.</p>
- <p>The namespace <code>org.freedesktop.Telepathy.Qt4.Error.</code>
+ <p>The namespace <code>im.telepathy1.Qt4.Error.</code>
is reserved for use by the D-Bus client implementation in telepathy-qt4,
which uses it to represent certain error situations that did not involve
a D-Bus ERROR message. These errors are defined and documented as part of
@@ -58,7 +58,7 @@
The connection is not currently connected and cannot be used.
This error may also be raised when operations are performed on a
Connection for which
- <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">StatusChanged</tp:dbus-ref>
+ <tp:dbus-ref namespace="im.telepathy1.Connection">StatusChanged</tp:dbus-ref>
has signalled status Disconnected for reason None.
<tp:rationale>
@@ -502,7 +502,7 @@
<tp:rationale>
For instance, the <tp:dbus-ref
- namespace="org.freedesktop.Telepathy">ChannelDispatcher</tp:dbus-ref>
+ namespace="im.telepathy1">ChannelDispatcher</tp:dbus-ref>
might raise this error for some or all channel requests if it has
detected that there is not enough free memory.
</tp:rationale>
@@ -515,10 +515,10 @@
Raised if a request cannot be satisfied without violating an earlier
request for anonymity, and the earlier request specified that raising
an error is preferable to disclosing the user's identity (for instance
- via <tp:dbus-ref namespace="org.freedesktop.Telepathy"
- >Connection.Interface.Anonymity.AnonymityMandatory</tp:dbus-ref> or
- <tp:dbus-ref namespace="org.freedesktop.Telepathy"
- >Channel.Interface.Anonymity.AnonymityMandatory</tp:dbus-ref>).
+ via <tp:dbus-ref namespace="im.telepathy1"
+ >Connection.Interface.Anonymity1.AnonymityMandatory</tp:dbus-ref> or
+ <tp:dbus-ref namespace="im.telepathy1"
+ >Channel.Interface.Anonymity1.AnonymityMandatory</tp:dbus-ref>).
</tp:docstring>
</tp:error>
@@ -534,7 +534,7 @@
<tp:added version="0.21.2"/>
<tp:docstring>
Raised when an incoming or outgoing <tp:dbus-ref
- namespace="ofdT.Channel.Type">Call1</tp:dbus-ref> is
+ namespace="imt1.Channel.Type">Call1</tp:dbus-ref> is
rejected by the the receiver.
</tp:docstring>
</tp:error>
@@ -573,12 +573,13 @@
<tp:rationale>
For instance, this would be an appropriate mapping for XMPP's
- errors bad-format, invalid-xml, etc., which can't happen unless
- the local (or remote) XMPP implementation is faulty. This is
- also analogous to
- <tp:value-ref type="Media_Stream_Error">Invalid_CM_Behavior</tp:value-ref>,
+ errors bad-format, invalid-xml, etc., which can't happen
+ unless the local (or remote) XMPP implementation is
+ faulty. This is also analogous to
+ Media_Stream_Error_Invalid_CM_Behavior,
<code>TP_DBUS_ERROR_INCONSISTENT</code> in telepathy-glib, and
- <code>TELEPATHY_QT4_ERROR_INCONSISTENT</code> in telepathy-qt4.
+ <code>TELEPATHY_QT4_ERROR_INCONSISTENT</code> in
+ telepathy-qt4.
</tp:rationale>
</tp:docstring>
</tp:error>
@@ -587,7 +588,7 @@
<tp:added version="0.21.12"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Raised as a
- <tp:dbus-ref namespace="ofdT.Connection">ConnectionError</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Connection">ConnectionError</tp:dbus-ref>
when a Connection cannot be established because either the Connection
Manager or its support library (e.g. wocky, papyon, sofiasip) requires
upgrading to support a newer protocol version.</p>
@@ -624,14 +625,14 @@
<tp:added version="0.22.1"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Raised if the user has insufficient
- <tp:dbus-ref namespace="ofdT.Connection.Interface">Balance</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Connection.Interface">Balance1</tp:dbus-ref>
to place a call or send a message.</p>
<p>The key 'balance-required' MAY be included in
- <tp:dbus-ref namespace="ofdT.Channel.Type.Call1">CallStateDetails</tp:dbus-ref>
+ <tp:dbus-ref namespace="imt1.Channel.Type.Call1">CallStateDetails</tp:dbus-ref>
or a delivery report's <tp:type>Message_Part</tp:type>
(with the same units and scale as
- <tp:dbus-ref namespace="ofdT.Connection.Interface.Balance">AccountBalance</tp:dbus-ref>)
+ <tp:dbus-ref namespace="imt1.Connection.Interface.Balance1">AccountBalance</tp:dbus-ref>)
to indicate how much credit is required to make this call or send
this message.</p>
</tp:docstring>
@@ -641,7 +642,7 @@
<tp:added version="0.25.2"/>
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>Raised if the <tp:dbus-ref
- namespace="ofdT.Channel.Interface">CaptchaAuthentication1</tp:dbus-ref>
+ namespace="imt1.Channel.Interface">CaptchaAuthentication1</tp:dbus-ref>
Handler either has no UI to present captchas, or it does, but wasn't
able to answer any of the captchas given.</p>
</tp:docstring>
diff --git a/spec/generic-types.xml b/spec/generic-types.xml
index 2676e4533..4e68f318a 100644
--- a/spec/generic-types.xml
+++ b/spec/generic-types.xml
@@ -20,14 +20,14 @@
<tp:simple-type name="DBus_Bus_Name" type="s"
array-name="DBus_Bus_Name_List">
<tp:docstring>A string representing a D-Bus bus name - either a well-known
- name like "org.freedesktop.Telepathy.MissionControl" or a unique name
+ name like "im.telepathy1.MissionControl" or a unique name
like ":1.123"</tp:docstring>
</tp:simple-type>
<tp:simple-type name="DBus_Well_Known_Name" type="s"
array-name="DBus_Well_Known_Name_List">
<tp:docstring>A string representing a D-Bus well-known
- name like "org.freedesktop.Telepathy.MissionControl".</tp:docstring>
+ name like "im.telepathy1.MissionControl".</tp:docstring>
</tp:simple-type>
<tp:simple-type name="DBus_Unique_Name" type="s"
diff --git a/spec/template.xml b/spec/template.xml
index 283804a94..f5a9529d4 100644
--- a/spec/template.xml
+++ b/spec/template.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" ?>
-<node name="/Foo"
+<node name="/Foo1"
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
<tp:copyright>Copyright © 2010 Collabora Ltd.</tp:copyright>
@@ -20,7 +20,7 @@
02110-1301, USA.</p>
</tp:license>
- <interface name="org.freedesktop.Telepathy.Foo.DRAFT"
+ <interface name="im.telepathy1.Foo1"
tp:causes-havoc="experimental">
<tp:added version="0.UNRELEASED">(draft 1)</tp:added>
diff --git a/telepathy-glib/Makefile.am b/telepathy-glib/Makefile.am
index e84221083..3228b2dcb 100644
--- a/telepathy-glib/Makefile.am
+++ b/telepathy-glib/Makefile.am
@@ -1,10 +1,12 @@
include $(top_srcdir)/tools/flymake.mk
-tpgincludedir=$(includedir)/telepathy-1.0/telepathy-glib
+tpgincludedir=$(includedir)/telepathy-glib-1/telepathy-glib
genincludedir=$(tpgincludedir)/_gen
+tpgdbusincludedir=$(includedir)/telepathy-glib-1-dbus/telepathy-glib
+gendbusincludedir=$(tpgdbusincludedir)/_gen
pkgconfigdir = ${libdir}/pkgconfig
-pkgconfig_DATA = telepathy-glib.pc
+pkgconfig_DATA = telepathy-glib-1.pc telepathy-glib-1-dbus.pc
EXTRA_DIST = \
$(ABI_LISTS) \
@@ -12,23 +14,37 @@ EXTRA_DIST = \
$(introspection_extra_dist) \
extra-gtkdoc.h
-# libtelepathy-glib is just a shared version of libtelepathy-glib-internal,
-# produced by abi.am.
+# libtelepathy-glib-1 is just a shared version of
+# libtelepathy-glib-main-internal, produced by abi.am. Similarly,
+# libtelepathy-glib-1-core and libtelepathy-glib-1-dbus are shared versions of
+# libtelepathy-glib-core-internal and -dbus-internal.
#
# The static version is necessary because one of the tests wants to use
-# internal symbols (_tp_log) which are made invisible by GNU ld.
+# internal symbols (_tp_log) which are made invisible by GNU ld, and it
+# makes checking consistency of the ABI easier.
-lib_LTLIBRARIES = libtelepathy-glib.la
-noinst_LTLIBRARIES = libtelepathy-glib-internal.la
+# Put the lowest-level library first, so that libtool will be able to relink
+# them during installation.
+lib_LTLIBRARIES = \
+ libtelepathy-glib-1-core.la \
+ libtelepathy-glib-1-dbus.la \
+ libtelepathy-glib-1.la \
+ $(NULL)
+
+noinst_LTLIBRARIES = \
+ libtelepathy-glib-main-internal.la \
+ libtelepathy-glib-dbus-internal.la \
+ libtelepathy-glib-core-internal.la \
+ libtelepathy-glib-reentrants.la \
+ $(NULL)
# headers that are subject to coding-style checks
-our_headers = \
+tpginclude_HEADERS = \
account.h \
account-channel-request.h \
account-manager.h \
account-request.h \
automatic-client-factory.h \
- automatic-proxy-factory.h \
add-dispatch-operation-context.h \
base-call-channel.h \
base-call-content.h \
@@ -43,7 +59,6 @@ our_headers = \
base-password-channel.h \
base-protocol.h \
base-room-config.h \
- basic-proxy-factory.h \
call-channel.h \
call-content.h \
call-content-media-description.h \
@@ -54,11 +69,10 @@ our_headers = \
channel-iface.h \
channel-dispatcher.h \
channel-dispatch-operation.h \
- channel-factory-iface.h \
channel-manager.h \
channel-request.h \
client.h \
- client-channel-factory.h \
+ client-factory.h \
client-message.h \
cm-message.h \
connection.h \
@@ -79,7 +93,6 @@ our_headers = \
debug.h \
debug-sender.h \
debug-client.h \
- debug-ansi.h \
debug-message.h \
dtmf.h \
enums.h \
@@ -88,21 +101,17 @@ our_headers = \
file-transfer-channel.h \
gnio-util.h \
group-mixin.h \
- gtypes.h \
handle.h \
handle-channels-context.h \
handle-repo.h \
handle-repo-static.h \
handle-repo-dynamic.h \
heap.h \
- interfaces.h \
intset.h \
- media-interfaces.h \
message.h \
message-mixin.h \
observe-channels-context.h \
presence-mixin.h \
- properties-mixin.h \
protocol.h \
proxy.h \
proxy-subclass.h \
@@ -111,12 +120,25 @@ our_headers = \
run.h \
signalled-message.h \
simple-approver.h \
- simple-client-factory.h \
simple-handler.h \
simple-observer.h \
simple-password-manager.h \
stream-tube-channel.h \
stream-tube-connection.h \
+ telepathy-glib.h \
+ text-channel.h \
+ tls-certificate.h \
+ tls-certificate-rejection.h \
+ util.h \
+ $(NULL)
+
+tpgdbusinclude_HEADERS = \
+ cli-call.h \
+ cli-channel.h \
+ cli-connection.h \
+ cli-misc.h \
+ gtypes.h \
+ interfaces.h \
svc-account.h \
svc-account-manager.h \
svc-call.h \
@@ -129,21 +151,11 @@ our_headers = \
svc-connection-manager.h \
svc-debug.h \
svc-generic.h \
- svc-media-interfaces.h \
svc-properties-interface.h \
svc-protocol.h \
svc-tls.h \
- telepathy-glib.h \
telepathy-glib-dbus.h \
- text-channel.h \
- text-mixin.h \
- tls-certificate.h \
- tls-certificate-rejection.h \
- util.h
-
-tpginclude_HEADERS = \
- $(our_headers) \
- verify.h
+ $(NULL)
BUILT_SOURCES = $(codegen_sources)
@@ -161,14 +173,41 @@ clean-local:
rm -rf tmp-introspect*
check_c_sources = \
- $(our_headers) \
- $(libtelepathy_glib_internal_la_SOURCES)
+ $(tpginclude_HEADERS) \
+ $(tpgdbusinclude_HEADERS) \
+ $(libtelepathy_glib_core_internal_la_SOURCES) \
+ $(libtelepathy_glib_dbus_internal_la_SOURCES) \
+ $(libtelepathy_glib_main_internal_la_SOURCES) \
+ $(NULL)
include $(top_srcdir)/tools/check-coding-style.mk
check-local: check-coding-style
-libtelepathy_glib_internal_la_LIBADD = $(ALL_LIBS)
-libtelepathy_glib_internal_la_SOURCES = \
+libtelepathy_glib_core_internal_la_LIBADD = $(ALL_LIBS)
+libtelepathy_glib_core_internal_la_SOURCES = \
+ core-dbus.c \
+ core-proxy.c \
+ errors.c \
+ $(NULL)
+
+libtelepathy_glib_dbus_internal_la_LIBADD = \
+ $(ALL_LIBS) \
+ libtelepathy-glib-1-core.la \
+ $(NULL)
+libtelepathy_glib_dbus_internal_la_SOURCES = \
+ cli-channel.c \
+ cli-connection.c \
+ cli-misc.c \
+ gtypes.c \
+ interfaces.c \
+ $(NULL)
+
+libtelepathy_glib_main_internal_la_LIBADD = \
+ $(ALL_LIBS) \
+ libtelepathy-glib-1-dbus.la \
+ $(NULL)
+
+libtelepathy_glib_main_internal_la_SOURCES = \
account.c \
account-channel-request.c \
account-channel-request-internal.h \
@@ -178,7 +217,6 @@ libtelepathy_glib_internal_la_SOURCES = \
account-request.c \
automatic-client-factory-internal.h \
automatic-client-factory.c \
- automatic-proxy-factory.c \
add-dispatch-operation-context-internal.h \
add-dispatch-operation-context.c \
base-call-channel.c \
@@ -198,7 +236,6 @@ libtelepathy_glib_internal_la_SOURCES = \
base-protocol-internal.h \
base-protocol.c \
base-room-config.c \
- basic-proxy-factory.c \
capabilities.c \
capabilities-internal.h \
call-channel.c \
@@ -209,7 +246,6 @@ libtelepathy_glib_internal_la_SOURCES = \
call-stream.c \
call-stream-endpoint.c \
channel.c \
- channel-contacts.c \
channel-group.c \
channel-internal.h \
channel-dispatcher.c \
@@ -218,7 +254,8 @@ libtelepathy_glib_internal_la_SOURCES = \
channel-manager.c \
channel-request.c \
client.c \
- client-channel-factory.c \
+ client-factory.c \
+ client-factory-internal.h \
client-message.c \
client-message-internal.h \
connection.c \
@@ -231,14 +268,12 @@ libtelepathy_glib_internal_la_SOURCES = \
connection-manager.c \
contact.c \
contact-internal.h \
- contact-list-channel-internal.h \
- contact-list-channel.c \
contact-operations.c \
contact-search.c \
contact-search-internal.h \
contact-search-result.c \
- base-contact-list.c \
base-contact-list-internal.h \
+ base-contact-list.c \
cm-message.c \
cm-message-internal.h \
contacts-mixin.c \
@@ -246,22 +281,19 @@ libtelepathy_glib_internal_la_SOURCES = \
dbus-daemon.c \
dbus-internal.h \
dbus-properties-mixin.c \
+ dbus-properties-mixin-internal.h \
dbus-tube-channel.c \
debug.c \
debug-client.c \
debug-sender.c \
debug-message.c \
debug-message-internal.h \
- deprecated-internal.h \
dtmf.c \
- interfaces.c \
debug-internal.h \
- errors.c \
exportable-channel.c \
file-transfer-channel.c \
gnio-util.c \
group-mixin.c \
- gtypes.c \
handle.c \
handle-channels-context-internal.h \
handle-channels-context.c \
@@ -273,15 +305,12 @@ libtelepathy_glib_internal_la_SOURCES = \
heap.c \
intset.c \
channel-iface.c \
- channel-factory-iface.c \
- media-interfaces.c \
message.c \
message-internal.h \
message-mixin.c \
observe-channels-context-internal.h \
observe-channels-context.c \
presence-mixin.c \
- properties-mixin.c \
protocol.c \
protocol-internal.h \
proxy.c \
@@ -295,8 +324,6 @@ libtelepathy_glib_internal_la_SOURCES = \
signalled-message.c \
signalled-message-internal.h \
simple-approver.c \
- simple-client-factory.c \
- simple-client-factory-internal.h \
simple-handler.c \
simple-observer.c \
simple-password-manager.c \
@@ -304,13 +331,16 @@ libtelepathy_glib_internal_la_SOURCES = \
stream-tube-connection-internal.h \
stream-tube-connection.c \
text-channel.c \
- text-mixin.c \
tls-certificate.c \
tls-certificate-rejection.c \
tls-certificate-rejection-internal.h \
util.c \
util-internal.h
+libtelepathy_glib_reentrants_la_SOURCES = \
+ reentrants.c \
+ reentrants.h
+
AM_CPPFLAGS = \
-DG_LOG_DOMAIN=\"tp-glib\" \
-D_TP_COMPILATION \
@@ -335,12 +365,33 @@ include codegen.am
include introspection.am
Android.mk: Makefile.am $(codegen_sources)
- androgenizer -:PROJECT telepathy-glib -:SHARED libtelepathy-glib -:TAGS eng debug \
+ androgenizer -:PROJECT telepathy-glib \
+ \
+ -:SHARED libtelepathy-glib-1-core -:TAGS eng debug \
+ -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+ -:SOURCES $(libtelepathy_glib_core_internal_la_SOURCES) \
+ $(nodist_libtelepathy_glib_core_internal_la_SOURCES) \
+ -:CFLAGS $(DEFAULT_INCLUDES) $(DEFS) $(CFLAGS) $(GIO_UNIX_CFLAGS) $(DBUS_CFLAGS) $(AM_CFLAGS) \
+ -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS) $(INCLUDES) \
+ -:LDFLAGS $(ALL_LIBS) \
+ $(libtelepathy_glib_core_internal_la_LDFLAGS) \
+ \
+ -:SHARED libtelepathy-glib-1-dbus -:TAGS eng debug \
+ -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
+ -:SOURCES $(libtelepathy_glib_dbus_internal_la_SOURCES) \
+ $(nodist_libtelepathy_glib_dbus_internal_la_SOURCES) \
+ -:CFLAGS $(DEFAULT_INCLUDES) $(DEFS) $(CFLAGS) $(GIO_UNIX_CFLAGS) $(DBUS_CFLAGS) $(AM_CFLAGS) \
+ -:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS) $(INCLUDES) \
+ -:LDFLAGS $(ALL_LIBS) -ltelepathy-glib-1-core \
+ $(libtelepathy_glib_dbus_internal_la_LDFLAGS) \
+ \
+ -:SHARED libtelepathy-glib-1 -:TAGS eng debug \
-:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
- -:SOURCES $(libtelepathy_glib_internal_la_SOURCES) \
- $(nodist_libtelepathy_glib_internal_la_SOURCES) \
+ -:SOURCES $(libtelepathy_glib_main_internal_la_SOURCES) \
+ $(nodist_libtelepathy_glib_main_internal_la_SOURCES) \
-:CFLAGS $(DEFAULT_INCLUDES) $(DEFS) $(CFLAGS) $(GIO_UNIX_CFLAGS) $(DBUS_CFLAGS) $(AM_CFLAGS) \
-:CPPFLAGS $(CPPFLAGS) $(AM_CPPFLAGS) $(INCLUDES) \
- -:LDFLAGS $(libtelepathy_glib_internal_la_LIBADD) \
- $(libtelepathy_glib_internal_la_LDFLAGS) \
+ -:LDFLAGS $(ALL_LIBS) -ltelepathy-glib-1-dbus -ltelepathy-glib-1-core \
+ $(libtelepathy_glib_main_internal_la_LDFLAGS) \
+ \
> $@
diff --git a/telepathy-glib/TelepathyGLib-0.12.metadata b/telepathy-glib/TelepathyGLib-1.metadata
index 6fd4a8dc7..6fd4a8dc7 100644
--- a/telepathy-glib/TelepathyGLib-0.12.metadata
+++ b/telepathy-glib/TelepathyGLib-1.metadata
diff --git a/telepathy-glib/TelepathyGLibDBus-1.metadata b/telepathy-glib/TelepathyGLibDBus-1.metadata
new file mode 100644
index 000000000..a26219271
--- /dev/null
+++ b/telepathy-glib/TelepathyGLibDBus-1.metadata
@@ -0,0 +1 @@
+TelepathyGLibDBus name="TelepathyGLibDBus"
diff --git a/telepathy-glib/abi.am b/telepathy-glib/abi.am
index 7f4ef3db3..465ea309c 100644
--- a/telepathy-glib/abi.am
+++ b/telepathy-glib/abi.am
@@ -1,107 +1,76 @@
# To be included by Makefile.am.
ABI_LISTS = \
- versions/0.7.0.abi \
- versions/0.7.1.abi \
- versions/0.7.2.abi \
- versions/0.7.3.abi \
- versions/0.7.5.abi \
- versions/0.7.6.abi \
- versions/0.7.7.abi \
- versions/0.7.8.abi \
- versions/0.7.9.abi \
- versions/0.7.10.abi \
- versions/0.7.12.abi \
- versions/0.7.13.abi \
- versions/0.7.14.abi \
- versions/0.7.15.abi \
- versions/0.7.16.abi \
- versions/0.7.17.abi \
- versions/0.7.18.abi \
- versions/0.7.19.abi \
- versions/0.7.20.abi \
- versions/0.7.21.abi \
- versions/0.7.23.abi \
- versions/0.7.24.abi \
- versions/0.7.26.abi \
- versions/0.7.27.abi \
- versions/0.7.28.abi \
- versions/0.7.29.abi \
- versions/0.7.30.abi \
- versions/0.7.31.abi \
- versions/0.7.32.abi \
- versions/0.7.34.abi \
- versions/0.7.35.abi \
- versions/0.7.36.abi \
- versions/0.7.37.abi \
- versions/0.9.0.abi \
- versions/0.9.2.abi \
- versions/0.11.0.abi \
- versions/0.11.1.abi \
- versions/0.11.3.abi \
- versions/0.11.4.abi \
- versions/0.11.5.abi \
- versions/0.11.6.abi \
- versions/0.11.7.abi \
- versions/0.11.9.abi \
- versions/0.11.11.abi \
- versions/0.11.12.abi \
- versions/0.11.13.abi \
- versions/0.11.14.abi \
- versions/0.11.15.abi \
- versions/0.11.16.abi \
- versions/0.13.0.abi \
- versions/0.13.1.abi \
- versions/0.13.2.abi \
- versions/0.13.3.abi \
- versions/0.13.4.abi \
- versions/0.13.5.abi \
- versions/0.13.7.abi \
- versions/0.13.8.abi \
- versions/0.13.9.abi \
- versions/0.13.10.abi \
- versions/0.13.11.abi \
- versions/0.13.12.abi \
- versions/0.13.13.abi \
- versions/0.13.14.abi \
- versions/0.13.15.abi \
- versions/0.13.16.abi \
- versions/0.14.1.abi \
- versions/0.14.3.abi \
- versions/0.14.4.abi \
- versions/0.14.5.abi \
- versions/0.15.0.abi \
- versions/0.15.1.abi \
- versions/0.15.2.abi \
- versions/0.15.3.abi \
- versions/0.15.5.abi \
- versions/0.15.6.abi \
- versions/0.15.8.abi \
- versions/0.17.0.abi \
- versions/0.17.1.abi \
- versions/0.17.2.abi \
- versions/0.17.3.abi \
- versions/0.17.5.abi \
- versions/0.17.6.abi \
- versions/0.17.7.abi \
- versions/0.18.0.abi \
- versions/0.19.0.abi \
+ versions/core-1.0.0.abi \
+ versions/dbus-1.0.0.abi \
+ versions/main-1.0.0.abi \
$(NULL)
# The quoting here is unnecessary but harmless, and has the useful side-effect
# that vim quickfix mode (:make) doesn't interpret the libtool --mode=link
# command as an error message in a bizarrely named file
-libtelepathy_glib_la_LDFLAGS = \
+#
+# libtelepathy-glib-core shares its Libtool versioning with libtelepathy-glib:
+# they are intended to be upgraded in lockstep, and always break ABI at the
+# same time.
+libtelepathy_glib_1_core_la_LDFLAGS = \
$(AM_LDFLAGS) \
-no-undefined \
- -version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)"
-libtelepathy_glib_la_LIBADD = libtelepathy-glib-internal.la
-nodist_libtelepathy_glib_la_SOURCES =
-libtelepathy_glib_la_DEPENDENCIES = libtelepathy-glib-internal.la abi.am
+ -version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)" \
+ $(NULL)
+libtelepathy_glib_1_core_la_LIBADD = libtelepathy-glib-core-internal.la
+nodist_libtelepathy_glib_1_core_la_SOURCES =
+libtelepathy_glib_1_core_la_DEPENDENCIES = \
+ libtelepathy-glib-core-internal.la \
+ abi.am \
+ $(NULL)
+
+libtelepathy_glib_1_dbus_la_LDFLAGS = \
+ $(AM_LDFLAGS) \
+ -no-undefined \
+ -version-info "$(LT_DBUS_CURRENT)":"$(LT_DBUS_REVISION)":"$(LT_DBUS_AGE)" \
+ $(NULL)
+libtelepathy_glib_1_dbus_la_LIBADD = libtelepathy-glib-dbus-internal.la
+nodist_libtelepathy_glib_1_dbus_la_SOURCES =
+libtelepathy_glib_1_dbus_la_DEPENDENCIES = \
+ libtelepathy-glib-dbus-internal.la \
+ abi.am \
+ $(NULL)
+
+libtelepathy_glib_1_la_LDFLAGS = \
+ $(AM_LDFLAGS) \
+ -no-undefined \
+ -version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)" \
+ $(NULL)
+libtelepathy_glib_1_la_LIBADD = libtelepathy-glib-main-internal.la
+nodist_libtelepathy_glib_1_la_SOURCES =
+libtelepathy_glib_1_la_DEPENDENCIES = \
+ libtelepathy-glib-main-internal.la \
+ abi.am \
+ $(NULL)
if HAVE_LD_VERSION_SCRIPT
-nodist_libtelepathy_glib_la_SOURCES += _gen/version-script.txt
-libtelepathy_glib_la_DEPENDENCIES += _gen/version-script.txt _gen/abi.txt
+nodist_libtelepathy_glib_1_la_SOURCES += \
+ _gen/main-version-script.txt \
+ $(NULL)
+nodist_libtelepathy_glib_1_dbus_la_SOURCES += \
+ _gen/dbus-version-script.txt \
+ $(NULL)
+nodist_libtelepathy_glib_1_core_la_SOURCES += \
+ _gen/core-version-script.txt \
+ $(NULL)
+libtelepathy_glib_1_la_DEPENDENCIES += \
+ _gen/main-version-script.txt \
+ _gen/main-abi.txt \
+ $(NULL)
+libtelepathy_glib_1_dbus_la_DEPENDENCIES += \
+ _gen/dbus-version-script.txt \
+ _gen/dbus-abi.txt \
+ $(NULL)
+libtelepathy_glib_1_core_la_DEPENDENCIES += \
+ _gen/core-version-script.txt \
+ _gen/core-abi.txt \
+ $(NULL)
if OFFICIAL_RELEASE
# don't allow undocumented ABI
@@ -110,37 +79,57 @@ else
# allow new ABI, and silently put it in a dummy version (which can be used to
# check whether binaries have been linked against unguaranteed ABI)
MAKE_VERSION_SCRIPT_FLAGS = \
- --unreleased-version=TELEPATHY_GLIB_@VERSION@_UNRELEASED
+ --unreleased-version=TELEPATHY_GLIB$${SUFFIX}_@VERSION@_UNRELEASED
endif
-_gen/version-script.txt: $(ABI_LISTS) _gen/abi.txt abi.am \
- $(top_srcdir)/tools/make-version-script.py
- $(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/make-version-script.py \
- --symbols=_gen/abi.txt $(MAKE_VERSION_SCRIPT_FLAGS) \
- $(ABI_LISTS:%=$(srcdir)/%) > $@
+_gen/%-version-script.txt: \
+ $(ABI_LISTS) \
+ _gen/%-abi.txt \
+ abi.am \
+ $(top_srcdir)/tools/make-version-script.py \
+ $(NULL)
+ $(AM_V_GEN)set -e; \
+ if test "$*" = main; then SUFFIX=""; else SUFFIX="_$*"; fi; \
+ $(PYTHON) $(top_srcdir)/tools/make-version-script.py \
+ --symbols=_gen/$*-abi.txt $(MAKE_VERSION_SCRIPT_FLAGS) \
+ $(patsubst %,$(srcdir)/%,$(filter versions/$*-%,$(ABI_LISTS))) > $@
+ $(AM_V_GEN)set -e; \
+ if test "$*" = main; then suffix=""; else suffix="-$*"; fi; \
+ if test "$*" = main; then SUFFIX=""; else SUFFIX="_$*"; fi; \
+ if test "$${suffix}" = ""; then binpkg="libtelepathy-glib-1-0"; \
+ else binpkg="libtelepathy-glib-1$${suffix}0"; fi; \
$(PYTHON) $(top_srcdir)/tools/make-version-script.py \
- --symbols=_gen/abi.txt $(MAKE_VERSION_SCRIPT_FLAGS) \
- --dpkg "libtelepathy-glib.so.0 libtelepathy-glib0 #MINVER#" \
- --dpkg-build-depends-package "libtelepathy-glib-dev" \
- $(ABI_LISTS:%=$(srcdir)/%) > _gen/libtelepathy-glib0.symbols
- sed -n -e "s/^[ ]*\\(tp_.*\\);/\\1/p" < $@ > _gen/versioned-abi.tmp
- sort -u < _gen/versioned-abi.tmp > _gen/versioned-abi.txt
+ --symbols=_gen/$*-abi.txt $(MAKE_VERSION_SCRIPT_FLAGS) \
+ --dpkg "libtelepathy-glib-1$${suffix}.so.0 $${binpkg} #MINVER#" \
+ --dpkg-build-depends-package "libtelepathy-glib-1-dev" \
+ $(patsubst %,$(srcdir)/%,$(filter versions/$*-%,$(ABI_LISTS))) \
+ > _gen/$${binpkg}.symbols
+ sed -n -e "s/^[ ]*\\(tp_.*\\);/\\1/p" < $@ > _gen/$*-versioned-abi.tmp
+ sort -u < _gen/$*-versioned-abi.tmp > _gen/$*-versioned-abi.txt
: # the versioned API should always match the ^tp API
- diff -c _gen/versioned-abi.txt _gen/abi.txt
+ diff -c _gen/$*-versioned-abi.txt _gen/$*-abi.txt
-_gen/abi.txt: libtelepathy-glib-internal.la abi.am
- $(NM) .libs/libtelepathy-glib-internal.a > _gen/abi.nm
- grep " [DT] " < _gen/abi.nm > _gen/abi.funcs
+_gen/%-abi.txt: libtelepathy-glib-%-internal.la abi.am
+ $(NM) .libs/libtelepathy-glib-$*-internal.a > _gen/abi.nm
+ grep " [DT] " < _gen/abi.nm > _gen/abi.funcs || test $$? = 1
cut -d" " -f3 < _gen/abi.funcs > _gen/abi.funcnames
- grep "^tp" < _gen/abi.funcnames > _gen/abi.tpfuncnames
+ grep "^tp" < _gen/abi.funcnames > _gen/abi.tpfuncnames || test $$? = 1
$(AM_V_GEN)sort -u < _gen/abi.tpfuncnames > $@
-libtelepathy_glib_la_LDFLAGS += \
- $(VERSION_SCRIPT_ARG)=_gen/version-script.txt
+libtelepathy_glib_1_la_LDFLAGS += \
+ $(VERSION_SCRIPT_ARG)=_gen/main-version-script.txt
+
+libtelepathy_glib_1_dbus_la_LDFLAGS += \
+ $(VERSION_SCRIPT_ARG)=_gen/dbus-version-script.txt
+
+libtelepathy_glib_1_core_la_LDFLAGS += \
+ $(VERSION_SCRIPT_ARG)=_gen/core-version-script.txt
else # !HAVE_LD_VERSION_SCRIPT
-libtelepathy_glib_la_LDFLAGS += -export-symbols-regex '^tp'
+libtelepathy_glib_1_core_la_LDFLAGS += -export-symbols-regex '^tp'
+libtelepathy_glib_1_dbus_la_LDFLAGS += -export-symbols-regex '^tp'
+libtelepathy_glib_1_la_LDFLAGS += -export-symbols-regex '^tp'
endif # !HAVE_LD_VERSION_SCRIPT
diff --git a/telepathy-glib/account-channel-request.c b/telepathy-glib/account-channel-request.c
index ef5b6ebd4..fbc4bd00f 100644
--- a/telepathy-glib/account-channel-request.c
+++ b/telepathy-glib/account-channel-request.c
@@ -76,11 +76,11 @@
#include "telepathy-glib/account-channel-request.h"
#include "telepathy-glib/account-channel-request-internal.h"
-#include <telepathy-glib/automatic-proxy-factory.h>
#include "telepathy-glib/base-client-internal.h"
#include <telepathy-glib/channel-dispatcher.h>
#include <telepathy-glib/channel-request.h>
#include <telepathy-glib/channel.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/simple-handler.h>
@@ -89,8 +89,7 @@
#define DEBUG_FLAG TP_DEBUG_CLIENT
#include "telepathy-glib/debug-internal.h"
-#include "telepathy-glib/deprecated-internal.h"
-#include "telepathy-glib/simple-client-factory-internal.h"
+#include "telepathy-glib/client-factory-internal.h"
struct _TpAccountChannelRequestClass {
/*<private>*/
@@ -149,7 +148,6 @@ struct _TpAccountChannelRequestPrivate
TpChannel *channel;
TpHandleChannelsContext *handle_context;
TpDBusDaemon *dbus;
- TpClientChannelFactory *factory;
GHashTable *hints;
/* TRUE if the channel has been requested (an _async function has been called
@@ -210,7 +208,6 @@ tp_account_channel_request_dispose (GObject *object)
tp_clear_object (&self->priv->channel);
tp_clear_object (&self->priv->handle_context);
tp_clear_object (&self->priv->dbus);
- tp_clear_object (&self->priv->factory);
tp_clear_pointer (&self->priv->hints, g_hash_table_unref);
if (self->priv->delegated_channel_destroy != NULL)
@@ -310,6 +307,8 @@ tp_account_channel_request_constructed (GObject *object)
self->priv->dbus = g_object_ref (tp_proxy_get_dbus_daemon (
self->priv->account));
+
+ self->priv->hints = tp_asv_new (NULL, NULL);
}
static void
@@ -549,7 +548,7 @@ complete_result (TpAccountChannelRequest *self)
request_disconnect (self);
- g_simple_async_result_complete_in_idle (self->priv->result);
+ g_simple_async_result_complete (self->priv->result);
tp_clear_object (&self->priv->result);
}
@@ -699,7 +698,7 @@ acr_channel_request_invalidated_cb (TpProxy *proxy,
}
static void
-acr_channel_request_succeeded_with_channel (TpChannelRequest *chan_req,
+acr_channel_request_succeeded (TpChannelRequest *chan_req,
TpConnection *connection,
TpChannel *channel,
TpAccountChannelRequest *self)
@@ -737,12 +736,8 @@ acr_channel_request_succeeded_with_channel (TpChannelRequest *chan_req,
}
/* Operation will be complete once the channel have been prepared */
- if (self->priv->factory != NULL)
- features = tp_client_channel_factory_dup_channel_features (
- self->priv->factory, self->priv->channel);
- else
- features = tp_simple_client_factory_dup_channel_features (
- tp_proxy_get_factory (self->priv->account), self->priv->channel);
+ features = tp_client_factory_dup_channel_features (
+ tp_proxy_get_factory (self->priv->account), self->priv->channel);
g_assert (features != NULL);
tp_proxy_prepare_async (self->priv->channel, (GQuark *) features->data,
@@ -812,7 +807,7 @@ acr_request_cb (TpChannelDispatcher *cd,
DEBUG ("Got ChannelRequest: %s", channel_request_path);
- self->priv->chan_request = _tp_simple_client_factory_ensure_channel_request (
+ self->priv->chan_request = _tp_client_factory_ensure_channel_request (
tp_proxy_get_factory (self->priv->account), channel_request_path, NULL,
&err);
if (self->priv->chan_request == NULL)
@@ -821,15 +816,12 @@ acr_request_cb (TpChannelDispatcher *cd,
goto fail;
}
- _tp_channel_request_set_channel_factory (self->priv->chan_request,
- self->priv->factory);
-
self->priv->invalidated_sig = g_signal_connect (self->priv->chan_request,
"invalidated", G_CALLBACK (acr_channel_request_invalidated_cb), self);
self->priv->succeeded_chan_sig = g_signal_connect (self->priv->chan_request,
- "succeeded-with-channel",
- G_CALLBACK (acr_channel_request_succeeded_with_channel), self);
+ "succeeded",
+ G_CALLBACK (acr_channel_request_succeeded), self);
if (self->priv->cancellable != NULL)
{
@@ -903,15 +895,12 @@ request_and_handle_channel_async (TpAccountChannelRequest *self,
self->priv->ensure = ensure;
/* Create a temp handler */
- self->priv->handler = tp_simple_handler_new_with_factory (
+ self->priv->handler = tp_simple_handler_new (
tp_proxy_get_factory (self->priv->account), TRUE, FALSE,
"TpGLibRequestAndHandle", TRUE, handle_channels, self, NULL);
_tp_base_client_set_only_for_account (self->priv->handler,
self->priv->account);
- _tp_base_client_set_channel_factory (self->priv->handler,
- self->priv->factory);
-
if (self->priv->delegated_channel_cb != NULL)
{
tp_base_client_set_delegated_channels_callback (self->priv->handler,
@@ -937,23 +926,12 @@ request_and_handle_channel_async (TpAccountChannelRequest *self,
user_data,
tp_account_channel_request_ensure_and_handle_channel_async);
- if (self->priv->hints == NULL)
- {
- tp_cli_channel_dispatcher_call_ensure_channel (cd, -1,
- tp_proxy_get_object_path (self->priv->account),
- self->priv->request, self->priv->user_action_time,
- tp_base_client_get_bus_name (self->priv->handler),
- acr_request_cb, self, NULL, G_OBJECT (self));
- }
- else
- {
- tp_cli_channel_dispatcher_call_ensure_channel_with_hints (cd, -1,
- tp_proxy_get_object_path (self->priv->account),
- self->priv->request, self->priv->user_action_time,
- tp_base_client_get_bus_name (self->priv->handler),
- self->priv->hints,
- acr_request_cb, self, NULL, G_OBJECT (self));
- }
+ tp_cli_channel_dispatcher_call_ensure_channel (cd, -1,
+ tp_proxy_get_object_path (self->priv->account),
+ self->priv->request, self->priv->user_action_time,
+ tp_base_client_get_bus_name (self->priv->handler),
+ self->priv->hints,
+ acr_request_cb, self, NULL, G_OBJECT (self));
}
else
{
@@ -961,25 +939,13 @@ request_and_handle_channel_async (TpAccountChannelRequest *self,
user_data,
tp_account_channel_request_create_and_handle_channel_async);
- if (self->priv->hints == NULL)
- {
- tp_cli_channel_dispatcher_call_create_channel (cd, -1,
- tp_proxy_get_object_path (self->priv->account),
- self->priv->request,
- self->priv->user_action_time,
- tp_base_client_get_bus_name (self->priv->handler),
- acr_request_cb, self, NULL, G_OBJECT (self));
- }
- else
- {
- tp_cli_channel_dispatcher_call_create_channel_with_hints (cd, -1,
- tp_proxy_get_object_path (self->priv->account),
- self->priv->request,
- self->priv->user_action_time,
- tp_base_client_get_bus_name (self->priv->handler),
- self->priv->hints,
- acr_request_cb, self, NULL, G_OBJECT (self));
- }
+ tp_cli_channel_dispatcher_call_create_channel (cd, -1,
+ tp_proxy_get_object_path (self->priv->account),
+ self->priv->request,
+ self->priv->user_action_time,
+ tp_base_client_get_bus_name (self->priv->handler),
+ self->priv->hints,
+ acr_request_cb, self, NULL, G_OBJECT (self));
}
g_object_unref (cd);
@@ -1192,50 +1158,26 @@ request_channel_async (TpAccountChannelRequest *self,
self->priv->result = g_simple_async_result_new (G_OBJECT (self), callback,
user_data, tp_account_channel_request_ensure_channel_async);
- if (self->priv->hints == NULL)
- {
- tp_cli_channel_dispatcher_call_ensure_channel (cd, -1,
- tp_proxy_get_object_path (self->priv->account),
- self->priv->request,
- self->priv->user_action_time,
- preferred_handler == NULL ? "" : preferred_handler,
- acr_request_cb, self, NULL, G_OBJECT (self));
- }
- else
- {
- tp_cli_channel_dispatcher_call_ensure_channel_with_hints (cd, -1,
- tp_proxy_get_object_path (self->priv->account),
- self->priv->request,
- self->priv->user_action_time,
- preferred_handler == NULL ? "" : preferred_handler,
- self->priv->hints,
- acr_request_cb, self, NULL, G_OBJECT (self));
- }
+ tp_cli_channel_dispatcher_call_ensure_channel (cd, -1,
+ tp_proxy_get_object_path (self->priv->account),
+ self->priv->request,
+ self->priv->user_action_time,
+ preferred_handler == NULL ? "" : preferred_handler,
+ self->priv->hints,
+ acr_request_cb, self, NULL, G_OBJECT (self));
}
else
{
self->priv->result = g_simple_async_result_new (G_OBJECT (self), callback,
user_data, tp_account_channel_request_create_channel_async);
- if (self->priv->hints == NULL)
- {
- tp_cli_channel_dispatcher_call_create_channel (cd, -1,
- tp_proxy_get_object_path (self->priv->account),
- self->priv->request,
- self->priv->user_action_time,
- preferred_handler == NULL ? "" : preferred_handler,
- acr_request_cb, self, NULL, G_OBJECT (self));
- }
- else
- {
- tp_cli_channel_dispatcher_call_create_channel_with_hints (cd, -1,
- tp_proxy_get_object_path (self->priv->account),
- self->priv->request,
- self->priv->user_action_time,
- preferred_handler == NULL ? "" : preferred_handler,
- self->priv->hints,
- acr_request_cb, self, NULL, G_OBJECT (self));
- }
+ tp_cli_channel_dispatcher_call_create_channel (cd, -1,
+ tp_proxy_get_object_path (self->priv->account),
+ self->priv->request,
+ self->priv->user_action_time,
+ preferred_handler == NULL ? "" : preferred_handler,
+ self->priv->hints,
+ acr_request_cb, self, NULL, G_OBJECT (self));
}
g_object_unref (cd);
@@ -1372,42 +1314,6 @@ tp_account_channel_request_ensure_channel_finish (
}
/**
- * tp_account_channel_request_set_channel_factory:
- * @self: a #TpAccountChannelRequest
- * @factory: a #TpClientChannelFactory
- *
- * Set @factory as the #TpClientChannelFactory that will be used to
- * create the channel requested by @self.
- * By default #TpAutomaticProxyFactory is used.
- *
- * This function can't be called once @self has been used to request a
- * channel.
- *
- * Since: 0.13.2
- * Deprecated: since 0.15.5. The factory is taken from
- * #TpAccountChannelRequest:account.
- */
-void
-tp_account_channel_request_set_channel_factory (TpAccountChannelRequest *self,
- TpClientChannelFactory *factory)
-{
- _tp_account_channel_request_set_channel_factory (self, factory);
-}
-
-void
-_tp_account_channel_request_set_channel_factory (TpAccountChannelRequest *self,
- TpClientChannelFactory *factory)
-{
- g_return_if_fail (!self->priv->requested);
-
- tp_clear_object (&self->priv->factory);
-
- if (factory != NULL)
- self->priv->factory = g_object_ref (factory);
-}
-
-
-/**
* tp_account_channel_request_get_channel_request:
* @self: a #TpAccountChannelRequest
*
@@ -1454,16 +1360,13 @@ request_and_observe_channel_async (TpAccountChannelRequest *self,
cd = tp_channel_dispatcher_new (self->priv->dbus);
- if (self->priv->hints == NULL)
- self->priv->hints = g_hash_table_new (NULL, NULL);
-
if (ensure)
{
self->priv->result = g_simple_async_result_new (G_OBJECT (self), callback,
user_data,
tp_account_channel_request_ensure_and_observe_channel_async);
- tp_cli_channel_dispatcher_call_ensure_channel_with_hints (cd, -1,
+ tp_cli_channel_dispatcher_call_ensure_channel (cd, -1,
tp_proxy_get_object_path (self->priv->account), self->priv->request,
self->priv->user_action_time,
preferred_handler == NULL ? "" : preferred_handler,
@@ -1476,7 +1379,7 @@ request_and_observe_channel_async (TpAccountChannelRequest *self,
user_data,
tp_account_channel_request_create_and_observe_channel_async);
- tp_cli_channel_dispatcher_call_create_channel_with_hints (cd, -1,
+ tp_cli_channel_dispatcher_call_create_channel (cd, -1,
tp_proxy_get_object_path (self->priv->account), self->priv->request,
self->priv->user_action_time,
preferred_handler == NULL ? "" : preferred_handler,
@@ -1663,11 +1566,8 @@ tp_account_channel_request_set_delegate_to_preferred_handler (
{
g_return_if_fail (!self->priv->requested);
- if (self->priv->hints == NULL)
- self->priv->hints = tp_asv_new (NULL, NULL);
-
tp_asv_set_boolean (self->priv->hints,
- "org.freedesktop.Telepathy.ChannelRequest.DelegateToPreferredHandler",
+ "im.telepathy1.ChannelRequest.DelegateToPreferredHandler",
delegate);
}
@@ -1680,7 +1580,7 @@ tp_account_channel_request_set_delegate_to_preferred_handler (
* @destroy: called with the @user_data as argument, when @self is destroyed
*
* Turn on support for
- * the org.freedesktop.Telepathy.ChannelRequest.DelegateToPreferredHandler
+ * the im.telepathy1.ChannelRequest.DelegateToPreferredHandler
* hint.
*
* When receiving a request containing this hint, @self will automatically
diff --git a/telepathy-glib/account-channel-request.h b/telepathy-glib/account-channel-request.h
index fd136ae00..23728c2a7 100644
--- a/telepathy-glib/account-channel-request.h
+++ b/telepathy-glib/account-channel-request.h
@@ -28,7 +28,6 @@
#include <telepathy-glib/account.h>
#include <telepathy-glib/channel.h>
#include <telepathy-glib/channel-request.h>
-#include <telepathy-glib/client-channel-factory.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/handle-channels-context.h>
@@ -72,13 +71,6 @@ GHashTable * tp_account_channel_request_get_request (
gint64 tp_account_channel_request_get_user_action_time (
TpAccountChannelRequest *self);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_16
-void tp_account_channel_request_set_channel_factory (
- TpAccountChannelRequest *self,
- TpClientChannelFactory *factory);
-#endif
-
TpChannelRequest * tp_account_channel_request_get_channel_request (
TpAccountChannelRequest *self);
diff --git a/telepathy-glib/account-manager.c b/telepathy-glib/account-manager.c
index 0e78bbc2b..a2c3899bc 100644
--- a/telepathy-glib/account-manager.c
+++ b/telepathy-glib/account-manager.c
@@ -24,6 +24,7 @@
#include "telepathy-glib/account-manager-internal.h"
#include "telepathy-glib/account-internal.h"
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
@@ -37,9 +38,7 @@
#include "telepathy-glib/dbus-internal.h"
#include "telepathy-glib/debug-internal.h"
#include "telepathy-glib/proxy-internal.h"
-#include "telepathy-glib/simple-client-factory-internal.h"
-
-#include "telepathy-glib/_gen/tp-cli-account-manager-body.h"
+#include "telepathy-glib/client-factory-internal.h"
/**
* SECTION:account-manager
@@ -128,10 +127,10 @@ typedef struct {
GArray *features;
} TpAccountManagerFeatureCallback;
-#define MC5_BUS_NAME "org.freedesktop.Telepathy.MissionControl5"
+#define MC5_BUS_NAME "im.telepathy1.MissionControl5"
enum {
- ACCOUNT_VALIDITY_CHANGED,
+ ACCOUNT_USABILITY_CHANGED,
ACCOUNT_REMOVED,
ACCOUNT_ENABLED,
ACCOUNT_DISABLED,
@@ -154,9 +153,9 @@ G_DEFINE_TYPE (TpAccountManager, tp_account_manager, TP_TYPE_PROXY)
* Additionally, the #TpAccount objects for accounts which existed at the time
* this feature was prepared will have #TP_ACCOUNT_FEATURE_CORE prepared, but
* #TpAccount objects subsequently announced by
- * #TpAccountManager::account-validity-changed are <emphasis>not</emphasis>
+ * #TpAccountManager::account-usability-changed are <emphasis>not</emphasis>
* guaranteed to have this feature prepared. In practice, this means that
- * the accounts returned by calling tp_account_manager_get_valid_accounts()
+ * the accounts returned by calling tp_account_manager_get_usable_accounts()
* immediately after successfully calling tp_proxy_prepare_finish() on the
* #TpAccountManager will have #TP_ACCOUNT_FEATURE_CORE prepared, but later
* calls to that function do not have the same guarantee.
@@ -261,7 +260,7 @@ _tp_account_manager_name_owner_cb (TpDBusDaemon *proxy,
static void insert_account (TpAccountManager *self, TpAccount *account);
static void
-validity_changed_account_prepared_cb (GObject *object,
+usability_changed_account_prepared_cb (GObject *object,
GAsyncResult *res,
gpointer user_data)
{
@@ -277,11 +276,11 @@ validity_changed_account_prepared_cb (GObject *object,
}
/* Account could have been invalidated while we were preparing it */
- if (tp_account_is_valid (account) &&
+ if (tp_account_is_usable (account) &&
tp_proxy_get_invalidated (account) == NULL)
{
insert_account (self, account);
- g_signal_emit (self, signals[ACCOUNT_VALIDITY_CHANGED], 0,
+ g_signal_emit (self, signals[ACCOUNT_USABILITY_CHANGED], 0,
account, TRUE);
}
@@ -290,9 +289,9 @@ OUT:
}
static void
-_tp_account_manager_validity_changed_cb (TpAccountManager *proxy,
+_tp_account_manager_usability_changed_cb (TpAccountManager *proxy,
const gchar *path,
- gboolean valid,
+ gboolean usable,
gpointer user_data,
GObject *weak_object)
{
@@ -302,9 +301,9 @@ _tp_account_manager_validity_changed_cb (TpAccountManager *proxy,
GArray *features;
GError *error = NULL;
- if (!valid)
+ if (!usable)
{
- /* If account became invalid, but we didn't have it anyway, ignore. */
+ /* If account became unusable, but we didn't have it anyway, ignore. */
account = g_hash_table_lookup (priv->accounts, path);
if (account == NULL)
return;
@@ -312,7 +311,7 @@ _tp_account_manager_validity_changed_cb (TpAccountManager *proxy,
g_object_ref (account);
g_hash_table_remove (priv->accounts, path);
- g_signal_emit (manager, signals[ACCOUNT_VALIDITY_CHANGED], 0,
+ g_signal_emit (manager, signals[ACCOUNT_USABILITY_CHANGED], 0,
account, FALSE);
g_object_unref (account);
@@ -320,7 +319,7 @@ _tp_account_manager_validity_changed_cb (TpAccountManager *proxy,
return;
}
- account = tp_simple_client_factory_ensure_account (
+ account = tp_client_factory_ensure_account (
tp_proxy_get_factory (manager), path, NULL, &error);
if (account == NULL)
{
@@ -330,11 +329,11 @@ _tp_account_manager_validity_changed_cb (TpAccountManager *proxy,
}
/* Delay signal emission until until account is prepared */
- features = tp_simple_client_factory_dup_account_features (
+ features = tp_client_factory_dup_account_features (
tp_proxy_get_factory (manager), account);
tp_proxy_prepare_async (account, (GQuark *) features->data,
- validity_changed_account_prepared_cb, g_object_ref (manager));
+ usability_changed_account_prepared_cb, g_object_ref (manager));
g_array_unref (features);
g_object_unref (account);
@@ -450,7 +449,7 @@ account_prepared_cb (GObject *object,
}
/* Account could have been invalidated while we were preparing it */
- if (tp_account_is_valid (account) &&
+ if (tp_account_is_usable (account) &&
tp_proxy_get_invalidated (account) == NULL)
{
insert_account (self, account);
@@ -473,7 +472,7 @@ _tp_account_manager_got_all_cb (TpProxy *proxy,
GObject *weak_object)
{
TpAccountManager *manager = TP_ACCOUNT_MANAGER (weak_object);
- GPtrArray *valid_accounts;
+ GPtrArray *usable_accounts;
guint i;
if (error != NULL)
@@ -483,17 +482,17 @@ _tp_account_manager_got_all_cb (TpProxy *proxy,
return;
}
- valid_accounts = tp_asv_get_boxed (properties, "ValidAccounts",
+ usable_accounts = tp_asv_get_boxed (properties, "UsableAccounts",
TP_ARRAY_TYPE_OBJECT_PATH_LIST);
- for (i = 0; i < valid_accounts->len; i++)
+ for (i = 0; i < usable_accounts->len; i++)
{
- const gchar *path = g_ptr_array_index (valid_accounts, i);
+ const gchar *path = g_ptr_array_index (usable_accounts, i);
TpAccount *account;
GArray *features;
GError *e = NULL;
- account = tp_simple_client_factory_ensure_account (
+ account = tp_client_factory_ensure_account (
tp_proxy_get_factory (manager), path, NULL, &e);
if (account == NULL)
{
@@ -502,7 +501,7 @@ _tp_account_manager_got_all_cb (TpProxy *proxy,
continue;
}
- features = tp_simple_client_factory_dup_account_features (
+ features = tp_client_factory_dup_account_features (
tp_proxy_get_factory (manager), account);
manager->priv->n_preparing_accounts++;
@@ -530,8 +529,8 @@ _tp_account_manager_constructed (GObject *object)
_tp_proxy_ensure_factory (self, NULL);
- tp_cli_account_manager_connect_to_account_validity_changed (self,
- _tp_account_manager_validity_changed_cb, NULL,
+ tp_cli_account_manager_connect_to_account_usability_changed (self,
+ _tp_account_manager_usability_changed_cb, NULL,
NULL, G_OBJECT (self), NULL);
tp_cli_dbus_properties_call_get_all (self, -1, TP_IFACE_ACCOUNT_MANAGER,
@@ -602,23 +601,23 @@ tp_account_manager_class_init (TpAccountManagerClass *klass)
tp_account_manager_init_known_interfaces ();
/**
- * TpAccountManager::account-validity-changed:
+ * TpAccountManager::account-usability-changed:
* @manager: a #TpAccountManager
* @account: a #TpAccount
- * @valid: %TRUE if the account is now valid
+ * @usable: %TRUE if the account is now usable
*
- * Emitted when the validity on @account changes.
+ * Emitted when the usability on @account changes.
*
* This signal is also used to indicate a new account that did not
* previously exist has been added (with @valid set to %TRUE).
*
* @account is guaranteed to have %TP_ACCOUNT_FEATURE_CORE prepared, along
* with all features previously passed to
- * tp_simple_client_factory_add_account_features().
+ * tp_client_factory_add_account_features().
*
* Since: 0.9.0
*/
- signals[ACCOUNT_VALIDITY_CHANGED] = g_signal_new ("account-validity-changed",
+ signals[ACCOUNT_USABILITY_CHANGED] = g_signal_new ("account-usability-changed",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
@@ -652,7 +651,7 @@ tp_account_manager_class_init (TpAccountManagerClass *klass)
*
* @account is guaranteed to have %TP_ACCOUNT_FEATURE_CORE prepared, along
* with all features previously passed to
- * tp_simple_client_factory_add_account_features().
+ * tp_client_factory_add_account_features().
*
* Since: 0.9.0
*/
@@ -736,7 +735,7 @@ tp_account_manager_init_known_interfaces (void)
}
static TpAccountManager *
-_tp_account_manager_new_internal (TpSimpleClientFactory *factory,
+_tp_account_manager_new_internal (TpClientFactory *factory,
TpDBusDaemon *bus_daemon)
{
return TP_ACCOUNT_MANAGER (g_object_new (TP_TYPE_ACCOUNT_MANAGER,
@@ -771,12 +770,12 @@ tp_account_manager_new (TpDBusDaemon *bus_daemon)
/**
* tp_account_manager_new_with_factory:
- * @factory: a #TpSimpleClientFactory
+ * @factory: a #TpClientFactory
*
* Convenience function to create a new account manager proxy. The returned
* #TpAccountManager is not guaranteed to be ready on return.
*
- * Should be used only by applications having their own #TpSimpleClientFactory
+ * Should be used only by applications having their own #TpClientFactory
* subclass. Usually this should be done at application startup and followed by
* a call to tp_account_manager_set_default() to ensure other libraries/plugins
* will use this custom factory as well.
@@ -784,12 +783,12 @@ tp_account_manager_new (TpDBusDaemon *bus_daemon)
* Returns: a new reference to an account manager proxy
*/
TpAccountManager *
-tp_account_manager_new_with_factory (TpSimpleClientFactory *factory)
+tp_account_manager_new_with_factory (TpClientFactory *factory)
{
- g_return_val_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (factory), NULL);
+ g_return_val_if_fail (TP_IS_CLIENT_FACTORY (factory), NULL);
return _tp_account_manager_new_internal (factory,
- tp_simple_client_factory_get_dbus_daemon (factory));
+ tp_client_factory_get_dbus_daemon (factory));
}
static gpointer starter_account_manager_proxy = NULL;
@@ -803,15 +802,17 @@ static gpointer starter_account_manager_proxy = NULL;
*
* This function may only be called before the first call to
* tp_account_manager_dup(), and may not be called more than once. Applications
- * which use a custom #TpSimpleClientFactory and want the default
+ * which use a custom #TpClientFactory and want the default
* #TpAccountManager to use that factory should call this after calling
* tp_account_manager_new_with_factory().
*
- * Unlike tp_account_manager_dup(), this function will keep an internal
- * reference to @manager, so it will never be destroyed.
+ * Only a weak reference is taken on @manager. It is the caller's responsibility
+ * to keep it alive. If @manager is disposed after calling this function, the
+ * next call to tp_account_manager_dup() will return a newly created
+ * #TpAccountManager.
*
* Note that @manager must use the default #TpDBusDaemon as returned by
- * tp_dbus_daemon_dup()
+ * tp_dbus_daemon_dup().
*
* Since: 0.15.5
*/
@@ -834,7 +835,9 @@ tp_account_manager_set_default (TpAccountManager *manager)
g_return_if_reached ();
}
- starter_account_manager_proxy = g_object_ref (manager);
+ starter_account_manager_proxy = manager;
+ g_object_add_weak_pointer (starter_account_manager_proxy,
+ &starter_account_manager_proxy);
}
/**
@@ -1003,68 +1006,10 @@ insert_account (TpAccountManager *self,
}
/**
- * tp_account_manager_ensure_account:
- * @manager: a #TpAccountManager
- * @path: the object path for an account
- *
- * Lookup an account in the account manager @manager. If the desired account
- * has already been ensured then the same object will be returned, otherwise
- * it will create a new #TpAccount and add it to @manager. As a result, if
- * @manager thinks that the account doesn't exist, this will still add it to
- * @manager to avoid races. Note that the returned #TpAccount is not guaranteed
- * to be ready on return.
- *
- * The caller must keep a ref to the returned object using g_object_ref() if
- * it is to be kept.
- *
- * Returns: (transfer none): a new #TpAccount at @path, or %NULL if @path is
- * not a valid account path.
- *
- * Since: 0.9.0
- * Deprecated: New code should use tp_simple_client_factory_ensure_account()
- * instead.
- */
-TpAccount *
-tp_account_manager_ensure_account (TpAccountManager *self,
- const gchar *path)
-{
- TpAccount *account;
- GError *error = NULL;
-
- g_return_val_if_fail (TP_IS_ACCOUNT_MANAGER (self), NULL);
- g_return_val_if_fail (path != NULL, NULL);
-
- account = g_hash_table_lookup (self->priv->legacy_accounts, path);
- if (account != NULL)
- return account;
-
- account = tp_simple_client_factory_ensure_account (
- tp_proxy_get_factory (self), path, NULL, &error);
- if (account == NULL)
- {
- DEBUG ("failed to create account: %s", error->message);
- g_clear_error (&error);
- return NULL;
- }
-
- /* We don't want to insert in self->priv->accounts random accounts we
- * don't even know if they are valid. For compatibility we can't return a ref,
- * so keep them into a legacy table */
- g_hash_table_insert (self->priv->legacy_accounts, g_strdup (path),
- account);
- tp_g_signal_connect_object (account, "invalidated",
- G_CALLBACK (legacy_account_invalidated_cb), self, 0);
-
- tp_proxy_prepare_async (account, NULL, NULL, NULL);
-
- return account;
-}
-
-/**
- * tp_account_manager_get_valid_accounts:
+ * tp_account_manager_get_usable_accounts:
* @manager: a #TpAccountManager
*
- * Returns a newly allocated #GList of valid accounts in @manager. The list
+ * Returns a newly allocated #GList of usable accounts in @manager. The list
* must be freed with g_list_free() after used. None of the accounts in the
* returned list are guaranteed to be ready.
*
@@ -1073,25 +1018,25 @@ tp_account_manager_ensure_account (TpAccountManager *self,
* like the following example:
* |[
* GList *accounts;
- * account = tp_account_manager_get_valid_accounts (manager);
+ * account = tp_account_manager_get_usable_accounts (manager);
* g_list_foreach (accounts, (GFunc) g_object_ref, NULL);
* ]|
*
* The returned #TpAccount<!-- -->s are guaranteed to have
* %TP_ACCOUNT_FEATURE_CORE prepared, along with all features previously passed
- * to tp_simple_client_factory_add_account_features().
+ * to tp_client_factory_add_account_features().
*
- * The list of valid accounts returned is not guaranteed to have been retrieved
+ * The list of usable accounts returned is not guaranteed to have been retrieved
* until %TP_ACCOUNT_MANAGER_FEATURE_CORE is prepared
* (tp_proxy_prepare_async() has returned). Until this feature has
* been prepared, an empty list (%NULL) will be returned.
*
- * Returns: (element-type TelepathyGLib.Account) (transfer container): a newly allocated #GList of valid accounts in @manager
+ * Returns: (element-type TelepathyGLib.Account) (transfer container): a newly allocated #GList of usable accounts in @manager
*
* Since: 0.9.0
*/
GList *
-tp_account_manager_get_valid_accounts (TpAccountManager *manager)
+tp_account_manager_get_usable_accounts (TpAccountManager *manager)
{
g_return_val_if_fail (TP_IS_ACCOUNT_MANAGER (manager), NULL);
@@ -1140,7 +1085,7 @@ tp_account_manager_set_all_requested_presences (TpAccountManager *manager,
{
TpAccount *account = TP_ACCOUNT (value);
- if (tp_account_is_prepared (account, TP_ACCOUNT_FEATURE_CORE))
+ if (tp_proxy_is_prepared (account, TP_ACCOUNT_FEATURE_CORE))
tp_account_request_presence_async (account, type, status, message,
NULL, NULL);
}
@@ -1175,7 +1120,7 @@ tp_account_manager_set_all_requested_presences (TpAccountManager *manager,
* that there exists at least one account in @manager with the returned
* presence.
*
- * If no accounts are enabled or valid the output will be
+ * If no accounts are enabled or usable the output will be
* (%TP_CONNECTION_PRESENCE_TYPE_OFFLINE, "offline", "").
*
* Since 0.17.5, if the only connected accounts does not implement
@@ -1184,7 +1129,7 @@ tp_account_manager_set_all_requested_presences (TpAccountManager *manager,
*
* The return value of this function is not guaranteed to have been retrieved
* until tp_proxy_prepare_async() has finished; until then, the
- * value will be the same as if no accounts are enabled or valid.
+ * value will be the same as if no accounts are enabled or usable.
*
* Returns: the most available presence across all accounts
*
@@ -1260,23 +1205,23 @@ _tp_account_manager_created_cb (TpAccountManager *proxy,
if (error != NULL)
{
g_simple_async_result_set_from_error (my_res, error);
- g_simple_async_result_complete_in_idle (my_res);
+ g_simple_async_result_complete (my_res);
return;
}
- account = tp_simple_client_factory_ensure_account (
+ account = tp_client_factory_ensure_account (
tp_proxy_get_factory (manager), account_path, NULL, &e);
if (account == NULL)
{
g_simple_async_result_take_error (my_res, e);
- g_simple_async_result_complete_in_idle (my_res);
+ g_simple_async_result_complete (my_res);
return;
}
/* Give account's ref to the result */
g_simple_async_result_set_op_res_gpointer (my_res, account, g_object_unref);
- features = tp_simple_client_factory_dup_account_features (
+ features = tp_client_factory_dup_account_features (
tp_proxy_get_factory (manager), account);
tp_proxy_prepare_async (account, (GQuark *) features->data,
@@ -1366,77 +1311,6 @@ tp_account_manager_create_account_finish (TpAccountManager *manager,
}
/**
- * tp_account_manager_is_prepared: (skip)
- * @manager: a #TpAccountManager
- * @feature: a feature which is required
- *
- * <!-- -->
- *
- * Returns: the same thing as tp_proxy_is_prepared()
- *
- * Since: 0.9.0
- */
-gboolean
-tp_account_manager_is_prepared (TpAccountManager *manager,
- GQuark feature)
-{
- return tp_proxy_is_prepared (manager, feature);
-}
-
-/**
- * tp_account_manager_prepare_async: (skip)
- * @manager: a #TpAccountManager
- * @features: a 0-terminated list of features, or %NULL
- * @callback: a callback to call when the request is satisfied
- * @user_data: data to pass to @callback
- *
- * Requests an asynchronous preparation of @manager with
- * %TP_ACCOUNT_MANAGER_FEATURE_CORE, plus any features specified
- * by @features. When the operation is finished, @callback will be called. You
- * can then call tp_account_manager_prepare_finish() to get the result of the
- * operation.
- *
- * If %NULL is given to @callback, then no callback will be called when the
- * operation is finished. Instead, it will simply set @features on @manager.
- * Note that if @callback is %NULL, then @user_data must also be %NULL.
- *
- * In version 0.11.3 or later, this is equivalent to calling
- * tp_proxy_prepare_async() with the same arguments.
- *
- * Since: 0.9.0
- * Deprecated: since 0.15.6, use tp_proxy_prepare_async() instead.
- */
-void
-tp_account_manager_prepare_async (TpAccountManager *manager,
- const GQuark *features,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- tp_proxy_prepare_async (manager, features, callback, user_data);
-}
-
-/**
- * tp_account_manager_prepare_finish: (skip)
- * @manager: a #TpAccountManager
- * @result: a #GAsyncResult
- * @error: a #GError to fill
- *
- * Finishes an async preparation of the account manager @manager.
- *
- * Returns: %TRUE if the preparation was successful, otherwise %FALSE
- *
- * Since: 0.9.0
- * Deprecated: since 0.15.6, use tp_proxy_prepare_finish() instead.
- */
-gboolean
-tp_account_manager_prepare_finish (TpAccountManager *manager,
- GAsyncResult *result,
- GError **error)
-{
- return tp_proxy_prepare_finish (manager, result, error);
-}
-
-/**
* tp_account_manager_enable_restart:
* @manager: a #TpAccountManager
*
diff --git a/telepathy-glib/account-manager.h b/telepathy-glib/account-manager.h
index d5692978e..4c43de946 100644
--- a/telepathy-glib/account-manager.h
+++ b/telepathy-glib/account-manager.h
@@ -74,7 +74,7 @@ TpAccountManager *tp_account_manager_new (TpDBusDaemon *bus_daemon)
G_GNUC_WARN_UNUSED_RESULT;
TpAccountManager *tp_account_manager_new_with_factory (
- TpSimpleClientFactory *factory) G_GNUC_WARN_UNUSED_RESULT;
+ TpClientFactory *factory) G_GNUC_WARN_UNUSED_RESULT;
_TP_AVAILABLE_IN_0_16
void tp_account_manager_set_default (TpAccountManager *manager);
@@ -82,13 +82,7 @@ TpAccountManager *tp_account_manager_dup (void) G_GNUC_WARN_UNUSED_RESULT;
void tp_account_manager_init_known_interfaces (void);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_ensure_account)
-TpAccount *tp_account_manager_ensure_account (TpAccountManager *manager,
- const gchar *path);
-#endif
-
-GList *tp_account_manager_get_valid_accounts (TpAccountManager *manager)
+GList *tp_account_manager_get_usable_accounts (TpAccountManager *manager)
G_GNUC_WARN_UNUSED_RESULT;
void tp_account_manager_set_all_requested_presences (TpAccountManager *manager,
@@ -106,26 +100,8 @@ TpAccount * tp_account_manager_create_account_finish (
TpAccountManager *manager, GAsyncResult *result, GError **error)
G_GNUC_WARN_UNUSED_RESULT;
-gboolean tp_account_manager_is_prepared (TpAccountManager *manager,
- GQuark feature);
-
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_16_FOR (tp_proxy_prepare_async)
-void tp_account_manager_prepare_async (TpAccountManager *manager,
- const GQuark *features,
- GAsyncReadyCallback callback,
- gpointer user_data);
-
-_TP_DEPRECATED_IN_0_16_FOR (tp_proxy_prepare_finish)
-gboolean tp_account_manager_prepare_finish (TpAccountManager *manager,
- GAsyncResult *result,
- GError **error);
-#endif
-
void tp_account_manager_enable_restart (TpAccountManager *manager);
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-account-manager.h>
-
#endif
diff --git a/telepathy-glib/account-request.c b/telepathy-glib/account-request.c
index 2f39c7f2f..6701fcc03 100644
--- a/telepathy-glib/account-request.c
+++ b/telepathy-glib/account-request.c
@@ -22,10 +22,11 @@
#include "telepathy-glib/account-request.h"
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/util.h>
-#include <telepathy-glib/simple-client-factory.h>
+#include <telepathy-glib/client-factory.h>
#define DEBUG_FLAG TP_DEBUG_ACCOUNTS
#include "telepathy-glib/dbus-internal.h"
@@ -179,7 +180,7 @@ tp_account_request_constructed (GObject *object)
#define GET_PRESENCE_VALUE(key, offset, type) \
G_STMT_START { \
GValueArray *_arr = tp_asv_get_boxed (self->priv->properties, \
- key, TP_STRUCT_TYPE_SIMPLE_PRESENCE); \
+ key, TP_STRUCT_TYPE_PRESENCE); \
if (_arr != NULL) \
g_value_set_##type (value, g_value_get_##type (_arr->values + offset)); \
} G_STMT_END
@@ -874,8 +875,8 @@ tp_account_request_set_requested_presence (TpAccountRequest *self,
g_return_if_fail (priv->result == NULL && !priv->created);
- value = tp_g_value_slice_new_take_boxed (TP_STRUCT_TYPE_SIMPLE_PRESENCE,
- dbus_g_type_specialized_construct (TP_STRUCT_TYPE_SIMPLE_PRESENCE));
+ value = tp_g_value_slice_new_take_boxed (TP_STRUCT_TYPE_PRESENCE,
+ dbus_g_type_specialized_construct (TP_STRUCT_TYPE_PRESENCE));
arr = (GValueArray *) g_value_get_boxed (value);
g_value_set_uint (arr->values, presence);
@@ -918,8 +919,8 @@ tp_account_request_set_automatic_presence (TpAccountRequest *self,
g_return_if_fail (priv->result == NULL && !priv->created);
- value = tp_g_value_slice_new_take_boxed (TP_STRUCT_TYPE_SIMPLE_PRESENCE,
- dbus_g_type_specialized_construct (TP_STRUCT_TYPE_SIMPLE_PRESENCE));
+ value = tp_g_value_slice_new_take_boxed (TP_STRUCT_TYPE_PRESENCE,
+ dbus_g_type_specialized_construct (TP_STRUCT_TYPE_PRESENCE));
arr = (GValueArray *) g_value_get_boxed (value);
g_value_set_uint (arr->values, presence);
@@ -1244,7 +1245,7 @@ tp_account_request_create_account_cb (TpAccountManager *proxy,
priv->created = TRUE;
- account = tp_simple_client_factory_ensure_account (
+ account = tp_client_factory_ensure_account (
tp_proxy_get_factory (proxy), account_path, NULL, &e);
if (account == NULL)
@@ -1259,7 +1260,7 @@ tp_account_request_create_account_cb (TpAccountManager *proxy,
g_simple_async_result_set_op_res_gpointer (priv->result, account,
g_object_unref);
- features = tp_simple_client_factory_dup_account_features (
+ features = tp_client_factory_dup_account_features (
tp_proxy_get_factory (proxy), account);
tp_proxy_prepare_async (account, (GQuark *) features->data,
@@ -1331,7 +1332,7 @@ tp_account_request_create_account_async (TpAccountRequest *self,
*
* Finishes an asynchronous account creation operation and returns a
* new ref to a #TpAccount object. The returned account will have the
- * features listed in tp_simple_client_factory_dup_account_features()
+ * features listed in tp_client_factory_dup_account_features()
* (with the proxy factory from #TpAccountRequest:account-manager)
* prepared on it.
*
diff --git a/telepathy-glib/account.c b/telepathy-glib/account.c
index 9190c7b4e..466ecc3e0 100644
--- a/telepathy-glib/account.c
+++ b/telepathy-glib/account.c
@@ -26,6 +26,7 @@
#include "telepathy-glib/account-internal.h"
#include "telepathy-glib/account.h"
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/errors.h>
@@ -39,11 +40,9 @@
#include "telepathy-glib/dbus-internal.h"
#include "telepathy-glib/debug-internal.h"
#include "telepathy-glib/proxy-internal.h"
-#include "telepathy-glib/simple-client-factory-internal.h"
+#include "telepathy-glib/client-factory-internal.h"
#include <telepathy-glib/util-internal.h>
-#include "telepathy-glib/_gen/tp-cli-account-body.h"
-
/**
* SECTION:account
* @title: TpAccount
@@ -112,7 +111,7 @@ struct _TpAccountPrivate {
gchar *nickname;
gboolean enabled;
- gboolean valid;
+ gboolean usable;
gboolean removed;
gchar *cm_name;
@@ -164,7 +163,7 @@ enum {
PROP_CONNECT_AUTOMATICALLY,
PROP_HAS_BEEN_ONLINE,
PROP_SERVICE,
- PROP_VALID,
+ PROP_USABLE,
PROP_REQUESTED_PRESENCE_TYPE,
PROP_REQUESTED_STATUS,
PROP_REQUESTED_STATUS_MESSAGE,
@@ -229,11 +228,11 @@ connection_is_internal (TpAccount *self)
*
* When this feature is prepared, it is guaranteed that #TpAccount:connection
* will always be either %NULL or prepared. If the account was created using a
- * #TpSimpleClientFactory, the same factory will be used to create #TpConnection
+ * #TpClientFactory, the same factory will be used to create #TpConnection
* object and to determine desired connection features. Change notification of
* #TpAccount:connection property will be delayed until all features (at least
* %TP_CONNECTION_FEATURE_CORE) are prepared. See
- * tp_simple_client_factory_add_account_features() to define which features
+ * tp_client_factory_add_account_features() to define which features
* needs to be prepared.
*
* One can ask for a feature to be prepared using the
@@ -519,7 +518,7 @@ _tp_account_set_connection (TpAccount *account,
return;
}
- priv->connection = tp_simple_client_factory_ensure_connection (
+ priv->connection = tp_client_factory_ensure_connection (
tp_proxy_get_factory (account), path, NULL, &error);
if (priv->connection == NULL)
@@ -538,7 +537,7 @@ _tp_account_set_connection (TpAccount *account,
{
GArray *features;
- features = tp_simple_client_factory_dup_connection_features (
+ features = tp_client_factory_dup_connection_features (
tp_proxy_get_factory (account), priv->connection);
tp_proxy_prepare_async (priv->connection, (GQuark *) features->data,
@@ -587,7 +586,7 @@ _tp_account_got_all_storage_cb (TpProxy *proxy,
if (self->priv->storage_provider == NULL)
self->priv->storage_provider = g_strdup ("");
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
static void
@@ -708,7 +707,7 @@ _tp_account_update (TpAccount *account,
{
presence_changed = TRUE;
arr = tp_asv_get_boxed (properties, "CurrentPresence",
- TP_STRUCT_TYPE_SIMPLE_PRESENCE);
+ TP_STRUCT_TYPE_PRESENCE);
priv->cur_presence = g_value_get_uint (g_value_array_get_nth (arr, 0));
g_free (priv->cur_status);
@@ -721,7 +720,7 @@ _tp_account_update (TpAccount *account,
if (g_hash_table_lookup (properties, "RequestedPresence") != NULL)
{
arr = tp_asv_get_boxed (properties, "RequestedPresence",
- TP_STRUCT_TYPE_SIMPLE_PRESENCE);
+ TP_STRUCT_TYPE_PRESENCE);
priv->requested_presence =
g_value_get_uint (g_value_array_get_nth (arr, 0));
@@ -741,7 +740,7 @@ _tp_account_update (TpAccount *account,
if (g_hash_table_lookup (properties, "AutomaticPresence") != NULL)
{
arr = tp_asv_get_boxed (properties, "AutomaticPresence",
- TP_STRUCT_TYPE_SIMPLE_PRESENCE);
+ TP_STRUCT_TYPE_PRESENCE);
priv->auto_presence =
g_value_get_uint (g_value_array_get_nth (arr, 0));
@@ -889,14 +888,14 @@ _tp_account_update (TpAccount *account,
g_free (old);
}
- if (g_hash_table_lookup (properties, "Valid") != NULL)
+ if (g_hash_table_lookup (properties, "Usable") != NULL)
{
- gboolean old = priv->valid;
+ gboolean old = priv->usable;
- priv->valid = tp_asv_get_boolean (properties, "Valid", NULL);
+ priv->usable = tp_asv_get_boolean (properties, "Usable", NULL);
- if (old != priv->valid)
- g_object_notify (G_OBJECT (account), "valid");
+ if (old != priv->usable)
+ g_object_notify (G_OBJECT (account), "usable");
}
if (g_hash_table_lookup (properties, "Parameters") != NULL)
@@ -1120,8 +1119,8 @@ _tp_account_get_property (GObject *object,
case PROP_SERVICE:
g_value_set_string (value, self->priv->service);
break;
- case PROP_VALID:
- g_value_set_boolean (value, self->priv->valid);
+ case PROP_USABLE:
+ g_value_set_boolean (value, self->priv->usable);
break;
case PROP_REQUESTED_PRESENCE_TYPE:
g_value_set_uint (value, self->priv->requested_presence);
@@ -1642,9 +1641,9 @@ tp_account_class_init (TpAccountClass *klass)
G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
/**
- * TpAccount:valid:
+ * TpAccount:usable:
*
- * Whether this account is valid.
+ * Whether this account is usable.
*
* One can receive change notifications on this property by connecting
* to the #GObject::notify signal and using this property as the signal
@@ -1656,10 +1655,10 @@ tp_account_class_init (TpAccountClass *klass)
*
* Since: 0.9.0
*/
- g_object_class_install_property (object_class, PROP_VALID,
- g_param_spec_boolean ("valid",
- "Valid",
- "Whether this account is valid",
+ g_object_class_install_property (object_class, PROP_USABLE,
+ g_param_spec_boolean ("usable",
+ "Usable",
+ "Whether this account is usable",
FALSE,
G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
@@ -2085,7 +2084,7 @@ tp_account_new (TpDBusDaemon *bus_daemon,
}
TpAccount *
-_tp_account_new_with_factory (TpSimpleClientFactory *factory,
+_tp_account_new_with_factory (TpClientFactory *factory,
TpDBusDaemon *bus_daemon,
const gchar *object_path,
GError **error)
@@ -2251,21 +2250,21 @@ tp_account_get_display_name (TpAccount *account)
}
/**
- * tp_account_is_valid:
+ * tp_account_is_usable:
* @account: a #TpAccount
*
* <!-- -->
*
- * Returns: the same as the #TpAccount:valid property
+ * Returns: the same as the #TpAccount:usable property
*
* Since: 0.9.0
*/
gboolean
-tp_account_is_valid (TpAccount *account)
+tp_account_is_usable (TpAccount *account)
{
g_return_val_if_fail (TP_IS_ACCOUNT (account), FALSE);
- return account->priv->valid;
+ return account->priv->usable;
}
/**
@@ -2354,7 +2353,7 @@ tp_account_get_icon_name (TpAccount *account)
* via tp_connection_manager_get_protocol() and
* tp_connection_manager_protocol_get_param(). Well-known parameters are
* listed
- * <ulink url="http://telepathy.freedesktop.org/spec/org.freedesktop.Telepathy.ConnectionManager.html#org.freedesktop.Telepathy.ConnectionManager.RequestConnection">in
+ * <ulink url="http://telepathy.freedesktop.org/spec/im.telepathy1.ConnectionManager.html#im.telepathy1.ConnectionManager.RequestConnection">in
* the Telepathy D-Bus Interface Specification</ulink>.
*
* Returns: (transfer none) (element-type utf8 GObject.Value): the hash table of
@@ -2432,7 +2431,7 @@ _tp_account_property_set_cb (TpProxy *proxy,
g_simple_async_result_set_from_error (result, error);
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -2494,7 +2493,7 @@ tp_account_set_enabled_async (TpAccount *account,
}
static void
-_tp_account_void_cb (TpAccount *proxy,
+_tp_account_reconnected_cb (TpAccount *proxy,
const GError *error,
gpointer user_data,
GObject *weak_object)
@@ -2504,7 +2503,7 @@ _tp_account_void_cb (TpAccount *proxy,
if (error != NULL)
g_simple_async_result_set_from_error (result, error);
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -2552,7 +2551,7 @@ tp_account_reconnect_async (TpAccount *account,
result = g_simple_async_result_new (G_OBJECT (account),
callback, user_data, tp_account_reconnect_finish);
- tp_cli_account_call_reconnect (account, -1, _tp_account_void_cb,
+ tp_cli_account_call_reconnect (account, -1, _tp_account_reconnected_cb,
result, NULL, G_OBJECT (account));
}
@@ -2609,7 +2608,7 @@ tp_account_set_automatic_presence_async (TpAccount *account,
result = g_simple_async_result_new (G_OBJECT (account),
callback, user_data, tp_account_set_automatic_presence_async);
- g_value_init (&value, TP_STRUCT_TYPE_SIMPLE_PRESENCE);
+ g_value_init (&value, TP_STRUCT_TYPE_PRESENCE);
g_value_take_boxed (&value, tp_value_array_build (3,
G_TYPE_UINT, type,
G_TYPE_STRING, status,
@@ -2675,9 +2674,9 @@ tp_account_request_presence_async (TpAccount *account,
result = g_simple_async_result_new (G_OBJECT (account),
callback, user_data, tp_account_request_presence_finish);
- g_value_init (&value, TP_STRUCT_TYPE_SIMPLE_PRESENCE);
+ g_value_init (&value, TP_STRUCT_TYPE_PRESENCE);
g_value_take_boxed (&value, dbus_g_type_specialized_construct (
- TP_STRUCT_TYPE_SIMPLE_PRESENCE));
+ TP_STRUCT_TYPE_PRESENCE));
arr = (GValueArray *) g_value_get_boxed (&value);
g_value_set_uint (arr->values, type);
@@ -2706,7 +2705,7 @@ _tp_account_updated_cb (TpAccount *proxy,
g_simple_async_result_set_op_res_gpointer (result,
g_strdupv ((GStrv) reconnect_required), (GDestroyNotify) g_strfreev);
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (G_OBJECT (result));
}
@@ -3022,6 +3021,21 @@ tp_account_set_icon_name_finish (TpAccount *account,
_tp_implement_finish_void (account, tp_account_set_icon_name_finish);
}
+static void
+_tp_account_void_cb (TpAccount *proxy,
+ const GError *error,
+ gpointer user_data,
+ GObject *weak_object)
+{
+ GSimpleAsyncResult *result = G_SIMPLE_ASYNC_RESULT (user_data);
+
+ if (error != NULL)
+ g_simple_async_result_set_from_error (result, error);
+
+ g_simple_async_result_complete (result);
+ g_object_unref (G_OBJECT (result));
+}
+
/**
* tp_account_remove_async:
* @account: a #TpAccount
@@ -3404,7 +3418,7 @@ _tp_account_got_avatar_cb (TpProxy *proxy,
(GDestroyNotify) g_array_unref);
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -3462,79 +3476,6 @@ tp_account_get_avatar_finish (TpAccount *account,
tp_account_get_avatar_finish, /* do not copy */);
}
-/**
- * tp_account_is_prepared: (skip)
- * @account: a #TpAccount
- * @feature: a feature which is required
- *
- * <!-- -->
- *
- * Returns: the same thing as tp_proxy_is_prepared()
- *
- * Since: 0.9.0
- */
-gboolean
-tp_account_is_prepared (TpAccount *account,
- GQuark feature)
-{
- return tp_proxy_is_prepared (account, feature);
-}
-
-/**
- * tp_account_prepare_async: (skip)
- * @account: a #TpAccount
- * @features: a 0-terminated list of features, or %NULL
- * @callback: a callback to call when the request is satisfied
- * @user_data: data to pass to @callback
- *
- * Requests an asynchronous preparation of @account with the features specified
- * by @features. When the operation is finished, @callback will be called. You
- * can then call tp_account_prepare_finish() to get the result of the
- * operation.
- *
- * If @features is %NULL, then @callback will be called when the implied
- * %TP_ACCOUNT_FEATURE_CORE feature is ready.
- *
- * If %NULL is given to @callback, then no callback will be called when the
- * operation is finished. Instead, it will simply set @features on @manager.
- * Note that if @callback is %NULL, then @user_data must also be %NULL.
- *
- * Since 0.11.3, this is equivalent to calling the new function
- * tp_proxy_prepare_async() with the same arguments.
- *
- * Since: 0.9.0
- * Deprecated: since 0.15.6, use tp_proxy_prepare_async() instead.
- */
-void
-tp_account_prepare_async (TpAccount *account,
- const GQuark *features,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- tp_proxy_prepare_async (account, features, callback, user_data);
-}
-
-/**
- * tp_account_prepare_finish: (skip)
- * @account: a #TpAccount
- * @result: a #GAsyncResult
- * @error: a #GError to fill
- *
- * Finishes an async preparation of the account @account.
- *
- * Returns: %TRUE if the preparation was successful, otherwise %FALSE
- *
- * Since: 0.9.0
- * Deprecated: since 0.15.6, use tp_proxy_prepare_finish() instead.
- */
-gboolean
-tp_account_prepare_finish (TpAccount *account,
- GAsyncResult *result,
- GError **error)
-{
- return tp_proxy_prepare_finish (account, result, error);
-}
-
static void
set_or_free (gchar **target,
gchar *source)
@@ -3919,7 +3860,7 @@ _tp_account_get_storage_specific_information_cb (TpProxy *self,
(GDestroyNotify) g_hash_table_unref);
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -4057,7 +3998,7 @@ _tp_account_got_all_addressing_cb (TpProxy *proxy,
if (self->priv->uri_schemes == NULL)
self->priv->uri_schemes = g_new0 (gchar *, 1);
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
static void
@@ -4102,7 +4043,7 @@ tp_account_prepare_connection_async (TpProxy *proxy,
return;
}
- features = tp_simple_client_factory_dup_connection_features (
+ features = tp_client_factory_dup_connection_features (
tp_proxy_get_factory (self), self->priv->connection);
tp_proxy_prepare_async (self->priv->connection, (GQuark *) features->data,
diff --git a/telepathy-glib/account.h b/telepathy-glib/account.h
index ff787b3dd..58cb2ae98 100644
--- a/telepathy-glib/account.h
+++ b/telepathy-glib/account.h
@@ -121,7 +121,7 @@ gboolean tp_account_reconnect_finish (TpAccount *account,
gboolean tp_account_is_enabled (TpAccount *account);
-gboolean tp_account_is_valid (TpAccount *account);
+gboolean tp_account_is_usable (TpAccount *account);
void tp_account_update_parameters_async (TpAccount *account,
GHashTable *parameters, const gchar **unset_parameters,
@@ -229,21 +229,6 @@ void tp_account_get_avatar_async (TpAccount *account,
const GArray *tp_account_get_avatar_finish (TpAccount *account,
GAsyncResult *result, GError **error);
-gboolean tp_account_is_prepared (TpAccount *account, GQuark feature);
-
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_16_FOR (tp_proxy_prepare_async)
-void tp_account_prepare_async (TpAccount *account,
- const GQuark *features,
- GAsyncReadyCallback callback,
- gpointer user_data);
-
-_TP_DEPRECATED_IN_0_16_FOR (tp_proxy_prepare_finish)
-gboolean tp_account_prepare_finish (TpAccount *account,
- GAsyncResult *result,
- GError **error);
-#endif
-
void tp_account_set_avatar_async (TpAccount *self,
const guchar *avatar,
gsize len,
@@ -292,6 +277,4 @@ GBinding *tp_account_bind_connection_status_to_property (TpAccount *self,
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-account.h>
-
#endif
diff --git a/telepathy-glib/account.xml b/telepathy-glib/account.xml
index 05db93920..fb1beb246 100644
--- a/telepathy-glib/account.xml
+++ b/telepathy-glib/account.xml
@@ -6,8 +6,8 @@
<xi:include href="../spec/Account.xml"/>
-<xi:include href="../spec/Account_Interface_Avatar.xml"/>
-<xi:include href="../spec/Account_Interface_Addressing.xml"/>
-<xi:include href="../spec/Account_Interface_Storage.xml"/>
+<xi:include href="../spec/Account_Interface_Avatar1.xml"/>
+<xi:include href="../spec/Account_Interface_Addressing1.xml"/>
+<xi:include href="../spec/Account_Interface_Storage1.xml"/>
</tp:spec>
diff --git a/telepathy-glib/automatic-client-factory-internal.h b/telepathy-glib/automatic-client-factory-internal.h
index 44682305d..621f835c3 100644
--- a/telepathy-glib/automatic-client-factory-internal.h
+++ b/telepathy-glib/automatic-client-factory-internal.h
@@ -27,35 +27,35 @@
G_BEGIN_DECLS
TpTextChannel *_tp_text_channel_new_with_factory (
- TpSimpleClientFactory *factory,
+ TpClientFactory *factory,
TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
GError **error);
TpStreamTubeChannel *_tp_stream_tube_channel_new_with_factory (
- TpSimpleClientFactory *factory,
+ TpClientFactory *factory,
TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
GError **error);
TpDBusTubeChannel *_tp_dbus_tube_channel_new_with_factory (
- TpSimpleClientFactory *factory,
+ TpClientFactory *factory,
TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
GError **error);
TpFileTransferChannel *_tp_file_transfer_channel_new_with_factory (
- TpSimpleClientFactory *factory,
+ TpClientFactory *factory,
TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
GError **error);
TpCallChannel *_tp_call_channel_new_with_factory (
- TpSimpleClientFactory *factory,
+ TpClientFactory *factory,
TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
diff --git a/telepathy-glib/automatic-client-factory.c b/telepathy-glib/automatic-client-factory.c
index b2cc10ab3..7d70ed4ab 100644
--- a/telepathy-glib/automatic-client-factory.c
+++ b/telepathy-glib/automatic-client-factory.c
@@ -22,9 +22,9 @@
* SECTION:automatic-client-factory
* @title: TpAutomaticClientFactory
* @short_description: Factory for specialized #TpChannel subclasses.
- * @see_also: #TpSimpleClientFactory
+ * @see_also: #TpClientFactory
*
- * This factory overrides some #TpSimpleClientFactory virtual methods to
+ * This factory overrides some #TpClientFactory virtual methods to
* create specialized #TpChannel subclasses.
*
* #TpAutomaticClientFactory will currently create #TpChannel objects
@@ -65,13 +65,8 @@
*
* <itemizedlist>
* <listitem>
- * <para>%TP_CHANNEL_FEATURE_CORE, %TP_CHANNEL_FEATURE_GROUP
- * and %TP_CHANNEL_FEATURE_PASSWORD for all
- * type of channels.</para>
- * </listitem>
- * <listitem>
- * <para>%TP_TEXT_CHANNEL_FEATURE_INCOMING_MESSAGES and
- * %TP_TEXT_CHANNEL_FEATURE_SMS for #TpTextChannel</para>
+ * <para>%TP_CHANNEL_FEATURE_CORE
+ * for all channel types.</para>
* </listitem>
* <listitem>
* <para>%TP_FILE_TRANSFER_CHANNEL_FEATURE_CORE
@@ -87,7 +82,7 @@
* </listitem>
* </itemizedlist>
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
/**
@@ -119,9 +114,9 @@
#include "telepathy-glib/automatic-client-factory-internal.h"
G_DEFINE_TYPE (TpAutomaticClientFactory, tp_automatic_client_factory,
- TP_TYPE_SIMPLE_CLIENT_FACTORY)
+ TP_TYPE_CLIENT_FACTORY)
-#define chainup ((TpSimpleClientFactoryClass *) \
+#define chainup ((TpClientFactoryClass *) \
tp_automatic_client_factory_parent_class)
typedef gboolean (*CheckPropertiesFunc) (
@@ -129,7 +124,7 @@ typedef gboolean (*CheckPropertiesFunc) (
const GHashTable *properties);
typedef TpChannel *(*NewFunc) (
- TpSimpleClientFactory *client,
+ TpClientFactory *client,
TpConnection *conn,
const gchar *object_path,
const GHashTable *properties,
@@ -146,25 +141,6 @@ typedef struct {
static ChannelTypeMapping *channel_type_mapping = NULL;
-static gboolean
-check_for_messages (
- const gchar *object_path,
- const GHashTable *properties)
-{
- /* Create a TpTextChannel only if the channel supports Messages */
- const gchar * const * interfaces;
-
- interfaces = tp_asv_get_strv (properties, TP_PROP_CHANNEL_INTERFACES);
-
- if (!tp_strv_contains (interfaces, TP_IFACE_CHANNEL_INTERFACE_MESSAGES))
- {
- DEBUG ("channel %s doesn't implement Messages so we can't create "
- "a TpTextChannel", object_path);
- return FALSE;
- }
-
- return TRUE;
-}
static void
build_channel_type_mapping (void)
{
@@ -184,11 +160,9 @@ build_channel_type_mapping (void)
},
{ TP_IFACE_CHANNEL_TYPE_TEXT,
TP_TYPE_TEXT_CHANNEL,
- check_for_messages,
+ NULL,
(NewFunc) _tp_text_channel_new_with_factory,
- { TP_TEXT_CHANNEL_FEATURE_INCOMING_MESSAGES,
- TP_TEXT_CHANNEL_FEATURE_SMS,
- 0 },
+ { 0 },
},
{ TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER,
TP_TYPE_FILE_TRANSFER_CHANNEL,
@@ -213,7 +187,7 @@ build_channel_type_mapping (void)
}
static TpChannel *
-create_channel_impl (TpSimpleClientFactory *self,
+create_channel_impl (TpClientFactory *self,
TpConnection *conn,
const gchar *object_path,
const GHashTable *properties,
@@ -241,21 +215,15 @@ create_channel_impl (TpSimpleClientFactory *self,
}
static GArray *
-dup_channel_features_impl (TpSimpleClientFactory *self,
+dup_channel_features_impl (TpClientFactory *self,
TpChannel *channel)
{
GArray *features;
- GQuark standard_features[] = {
- TP_CHANNEL_FEATURE_GROUP,
- TP_CHANNEL_FEATURE_PASSWORD,
- };
ChannelTypeMapping *m;
/* Chainup to get desired features for all channel types */
features = chainup->dup_channel_features (self, channel);
- g_array_append_vals (features, standard_features, G_N_ELEMENTS (standard_features));
-
for (m = channel_type_mapping; m->channel_type != NULL; m++)
{
if (G_TYPE_CHECK_INSTANCE_TYPE (channel, m->gtype))
@@ -276,29 +244,32 @@ tp_automatic_client_factory_init (TpAutomaticClientFactory *self)
}
static void
-tp_automatic_client_factory_class_init (TpAutomaticClientFactoryClass *cls)
+tp_automatic_client_factory_class_init (TpAutomaticClientFactoryClass *klass)
{
- TpSimpleClientFactoryClass *simple_class = (TpSimpleClientFactoryClass *) cls;
+ TpClientFactoryClass *base_class = (TpClientFactoryClass *) klass;
- simple_class->create_channel = create_channel_impl;
- simple_class->dup_channel_features = dup_channel_features_impl;
+ base_class->create_channel = create_channel_impl;
+ base_class->dup_channel_features = dup_channel_features_impl;
build_channel_type_mapping ();
}
/**
* tp_automatic_client_factory_new:
- * @dbus: a #TpDBusDaemon
+ * @dbus: a #TpDBusDaemon, or %NULL
*
- * Returns a new #TpAutomaticClientFactory instance.
+ * Returns a new #TpAutomaticClientFactory instance. If @dbus is %NULL then
+ * tp_dbus_daemon_dup() will be used.
*
* Returns: a new #TpAutomaticClientFactory
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
-TpAutomaticClientFactory *
+TpClientFactory *
tp_automatic_client_factory_new (TpDBusDaemon *dbus)
{
+ g_return_val_if_fail (dbus == NULL || TP_IS_DBUS_DAEMON (dbus), NULL);
+
return g_object_new (TP_TYPE_AUTOMATIC_CLIENT_FACTORY,
"dbus-daemon", dbus,
NULL);
diff --git a/telepathy-glib/automatic-client-factory.h b/telepathy-glib/automatic-client-factory.h
index 02707727b..b942bebd7 100644
--- a/telepathy-glib/automatic-client-factory.h
+++ b/telepathy-glib/automatic-client-factory.h
@@ -25,7 +25,7 @@
#include <telepathy-glib/dbus-tube-channel.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/file-transfer-channel.h>
-#include <telepathy-glib/simple-client-factory.h>
+#include <telepathy-glib/client-factory.h>
#include <telepathy-glib/stream-tube-channel.h>
#include <telepathy-glib/text-channel.h>
@@ -36,12 +36,12 @@ typedef struct _TpAutomaticClientFactoryClass TpAutomaticClientFactoryClass;
struct _TpAutomaticClientFactoryClass {
/*<public>*/
- TpSimpleClientFactoryClass parent_class;
+ TpClientFactoryClass parent_class;
};
struct _TpAutomaticClientFactory {
/*<private>*/
- TpSimpleClientFactory parent;
+ TpClientFactory parent;
};
_TP_AVAILABLE_IN_0_16
@@ -63,8 +63,7 @@ GType tp_automatic_client_factory_get_type (void);
(G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_AUTOMATIC_CLIENT_FACTORY, \
TpAutomaticClientFactoryClass))
-_TP_AVAILABLE_IN_0_16
-TpAutomaticClientFactory *tp_automatic_client_factory_new (TpDBusDaemon *dbus);
+TpClientFactory *tp_automatic_client_factory_new (TpDBusDaemon *dbus);
G_END_DECLS
diff --git a/telepathy-glib/automatic-proxy-factory.c b/telepathy-glib/automatic-proxy-factory.c
deleted file mode 100644
index 9af0939aa..000000000
--- a/telepathy-glib/automatic-proxy-factory.c
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- * Factory creating higher level proxy objects
- *
- * Copyright © 2010 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * SECTION:automatic-proxy-factory
- * @title: TpAutomaticProxyFactory
- * @short_description: factory creating higher level proxy objects
- * @see_also: #TpBasicProxyFactory
- *
- * This factory implements the #TpClientChannelFactoryInterface interface to
- * create specialized #TpChannel subclasses.
- *
- * #TpAutomaticProxyFactory will currently create #TpChannel objects
- * as follows:
- *
- * <itemizedlist>
- * <listitem>
- * <para>a #TpStreamTubeChannel, if the channel is of type
- * %TP_IFACE_CHANNEL_TYPE_STREAM_TUBE;</para>
- * </listitem>
- * <listitem>
- * <para>a #TpTextChannel, if the channel is of type
- * %TP_IFACE_CHANNEL_TYPE_TEXT and implements
- * %TP_IFACE_CHANNEL_INTERFACE_MESSAGES;</para>
- * </listitem>
- * <listitem>
- * <para>a #TpFileTransferChannel, if the channel is of type
- * %TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER;</para>
- * </listitem>
- * <listitem>
- * <para>a plain #TpChannel, otherwise</para>
- * </listitem>
- * </itemizedlist>
- *
- * It is guaranteed that the objects returned by future versions
- * will be either the class that is currently used, or a more specific
- * subclass of that class.
- *
- * This factory asks to prepare the following properties:
- *
- * <itemizedlist>
- * <listitem>
- * <para>%TP_CHANNEL_FEATURE_CORE, %TP_CHANNEL_FEATURE_GROUP
- * and %TP_CHANNEL_FEATURE_PASSWORD for all
- * type of channels.</para>
- * </listitem>
- * <listitem>
- * <para>%TP_TEXT_CHANNEL_FEATURE_INCOMING_MESSAGES and
- * TP_TEXT_CHANNEL_FEATURE_SMS for #TpTextChannel</para>
- * </listitem>
- * <listitem>
- * <para>%TP_FILE_TRANSFER_CHANNEL_FEATURE_CORE
- * for #TpFileTransferChannel</para>
- * </listitem>
- * </itemizedlist>
- *
- * TpProxy subclasses other than TpChannel are not currently supported.
- *
- * Since: 0.13.2
- */
-
-/**
- * TpAutomaticProxyFactory:
- *
- * Data structure representing a #TpAutomaticProxyFactory
- *
- * Since: 0.13.2
- */
-
-/**
- * TpAutomaticProxyFactoryClass:
- * @parent_class: the parent class
- *
- * The class of a #TpAutomaticProxyFactory.
- *
- * Since: 0.13.2
- */
-
-#include "config.h"
-
-#include "telepathy-glib/automatic-proxy-factory.h"
-
-#include <telepathy-glib/client-channel-factory.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/stream-tube-channel.h>
-#include <telepathy-glib/text-channel.h>
-#include <telepathy-glib/file-transfer-channel.h>
-#include <telepathy-glib/util.h>
-
-#define DEBUG_FLAG TP_DEBUG_CLIENT
-#include "telepathy-glib/debug-internal.h"
-
-static void client_proxy_factory_iface_init (gpointer, gpointer);
-
-G_DEFINE_TYPE_WITH_CODE(TpAutomaticProxyFactory,
- tp_automatic_proxy_factory, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (TP_TYPE_CLIENT_CHANNEL_FACTORY,
- client_proxy_factory_iface_init))
-
-static void
-tp_automatic_proxy_factory_init (TpAutomaticProxyFactory *self)
-{
-}
-
-static void
-tp_automatic_proxy_factory_class_init (TpAutomaticProxyFactoryClass *cls)
-{
-}
-
-static TpChannel *
-tp_automatic_proxy_factory_create_channel_impl (
- TpConnection *conn,
- const gchar *path,
- GHashTable *properties,
- GError **error)
-{
- const gchar *chan_type;
-
- chan_type = tp_asv_get_string (properties, TP_PROP_CHANNEL_CHANNEL_TYPE);
-
- if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
- {
- return TP_CHANNEL (tp_stream_tube_channel_new (conn, path, properties,
- error));
- }
- else if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_TEXT))
- {
- /* Create a TpTextChannel only if the channel supports Messages */
- const gchar * const * interfaces;
-
- interfaces = tp_asv_get_strv (properties, TP_PROP_CHANNEL_INTERFACES);
-
- if (tp_strv_contains (interfaces, TP_IFACE_CHANNEL_INTERFACE_MESSAGES))
- return TP_CHANNEL (tp_text_channel_new (conn, path, properties,
- error));
-
- DEBUG ("channel %s doesn't implement Messages so we can't create "
- "a TpTextChannel", path);
- }
- else if (!tp_strdiff (chan_type, TP_IFACE_CHANNEL_TYPE_FILE_TRANSFER))
- {
- return TP_CHANNEL (tp_file_transfer_channel_new (conn, path, properties,
- error));
- }
-
- return tp_channel_new_from_properties (conn, path, properties, error);
-}
-
-static TpChannel *
-tp_automatic_proxy_factory_create_channel (
- TpClientChannelFactoryInterface *iface G_GNUC_UNUSED,
- TpConnection *conn,
- const gchar *path,
- GHashTable *properties,
- GError **error)
-{
- return tp_automatic_proxy_factory_create_channel_impl (conn, path,
- properties, error);
-}
-
-static TpChannel *
-tp_automatic_proxy_factory_obj_create_channel (
- TpClientChannelFactory *self G_GNUC_UNUSED,
- TpConnection *conn,
- const gchar *path,
- GHashTable *properties,
- GError **error)
-{
- return tp_automatic_proxy_factory_create_channel_impl (conn, path,
- properties, error);
-}
-
-static GArray *
-tp_automatic_proxy_factory_dup_channel_features_impl (TpChannel *channel)
-{
- GArray *features;
- GQuark feature;
-
- features = g_array_sized_new (TRUE, FALSE, sizeof (GQuark), 2);
-
- feature = TP_CHANNEL_FEATURE_CORE;
- g_array_append_val (features, feature);
-
- feature = TP_CHANNEL_FEATURE_GROUP;
- g_array_append_val (features, feature);
-
- feature = TP_CHANNEL_FEATURE_PASSWORD;
- g_array_append_val (features, feature);
-
- if (TP_IS_TEXT_CHANNEL (channel))
- {
- feature = TP_TEXT_CHANNEL_FEATURE_INCOMING_MESSAGES;
- g_array_append_val (features, feature);
-
- feature = TP_TEXT_CHANNEL_FEATURE_SMS;
- g_array_append_val (features, feature);
- }
- else if (TP_IS_FILE_TRANSFER_CHANNEL (channel))
- {
- feature = TP_FILE_TRANSFER_CHANNEL_FEATURE_CORE;
- g_array_append_val (features, feature);
- }
-
- return features;
-}
-
-static GArray *
-tp_automatic_proxy_factory_obj_dup_channel_features (
- TpClientChannelFactory *self G_GNUC_UNUSED,
- TpChannel *channel)
-{
- return tp_automatic_proxy_factory_dup_channel_features_impl (channel);
-}
-
-static GArray *
-tp_automatic_proxy_factory_dup_channel_features (
- TpClientChannelFactoryInterface *iface G_GNUC_UNUSED,
- TpChannel *channel)
-{
- return tp_automatic_proxy_factory_dup_channel_features_impl (channel);
-}
-
-static void
-client_proxy_factory_iface_init (gpointer g_iface,
- gpointer unused G_GNUC_UNUSED)
-{
- TpClientChannelFactoryInterface *iface = g_iface;
-
- iface->create_channel = tp_automatic_proxy_factory_create_channel;
- iface->dup_channel_features = tp_automatic_proxy_factory_dup_channel_features;
- iface->obj_create_channel = tp_automatic_proxy_factory_obj_create_channel;
- iface->obj_dup_channel_features = tp_automatic_proxy_factory_obj_dup_channel_features;
-}
-
-/**
- * tp_automatic_proxy_factory_new:
- *
- * Convenient function to create a new #TpAutomaticProxyFactory instance.
- *
- * Returns: a new #TpAutomaticProxyFactory
- *
- * Since: 0.13.2
- * Deprecated: New code should use #TpAutomaticClientFactory instead
- */
-static TpAutomaticProxyFactory *
-_tp_automatic_proxy_factory_new (void)
-{
- return g_object_new (TP_TYPE_AUTOMATIC_PROXY_FACTORY,
- NULL);
-}
-
-TpAutomaticProxyFactory *
-tp_automatic_proxy_factory_new (void)
-{
- return _tp_automatic_proxy_factory_new ();
-}
-
-/**
- * tp_automatic_proxy_factory_dup:
- *
- * Returns a cached #TpAutomaticProxyFactory; the same
- * #TpAutomaticProxyFactory object will be returned by this function repeatedly,
- * as long as at least one reference exists.
- *
- * Returns: (transfer full): a #TpAutomaticProxyFactory
- *
- * Since: 0.13.2
- * Deprecated: New code should use #TpAutomaticClientFactory instead
- */
-TpAutomaticProxyFactory *
-tp_automatic_proxy_factory_dup (void)
-{
- static TpAutomaticProxyFactory *singleton = NULL;
-
- if (singleton != NULL)
- return g_object_ref (singleton);
-
- singleton = _tp_automatic_proxy_factory_new ();
-
- g_object_add_weak_pointer (G_OBJECT (singleton), (gpointer) &singleton);
-
- return singleton;
-}
diff --git a/telepathy-glib/automatic-proxy-factory.h b/telepathy-glib/automatic-proxy-factory.h
deleted file mode 100644
index 9a135f434..000000000
--- a/telepathy-glib/automatic-proxy-factory.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Factory creating higher level proxy objects
- *
- * Copyright © 2010 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __TP_AUTOMATIC_PROXY_FACTORY_H__
-#define __TP_AUTOMATIC_PROXY_FACTORY_H__
-
-#include <glib-object.h>
-
-#include <telepathy-glib/defs.h>
-
-G_BEGIN_DECLS
-
-typedef struct _TpAutomaticProxyFactory TpAutomaticProxyFactory;
-typedef struct _TpAutomaticProxyFactoryClass TpAutomaticProxyFactoryClass;
-
-struct _TpAutomaticProxyFactoryClass {
- /*<public>*/
- GObjectClass parent_class;
-};
-
-struct _TpAutomaticProxyFactory {
- /*<private>*/
- GObject parent;
-};
-
-GType tp_automatic_proxy_factory_get_type (void);
-
-#define TP_TYPE_AUTOMATIC_PROXY_FACTORY \
- (tp_automatic_proxy_factory_get_type ())
-#define TP_AUTOMATIC_PROXY_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), TP_TYPE_AUTOMATIC_PROXY_FACTORY, \
- TpAutomaticProxyFactory))
-#define TP_AUTOMATIC_PROXY_FACTORY_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), TP_TYPE_AUTOMATIC_PROXY_FACTORY, \
- TpAutomaticProxyFactoryClass))
-#define TP_IS_AUTOMATIC_PROXY_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TP_TYPE_AUTOMATIC_PROXY_FACTORY))
-#define TP_IS_AUTOMATIC_PROXY_FACTORY_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), TP_TYPE_AUTOMATIC_PROXY_FACTORY))
-#define TP_AUTOMATIC_PROXY_FACTORY_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_AUTOMATIC_PROXY_FACTORY, \
- TpAutomaticProxyFactoryClass))
-
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_16_FOR (tp_automatic_client_factory_new)
-TpAutomaticProxyFactory * tp_automatic_proxy_factory_new (void);
-
-_TP_DEPRECATED_IN_0_16_FOR (tp_automatic_client_factory_new)
-TpAutomaticProxyFactory * tp_automatic_proxy_factory_dup (void);
-#endif
-
-G_END_DECLS
-
-#endif
diff --git a/telepathy-glib/base-channel.c b/telepathy-glib/base-channel.c
index 61d433050..e0174a33d 100644
--- a/telepathy-glib/base-channel.c
+++ b/telepathy-glib/base-channel.c
@@ -61,7 +61,6 @@
* (e.g. #TP_IFACE_CHANNEL_TYPE_TEXT)
* @target_handle_type: The type of handle that is the target of channels of
* this type
- * @interfaces: Deprecated. Replaced by @get_interfaces.
* @close: A virtual function called to close the channel, which will be called
* by tp_base_channel_close() and by the implementation of the Closed D-Bus
* method.
@@ -78,7 +77,7 @@
* @get_interfaces: Extra interfaces provided by this channel (this SHOULD NOT
* include the channel type and interface itself). Implementation must first
* chainup on parent class implementation and then add extra interfaces into
- * the #GPtrArray. Replaces @interfaces.
+ * the #GPtrArray.
*
* The class structure for #TpBaseChannel
*
@@ -608,18 +607,7 @@ tp_base_channel_get_basic_object_path_suffix (TpBaseChannel *self)
static GPtrArray *
tp_base_channel_get_basic_interfaces (TpBaseChannel *self)
{
- GPtrArray *interfaces = g_ptr_array_new ();
- const char **ptr;
-
- /* copy the klass->interfaces property for backwards compatibility */
- for (ptr = TP_BASE_CHANNEL_GET_CLASS (self)->interfaces;
- ptr != NULL && *ptr != NULL;
- ptr++)
- {
- g_ptr_array_add (interfaces, (char *) *ptr);
- }
-
- return interfaces;
+ return g_ptr_array_new ();
}
static void
@@ -917,40 +905,6 @@ tp_base_channel_class_init (TpBaseChannelClass *tp_base_channel_class)
}
static void
-tp_base_channel_get_channel_type (TpSvcChannel *iface,
- DBusGMethodInvocation *context)
-{
- TpBaseChannelClass *klass = TP_BASE_CHANNEL_GET_CLASS (iface);
-
- tp_svc_channel_return_from_get_channel_type (context, klass->channel_type);
-}
-
-static void
-tp_base_channel_get_handle (TpSvcChannel *iface,
- DBusGMethodInvocation *context)
-{
- TpBaseChannelClass *klass = TP_BASE_CHANNEL_GET_CLASS (iface);
- TpBaseChannel *chan = TP_BASE_CHANNEL (iface);
-
- tp_svc_channel_return_from_get_handle (context, klass->target_handle_type,
- chan->priv->target);
-}
-
-static void
-tp_base_channel_get_interfaces (TpSvcChannel *iface,
- DBusGMethodInvocation *context)
-{
- TpBaseChannel *chan = TP_BASE_CHANNEL (iface);
- TpBaseChannelClass *klass = TP_BASE_CHANNEL_GET_CLASS (chan);
- GPtrArray *interfaces = klass->get_interfaces (chan);
-
- g_ptr_array_add (interfaces, NULL);
- tp_svc_channel_return_from_get_interfaces (context,
- (const char **) interfaces->pdata);
- g_ptr_array_unref (interfaces);
-}
-
-static void
tp_base_channel_close_dbus (
TpSvcChannel *iface,
DBusGMethodInvocation *context)
@@ -975,12 +929,5 @@ channel_iface_init (gpointer g_iface,
{
TpSvcChannelClass *klass = (TpSvcChannelClass *) g_iface;
-#define IMPLEMENT(x) tp_svc_channel_implement_##x (\
- klass, tp_base_channel_##x)
- IMPLEMENT(get_channel_type);
- IMPLEMENT(get_handle);
- IMPLEMENT(get_interfaces);
-#undef IMPLEMENT
-
tp_svc_channel_implement_close (klass, tp_base_channel_close_dbus);
}
diff --git a/telepathy-glib/base-channel.h b/telepathy-glib/base-channel.h
index 1a45bdaf6..c0f114bce 100644
--- a/telepathy-glib/base-channel.h
+++ b/telepathy-glib/base-channel.h
@@ -52,7 +52,6 @@ struct _TpBaseChannelClass
const gchar *channel_type;
TpHandleType target_handle_type;
- const gchar **interfaces;
TpBaseChannelCloseFunc close;
TpBaseChannelFillPropertiesFunc fill_immutable_properties;
diff --git a/telepathy-glib/base-client.c b/telepathy-glib/base-client.c
index 0704e2e20..858d84f41 100644
--- a/telepathy-glib/base-client.c
+++ b/telepathy-glib/base-client.c
@@ -67,16 +67,14 @@
* TpBaseClientClassObserveChannelsImpl:
* @client: a #TpBaseClient instance
* @account: a #TpAccount with %TP_ACCOUNT_FEATURE_CORE, and any other
- * features added via tp_base_client_add_account_features() or
- * tp_simple_client_factory_add_account_features(), prepared if
+ * features added via tp_client_factory_add_account_features(), prepared if
* possible
* @connection: a #TpConnection with %TP_CONNECTION_FEATURE_CORE,
- * and any other features added via tp_base_client_add_connection_features(),
- * or tp_simple_client_factory_add_connection_features(), prepared if possible
+ * and any other features added via
+ * tp_client_factory_add_connection_features(), prepared if possible
* @channels: (element-type TelepathyGLib.Channel): a #GList of #TpChannel,
* each with %TP_CHANNEL_FEATURE_CORE, and any other features added via
- * tp_base_client_add_channel_features() or
- * tp_simple_client_factory_add_channel_features(), prepared if possible
+ * tp_client_factory_add_channel_features(), prepared if possible
* @dispatch_operation: (allow-none): a #TpChannelDispatchOperation or %NULL;
* the dispatch_operation is not guaranteed to be prepared
* @requests: (element-type TelepathyGLib.ChannelRequest): a #GList of
@@ -98,16 +96,14 @@
* TpBaseClientClassAddDispatchOperationImpl:
* @client: a #TpBaseClient instance
* @account: a #TpAccount with %TP_ACCOUNT_FEATURE_CORE, and any other
- * features added via tp_base_client_add_account_features() or
- * tp_simple_client_factory_add_account_features(), prepared if
+ * features added via tp_client_factory_add_account_features(), prepared if
* possible
* @connection: a #TpConnection with %TP_CONNECTION_FEATURE_CORE,
- * and any other features added via tp_base_client_add_connection_features(),
- * or tp_simple_client_factory_add_connection_features(), prepared if possible
+ * and any other features added via
+ * tp_client_factory_add_connection_features(), prepared if possible
* @channels: (element-type TelepathyGLib.Channel): a #GList of #TpChannel,
* each with %TP_CHANNEL_FEATURE_CORE, and any other features added via
- * tp_base_client_add_channel_features() or
- * tp_simple_client_factory_add_channel_features(), prepared if possible
+ * tp_client_factory_add_channel_features(), prepared if possible
* @dispatch_operation: a #TpChannelDispatchOperation having
* %TP_CHANNEL_DISPATCH_OPERATION_FEATURE_CORE prepared if possible
* @context: a #TpObserveChannelsContext representing the context of this
@@ -131,16 +127,14 @@
* TpBaseClientClassHandleChannelsImpl:
* @client: a #TpBaseClient instance
* @account: a #TpAccount with %TP_ACCOUNT_FEATURE_CORE, and any other
- * features added via tp_base_client_add_account_features() or
- * tp_simple_client_factory_add_account_features(), prepared if
+ * features added via tp_client_factory_add_account_features(), prepared if
* possible
* @connection: a #TpConnection with %TP_CONNECTION_FEATURE_CORE,
- * and any other features added via tp_base_client_add_connection_features(),
- * or tp_simple_client_factory_add_connection_features(), prepared if possible
+ * and any other features added via
+ * tp_client_factory_add_connection_features(), prepared if possible
* @channels: (element-type TelepathyGLib.Channel): a #GList of #TpChannel,
* each with %TP_CHANNEL_FEATURE_CORE, and any other features added via
- * tp_base_client_add_channel_features() or
- * tp_simple_client_factory_add_channel_features(), prepared if possible
+ * tp_client_factory_add_channel_features(), prepared if possible
* @requests_satisfied: (element-type TelepathyGLib.ChannelRequest): a #GList of
* #TpChannelRequest having their object-path defined but are not guaranteed
* to be prepared.
@@ -185,11 +179,12 @@
#include <dbus/dbus-glib-lowlevel.h>
#include <telepathy-glib/add-dispatch-operation-context-internal.h>
-#include <telepathy-glib/automatic-proxy-factory.h>
+#include <telepathy-glib/automatic-client-factory.h>
#include <telepathy-glib/channel-dispatch-operation-internal.h>
#include <telepathy-glib/channel-dispatcher.h>
#include <telepathy-glib/channel-request.h>
#include <telepathy-glib/channel.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus-internal.h>
#include <telepathy-glib/handle-channels-context-internal.h>
#include <telepathy-glib/interfaces.h>
@@ -200,8 +195,7 @@
#define DEBUG_FLAG TP_DEBUG_CLIENT
#include "telepathy-glib/debug-internal.h"
-#include "telepathy-glib/deprecated-internal.h"
-#include "telepathy-glib/simple-client-factory-internal.h"
+#include "telepathy-glib/client-factory-internal.h"
#include "telepathy-glib/util-internal.h"
static void observer_iface_init (gpointer, gpointer);
@@ -221,11 +215,9 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE(TpBaseClient, tp_base_client, G_TYPE_OBJECT,
enum {
PROP_DBUS_DAEMON = 1,
- PROP_ACCOUNT_MANAGER,
PROP_FACTORY,
PROP_NAME,
PROP_UNIQUIFY_NAME,
- PROP_CHANNEL_FACTORY,
N_PROPS
};
@@ -251,7 +243,7 @@ typedef enum {
struct _TpBaseClientPrivate
{
- TpSimpleClientFactory *factory;
+ TpClientFactory *factory;
TpDBusDaemon *dbus;
gchar *name;
gboolean uniquify_name;
@@ -277,14 +269,7 @@ struct _TpBaseClientPrivate
gchar *bus_name;
gchar *object_path;
- TpAccountManager *account_mgr;
TpAccount *only_for_account;
- TpClientChannelFactory *channel_factory;
-
- /* array of GQuark or NULL */
- GArray *account_features;
- GArray *connection_features;
- GArray *channel_features;
TpBaseClientDelegatedChannelsCb delegated_channels_cb;
gpointer delegated_channels_data;
@@ -330,7 +315,7 @@ tp_base_client_dup_account (TpBaseClient *self,
return g_object_ref (self->priv->only_for_account);
}
- return tp_simple_client_factory_ensure_account (self->priv->factory,
+ return tp_client_factory_ensure_account (self->priv->factory,
path, NULL, error);
}
@@ -976,10 +961,6 @@ tp_base_client_init (TpBaseClient *self)
self->priv->my_chans = g_hash_table_new_full (g_str_hash, g_str_equal,
NULL, g_object_unref);
-
- self->priv->account_features = g_array_new (TRUE, FALSE, sizeof (GQuark));
- self->priv->connection_features = g_array_new (TRUE, FALSE, sizeof (GQuark));
- self->priv->channel_features = g_array_new (TRUE, FALSE, sizeof (GQuark));
}
static void
@@ -992,10 +973,8 @@ tp_base_client_dispose (GObject *object)
tp_base_client_unregister (self);
tp_clear_object (&self->priv->dbus);
- tp_clear_object (&self->priv->account_mgr);
tp_clear_object (&self->priv->factory);
tp_clear_object (&self->priv->only_for_account);
- tp_clear_object (&self->priv->channel_factory);
g_list_foreach (self->priv->pending_requests, (GFunc) g_object_unref, NULL);
g_list_free (self->priv->pending_requests);
@@ -1036,10 +1015,6 @@ tp_base_client_finalize (GObject *object)
g_free (self->priv->bus_name);
g_free (self->priv->object_path);
- tp_clear_pointer (&self->priv->account_features, g_array_unref);
- tp_clear_pointer (&self->priv->connection_features, g_array_unref);
- tp_clear_pointer (&self->priv->channel_features, g_array_unref);
-
if (finalize != NULL)
finalize (object);
}
@@ -1058,10 +1033,6 @@ tp_base_client_get_property (GObject *object,
g_value_set_object (value, self->priv->dbus);
break;
- case PROP_ACCOUNT_MANAGER:
- g_value_set_object (value, self->priv->account_mgr);
- break;
-
case PROP_FACTORY:
g_value_set_object (value, self->priv->factory);
break;
@@ -1074,10 +1045,6 @@ tp_base_client_get_property (GObject *object,
g_value_set_boolean (value, self->priv->uniquify_name);
break;
- case PROP_CHANNEL_FACTORY:
- g_value_set_object (value, self->priv->channel_factory);
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -1099,11 +1066,6 @@ tp_base_client_set_property (GObject *object,
self->priv->dbus = g_value_dup_object (value);
break;
- case PROP_ACCOUNT_MANAGER:
- g_assert (self->priv->account_mgr == NULL); /* construct-only */
- self->priv->account_mgr = g_value_dup_object (value);
- break;
-
case PROP_FACTORY:
g_assert (self->priv->factory == NULL); /* construct-only */
self->priv->factory = g_value_dup_object (value);
@@ -1118,11 +1080,6 @@ tp_base_client_set_property (GObject *object,
self->priv->uniquify_name = g_value_get_boolean (value);
break;
- case PROP_CHANNEL_FACTORY:
- g_assert (self->priv->channel_factory == NULL); /* construct-only */
- self->priv->channel_factory = g_value_dup_object (value);
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -1141,48 +1098,20 @@ tp_base_client_constructed (GObject *object)
if (chain_up != NULL)
chain_up (object);
- /* What we really need is a factory. For historical reasons,
- * constructor could get a TpDBusDaemon or a TpAccountManager.
- * We need to do some fallbacks for compatibility... */
- if (self->priv->account_mgr == NULL &&
- self->priv->factory == NULL)
- {
- /* This case happens only from deprecated API, for compatibility we still
- * need to create a TpAccountManager even if a factory would be enough */
-
- g_assert (self->priv->dbus != NULL);
-
- if (_tp_dbus_daemon_is_the_shared_one (self->priv->dbus))
- {
- /* The AM is guaranteed to be the one from
- * tp_account_manager_dup() */
- self->priv->account_mgr = tp_account_manager_dup ();
- }
- else
- {
- /* No guarantee, create a new AM */
- self->priv->account_mgr = tp_account_manager_new (self->priv->dbus);
- }
- }
-
+ /* Ensure we have a factory */
if (self->priv->factory == NULL)
{
- g_assert (self->priv->account_mgr != NULL);
-
- self->priv->factory = tp_proxy_get_factory (self->priv->account_mgr);
- g_object_ref (self->priv->factory);
+ self->priv->factory = tp_automatic_client_factory_new (self->priv->dbus);
}
+ /* Ensure we have a TpDBusDaemon */
if (self->priv->dbus == NULL)
{
- g_assert (self->priv->factory != NULL);
-
- self->priv->dbus = tp_simple_client_factory_get_dbus_daemon (
- self->priv->factory);
- g_object_ref (self->priv->dbus);
+ self->priv->dbus = g_object_ref (
+ tp_client_factory_get_dbus_daemon (self->priv->factory));
}
- g_assert (tp_simple_client_factory_get_dbus_daemon (self->priv->factory) ==
+ g_assert (tp_client_factory_get_dbus_daemon (self->priv->factory) ==
self->priv->dbus);
/* Bus name */
@@ -1368,11 +1297,6 @@ tp_base_client_class_init (TpBaseClientClass *cls)
*
* This property can't be %NULL after construction.
*
- * Since 0.11.14 this property may be %NULL or unspecified in
- * g_object_new(), but only if #TpBaseClient:account-manager is provided
- * instead, in which case its #TpProxy:dbus-daemon property will be
- * used.
- *
* Since: 0.11.5
*/
param_spec = g_param_spec_object ("dbus-daemon", "TpDBusDaemon object",
@@ -1382,45 +1306,6 @@ tp_base_client_class_init (TpBaseClientClass *cls)
g_object_class_install_property (object_class, PROP_DBUS_DAEMON, param_spec);
/**
- * TpBaseClient:account-manager:
- *
- * Account manager for this base client, used to look up or create
- * #TpAccount objects. This may be specified in the constructor in order
- * to get existing #TpAccount objects.
- *
- * It is not guaranteed that any of its features have been prepared, and
- * it is not necessary to wait for any features before specifying this
- * property in the constructor.
- *
- * Clients that interact with the #TpAccount should usually
- * set this property instead of #TpBaseClient:dbus-daemon. Doing this
- * will ensure that each account, connection or contact is represented by
- * a single #TpAccount, #TpConnection or #TpContact object, shared between
- * all the cooperating modules that have the same #TpAccountManager.
- *
- * If the #TpBaseClient:dbus-daemon is set to the result of
- * tp_dbus_daemon_dup(), then this property defaults to
- * the result of tp_account_manager_dup().
- *
- * This property may be %NULL initially, but will always be non-%NULL
- * after the #TpBaseClient has been constructed.
- *
- * It is an error to specify both a non-%NULL account manager, and a
- * non-%NULL #TpBaseClient:dbus-daemon that is not the same as the
- * account manager's #TpProxy:dbus-daemon.
- *
- * Since: 0.11.14
- * Deprecated: New code should not use this property, it may be %NULL in
- * the case @self was constructed with a #TpSimpleClientFactory.
- */
- param_spec = g_param_spec_object ("account-manager", "TpAccountManager",
- "The TpAccountManager used look up or create TpAccount objects",
- TP_TYPE_ACCOUNT_MANAGER,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_ACCOUNT_MANAGER,
- param_spec);
-
- /**
* TpBaseClient:factory:
*
* Factory for this base client, used to look up or create
@@ -1428,9 +1313,9 @@ tp_base_client_class_init (TpBaseClientClass *cls)
*
* Since: 0.15.5
*/
- param_spec = g_param_spec_object ("factory", "TpSimpleClientFactory",
- "The TpSimpleClientFactory used look up or create TpAccount objects",
- TP_TYPE_SIMPLE_CLIENT_FACTORY,
+ param_spec = g_param_spec_object ("factory", "TpClientFactory",
+ "The TpClientFactory used look up or create TpAccount objects",
+ TP_TYPE_CLIENT_FACTORY,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_FACTORY,
param_spec);
@@ -1466,34 +1351,12 @@ tp_base_client_class_init (TpBaseClientClass *cls)
g_object_class_install_property (object_class, PROP_UNIQUIFY_NAME,
param_spec);
- /**
- * TpBaseClient:channel-factory:
- *
- * The object implementing the #TpClientChannelFactoryInterface interface
- * that will be used to create channel proxies. While
- * tp_base_client_register() has not yet been called, this property can be
- * changed using tp_base_client_set_channel_factory().
- *
- * If no channel factory is specified then #TpAutomaticProxyFactory is used.
- *
- * Since: 0.13.2
- * Deprecated: since 0.15.5. The factory is taken from
- * #TpBaseClient:account-manager.
- */
- param_spec = g_param_spec_object ("channel-factory", "Channel factory",
- "Object implementing TpClientChannelFactoryInterface",
- G_TYPE_OBJECT,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_CHANNEL_FACTORY,
- param_spec);
-
/**
* TpBaseClient::request-added:
* @self: a #TpBaseClient
* @account: the #TpAccount on which the request was made,
* with %TP_ACCOUNT_FEATURE_CORE, and any other features added via
- * tp_base_client_add_account_features() or
- * tp_simple_client_factory_add_account_features(), prepared if possible
+ * tp_client_factory_add_account_features(), prepared if possible
* @request: a #TpChannelRequest having its object-path defined but
* is not guaranteed to be prepared.
*
@@ -1603,16 +1466,11 @@ dup_features_for_account (TpBaseClient *self,
{
GArray *features;
- features = tp_simple_client_factory_dup_account_features (self->priv->factory,
+ features = tp_client_factory_dup_account_features (self->priv->factory,
account);
g_assert (features != NULL);
- /* Deprecated - Merge features set on self instead of factory */
- _tp_quark_array_merge (features,
- (GQuark *) self->priv->account_features->data,
- self->priv->account_features->len);
-
return features;
}
@@ -1622,16 +1480,11 @@ dup_features_for_connection (TpBaseClient *self,
{
GArray *features;
- features = tp_simple_client_factory_dup_connection_features (
+ features = tp_client_factory_dup_connection_features (
self->priv->factory, connection);
g_assert (features != NULL);
- /* Deprecated - Merge features set on self instead of factory */
- _tp_quark_array_merge (features,
- (GQuark *) self->priv->connection_features->data,
- self->priv->connection_features->len);
-
return features;
}
@@ -1641,21 +1494,11 @@ dup_features_for_channel (TpBaseClient *self,
{
GArray *features;
- /* Use legacy channel factory if one is set */
- if (self->priv->channel_factory != NULL)
- features = tp_client_channel_factory_dup_channel_features (
- self->priv->channel_factory, channel);
- else
- features = tp_simple_client_factory_dup_channel_features (
- self->priv->factory, channel);
+ features = tp_client_factory_dup_channel_features (self->priv->factory,
+ channel);
g_assert (features != NULL);
- /* Deprecated - Merge features set on self instead of factory */
- _tp_quark_array_merge (features,
- (GQuark *) self->priv->channel_features->data,
- self->priv->channel_features->len);
-
return features;
}
@@ -1666,12 +1509,7 @@ ensure_channel (TpBaseClient *self,
GHashTable *chan_props,
GError **error)
{
- /* Use legacy channel factory if one is set */
- if (self->priv->channel_factory != NULL)
- return tp_client_channel_factory_create_channel (
- self->priv->channel_factory, connection, chan_path, chan_props, error);
-
- return tp_simple_client_factory_ensure_channel (self->priv->factory,
+ return tp_client_factory_ensure_channel (self->priv->factory,
connection, chan_path, chan_props, error);
}
@@ -1766,7 +1604,7 @@ _tp_base_client_observe_channels (TpSvcClientObserver *iface,
else
{
dispatch_operation =
- _tp_simple_client_factory_ensure_channel_dispatch_operation (
+ _tp_client_factory_ensure_channel_dispatch_operation (
self->priv->factory, dispatch_operation_path, NULL, &error);
if (dispatch_operation == NULL)
{
@@ -1782,7 +1620,7 @@ _tp_base_client_observe_channels (TpSvcClientObserver *iface,
const gchar *req_path = g_ptr_array_index (requests_arr, i);
TpChannelRequest *request;
- request = _tp_simple_client_factory_ensure_channel_request (
+ request = _tp_client_factory_ensure_channel_request (
self->priv->factory, req_path, NULL, &error);
if (request == NULL)
{
@@ -1985,7 +1823,7 @@ _tp_base_client_add_dispatch_operation (TpSvcClientApprover *iface,
}
dispatch_operation =
- _tp_simple_client_factory_ensure_channel_dispatch_operation (
+ _tp_client_factory_ensure_channel_dispatch_operation (
self->priv->factory, dispatch_operation_path, properties, &error);
if (dispatch_operation == NULL)
{
@@ -2140,7 +1978,7 @@ delegate_channels_if_needed (TpBaseClient *self,
continue;
should_delegate = tp_asv_get_boolean (hints,
- "org.freedesktop.Telepathy.ChannelRequest.DelegateToPreferredHandler",
+ "im.telepathy1.ChannelRequest.DelegateToPreferredHandler",
NULL);
if (!should_delegate)
@@ -2352,7 +2190,7 @@ _tp_base_client_handle_channels (TpSvcClientHandler *iface,
}
else
{
- request = _tp_simple_client_factory_ensure_channel_request (
+ request = _tp_client_factory_ensure_channel_request (
self->priv->factory, req_path, NULL, &error);
if (request == NULL)
{
@@ -2469,7 +2307,7 @@ _tp_base_client_add_request (TpSvcClientInterfaceRequests *iface,
channel_request_prepare_account_ctx *ctx;
GArray *account_features;
- request = _tp_simple_client_factory_ensure_channel_request (
+ request = _tp_client_factory_ensure_channel_request (
self->priv->factory, path, properties, &error);
if (request == NULL)
{
@@ -2670,31 +2508,6 @@ tp_base_client_get_dbus_daemon (TpBaseClient *self)
}
/**
- * tp_base_client_get_account_manager: (skip)
- * @self: a #TpBaseClient
- *
- * Return the #TpBaseClient:account-manager construct-only property, which
- * is the account manager used to look up or create #TpAccount objects.
- *
- * The returned object's reference count is not incremented, so it is not
- * necessarily valid after @self is destroyed.
- *
- * It is not guaranteed that any particular features are prepared on this
- * object; enable and wait for features with tp_proxy_prepare_async().
- *
- * Returns: (transfer none): the value of #TpBaseClient:account-manager
- * Since: 0.11.14
- * Deprecated: New code should not use this function, it may return %NULL in
- * the case @self was constructed with a #TpSimpleClientFactory.
- */
-TpAccountManager *
-tp_base_client_get_account_manager (TpBaseClient *self)
-{
- g_return_val_if_fail (TP_IS_BASE_CLIENT (self), NULL);
- return self->priv->account_mgr;
-}
-
-/**
* tp_base_client_implement_add_dispatch_operation: (skip)
* @klass: the #TpBaseClientClass of the object
* @impl: the #TpBaseClientClassAddDispatchOperationImpl function implementing
@@ -2795,227 +2608,6 @@ tp_base_client_unregister (TpBaseClient *self)
}
/**
- * tp_base_client_add_account_features_varargs: (skip)
- * @self: a client
- * @feature: the first feature
- * @...: the second and subsequent features, if any, ending with 0
- *
- * The same as tp_base_client_add_account_features(), but with a more
- * convenient calling convention from C.
- *
- * Since: 0.11.14
- * Deprecated: New code should use
- * tp_simple_client_factory_add_account_features_varargs() instead.
- */
-void
-tp_base_client_add_account_features_varargs (TpBaseClient *self,
- GQuark feature,
- ...)
-{
- va_list ap;
-
- g_return_if_fail (TP_IS_BASE_CLIENT (self));
- g_return_if_fail (!self->priv->registered);
-
- va_start (ap, feature);
- _tp_quark_array_merge_valist (self->priv->account_features, feature, ap);
- va_end (ap);
-}
-
-/**
- * tp_base_client_add_connection_features_varargs: (skip)
- * @self: a client
- * @feature: the first feature
- * @...: the second and subsequent features, if any, ending with 0
- *
- * The same as tp_base_client_add_connection_features(), but with a more
- * convenient calling convention from C.
- *
- * Since: 0.11.14
- * Deprecated: New code should use
- * tp_simple_client_factory_add_connection_features_varargs() instead.
- */
-void
-tp_base_client_add_connection_features_varargs (TpBaseClient *self,
- GQuark feature,
- ...)
-{
- va_list ap;
-
- g_return_if_fail (TP_IS_BASE_CLIENT (self));
- g_return_if_fail (!self->priv->registered);
-
- va_start (ap, feature);
- _tp_quark_array_merge_valist (self->priv->connection_features, feature, ap);
- va_end (ap);
-}
-
-/**
- * tp_base_client_add_channel_features_varargs: (skip)
- * @self: a client
- * @feature: the first feature
- * @...: the second and subsequent features, if any, ending with 0
- *
- * The same as tp_base_client_add_channel_features(), but with a more
- * convenient calling convention from C.
- *
- * Since: 0.11.14
- * Deprecated: New code should use
- * tp_simple_client_factory_add_channel_features_varargs() instead.
- */
-void
-tp_base_client_add_channel_features_varargs (TpBaseClient *self,
- GQuark feature,
- ...)
-{
- va_list ap;
-
- g_return_if_fail (TP_IS_BASE_CLIENT (self));
- g_return_if_fail (!self->priv->registered);
-
- va_start (ap, feature);
- _tp_quark_array_merge_valist (self->priv->channel_features, feature, ap);
- va_end (ap);
-}
-
-/**
- * tp_base_client_add_account_features:
- * @self: a client
- * @features: (array length=n): the features
- * @n: the number of features, or -1 if @features is 0-terminated
- *
- * Request that the given features are prepared on each #TpAccount (in
- * addition to %TP_ACCOUNT_FEATURE_CORE) before calling
- * #TpBaseClientClass.observe_channels,
- * #TpBaseClientClass.add_dispatch_operation or
- * #TpBaseClientClass.handle_channels, or emitting
- * #TpBaseClient::request-added.
- *
- * Since: 0.11.14
- * Deprecated: New code should use
- * tp_simple_client_factory_add_account_features() instead.
- */
-void
-tp_base_client_add_account_features (TpBaseClient *self,
- const GQuark *features,
- gssize n)
-{
- g_return_if_fail (TP_IS_BASE_CLIENT (self));
- g_return_if_fail (!self->priv->registered);
-
- _tp_quark_array_merge (self->priv->account_features, features, n);
-}
-
-
-/**
- * tp_base_client_add_channel_features:
- * @self: a client
- * @features: (array length=n): the features
- * @n: the number of features, or -1 if @features is 0-terminated
- *
- * Request that the given features are prepared on each #TpChannel (in
- * addition to %TP_CHANNEL_FEATURE_CORE) before calling
- * #TpBaseClientClass.observe_channels,
- * #TpBaseClientClass.add_dispatch_operation or
- * #TpBaseClientClass.handle_channels.
- *
- * Since: 0.11.14
- * Deprecated: New code should use
- * tp_simple_client_factory_add_channel_features() instead.
- */
-void
-tp_base_client_add_channel_features (TpBaseClient *self,
- const GQuark *features,
- gssize n)
-{
- g_return_if_fail (TP_IS_BASE_CLIENT (self));
- g_return_if_fail (!self->priv->registered);
-
- _tp_quark_array_merge (self->priv->channel_features, features, n);
-}
-
-/**
- * tp_base_client_add_connection_features:
- * @self: a client
- * @features: (array length=n): the features
- * @n: the number of features, or -1 if @features is 0-terminated
- *
- * Request that the given features are prepared on each #TpConnection (in
- * addition to %TP_CONNECTION_FEATURE_CORE) before calling
- * #TpBaseClientClass.observe_channels,
- * #TpBaseClientClass.add_dispatch_operation or
- * #TpBaseClientClass.handle_channels.
- *
- * Since: 0.11.14
- * Deprecated: New code should use
- * tp_simple_client_factory_add_connection_features() instead.
- */
-void
-tp_base_client_add_connection_features (TpBaseClient *self,
- const GQuark *features,
- gssize n)
-{
- g_return_if_fail (TP_IS_BASE_CLIENT (self));
- g_return_if_fail (!self->priv->registered);
-
- _tp_quark_array_merge (self->priv->connection_features, features, n);
-}
-
-/**
- * tp_base_client_set_channel_factory:
- * @self: a #TpBaseClient
- * @factory: an object implementing the #TpClientChannelFactoryInterface
- * interface
- *
- * Change the value of the #TpBaseClient:channel-factory property.
- * It can't be changed once @self has been registered.
- *
- * Since: 0.13.2
- * Deprecated: since 0.15.5. The factory is taken from
- * #TpBaseClient:account-manager.
- */
-void
-tp_base_client_set_channel_factory (TpBaseClient *self,
- TpClientChannelFactory *factory)
-{
- _tp_base_client_set_channel_factory (self, factory);
-}
-
-void
-_tp_base_client_set_channel_factory (TpBaseClient *self,
- TpClientChannelFactory *factory)
-{
- g_return_if_fail (TP_IS_BASE_CLIENT (self));
- g_return_if_fail (!self->priv->registered);
- g_return_if_fail (factory == NULL || TP_IS_CLIENT_CHANNEL_FACTORY (factory));
-
- tp_clear_object (&self->priv->channel_factory);
-
- if (factory != NULL)
- self->priv->channel_factory = g_object_ref (factory);
- g_object_notify (G_OBJECT (self), "channel-factory");
-}
-
-/**
- * tp_base_client_get_channel_factory: (skip)
- * @self: a #TpBaseClient
- *
- * Return the #TpBaseClient:channel-factory property.
- *
- * Returns: the value of #TpBaseClient:channel-factory
- * Since: 0.13.2
- * Deprecated: since 0.15.5. The factory is taken from
- * #TpBaseClient:account-manager.
- */
-TpClientChannelFactory *
-tp_base_client_get_channel_factory (TpBaseClient *self)
-{
- g_return_val_if_fail (TP_IS_BASE_CLIENT (self), NULL);
-
- return self->priv->channel_factory;
-}
-
-/**
* tp_base_client_is_handling_channel:
* @self: a #TpBaseClient
* @channel: a #TpChannel
@@ -3181,7 +2773,7 @@ delegate_channels_cb (TpChannelDispatcher *cd,
}
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
/**
@@ -3313,7 +2905,7 @@ tp_base_client_delegate_channels_finish (TpBaseClient *self,
* @destroy: called with the @user_data as argument, when @self is destroyed
*
* Turn on support for
- * the org.freedesktop.Telepathy.ChannelRequest.DelegateToPreferredHandler
+ * the im.telepathy1.ChannelRequest.DelegateToPreferredHandler
* hint.
*
* When receiving a request containing this hint, @self will automatically
diff --git a/telepathy-glib/base-client.h b/telepathy-glib/base-client.h
index 9550b4260..4d77ea5bb 100644
--- a/telepathy-glib/base-client.h
+++ b/telepathy-glib/base-client.h
@@ -25,9 +25,8 @@
#include <glib-object.h>
#include <telepathy-glib/account.h>
-#include <telepathy-glib/account-manager.h>
#include <telepathy-glib/add-dispatch-operation-context.h>
-#include <telepathy-glib/client-channel-factory.h>
+#include <telepathy-glib/channel.h>
#include <telepathy-glib/handle-channels-context.h>
#include <telepathy-glib/observe-channels-context.h>
#include <telepathy-glib/connection.h>
@@ -139,40 +138,6 @@ void tp_base_client_add_handler_capabilities (TpBaseClient *self,
void tp_base_client_add_handler_capabilities_varargs (TpBaseClient *self,
const gchar *first_token, ...) G_GNUC_NULL_TERMINATED;
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_add_account_features)
-void tp_base_client_add_account_features (TpBaseClient *self,
- const GQuark *features, gssize n);
-
-_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_add_account_features_varargs)
-void tp_base_client_add_account_features_varargs (TpBaseClient *self,
- GQuark feature, ...);
-
-_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_add_channel_features)
-void tp_base_client_add_channel_features (TpBaseClient *self,
- const GQuark *features, gssize n);
-
-_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_add_channel_features_varargs)
-void tp_base_client_add_channel_features_varargs (TpBaseClient *self,
- GQuark feature, ...);
-
-_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_add_connection_features)
-void tp_base_client_add_connection_features (TpBaseClient *self,
- const GQuark *features, gssize n);
-
-_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_add_connection_features_varargs)
-void tp_base_client_add_connection_features_varargs (TpBaseClient *self,
- GQuark feature, ...);
-
-_TP_DEPRECATED_IN_0_16
-void tp_base_client_set_channel_factory (TpBaseClient *self,
- TpClientChannelFactory *factory);
-
-_TP_DEPRECATED_IN_0_16
-TpClientChannelFactory *tp_base_client_get_channel_factory (
- TpBaseClient *self);
-#endif
-
typedef void (*TpBaseClientDelegatedChannelsCb) (
TpBaseClient *client,
GPtrArray *channels,
@@ -221,11 +186,6 @@ const gchar *tp_base_client_get_bus_name (TpBaseClient *self);
const gchar *tp_base_client_get_object_path (TpBaseClient *self);
TpDBusDaemon *tp_base_client_get_dbus_daemon (TpBaseClient *self);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_16
-TpAccountManager *tp_base_client_get_account_manager (TpBaseClient *self);
-#endif
-
void tp_base_client_unregister (TpBaseClient *self);
#define TP_TYPE_BASE_CLIENT \
diff --git a/telepathy-glib/base-connection-manager.c b/telepathy-glib/base-connection-manager.c
index 241f5117b..19ca1d4e0 100644
--- a/telepathy-glib/base-connection-manager.c
+++ b/telepathy-glib/base-connection-manager.c
@@ -39,6 +39,10 @@
#include <dbus/dbus-protocol.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/svc-connection-manager.h>
+#include <telepathy-glib/svc-generic.h>
#include <telepathy-glib/telepathy-glib.h>
#define DEBUG_FLAG TP_DEBUG_PARAMS
@@ -852,101 +856,11 @@ parse_parameters (const TpCMParamSpec *paramspec,
return TRUE;
}
-
-/*
- * tp_base_connection_manager_get_parameters:
- *
- * Implements D-Bus method GetParameters
- * on interface org.freedesktop.Telepathy.ConnectionManager
- */
-static void
-tp_base_connection_manager_get_parameters (TpSvcConnectionManager *iface,
- const gchar *proto,
- DBusGMethodInvocation *context)
-{
- GPtrArray *ret;
- GError *error = NULL;
- TpBaseConnectionManager *self = TP_BASE_CONNECTION_MANAGER (iface);
- guint i;
- TpBaseProtocol *protocol;
- const TpCMParamSpec *parameters;
-
- g_assert (TP_IS_BASE_CONNECTION_MANAGER (iface));
- /* a D-Bus method shouldn't be happening til we're on D-Bus */
- g_assert (self->priv->registered);
-
- protocol = tp_base_connection_manager_get_protocol (self, proto, &error);
-
- if (protocol == NULL)
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- parameters = tp_base_protocol_get_parameters (protocol);
- g_assert (parameters != NULL);
-
- ret = g_ptr_array_new ();
-
- for (i = 0; parameters[i].name != NULL; i++)
- {
- g_ptr_array_add (ret,
- _tp_cm_param_spec_to_dbus (parameters + i));
- }
-
- tp_svc_connection_manager_return_from_get_parameters (context, ret);
-
- for (i = 0; i < ret->len; i++)
- {
- g_value_array_free (g_ptr_array_index (ret, i));
- }
-
- g_ptr_array_unref (ret);
-}
-
-
-/*
- * tp_base_connection_manager_list_protocols:
- *
- * Implements D-Bus method ListProtocols
- * on interface org.freedesktop.Telepathy.ConnectionManager
- */
-static void
-tp_base_connection_manager_list_protocols (TpSvcConnectionManager *iface,
- DBusGMethodInvocation *context)
-{
- TpBaseConnectionManager *self = TP_BASE_CONNECTION_MANAGER (iface);
- GPtrArray *protocols;
- GHashTableIter iter;
- gpointer name;
-
- /* a D-Bus method shouldn't be happening til we're on D-Bus */
- g_assert (self->priv->registered);
-
- protocols = g_ptr_array_sized_new (
- g_hash_table_size (self->priv->protocols) + 1);
-
- g_hash_table_iter_init (&iter, self->priv->protocols);
-
- while (g_hash_table_iter_next (&iter, &name, NULL))
- {
- g_ptr_array_add (protocols, name);
- }
-
- g_ptr_array_add (protocols, NULL);
-
- tp_svc_connection_manager_return_from_list_protocols (
- context, (const gchar **) protocols->pdata);
- g_ptr_array_unref (protocols);
-}
-
-
-/*
- * tp_base_connection_manager_request_connection:
+/**
+ * tp_base_connection_manager_request_connection
*
* Implements D-Bus method RequestConnection
- * on interface org.freedesktop.Telepathy.ConnectionManager
+ * on interface im.telepathy1.ConnectionManager
*
* @error: Used to return a pointer to a GError detailing any error
* that occurred, D-Bus will throw the error only if this
@@ -1128,8 +1042,6 @@ service_iface_init (gpointer g_iface, gpointer iface_data)
#define IMPLEMENT(x) tp_svc_connection_manager_implement_##x (klass, \
tp_base_connection_manager_##x)
- IMPLEMENT(get_parameters);
- IMPLEMENT(list_protocols);
IMPLEMENT(request_connection);
#undef IMPLEMENT
}
diff --git a/telepathy-glib/base-connection-manager.h b/telepathy-glib/base-connection-manager.h
index 6fd8f305b..66e4602e6 100644
--- a/telepathy-glib/base-connection-manager.h
+++ b/telepathy-glib/base-connection-manager.h
@@ -29,7 +29,6 @@
#include <telepathy-glib/base-protocol.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/proxy.h>
-#include <telepathy-glib/svc-connection-manager.h>
G_BEGIN_DECLS
diff --git a/telepathy-glib/base-connection.c b/telepathy-glib/base-connection.c
index fe268fc8d..aee9e6755 100644
--- a/telepathy-glib/base-connection.c
+++ b/telepathy-glib/base-connection.c
@@ -26,7 +26,7 @@
* @see_also: #TpBaseConnectionManager, #TpSvcConnection
*
* This base class makes it easier to write #TpSvcConnection implementations
- * by managing connection status, channel factories and handle tracking.
+ * by managing connection status, channel managers and handle tracking.
* A subclass should often not need to implement any of the Connection
* methods itself.
*
@@ -86,18 +86,6 @@
*/
/**
- * TpBaseConnectionCreateChannelFactoriesImpl:
- * @self: The implementation, a subclass of TpBaseConnection
- *
- * Signature of an implementation of the create_channel_factories method
- * of #TpBaseConnection.
- *
- * Returns: (transfer full): a GPtrArray of objects implementing
- * #TpChannelFactoryIface which, between them, implement all channel types
- * this Connection supports.
- */
-
-/**
* TpBaseConnectionCreateChannelManagersImpl:
* @self: The implementation, a subclass of TpBaseConnection
*
@@ -128,10 +116,6 @@
* given array for all those handle types this Connection supports.
* Must be set by subclasses to a non-%NULL value; the function must create
* at least a CONTACT handle repository (failing to do so will cause a crash).
- * @create_channel_factories: Create an array of channel factories for this
- * Connection. At least one of this or @create_channel_managers must be set by
- * subclasses to a non-%NULL value; in new code, setting this to %NULL and
- * using channel managers exclusively is recommended.
* @get_unique_connection_name: Construct a unique name for this connection
* (for example using the protocol's format for usernames). If %NULL (the
* default), a unique name will be generated. Subclasses should usually
@@ -156,10 +140,12 @@
* by subclasses. The default is to list no additional interfaces.
* Individual instances may detect which additional interfaces they support
* and signal them before going to state CONNECTED by calling
+ * tp_base_connection_add_interfaces(). Note that subclasses override this
+ * value; so if you're doing a sub-subclass of TpBaseConnection, you should use
* tp_base_connection_add_interfaces().
* @create_channel_managers: Create an array of channel managers for this
- * Connection. At least one of this or @create_channel_factories must be set
- * by subclasses to a non-%NULL value. Since: 0.7.15
+ * Connection. This must be set by subclasses to a non-%NULL
+ * value. Since: 0.7.15
*
* The class of a #TpBaseConnection. Many members are virtual methods etc.
* to be filled in in the subclass' class_init function.
@@ -195,7 +181,8 @@
* property is set directly, the connection must ensure it holds a reference
* to the handle. Changing this property directly having moved to state
* CONNECTED is very strongly discouraged, as this will prevent the
- * SelfHandleChanged signal being emitted.
+ * SelfContactChanged signal being emitted.
+ * @self_id: The result of inspecting @self_handle.
*
* Data structure representing a generic #TpSvcConnection implementation.
*
@@ -236,7 +223,6 @@
#include <dbus/dbus-glib-lowlevel.h>
-#include <telepathy-glib/channel-factory-iface.h>
#include <telepathy-glib/channel-manager.h>
#include <telepathy-glib/connection-manager.h>
#include <telepathy-glib/contacts-mixin.h>
@@ -246,6 +232,7 @@
#include <telepathy-glib/exportable-channel.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/svc-connection.h>
#include <telepathy-glib/svc-generic.h>
#include <telepathy-glib/util.h>
@@ -269,10 +256,10 @@ enum
{
PROP_PROTOCOL = 1,
PROP_SELF_HANDLE,
+ PROP_SELF_ID,
PROP_INTERFACES,
PROP_DBUS_STATUS,
PROP_DBUS_DAEMON,
- PROP_HAS_IMMORTAL_HANDLES,
N_PROPS
};
@@ -291,7 +278,6 @@ static guint signals[N_SIGNALS] = {0};
typedef struct _ChannelRequest ChannelRequest;
typedef enum {
- METHOD_REQUEST_CHANNEL,
METHOD_CREATE_CHANNEL,
METHOD_ENSURE_CHANNEL,
NUM_METHODS
@@ -305,8 +291,6 @@ struct _ChannelRequest
gchar *channel_type;
guint handle_type;
guint handle;
- /* always TRUE for CREATE; always FALSE for ENSURE */
- unsigned suppress_handler : 1;
/* only meaningful for METHOD_ENSURE_CHANNEL; only true if this is the first
* request to be satisfied with a particular channel, and no other request
@@ -320,8 +304,7 @@ channel_request_new (DBusGMethodInvocation *context,
ChannelRequestMethod method,
const char *channel_type,
guint handle_type,
- guint handle,
- gboolean suppress_handler)
+ guint handle)
{
ChannelRequest *ret;
@@ -335,11 +318,10 @@ channel_request_new (DBusGMethodInvocation *context,
ret->channel_type = g_strdup (channel_type);
ret->handle_type = handle_type;
ret->handle = handle;
- ret->suppress_handler = suppress_handler;
ret->yours = FALSE;
- DEBUG("New channel request at %p: ctype=%s htype=%d handle=%d suppress=%d",
- ret, channel_type, handle_type, handle, suppress_handler);
+ DEBUG("New channel request at %p: ctype=%s htype=%d handle=%d",
+ ret, channel_type, handle_type, handle);
return ret;
}
@@ -348,9 +330,9 @@ static void
channel_request_free (ChannelRequest *request)
{
g_assert (NULL == request->context);
- DEBUG("Freeing channel request at %p: ctype=%s htype=%d handle=%d "
- "suppress=%d", request, request->channel_type, request->handle_type,
- request->handle, request->suppress_handler);
+ DEBUG("Freeing channel request at %p: ctype=%s htype=%d handle=%d",
+ request, request->channel_type, request->handle_type,
+ request->handle);
g_free (request->channel_type);
g_slice_free (ChannelRequest, request);
}
@@ -378,8 +360,6 @@ struct _TpBaseConnectionPrivate
/* if TRUE, the object has gone away */
gboolean dispose_has_run;
- /* array of (TpChannelFactoryIface *) */
- GPtrArray *channel_factories;
/* array of (TpChannelManager *) */
GPtrArray *channel_managers;
/* array of (ChannelRequest *) */
@@ -462,6 +442,10 @@ tp_base_connection_get_property (GObject *object,
g_value_set_uint (value, self->self_handle);
break;
+ case PROP_SELF_ID:
+ g_value_set_string (value, self->self_id);
+ break;
+
case PROP_INTERFACES:
g_value_set_boxed (value, tp_base_connection_get_interfaces (self));
break;
@@ -474,10 +458,6 @@ tp_base_connection_get_property (GObject *object,
g_value_set_object (value, self->priv->bus_proxy);
break;
- case PROP_HAS_IMMORTAL_HANDLES:
- g_value_set_boolean (value, TRUE);
- break;
-
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -501,19 +481,7 @@ tp_base_connection_set_property (GObject *object,
break;
case PROP_SELF_HANDLE:
- {
- TpHandle new_self_handle = g_value_get_uint (value);
-
- if (self->status == TP_CONNECTION_STATUS_CONNECTED)
- g_return_if_fail (new_self_handle != 0);
-
- if (self->self_handle == new_self_handle)
- return;
-
- self->self_handle = new_self_handle;
-
- tp_svc_connection_emit_self_handle_changed (self, self->self_handle);
- }
+ tp_base_connection_set_self_handle (self, g_value_get_uint (value));
break;
case PROP_DBUS_DAEMON:
@@ -589,10 +557,6 @@ tp_base_connection_dispose (GObject *object)
tp_clear_object (&priv->bus_proxy);
- g_ptr_array_foreach (priv->channel_factories, (GFunc) g_object_unref, NULL);
- g_ptr_array_unref (priv->channel_factories);
- priv->channel_factories = NULL;
-
g_ptr_array_foreach (priv->channel_managers, (GFunc) g_object_unref, NULL);
g_ptr_array_unref (priv->channel_managers);
priv->channel_managers = NULL;
@@ -631,82 +595,6 @@ tp_base_connection_finalize (GObject *object)
G_OBJECT_CLASS (tp_base_connection_parent_class)->finalize (object);
}
-
-/**
- * exportable_channel_get_old_info:
- * @channel: a channel
- * @object_path_out: address at which to store the channel's object path,
- * which the caller should g_free()
- * @channel_type_out: address at which to store the channel's type, which the
- * caller should g_free()
- * @handle_type_out: address at which to store the channel's associated handle
- * type
- * @handle_out: address at which to store the channel's associated
- * handle, if any. This is a borrowed reference; the caller
- * does not need to tp_handle_unref() it.
- *
- * Given a new-style exportable channel, as used by the Requests interface's
- * API, fetches the information needed for the old-style ListChannels method
- * on Connections.
- */
-static void
-exportable_channel_get_old_info (TpExportableChannel *channel,
- gchar **object_path_out,
- gchar **channel_type_out,
- guint *handle_type_out,
- guint *handle_out)
-{
- gchar *object_path;
- GHashTable *channel_properties;
- gboolean valid;
-
- g_object_get (channel,
- "object-path", &object_path,
- "channel-properties", &channel_properties,
- NULL);
-
- g_assert (object_path != NULL);
- g_assert (tp_dbus_check_valid_object_path (object_path, NULL));
-
- if (object_path_out != NULL)
- *object_path_out = object_path;
- else
- g_free (object_path);
-
- if (channel_type_out != NULL)
- {
- *channel_type_out = g_strdup (tp_asv_get_string (channel_properties,
- TP_PROP_CHANNEL_CHANNEL_TYPE));
- g_assert (*channel_type_out != NULL);
- g_assert (tp_dbus_check_valid_interface_name (*channel_type_out, NULL));
- }
-
- if (handle_type_out != NULL)
- {
- *handle_type_out = tp_asv_get_uint32 (channel_properties,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, &valid);
- g_assert (valid);
- }
-
- if (handle_out != NULL)
- {
- *handle_out = tp_asv_get_uint32 (channel_properties,
- TP_PROP_CHANNEL_TARGET_HANDLE, &valid);
- g_assert (valid);
-
- if (handle_type_out != NULL)
- {
- if (*handle_type_out == TP_HANDLE_TYPE_NONE)
- g_assert (*handle_out == 0);
- else
- g_assert (*handle_out != 0);
- }
- }
-
- g_hash_table_unref (channel_properties);
-}
-
-
/*
* get_channel_details:
* @obj: a channel, which must implement one of #TpExportableChannel and
@@ -733,31 +621,11 @@ get_channel_details (GObject *obj)
g_value_take_boxed (value, object_path);
object_path = NULL;
- g_assert (TP_IS_EXPORTABLE_CHANNEL (obj) || TP_IS_CHANNEL_IFACE (obj));
-
- if (TP_IS_EXPORTABLE_CHANNEL (obj))
- {
- g_object_get (obj,
- "channel-properties", &table,
- NULL);
- }
- else
- {
- table = g_hash_table_new_full (g_str_hash, g_str_equal,
- NULL, (GDestroyNotify) tp_g_value_slice_free);
+ g_assert (TP_IS_EXPORTABLE_CHANNEL (obj));
- value = tp_g_value_slice_new (G_TYPE_UINT);
- g_object_get_property (obj, "handle", value);
- g_hash_table_insert (table, TP_PROP_CHANNEL_TARGET_HANDLE, value);
-
- value = tp_g_value_slice_new (G_TYPE_UINT);
- g_object_get_property (obj, "handle-type", value);
- g_hash_table_insert (table, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, value);
-
- value = tp_g_value_slice_new (G_TYPE_STRING);
- g_object_get_property (obj, "channel-type", value);
- g_hash_table_insert (table, TP_PROP_CHANNEL_CHANNEL_TYPE, value);
- }
+ g_object_get (obj,
+ "channel-properties", &table,
+ NULL);
g_value_array_append (structure, NULL);
value = g_value_array_get_nth (structure, 1);
@@ -767,75 +635,6 @@ get_channel_details (GObject *obj)
return structure;
}
-
-static GPtrArray *
-find_matching_channel_requests (TpBaseConnection *conn,
- const gchar *channel_type,
- guint handle_type,
- guint handle,
- ChannelRequest *channel_request,
- gboolean *suppress_handler)
-{
- TpBaseConnectionPrivate *priv = conn->priv;
- GPtrArray *requests;
- guint i;
-
- requests = g_ptr_array_sized_new (1);
-
- if (handle_type == 0)
- {
- /* It's an anonymous channel, which can only satisfy the request for
- * which it was created (or if it's returned as EXISTING, it can only
- * satisfy the request for which it was returned as EXISTING).
- */
- g_assert (handle == 0);
- g_assert (channel_request == NULL ||
- tp_g_ptr_array_contains (priv->channel_requests, channel_request));
-
- if (channel_request)
- {
- g_ptr_array_add (requests, channel_request);
-
- if (suppress_handler && channel_request->suppress_handler)
- *suppress_handler = TRUE;
- }
-
- /* whether we've put any matches in requests or not */
- return requests;
- }
-
- /* for identifiable channels (those which are to a particular handle),
- * satisfy any queued requests.
- */
- for (i = 0; i < priv->channel_requests->len; i++)
- {
- ChannelRequest *request = g_ptr_array_index (priv->channel_requests, i);
-
- if (tp_strdiff (request->channel_type, channel_type))
- continue;
-
- if (handle_type != request->handle_type)
- continue;
-
- if (handle != request->handle)
- continue;
-
- if (request->suppress_handler && suppress_handler)
- *suppress_handler = TRUE;
-
- g_ptr_array_add (requests, request);
- }
-
- /* if this channel was created or returned as a result of a particular
- * request, that request had better be among the matching ones in the queue
- */
- g_assert (channel_request == NULL ||
- tp_g_ptr_array_contains (requests, channel_request));
-
- return requests;
-}
-
-
static void
satisfy_request (TpBaseConnection *conn,
ChannelRequest *request,
@@ -846,16 +645,11 @@ satisfy_request (TpBaseConnection *conn,
DEBUG ("completing queued request %p with success, "
"channel_type=%s, handle_type=%u, "
- "handle=%u, suppress_handler=%u", request, request->channel_type,
- request->handle_type, request->handle, request->suppress_handler);
+ "handle=%u", request, request->channel_type,
+ request->handle_type, request->handle);
switch (request->method)
{
- case METHOD_REQUEST_CHANNEL:
- tp_svc_connection_return_from_request_channel (request->context,
- object_path);
- break;
-
case METHOD_CREATE_CHANNEL:
{
GHashTable *properties;
@@ -894,57 +688,6 @@ satisfy_request (TpBaseConnection *conn,
channel_request_free (request);
}
-
-static void
-factory_satisfy_requests (TpBaseConnection *conn,
- TpChannelFactoryIface *factory,
- TpChannelIface *chan,
- ChannelRequest *channel_request,
- gboolean is_new)
-{
- gchar *object_path = NULL, *channel_type = NULL;
- guint handle_type = 0, handle = 0;
- gboolean suppress_handler = FALSE;
- GPtrArray *tmp;
- guint i;
-
- g_object_get (chan,
- "object-path", &object_path,
- "channel-type", &channel_type,
- "handle-type", &handle_type,
- "handle", &handle,
- NULL);
-
- DEBUG ("called for %s", object_path);
-
- tmp = find_matching_channel_requests (conn, channel_type, handle_type,
- handle, channel_request,
- &suppress_handler);
-
- for (i = 0; i < tmp->len; i++)
- satisfy_request (conn, g_ptr_array_index (tmp, i), G_OBJECT (chan),
- object_path);
-
- if (is_new)
- {
- GPtrArray *array = g_ptr_array_sized_new (1);
-
- g_ptr_array_add (array, get_channel_details (G_OBJECT (chan)));
- tp_svc_connection_interface_requests_emit_new_channels (conn, array);
- g_value_array_free (g_ptr_array_index (array, 0));
- g_ptr_array_unref (array);
-
- tp_svc_connection_emit_new_channel (conn, object_path, channel_type,
- handle_type, handle, suppress_handler);
- }
-
- g_ptr_array_unref (tmp);
-
- g_free (object_path);
- g_free (channel_type);
-}
-
-
static void
fail_channel_request (TpBaseConnection *conn,
ChannelRequest *request,
@@ -953,9 +696,9 @@ fail_channel_request (TpBaseConnection *conn,
TpBaseConnectionPrivate *priv = conn->priv;
DEBUG ("completing queued request %p with error, channel_type=%s, "
- "handle_type=%u, handle=%u, suppress_handler=%u",
+ "handle_type=%u, handle=%u",
request, request->channel_type,
- request->handle_type, request->handle, request->suppress_handler);
+ request->handle_type, request->handle);
dbus_g_method_return_error (request->context, error);
request->context = NULL;
@@ -965,82 +708,8 @@ fail_channel_request (TpBaseConnection *conn,
channel_request_free (request);
}
-
-/* Channel factory signal handlers */
-
-static void
-factory_channel_closed_cb (GObject *channel,
- TpBaseConnection *conn)
-{
- gchar *object_path;
-
- g_object_get (channel,
- "object-path", &object_path,
- NULL);
-
- tp_svc_connection_interface_requests_emit_channel_closed (conn,
- object_path);
-
- g_free (object_path);
-}
-
-static void
-factory_new_channel_cb (TpChannelFactoryIface *factory,
- GObject *chan,
- ChannelRequest *channel_request,
- gpointer data)
-{
- factory_satisfy_requests (TP_BASE_CONNECTION (data), factory,
- TP_CHANNEL_IFACE (chan), channel_request, TRUE);
-
- g_signal_connect (chan, "closed", (GCallback) factory_channel_closed_cb,
- data);
-}
-
-
-static void
-factory_channel_error_cb (TpChannelFactoryIface *factory,
- GObject *chan,
- GError *error,
- ChannelRequest *channel_request,
- gpointer data)
-{
- TpBaseConnection *conn = TP_BASE_CONNECTION (data);
- gchar *channel_type = NULL;
- guint handle_type = 0, handle = 0;
- GPtrArray *tmp;
- guint i;
-
- DEBUG ("channel_type=%s, handle_type=%u, handle=%u, error_code=%u, "
- "error_message=\"%s\"", channel_type, handle_type, handle,
- error->code, error->message);
-
- g_object_get (chan,
- "channel-type", &channel_type,
- "handle-type", &handle_type,
- "handle", &handle,
- NULL);
-
- tmp = find_matching_channel_requests (conn, channel_type, handle_type,
- handle, channel_request, NULL);
-
- for (i = 0; i < tmp->len; i++)
- fail_channel_request (conn, g_ptr_array_index (tmp, i), error);
-
- g_ptr_array_unref (tmp);
- g_free (channel_type);
-}
-
-
/* Channel manager signal handlers */
-typedef struct {
- TpBaseConnection *self;
- /* borrowed TpExportableChannel => itself if suppress_handler,
- * omitted otherwise */
- GHashTable *suppress_handler;
-} ManagerNewChannelContext;
-
static void
manager_new_channel (gpointer key,
gpointer value,
@@ -1048,46 +717,22 @@ manager_new_channel (gpointer key,
{
TpExportableChannel *channel = TP_EXPORTABLE_CHANNEL (key);
GSList *request_tokens = value;
- ManagerNewChannelContext *context = data;
- TpBaseConnection *self = TP_BASE_CONNECTION (context->self);
+ TpBaseConnection *self = TP_BASE_CONNECTION (data);
gchar *object_path;
GSList *iter;
- gboolean suppress_handler = FALSE;
gboolean satisfies_create_channel = FALSE;
- gboolean satisfies_request_channel = FALSE;
ChannelRequest *first_ensure = NULL;
g_object_get (channel,
"object-path", &object_path,
NULL);
- /* suppress_handler on Connection.NewChannel should be TRUE if:
- * - any satisfied requests were calls to CreateChannel; or
- * - at least one satisfied RequestChannel call had suppress_handler=TRUE;
- * or
- * - any EnsureChannel call will receive Yours=TRUE (that is, if the
- * channel satisfies no CreateChannel or RequestChannel calls).
- *
- * So, it should be FALSE if:
- * - all the requests were RequestChannel(..., suppress_handler=FALSE) or
- * EnsureChannel and there was at least one RequestChannel; or
- * - no requests were satisfied by the channel.
- */
for (iter = request_tokens; iter != NULL; iter = iter->next)
{
ChannelRequest *request = iter->data;
switch (request->method)
{
- case METHOD_REQUEST_CHANNEL:
- satisfies_request_channel = TRUE;
- if (request->suppress_handler)
- {
- suppress_handler = TRUE;
- goto break_loop_early;
- }
- break;
-
case METHOD_CREATE_CHANNEL:
satisfies_create_channel = TRUE;
goto break_loop_early;
@@ -1103,29 +748,17 @@ manager_new_channel (gpointer key,
}
}
-break_loop_early:
-
- /* put the channel in the suppress_handler hash table if it needs
- * suppress_handler set when signalling NewChannel */
- if (request_tokens != NULL &&
- (satisfies_create_channel || !satisfies_request_channel))
- suppress_handler = TRUE;
-
- if (suppress_handler)
- g_hash_table_insert (context->suppress_handler, channel, channel);
+break_loop_early:
/* If the only type of request satisfied by this new channel is
* EnsureChannel, give exactly one request Yours=True.
* If other kinds of requests are involved, don't give anyone Yours=True.
*/
- if (!satisfies_request_channel
- && !satisfies_create_channel
- && first_ensure != NULL)
+ if (!satisfies_create_channel && first_ensure != NULL)
{
first_ensure->yours = TRUE;
}
-
for (iter = request_tokens; iter != NULL; iter = iter->next)
{
satisfy_request (self, iter->data, G_OBJECT (channel),
@@ -1142,17 +775,14 @@ manager_new_channels_cb (TpChannelManager *manager,
TpBaseConnection *self)
{
GPtrArray *array;
- ManagerNewChannelContext context = { self, g_hash_table_new (NULL, NULL) };
GHashTableIter iter;
gpointer key, value;
g_assert (TP_IS_CHANNEL_MANAGER (manager));
g_assert (TP_IS_BASE_CONNECTION (self));
- /* satisfy the RequestChannel/CreateChannel/EnsureChannel calls; as
- * a side-effect, fill in context.suppress_handler with those channels
- * that will have to be signalled with suppress_handler = TRUE */
- g_hash_table_foreach (channels, manager_new_channel, &context);
+ /* satisfy the RequestChannel/CreateChannel/EnsureChannel calls */
+ g_hash_table_foreach (channels, manager_new_channel, self);
/* Emit NewChannels */
array = g_ptr_array_sized_new (g_hash_table_size (channels));
@@ -1168,28 +798,6 @@ manager_new_channels_cb (TpChannelManager *manager,
g_ptr_array_foreach (array, (GFunc) g_value_array_free, NULL);
g_ptr_array_unref (array);
-
- /* Emit NewChannel */
- g_hash_table_iter_init (&iter, channels);
-
- while (g_hash_table_iter_next (&iter, &key, &value))
- {
- gboolean suppress_handler = (
- g_hash_table_lookup (context.suppress_handler, key) != NULL);
- gchar *object_path, *channel_type;
- guint handle_type, handle;
-
- exportable_channel_get_old_info (TP_EXPORTABLE_CHANNEL (key),
- &object_path, &channel_type, &handle_type, &handle);
-
- tp_svc_connection_emit_new_channel (self, object_path, channel_type,
- handle_type, handle, suppress_handler);
-
- g_free (object_path);
- g_free (channel_type);
- }
-
- g_hash_table_unref (context.suppress_handler);
}
@@ -1278,8 +886,7 @@ tp_base_connection_constructor (GType type, guint n_construct_properties,
TpBaseConnectionClass *cls = TP_BASE_CONNECTION_GET_CLASS (self);
g_assert (cls->create_handle_repos != NULL);
- g_assert (cls->create_channel_factories != NULL ||
- cls->create_channel_managers != NULL);
+ g_assert (cls->create_channel_managers != NULL);
g_assert (cls->shut_down != NULL);
g_assert (cls->start_connecting != NULL);
@@ -1292,25 +899,11 @@ tp_base_connection_constructor (GType type, guint n_construct_properties,
/* a connection that doesn't support contacts is no use to anyone */
g_assert (priv->handles[TP_HANDLE_TYPE_CONTACT] != NULL);
- if (cls->create_channel_factories != NULL)
- priv->channel_factories = cls->create_channel_factories (self);
- else
- priv->channel_factories = g_ptr_array_sized_new (0);
-
if (cls->create_channel_managers != NULL)
priv->channel_managers = cls->create_channel_managers (self);
else
priv->channel_managers = g_ptr_array_sized_new (0);
- for (i = 0; i < priv->channel_factories->len; i++)
- {
- GObject *factory = g_ptr_array_index (priv->channel_factories, i);
- g_signal_connect (factory, "new-channel", G_CALLBACK
- (factory_new_channel_cb), self);
- g_signal_connect (factory, "channel-error", G_CALLBACK
- (factory_channel_error_cb), self);
- }
-
for (i = 0; i < priv->channel_managers->len; i++)
{
TpChannelManager *manager = TP_CHANNEL_MANAGER (
@@ -1363,16 +956,6 @@ tp_base_connection_add_possible_client_interest (TpBaseConnection *self,
/* D-Bus properties for the Requests interface */
static void
-factory_get_channel_details_foreach (TpChannelIface *chan,
- gpointer data)
-{
- GPtrArray *details = data;
-
- g_ptr_array_add (details, get_channel_details (G_OBJECT (chan)));
-}
-
-
-static void
manager_get_channel_details_foreach (TpExportableChannel *chan,
gpointer data)
{
@@ -1386,23 +969,10 @@ static GPtrArray *
conn_requests_get_channel_details (TpBaseConnection *self)
{
TpBaseConnectionPrivate *priv = self->priv;
- /* guess that each ChannelManager and each ChannelFactory has two
- * channels, on average */
- GPtrArray *details = g_ptr_array_sized_new (priv->channel_managers->len * 2
- + priv->channel_factories->len * 2);
+ /* guess that each ChannelManager has two channels, on average */
+ GPtrArray *details = g_ptr_array_sized_new (priv->channel_managers->len * 2);
guint i;
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- for (i = 0; i < priv->channel_factories->len; i++)
- {
- TpChannelFactoryIface *factory = TP_CHANNEL_FACTORY_IFACE (
- g_ptr_array_index (priv->channel_factories, i));
-
- tp_channel_factory_iface_foreach (factory,
- factory_get_channel_details_foreach, details);
- }
- G_GNUC_END_IGNORE_DEPRECATIONS
-
for (i = 0; i < priv->channel_managers->len; i++)
{
TpChannelManager *manager = TP_CHANNEL_MANAGER (
@@ -1492,9 +1062,9 @@ tp_base_connection_class_init (TpBaseConnectionClass *klass)
{
static TpDBusPropertiesMixinPropImpl connection_properties[] = {
{ "SelfHandle", "self-handle", NULL },
+ { "SelfID", "self-id", NULL },
{ "Status", "dbus-status", NULL },
{ "Interfaces", "interfaces", NULL },
- { "HasImmortalHandles", "has-immortal-handles", NULL },
{ NULL }
};
static TpDBusPropertiesMixinPropImpl requests_properties[] = {
@@ -1541,6 +1111,21 @@ tp_base_connection_class_init (TpBaseConnectionClass *klass)
g_object_class_install_property (object_class, PROP_SELF_HANDLE, param_spec);
/**
+ * TpBaseConnection:self-id: (skip)
+ *
+ * The identifier representing the local user. This is the result of
+ * inspecting #TpBaseConnection:self-handle.
+ *
+ * Since: 0.UNRELEASED
+ */
+ param_spec = g_param_spec_string ("self-id",
+ "Connection.SelfID",
+ "The identifier representing the local user.",
+ "",
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+ g_object_class_install_property (object_class, PROP_SELF_ID, param_spec);
+
+ /**
* TpBaseConnection:interfaces: (skip)
*
* The set of D-Bus interfaces available on this Connection, other than
@@ -1594,21 +1179,6 @@ tp_base_connection_class_init (TpBaseConnectionClass *klass)
"The D-Bus daemon used by this object", TP_TYPE_DBUS_DAEMON,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
- /**
- * TpBaseConnection:has-immortal-handles:
- *
- * This property is not useful to use directly. Its value is %TRUE, to
- * indicate that this version of telepathy-glib never unreferences handles
- * until the connection becomes disconnected.
- *
- * Since: 0.13.8
- */
- param_spec = g_param_spec_boolean ("has-immortal-handles",
- "Connection.HasImmortalHandles",
- "Always TRUE", TRUE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_HAS_IMMORTAL_HANDLES,
- param_spec);
-
/* signal definitions */
/**
@@ -1640,7 +1210,7 @@ tp_base_connection_class_init (TpBaseConnectionClass *klass)
* The "signal detail" is a GQuark representing @token. Modules implementing
* an interface (Location, say) should typically connect to a detailed signal
* like
- * "clients-interested::org.freedesktop.Telepathy.Connection.Interface.Location"
+ * "clients-interested::im.telepathy1.Connection.Interface.Location"
* rather than receiving all emissions of this signal.
*/
signals[CLIENTS_INTERESTED] =
@@ -1664,7 +1234,7 @@ tp_base_connection_class_init (TpBaseConnectionClass *klass)
* As with #TpBaseConnection::clients-interested, the "signal detail" is a
* GQuark representing @token. Modules implementing an interface (Location,
* say) should typically connect to a detailed signal like
- * "clients-uninterested::org.freedesktop.Telepathy.Connection.Interface.Location"
+ * "clients-uninterested::im.telepathy1.Connection.Interface.Location"
* rather than receiving all emissions of this signal.
*/
signals[CLIENTS_UNINTERESTED] =
@@ -1848,23 +1418,6 @@ tp_base_connection_register (TpBaseConnection *self,
return TRUE;
}
-static void
-tp_base_connection_close_all_channels (TpBaseConnection *self)
-{
- TpBaseConnectionPrivate *priv = self->priv;
-
- /* We deliberately don't iterate over channel managers here -
- * they don't need this, and are expected to listen to
- * TpSvcConnection::status-changed on the connection for themselves.
- */
-
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- /* trigger close_all on all channel factories */
- g_ptr_array_foreach (priv->channel_factories, (GFunc)
- tp_channel_factory_iface_close_all, NULL);
- G_GNUC_END_IGNORE_DEPRECATIONS
-}
-
/* D-Bus methods on Connection interface ----------------------------*/
static inline TpConnectionStatusReason
@@ -2010,45 +1563,6 @@ tp_base_connection_get_interfaces (TpBaseConnection *self)
}
}
-static void
-tp_base_connection_dbus_get_interfaces (TpSvcConnection *iface,
- DBusGMethodInvocation *context)
-{
- tp_svc_connection_return_from_get_interfaces (context,
- (const gchar **) tp_base_connection_get_interfaces (
- (TpBaseConnection *) iface));
-}
-
-static void
-tp_base_connection_get_protocol (TpSvcConnection *iface,
- DBusGMethodInvocation *context)
-{
- TpBaseConnection *self = TP_BASE_CONNECTION (iface);
- TpBaseConnectionPrivate *priv;
-
- g_assert (TP_IS_BASE_CONNECTION (self));
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (self, context);
-
- priv = self->priv;
-
- tp_svc_connection_return_from_get_protocol (context, priv->protocol);
-}
-
-static void
-tp_base_connection_dbus_get_self_handle (TpSvcConnection *iface,
- DBusGMethodInvocation *context)
-{
- TpBaseConnection *self = TP_BASE_CONNECTION (iface);
-
- g_assert (TP_IS_BASE_CONNECTION (self));
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (self, context);
-
- tp_svc_connection_return_from_get_self_handle (
- context, self->self_handle);
-}
-
static guint
tp_base_connection_get_dbus_status (TpBaseConnection *self)
{
@@ -2066,42 +1580,6 @@ tp_base_connection_get_dbus_status (TpBaseConnection *self)
}
static void
-tp_base_connection_dbus_get_status (TpSvcConnection *iface,
- DBusGMethodInvocation *context)
-{
- tp_svc_connection_return_from_get_status (
- context, tp_base_connection_get_dbus_status (
- (TpBaseConnection *) iface));
-}
-
-static void
-tp_base_connection_hold_handles (TpSvcConnection *iface,
- guint handle_type,
- const GArray *handles,
- DBusGMethodInvocation *context)
-{
- TpBaseConnection *self = TP_BASE_CONNECTION (iface);
- TpBaseConnectionPrivate *priv;
- GError *error = NULL;
-
- g_assert (TP_IS_BASE_CONNECTION (self));
-
- priv = self->priv;
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (self, context);
-
- if (!tp_handles_supported_and_valid (priv->handles,
- handle_type, handles, FALSE, &error))
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- tp_svc_connection_return_from_hold_handles (context);
-}
-
-static void
tp_base_connection_inspect_handles (TpSvcConnection *iface,
guint handle_type,
const GArray *handles,
@@ -2148,383 +1626,7 @@ tp_base_connection_inspect_handles (TpSvcConnection *iface,
g_free (ret);
}
-/*
- * list_channel_factory_foreach_one:
- * @chan: a channel
- * @data: a GPtrArray in which channel information should be stored
- *
- * Called by the exported ListChannels function for each channel in a channel
- * factory, this should add to the GPtrArray (in the data pointer) a
- * GValueArray containing the following:
- * a D-Bus object path for the channel object on this service
- * a D-Bus interface name representing the channel type
- * an integer representing the handle type this channel communicates with,
- * or zero
- * an integer handle representing the contact, room or list this channel
- * communicates with, or zero
- */
-static void
-list_channel_factory_foreach_one (TpChannelIface *chan,
- gpointer data)
-{
- GObject *channel = G_OBJECT (chan);
- GPtrArray *values = (GPtrArray *) data;
- gchar *path, *type;
- guint handle_type, handle;
- GValue *entry = tp_dbus_specialized_value_slice_new
- (TP_STRUCT_TYPE_CHANNEL_INFO);
-
- g_object_get (channel,
- "object-path", &path,
- "channel-type", &type,
- "handle-type", &handle_type,
- "handle", &handle,
- NULL);
-
- dbus_g_type_struct_set (entry,
- 0, path,
- 1, type,
- 2, handle_type,
- 3, handle,
- G_MAXUINT);
-
- g_ptr_array_add (values, entry);
-
- g_free (path);
- g_free (type);
-}
-
-
-/*
- * list_channel_manager_foreach_one:
- * @chan: a channel
- * @data: a GPtrArray in which channel information should be stored
- *
- * Called by the exported ListChannels function for each channel in a channel
- * manager, this should add to the GPtrArray (in the data pointer) a
- * GValueArray containing the following:
- * a D-Bus object path for the channel object on this service
- * a D-Bus interface name representing the channel type
- * an integer representing the handle type this channel communicates with,
- * or zero
- * an integer handle representing the contact, room or list this channel
- * communicates with, or zero
- */
-static void
-list_channel_manager_foreach_one (TpExportableChannel *channel,
- gpointer data)
-{
- GPtrArray *values = (GPtrArray *) data;
- gchar *path, *type;
- guint handle_type, handle;
- GValue *entry = tp_dbus_specialized_value_slice_new
- (TP_STRUCT_TYPE_CHANNEL_INFO);
-
- g_assert (TP_IS_EXPORTABLE_CHANNEL (channel));
-
- exportable_channel_get_old_info (channel, &path, &type, &handle_type,
- &handle);
-
- dbus_g_type_struct_set (entry,
- 0, path,
- 1, type,
- 2, handle_type,
- 3, handle,
- G_MAXUINT);
-
- g_ptr_array_add (values, entry);
-
- g_free (path);
- g_free (type);
-}
-
-
-static void
-tp_base_connection_list_channels (TpSvcConnection *iface,
- DBusGMethodInvocation *context)
-{
- TpBaseConnection *self = TP_BASE_CONNECTION (iface);
- TpBaseConnectionPrivate *priv;
- GPtrArray *channels, *values;
- guint i;
-
- g_assert (TP_IS_BASE_CONNECTION (self));
-
- priv = self->priv;
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (self, context);
-
- /* I think on average, each factory will have 2 channels :D */
- values = g_ptr_array_sized_new (priv->channel_factories->len * 2
- + priv->channel_managers->len * 2);
-
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- for (i = 0; i < priv->channel_factories->len; i++)
- {
- TpChannelFactoryIface *factory = g_ptr_array_index
- (priv->channel_factories, i);
-
- tp_channel_factory_iface_foreach (factory,
- list_channel_factory_foreach_one, values);
- }
- G_GNUC_END_IGNORE_DEPRECATIONS
-
- for (i = 0; i < priv->channel_managers->len; i++)
- {
- TpChannelManager *manager = g_ptr_array_index
- (priv->channel_managers, i);
-
- tp_channel_manager_foreach_channel (manager,
- list_channel_manager_foreach_one, values);
- }
-
- channels = g_ptr_array_sized_new (values->len);
-
- for (i = 0; i < values->len; i++)
- {
- g_ptr_array_add (channels, g_value_get_boxed (g_ptr_array_index
- (values, i)));
- }
-
- tp_svc_connection_return_from_list_channels (context, channels);
-
- g_ptr_array_unref (channels);
- for (i = 0; i < values->len; i++)
- {
- tp_g_value_slice_free (g_ptr_array_index (values, i));
- }
- g_ptr_array_unref (values);
-}
-
static void
-tp_base_connection_request_channel (TpSvcConnection *iface,
- const gchar *type,
- guint handle_type,
- guint handle,
- gboolean suppress_handler,
- DBusGMethodInvocation *context)
-{
- TpBaseConnection *self = TP_BASE_CONNECTION (iface);
- TpBaseConnectionPrivate *priv;
- TpChannelFactoryRequestStatus status =
- TP_CHANNEL_FACTORY_REQUEST_STATUS_NOT_IMPLEMENTED;
- GError *error = NULL;
- guint i;
- ChannelRequest *request;
- GHashTable *request_properties;
- gboolean claimed_by_channel_manager = FALSE;
- TpHandleRepoIface *handle_repo = NULL;
-
- g_assert (TP_IS_BASE_CONNECTION (self));
-
- priv = self->priv;
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (self, context);
-
- if (handle_type == TP_HANDLE_TYPE_NONE)
- {
- if (handle != 0)
- {
- GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
- "When handle type is NONE, handle must be 0" };
-
- dbus_g_method_return_error (context, &e);
- return;
- }
- }
- else
- {
- handle_repo = tp_base_connection_get_handles (self,
- handle_type);
-
- if (handle_repo == NULL)
- {
- GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
- "Handle type not supported by this connection manager" };
-
- dbus_g_method_return_error (context, &e);
- return;
- }
-
- if (!tp_handle_is_valid (handle_repo, handle, &error))
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
- }
-
- request = channel_request_new (context, METHOD_REQUEST_CHANNEL,
- type, handle_type, handle, suppress_handler);
- g_ptr_array_add (priv->channel_requests, request);
-
- /* First try the channel managers */
-
- request_properties = tp_asv_new (
- TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, type,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, handle_type,
- NULL);
-
- if (handle != 0)
- {
- tp_asv_set_uint32 (request_properties,
- TP_PROP_CHANNEL_TARGET_HANDLE, handle);
- g_assert (handle_repo != NULL);
- tp_asv_set_string (request_properties,
- TP_PROP_CHANNEL_TARGET_ID,
- tp_handle_inspect (handle_repo, handle));
- }
-
- for (i = 0; i < priv->channel_managers->len; i++)
- {
- TpChannelManager *manager = TP_CHANNEL_MANAGER (
- g_ptr_array_index (priv->channel_managers, i));
-
- if (tp_channel_manager_request_channel (manager, request,
- request_properties))
- {
- claimed_by_channel_manager = TRUE;
- break;
- }
- }
-
- g_hash_table_unref (request_properties);
-
- if (claimed_by_channel_manager)
- return;
-
- /* OK, none of them wanted it. Now try the channel factories */
-
- for (i = 0; i < priv->channel_factories->len; i++)
- {
- TpChannelFactoryIface *factory = g_ptr_array_index
- (priv->channel_factories, i);
- TpChannelFactoryRequestStatus cur_status;
- TpChannelIface *chan = NULL;
-
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- cur_status = tp_channel_factory_iface_request (factory, type,
- (TpHandleType) handle_type, handle, request, &chan, &error);
- G_GNUC_END_IGNORE_DEPRECATIONS
-
- switch (cur_status)
- {
- case TP_CHANNEL_FACTORY_REQUEST_STATUS_EXISTING:
- {
- g_assert (NULL != chan);
- factory_satisfy_requests (self, factory, chan, request, FALSE);
- /* factory_satisfy_requests should remove the request */
- g_assert (!tp_g_ptr_array_contains (priv->channel_requests,
- request));
- return;
- }
- case TP_CHANNEL_FACTORY_REQUEST_STATUS_CREATED:
- g_assert (NULL != chan);
- /* the signal handler should have completed the queued request
- * and freed the ChannelRequest already */
- g_assert (!tp_g_ptr_array_contains (priv->channel_requests,
- request));
- return;
- case TP_CHANNEL_FACTORY_REQUEST_STATUS_QUEUED:
- DEBUG ("queued request, channel_type=%s, handle_type=%u, "
- "handle=%u, suppress_handler=%u", type, handle_type,
- handle, suppress_handler);
- return;
- case TP_CHANNEL_FACTORY_REQUEST_STATUS_ERROR:
- /* pass through error */
- goto ERROR;
- default:
- /* always return the most specific error */
- if (cur_status > status)
- status = cur_status;
- }
- }
-
- switch (status)
- {
- case TP_CHANNEL_FACTORY_REQUEST_STATUS_INVALID_HANDLE:
- DEBUG ("invalid handle %u", handle);
-
- error = g_error_new (TP_ERROR, TP_ERROR_INVALID_HANDLE,
- "invalid handle %u", handle);
-
- break;
-
- case TP_CHANNEL_FACTORY_REQUEST_STATUS_NOT_AVAILABLE:
- DEBUG ("requested channel is unavailable with "
- "handle type %u", handle_type);
-
- error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
- "requested channel is not available with "
- "handle type %u", handle_type);
-
- break;
-
- case TP_CHANNEL_FACTORY_REQUEST_STATUS_NOT_IMPLEMENTED:
- DEBUG ("unsupported channel type %s", type);
-
- error = g_error_new (TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
- "unsupported channel type %s", type);
-
- break;
-
- default:
- g_assert_not_reached ();
- }
-
-ERROR:
- g_assert (error != NULL);
- dbus_g_method_return_error (request->context, error);
- request->context = NULL;
- g_error_free (error);
-
- g_ptr_array_remove (priv->channel_requests, request);
- channel_request_free (request);
-}
-
-static void
-tp_base_connection_release_handles (TpSvcConnection *iface,
- guint handle_type,
- const GArray * handles,
- DBusGMethodInvocation *context)
-{
- TpBaseConnection *self = TP_BASE_CONNECTION (iface);
- TpBaseConnectionPrivate *priv = self->priv;
- GError *error = NULL;
-
- g_assert (TP_IS_BASE_CONNECTION (self));
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (self, context);
-
- if (!tp_handles_supported_and_valid (priv->handles,
- handle_type, handles, FALSE, &error))
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- tp_svc_connection_return_from_release_handles (context);
-}
-
-
-/**
- * tp_base_connection_dbus_request_handles: (skip)
- * @iface: A pointer to #TpBaseConnection, cast to a pointer to
- * #TpSvcConnection
- * @handle_type: The handle type (#TpHandleType) as a guint
- * @names: A strv of handle names
- * @context: The dbus-glib method invocation context
- *
- * Implements D-Bus method RequestHandles on interface
- * org.freedesktop.Telepathy.Connection.
- *
- * This was exported so subclasses could use it as a basis for their
- * reimplementations, but reimplementing the method is now deprecated.
- *
- * Deprecated: 0.19.0
- */
-void
tp_base_connection_dbus_request_handles (TpSvcConnection *iface,
guint handle_type,
const gchar **names,
@@ -2650,7 +1752,26 @@ void
tp_base_connection_set_self_handle (TpBaseConnection *self,
TpHandle self_handle)
{
- g_object_set (self, "self-handle", self_handle, NULL);
+ if (self->status == TP_CONNECTION_STATUS_CONNECTED)
+ g_return_if_fail (self_handle != 0);
+
+ if (self->self_handle == self_handle)
+ return;
+
+ self->self_handle = self_handle;
+ self->self_id = NULL;
+
+ if (self_handle != 0)
+ {
+ self->self_id = tp_handle_inspect (
+ self->priv->handles[TP_HANDLE_TYPE_CONTACT], self_handle);
+ }
+
+ tp_svc_connection_emit_self_contact_changed (self,
+ self->self_handle, self->self_id);
+
+ g_object_notify ((GObject *) self, "self-handle");
+ g_object_notify ((GObject *) self, "self-id");
}
@@ -2838,13 +1959,10 @@ tp_base_connection_disconnect_with_dbus_error_vardict (TpBaseConnection *self,
*
* <itemizedlist>
* <listitem>Update #TpBaseConnection<!-- -->.status;</listitem>
- * <listitem>If the new state is #TP_CONNECTION_STATUS_DISCONNECTED, call
- * tp_channel_factory_iface_close_all() on all channel factories</listitem>
* <listitem>Emit the D-Bus StatusChanged signal;</listitem>
* <listitem>Call #TpBaseConnectionClass.connecting,
* #TpBaseConnectionClass.connected or #TpBaseConnectionClass.disconnected
* as appropriate;</listitem>
- * <listitem>Call the channel factories' status change callbacks;</listitem>
* <listitem>If the new state is #TP_CONNECTION_STATUS_DISCONNECTED, call the
* subclass' #TpBaseConnectionClass.shut_down callback.</listitem>
* </itemizedlist>
@@ -2930,28 +2048,18 @@ tp_base_connection_change_status (TpBaseConnection *self,
/* the presence of this array indicates that we are shutting down */
if (self->priv->disconnect_requests == NULL)
self->priv->disconnect_requests = g_ptr_array_sized_new (0);
-
- /* remove all channels and shut down all factories, so we don't get
- * any race conditions where method calls are delivered to a channel
- * after we've started disconnecting
- */
- tp_base_connection_close_all_channels (self);
}
DEBUG("emitting status-changed to %u, for reason %u", status, reason);
tp_svc_connection_emit_status_changed (self, status, reason);
- /* tell subclass and factories about the state change. In the case of
+ /* tell subclass about the state change. In the case of
* disconnection, shut down afterwards */
switch (status)
{
case TP_CONNECTION_STATUS_CONNECTING:
if (klass->connecting)
(klass->connecting) (self);
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- g_ptr_array_foreach (priv->channel_factories, (GFunc)
- tp_channel_factory_iface_connecting, NULL);
- G_GNUC_END_IGNORE_DEPRECATIONS
break;
case TP_CONNECTION_STATUS_CONNECTED:
@@ -2963,10 +2071,6 @@ tp_base_connection_change_status (TpBaseConnection *self,
self->self_handle, NULL));
if (klass->connected)
(klass->connected) (self);
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- g_ptr_array_foreach (priv->channel_factories, (GFunc)
- tp_channel_factory_iface_connected, NULL);
- G_GNUC_END_IGNORE_DEPRECATIONS
break;
case TP_CONNECTION_STATUS_DISCONNECTED:
@@ -2985,10 +2089,6 @@ tp_base_connection_change_status (TpBaseConnection *self,
{
if (klass->disconnected)
(klass->disconnected) (self);
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- g_ptr_array_foreach (priv->channel_factories, (GFunc)
- tp_channel_factory_iface_disconnected, NULL);
- G_GNUC_END_IGNORE_DEPRECATIONS
}
(klass->shut_down) (self);
tp_base_connection_unregister (self);
@@ -3373,18 +2473,8 @@ conn_iface_init (gpointer g_iface, gpointer iface_data)
tp_base_connection_##prefix##x)
IMPLEMENT(,connect);
IMPLEMENT(,disconnect);
- IMPLEMENT(dbus_,get_interfaces);
- IMPLEMENT(,get_protocol);
- IMPLEMENT(dbus_,get_self_handle);
- IMPLEMENT(dbus_,get_status);
- IMPLEMENT(,hold_handles);
IMPLEMENT(,inspect_handles);
- IMPLEMENT(,list_channels);
- IMPLEMENT(,request_channel);
- IMPLEMENT(,release_handles);
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
IMPLEMENT(dbus_,request_handles);
-G_GNUC_END_IGNORE_DEPRECATIONS
IMPLEMENT(dbus_,add_client_interest);
IMPLEMENT(dbus_,remove_client_interest);
#undef IMPLEMENT
@@ -3650,19 +2740,16 @@ conn_requests_offer_request (TpBaseConnection *self,
TpBaseConnectionPrivate *priv = self->priv;
TpChannelManagerRequestFunc func;
ChannelRequest *request;
- gboolean suppress_handler;
guint i;
switch (method)
{
case METHOD_CREATE_CHANNEL:
func = tp_channel_manager_create_channel;
- suppress_handler = TRUE;
break;
case METHOD_ENSURE_CHANNEL:
func = tp_channel_manager_ensure_channel;
- suppress_handler = FALSE;
break;
default:
@@ -3670,7 +2757,7 @@ conn_requests_offer_request (TpBaseConnection *self,
}
request = channel_request_new (context, method,
- type, target_handle_type, target_handle, suppress_handler);
+ type, target_handle_type, target_handle);
g_ptr_array_add (priv->channel_requests, request);
for (i = 0; i < priv->channel_managers->len; i++)
diff --git a/telepathy-glib/base-connection.h b/telepathy-glib/base-connection.h
index ae772d044..331632664 100644
--- a/telepathy-glib/base-connection.h
+++ b/telepathy-glib/base-connection.h
@@ -30,7 +30,6 @@
#include <telepathy-glib/enums.h>
#include <telepathy-glib/handle-repo.h>
#include <telepathy-glib/proxy.h>
-#include <telepathy-glib/svc-connection.h>
G_BEGIN_DECLS
@@ -46,10 +45,6 @@ typedef gboolean (*TpBaseConnectionStartConnectingImpl) (
typedef void (*TpBaseConnectionCreateHandleReposImpl) (TpBaseConnection *self,
TpHandleRepoIface *repos[TP_NUM_HANDLE_TYPES]);
-
-typedef GPtrArray *(*TpBaseConnectionCreateChannelFactoriesImpl) (
- TpBaseConnection *self);
-
typedef GPtrArray *(*TpBaseConnectionCreateChannelManagersImpl) (
TpBaseConnection *self);
@@ -66,6 +61,7 @@ struct _TpBaseConnection {
TpConnectionStatus status;
TpHandle self_handle;
+ const gchar *self_id;
/*<private>*/
gpointer _future1;
@@ -87,8 +83,6 @@ struct _TpBaseConnectionClass {
TpBaseConnectionCreateHandleReposImpl create_handle_repos;
#endif
- TpBaseConnectionCreateChannelFactoriesImpl create_channel_factories;
-
TpBaseConnectionGetUniqueConnectionNameImpl get_unique_connection_name;
TpBaseConnectionProc connecting;
@@ -150,12 +144,6 @@ void tp_base_connection_finish_shutdown (TpBaseConnection *self);
void tp_base_connection_add_interfaces (TpBaseConnection *self,
const gchar **interfaces);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_20
-void tp_base_connection_dbus_request_handles (TpSvcConnection *iface,
- guint handle_type, const gchar **names, DBusGMethodInvocation *context);
-#endif
-
void tp_base_connection_register_with_contacts_mixin (TpBaseConnection *self);
diff --git a/telepathy-glib/base-contact-list-internal.h b/telepathy-glib/base-contact-list-internal.h
index 5258ab476..7a1794656 100644
--- a/telepathy-glib/base-contact-list-internal.h
+++ b/telepathy-glib/base-contact-list-internal.h
@@ -1,5 +1,5 @@
/*<private_header>*/
-/* ContactList channel manager - internals (for use by our channels)
+/* ContactList channel manager - internals
*
* Copyright © 2010 Collabora Ltd.
*
@@ -23,60 +23,8 @@
#include <telepathy-glib/base-contact-list.h>
-#include <telepathy-glib/enums.h>
-#include <telepathy-glib/handle.h>
-
G_BEGIN_DECLS
-/* elements 1, 2... of this enum must be kept in sync with elements 0, 1...
- * of the array in the .c */
-typedef enum {
- INVALID_TP_LIST_HANDLE = 0,
- TP_LIST_HANDLE_SUBSCRIBE,
- TP_LIST_HANDLE_PUBLISH,
- TP_LIST_HANDLE_STORED,
- TP_LIST_HANDLE_DENY,
- TP_NUM_LIST_HANDLES
-} TpListHandle;
-
-TpChannelGroupFlags _tp_base_contact_list_get_list_flags (
- TpBaseContactList *self,
- TpHandle list);
-
-TpChannelGroupFlags _tp_base_contact_list_get_group_flags (
- TpBaseContactList *self);
-
-void _tp_base_contact_list_add_to_list (TpBaseContactList *self,
- TpHandle list,
- const GArray *contacts_arr,
- const gchar *message,
- DBusGMethodInvocation *context);
-
-void _tp_base_contact_list_remove_from_list (TpBaseContactList *self,
- TpHandle list,
- const GArray *contacts_arr,
- const gchar *message,
- guint reason,
- DBusGMethodInvocation *context);
-
-void _tp_base_contact_list_add_to_group (TpBaseContactList *self,
- TpHandle group,
- const GArray *contacts_arr,
- const gchar *message,
- DBusGMethodInvocation *context);
-
-void _tp_base_contact_list_remove_from_group (TpBaseContactList *self,
- TpHandle group,
- const GArray *contacts_arr,
- const gchar *message,
- guint reason,
- DBusGMethodInvocation *context);
-
-gboolean _tp_base_contact_list_delete_group_by_handle (
- TpBaseContactList *self,
- TpHandle group,
- GError **error);
-
char _tp_base_contact_list_presence_state_to_letter (TpSubscriptionState ps);
G_END_DECLS
diff --git a/telepathy-glib/base-contact-list.c b/telepathy-glib/base-contact-list.c
index bcf1a9cf5..3fd972502 100644
--- a/telepathy-glib/base-contact-list.c
+++ b/telepathy-glib/base-contact-list.c
@@ -28,9 +28,9 @@
#include <telepathy-glib/handle-repo-dynamic.h>
#include <telepathy-glib/handle-repo-static.h>
#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/svc-connection.h>
#include <telepathy-glib/base-connection-internal.h>
-#include <telepathy-glib/contact-list-channel-internal.h>
#include <telepathy-glib/handle-repo-internal.h>
/**
@@ -265,6 +265,9 @@
#include "telepathy-glib/debug-internal.h"
#include "telepathy-glib/util-internal.h"
+#define BASE_CONTACT_LIST \
+ g_quark_from_static_string ("tp-base-contact-list-conn")
+
struct _TpBaseContactListPrivate
{
TpBaseConnection *conn;
@@ -274,22 +277,9 @@ struct _TpBaseContactListPrivate
/* NULL unless state = FAILURE */
GError *failure /* initially NULL */;
- /* values referenced; 0'th remains NULL */
- TpBaseContactListChannel *lists[TP_NUM_LIST_HANDLES];
-
- TpHandleRepoIface *group_repo;
- /* handle borrowed from channel => referenced TpContactGroupChannel */
+ /* owned gchar* => owned TpHandleSet */
GHashTable *groups;
- /* borrowed TpExportableChannel => GSList of gpointer (request tokens) that
- * will be satisfied by that channel when the contact list has been
- * downloaded. The requests are in reverse chronological order; the list
- * can also contain NULL.
- *
- * If a channel appears in the keys of this map, that means it hasn't been
- * announced via NewChannels yet. */
- GHashTable *channel_requests;
-
/* DBusGMethodInvocation *s for calls to RequestBlockedContacts which are
* waiting for the contact list to (fail to) be downloaded.
*/
@@ -314,13 +304,9 @@ struct _TpBaseContactListClassPrivate
char dummy;
};
-static void channel_manager_iface_init (TpChannelManagerIface *iface);
-
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (TpBaseContactList,
tp_base_contact_list,
G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_MANAGER,
- channel_manager_iface_init);
g_type_add_class_private (g_define_type_id, sizeof (
TpBaseContactListClassPrivate)))
@@ -534,46 +520,9 @@ tp_base_contact_list_init (TpBaseContactList *self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, TP_TYPE_BASE_CONTACT_LIST,
TpBaseContactListPrivate);
- self->priv->groups = g_hash_table_new_full (NULL, NULL, NULL,
- g_object_unref);
- self->priv->channel_requests = g_hash_table_new (NULL, NULL);
g_queue_init (&self->priv->blocked_contact_requests);
-}
-
-static void
-tp_base_contact_list_fail_channel_requests (TpBaseContactList *self,
- GQuark domain,
- gint code,
- const gchar *message)
-{
- if (self->priv->channel_requests != NULL)
- {
- GHashTable *tmp = self->priv->channel_requests;
- GHashTableIter iter;
- gpointer value;
-
- self->priv->channel_requests = NULL;
- g_hash_table_iter_init (&iter, tmp);
-
- while (g_hash_table_iter_next (&iter, NULL, &value))
- {
- GSList *requests = value;
- GSList *slist;
-
- requests = g_slist_reverse (requests);
-
- for (slist = requests; slist != NULL; slist = slist->next)
- {
- tp_channel_manager_emit_request_failed (self,
- slist->data, domain, code, message);
- }
-
- g_slist_free (requests);
- g_hash_table_iter_steal (&iter);
- }
-
- g_hash_table_unref (tmp);
- }
+ self->priv->groups = g_hash_table_new_full (g_str_hash, g_str_equal,
+ g_free, (GDestroyNotify) tp_handle_set_destroy);
}
static void
@@ -593,27 +542,10 @@ tp_base_contact_list_free_contents (TpBaseContactList *self)
{
GError error = { TP_ERROR, TP_ERROR_DISCONNECTED,
"Disconnected before blocked contacts were retrieved" };
- guint i;
- tp_base_contact_list_fail_channel_requests (self, TP_ERROR,
- TP_ERROR_DISCONNECTED,
- "Unable to complete channel request due to disconnection");
tp_base_contact_list_fail_blocked_contact_requests (self, &error);
- for (i = 0; i < TP_NUM_LIST_HANDLES; i++)
- tp_clear_object (self->priv->lists + i);
-
- tp_clear_pointer (&self->priv->groups, g_hash_table_unref);
- tp_clear_object (&self->priv->contact_repo);
-
- if (self->priv->group_repo != NULL)
- {
- /* the normalization data is a borrowed reference to @self, which must
- * be released when @self is no longer usable */
- _tp_dynamic_handle_repo_set_normalization_data (self->priv->group_repo,
- NULL, NULL);
- tp_clear_object (&self->priv->group_repo);
- }
+ g_clear_object (&self->priv->contact_repo);
if (self->priv->conn != NULL)
{
@@ -639,11 +571,7 @@ tp_base_contact_list_dispose (GObject *object)
G_OBJECT_CLASS (tp_base_contact_list_parent_class)->dispose;
tp_base_contact_list_free_contents (self);
- g_assert (self->priv->groups == NULL);
g_assert (self->priv->contact_repo == NULL);
- g_assert (self->priv->group_repo == NULL);
- g_assert (self->priv->lists[TP_LIST_HANDLE_SUBSCRIBE] == NULL);
- g_assert (self->priv->channel_requests == NULL);
if (dispose != NULL)
dispose (object);
@@ -686,6 +614,7 @@ tp_base_contact_list_set_property (GObject *object,
case PROP_CONNECTION:
g_assert (self->priv->conn == NULL); /* construct-only */
self->priv->conn = g_value_dup_object (value);
+ g_object_set_qdata ((GObject *) self->priv->conn, BASE_CONTACT_LIST, self);
break;
case PROP_DOWNLOAD_AT_CONNECTION:
@@ -698,45 +627,6 @@ tp_base_contact_list_set_property (GObject *object,
}
}
-static gchar *
-tp_base_contact_list_repo_normalize_group (TpHandleRepoIface *repo,
- const gchar *id,
- gpointer context,
- GError **error)
-{
- TpBaseContactList *self =
- _tp_dynamic_handle_repo_get_normalization_data (repo);
- gchar *ret;
-
- if (id == NULL)
- id = "";
-
- if (self == NULL)
- {
- /* already disconnected or something */
- return g_strdup (id);
- }
-
- ret = tp_base_contact_list_normalize_group (self, id);
-
- if (ret == NULL)
- g_set_error (error, TP_ERROR, TP_ERROR_INVALID_HANDLE,
- "Invalid group name '%s'", id);
-
- return ret;
-}
-
-/* elements 0, 1... of this enum must be kept in sync with elements 1, 2...
- * of the enum in the -internal header */
-static const gchar * const tp_base_contact_list_contact_lists
- [TP_NUM_LIST_HANDLES + 1] = {
- "subscribe",
- "publish",
- "stored",
- "deny",
- NULL
-};
-
static void
status_changed_cb (TpBaseConnection *conn,
guint status,
@@ -754,7 +644,6 @@ tp_base_contact_list_constructed (GObject *object)
TpBaseContactListClass *cls = TP_BASE_CONTACT_LIST_GET_CLASS (self);
void (*chain_up) (GObject *) =
G_OBJECT_CLASS (tp_base_contact_list_parent_class)->constructed;
- TpHandleRepoIface *list_repo;
if (chain_up != NULL)
chain_up (object);
@@ -812,9 +701,6 @@ tp_base_contact_list_constructed (GObject *object)
TP_HANDLE_TYPE_CONTACT);
g_object_ref (self->priv->contact_repo);
- list_repo = tp_static_handle_repo_new (TP_HANDLE_TYPE_LIST,
- (const gchar **) tp_base_contact_list_contact_lists);
-
if (TP_IS_CONTACT_GROUP_LIST (self))
{
TpContactGroupListInterface *iface =
@@ -824,17 +710,6 @@ tp_base_contact_list_constructed (GObject *object)
g_return_if_fail (iface->dup_groups != NULL);
g_return_if_fail (iface->dup_contact_groups != NULL);
g_return_if_fail (iface->dup_group_members != NULL);
-
- self->priv->group_repo = tp_dynamic_handle_repo_new (TP_HANDLE_TYPE_GROUP,
- tp_base_contact_list_repo_normalize_group, NULL);
-
- /* borrowed ref so the handle repo can call our virtual method, released
- * in tp_base_contact_list_free_contents */
- _tp_dynamic_handle_repo_set_normalization_data (self->priv->group_repo,
- self, NULL);
-
- _tp_base_connection_set_handle_repo (self->priv->conn,
- TP_HANDLE_TYPE_GROUP, self->priv->group_repo);
}
if (TP_IS_MUTABLE_CONTACT_GROUP_LIST (self))
@@ -854,12 +729,6 @@ tp_base_contact_list_constructed (GObject *object)
g_return_if_fail (iface->remove_group_finish != NULL);
}
- _tp_base_connection_set_handle_repo (self->priv->conn, TP_HANDLE_TYPE_LIST,
- list_repo);
-
- /* set_handle_repo doesn't steal a reference */
- g_object_unref (list_repo);
-
self->priv->status_changed_id = g_signal_connect (self->priv->conn,
"status-changed", (GCallback) status_changed_cb, self);
}
@@ -988,836 +857,6 @@ tp_base_contact_list_class_init (TpBaseContactListClass *cls)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
}
-static void
-tp_base_contact_list_foreach_channel (TpChannelManager *manager,
- TpExportableChannelFunc func,
- gpointer user_data)
-{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (manager);
- GHashTableIter iter;
- gpointer handle, channel;
- guint i;
-
- /* in both cases, we look in channel_requests to avoid including channels
- * that don't officially exist yet */
-
- for (i = 0; i < TP_NUM_LIST_HANDLES; i++)
- {
- if (self->priv->lists[i] != NULL &&
- !g_hash_table_lookup_extended (self->priv->channel_requests,
- self->priv->lists[i], NULL, NULL))
- func (TP_EXPORTABLE_CHANNEL (self->priv->lists[i]), user_data);
- }
-
- g_hash_table_iter_init (&iter, self->priv->groups);
-
- while (g_hash_table_iter_next (&iter, &handle, &channel))
- {
- if (!g_hash_table_lookup_extended (self->priv->channel_requests,
- channel, NULL, NULL))
- func (TP_EXPORTABLE_CHANNEL (channel), user_data);
- }
-}
-
-static const gchar * const fixed_properties[] = {
- TP_PROP_CHANNEL_CHANNEL_TYPE,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE,
- NULL
-};
-
-static const gchar * const allowed_properties[] = {
- TP_PROP_CHANNEL_TARGET_HANDLE,
- TP_PROP_CHANNEL_TARGET_ID,
- NULL
-};
-
-static void
-tp_base_contact_list_type_foreach_channel_class (GType type,
- TpChannelManagerTypeChannelClassFunc func,
- gpointer user_data)
-{
- GHashTable *table = tp_asv_new (
- TP_PROP_CHANNEL_CHANNEL_TYPE,
- G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_CONTACT_LIST,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, G_TYPE_UINT, TP_HANDLE_TYPE_LIST,
- NULL);
-
- func (type, table, allowed_properties, user_data);
-
- if (g_type_is_a (type, TP_TYPE_MUTABLE_CONTACT_GROUP_LIST))
- {
- g_hash_table_insert (table, TP_PROP_CHANNEL_TARGET_HANDLE_TYPE,
- tp_g_value_slice_new_uint (TP_HANDLE_TYPE_GROUP));
- func (type, table, allowed_properties, user_data);
- }
-
- g_hash_table_unref (table);
-}
-
-static void
-tp_base_contact_list_associate_request (TpBaseContactList *self,
- gpointer chan,
- gpointer request_token)
-{
- GSList *requests = NULL;
-
- /* remember that it hasn't been announced yet, by putting it in
- * channel_requests */
- requests = g_hash_table_lookup (self->priv->channel_requests, chan);
- g_hash_table_steal (self->priv->channel_requests, chan);
- requests = g_slist_prepend (requests, request_token);
- g_hash_table_insert (self->priv->channel_requests, chan, requests);
-}
-
-static gpointer
-tp_base_contact_list_new_channel (TpBaseContactList *self,
- TpHandleType handle_type,
- TpHandle handle,
- gpointer request_token)
-{
- gpointer chan;
- gchar *object_path;
- GType type;
-
- if (handle_type == TP_HANDLE_TYPE_LIST)
- {
- object_path = g_strdup_printf ("%s/ContactList/%s",
- self->priv->conn->object_path,
- tp_base_contact_list_contact_lists[handle - 1]);
- type = TP_TYPE_CONTACT_LIST_CHANNEL;
- }
- else
- {
- g_assert (handle_type == TP_HANDLE_TYPE_GROUP);
- object_path = g_strdup_printf ("%s/Group/%u",
- self->priv->conn->object_path, handle);
- type = TP_TYPE_CONTACT_GROUP_CHANNEL;
- }
-
- chan = g_object_new (type,
- "connection", self->priv->conn,
- "manager", self,
- "object-path", object_path,
- "handle-type", handle_type,
- "handle", handle,
- NULL);
-
- g_free (object_path);
-
- if (handle_type == TP_HANDLE_TYPE_LIST)
- {
- g_assert (self->priv->lists[handle] == NULL);
- self->priv->lists[handle] = chan;
- }
- else
- {
- g_assert (g_hash_table_lookup (self->priv->groups,
- GUINT_TO_POINTER (handle)) == NULL);
- g_hash_table_insert (self->priv->groups, GUINT_TO_POINTER (handle),
- chan);
- }
-
- tp_base_contact_list_associate_request (self, chan, request_token);
-
- return chan;
-}
-
-static void
-tp_base_contact_list_announce_channel (TpBaseContactList *self,
- gpointer channel,
- const GError *error)
-{
- GSList *requests = g_hash_table_lookup (self->priv->channel_requests,
- channel);
-
- /* this is all fine even if requests is NULL */
-
- g_hash_table_steal (self->priv->channel_requests, channel);
-
- /* get into chronological order */
- requests = g_slist_reverse (requests);
- /* our list of requests can include NULL, which isn't a valid request
- * token; get rid of it/them */
- requests = g_slist_remove_all (requests, NULL);
-
- if (error == NULL)
- {
- tp_channel_manager_emit_new_channel (self, channel, requests);
- }
- else
- {
- GSList *iter;
-
- for (iter = requests; iter != NULL; iter = iter->next)
- tp_channel_manager_emit_request_failed (self, iter->data,
- error->domain, error->code, error->message);
- }
-
- g_slist_free (requests);
-}
-
-static void
-tp_base_contact_list_create_group_cb (GObject *source,
- GAsyncResult *result,
- gpointer channel)
-{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
- GError *error = NULL;
-
- if (tp_base_contact_list_add_to_group_finish (self, result, &error))
- {
- /* If all goes well, the channel should have been announced. */
- GSList *tokens = g_hash_table_lookup (self->priv->channel_requests,
- channel);
-
- if (tokens == NULL)
- return;
-
- g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
- "%s did not create a group even though it claims to have done so",
- G_OBJECT_TYPE_NAME (self));
- }
-
- /**/
-
- g_clear_error (&error);
-}
-
-static gboolean
-tp_base_contact_list_request_helper (TpChannelManager *manager,
- gpointer request_token,
- GHashTable *request_properties,
- gboolean is_create)
-{
- TpBaseContactList *self = (TpBaseContactList *) manager;
- TpHandleType handle_type;
- TpHandle handle;
- TpBaseContactListChannel *chan;
- GError *error = NULL;
-
- g_return_val_if_fail (TP_IS_BASE_CONTACT_LIST (self), FALSE);
-
- if (tp_strdiff (tp_asv_get_string (request_properties,
- TP_PROP_CHANNEL_CHANNEL_TYPE),
- TP_IFACE_CHANNEL_TYPE_CONTACT_LIST))
- {
- return FALSE;
- }
-
- handle_type = tp_asv_get_uint32 (request_properties,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL);
-
- if (handle_type != TP_HANDLE_TYPE_LIST &&
- (handle_type != TP_HANDLE_TYPE_GROUP ||
- !TP_IS_CONTACT_GROUP_LIST (self)))
- {
- return FALSE;
- }
-
- handle = tp_asv_get_uint32 (request_properties,
- TP_PROP_CHANNEL_TARGET_HANDLE, NULL);
- g_assert (handle != 0);
-
- if (tp_channel_manager_asv_has_unknown_properties (request_properties,
- fixed_properties, allowed_properties, &error) ||
- tp_base_contact_list_get_connection (self, &error) == NULL)
- {
- goto error;
- }
-
- if (handle_type == TP_HANDLE_TYPE_LIST)
- {
- /* TpBaseConnection already checked the handle for validity */
- g_assert (handle > 0);
- g_assert (handle < TP_NUM_LIST_HANDLES);
-
- if (handle == TP_LIST_HANDLE_STORED &&
- !tp_base_contact_list_get_contact_list_persists (self))
- {
- g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
- "Subscriptions do not persist, so this connection lacks the "
- "'stored' channel");
- goto error;
- }
-
- if (handle == TP_LIST_HANDLE_DENY &&
- !tp_base_contact_list_can_block (self))
- {
- g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
- "This connection cannot put people on the 'deny' list");
- goto error;
- }
-
- chan = self->priv->lists[handle];
- }
- else
- {
- chan = g_hash_table_lookup (self->priv->groups,
- GUINT_TO_POINTER (handle));
- }
-
- if (chan == NULL)
- {
- if (handle_type == TP_HANDLE_TYPE_LIST)
- {
- /* make an object, don't announce it yet, and remember the
- * request token for when it's announced in set_list_received */
- tp_base_contact_list_new_channel (self, handle_type, handle,
- request_token);
- }
- else
- {
- if (TP_IS_MUTABLE_CONTACT_GROUP_LIST (self))
- {
- const gchar *name = tp_handle_inspect (self->priv->group_repo,
- handle);
- gpointer channel;
- TpHandleSet *set = tp_handle_set_new (self->priv->contact_repo);
-
- /* make an object, don't announce it yet, and remember the
- * request token for when it's announced, if it's actually
- * created */
- channel = tp_base_contact_list_new_channel (self, handle_type,
- handle, request_token);
-
- /* this will create the empty group, and announce the channel(s)
- * later if appropriate */
- tp_base_contact_list_add_to_group_async (self, name, set,
- tp_base_contact_list_create_group_cb, channel);
- tp_handle_set_destroy (set);
- }
- else
- {
- g_set_error_literal (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
- "This connection cannot create new groups");
- goto error;
- }
- }
- }
- else if (is_create)
- {
- g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
- "A ContactList channel for type #%u, handle #%u already exists",
- handle_type, handle);
- goto error;
- }
- else if (g_hash_table_lookup_extended (self->priv->channel_requests, chan,
- NULL, NULL))
- {
- /* there are outstanding requests for the channel, and there's an object
- * to represent it, but it hasn't been announced; just append our
- * request */
- tp_base_contact_list_associate_request (self, chan, request_token);
- }
- else
- {
- tp_channel_manager_emit_request_already_satisfied (self,
- request_token, TP_EXPORTABLE_CHANNEL (chan));
- }
-
- return TRUE;
-
-error:
- tp_channel_manager_emit_request_failed (self, request_token,
- error->domain, error->code, error->message);
- g_error_free (error);
- return TRUE;
-}
-
-static gboolean
-tp_base_contact_list_create_channel (TpChannelManager *manager,
- gpointer request_token,
- GHashTable *request_properties)
-{
- return tp_base_contact_list_request_helper (manager, request_token,
- request_properties, TRUE);
-}
-
-static gboolean
-tp_base_contact_list_ensure_channel (TpChannelManager *manager,
- gpointer request_token,
- GHashTable *request_properties)
-{
- return tp_base_contact_list_request_helper (manager, request_token,
- request_properties, FALSE);
-}
-
-static void
-channel_manager_iface_init (TpChannelManagerIface *iface)
-{
- iface->foreach_channel = tp_base_contact_list_foreach_channel;
- iface->type_foreach_channel_class =
- tp_base_contact_list_type_foreach_channel_class;
- iface->create_channel = tp_base_contact_list_create_channel;
- iface->ensure_channel = tp_base_contact_list_ensure_channel;
- /* In this channel manager, Request has the same semantics as Ensure */
- iface->request_channel = tp_base_contact_list_ensure_channel;
-}
-
-TpChannelGroupFlags
-_tp_base_contact_list_get_group_flags (TpBaseContactList *self)
-{
- if (TP_IS_MUTABLE_CONTACT_GROUP_LIST (self))
- return TP_CHANNEL_GROUP_FLAG_CAN_ADD | TP_CHANNEL_GROUP_FLAG_CAN_REMOVE;
-
- return 0;
-}
-
-TpChannelGroupFlags
-_tp_base_contact_list_get_list_flags (TpBaseContactList *self,
- TpHandle list)
-{
- if (!tp_base_contact_list_can_change_contact_list (self))
- return 0;
-
- switch (list)
- {
- case TP_LIST_HANDLE_PUBLISH:
- /* We always allow an attempt to stop publishing presence to people,
- * and an attempt to send people our presence (if only as a sort of
- * pre-authorization). */
- return TP_CHANNEL_GROUP_FLAG_CAN_ADD | TP_CHANNEL_GROUP_FLAG_CAN_REMOVE;
-
- case TP_LIST_HANDLE_SUBSCRIBE:
- /* We can ask people to show us their presence, with a message.
- * We do our best to allow rescinding unreplied requests, and
- * unsubscribing, even if the underlying protocol does not. */
- return
- TP_CHANNEL_GROUP_FLAG_CAN_ADD |
- (tp_base_contact_list_get_request_uses_message (self)
- ? TP_CHANNEL_GROUP_FLAG_MESSAGE_ADD
- : 0) |
- TP_CHANNEL_GROUP_FLAG_CAN_REMOVE |
- TP_CHANNEL_GROUP_FLAG_CAN_RESCIND;
-
- case TP_LIST_HANDLE_STORED:
- /* We allow attempts to add people to the roster and remove them again,
- * even if the real protocol doesn't. */
- return TP_CHANNEL_GROUP_FLAG_CAN_ADD | TP_CHANNEL_GROUP_FLAG_CAN_REMOVE;
-
- case TP_LIST_HANDLE_DENY:
- /* A deny list wouldn't be much good if we couldn't actually deny,
- * would it? */
- return TP_CHANNEL_GROUP_FLAG_CAN_ADD | TP_CHANNEL_GROUP_FLAG_CAN_REMOVE;
-
- default:
- g_return_val_if_reached (0);
- }
-}
-
-static void
-tp_base_contact_list_add_to_group_cb (GObject *source,
- GAsyncResult *result,
- gpointer user_data)
-{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
- GError *error = NULL;
-
- g_return_if_fail (TP_IS_BASE_CONTACT_LIST (source));
-
- if (tp_base_contact_list_add_to_group_finish (self, result, &error))
- {
- dbus_g_method_return (user_data);
- }
- else
- {
- dbus_g_method_return_error (user_data, error);
- g_clear_error (&error);
- }
-}
-
-void
-_tp_base_contact_list_add_to_group (TpBaseContactList *self,
- TpHandle group,
- const GArray *contacts_arr,
- const gchar *message G_GNUC_UNUSED,
- DBusGMethodInvocation *context)
-{
- TpHandleSet *contacts;
- const gchar *group_name;
- GError *error = NULL;
-
- /* fail if not ready yet, failed, or disconnected, or if handles are bad */
- if (tp_base_contact_list_get_state (self, &error) !=
- TP_CONTACT_LIST_STATE_SUCCESS ||
- !tp_handles_are_valid (self->priv->contact_repo, contacts_arr, FALSE,
- &error))
- goto error;
-
- if (!TP_IS_MUTABLE_CONTACT_GROUP_LIST (self))
- {
- g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
- "Cannot add contacts to a group");
- goto error;
- }
-
- contacts = tp_handle_set_new_from_array (self->priv->contact_repo,
- contacts_arr);
- group_name = tp_handle_inspect (self->priv->group_repo, group);
-
- tp_base_contact_list_add_to_group_async (self, group_name, contacts,
- tp_base_contact_list_add_to_group_cb, context);
-
- tp_handle_set_destroy (contacts);
- return;
-
-error:
- dbus_g_method_return_error (context, error);
- g_error_free (error);
-}
-
-static void
-tp_base_contact_list_remove_from_group_cb (GObject *source,
- GAsyncResult *result,
- gpointer user_data)
-{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
- GError *error = NULL;
-
- g_return_if_fail (TP_IS_BASE_CONTACT_LIST (source));
-
- if (tp_base_contact_list_remove_from_group_finish (self, result, &error))
- {
- dbus_g_method_return (user_data);
- }
- else
- {
- dbus_g_method_return_error (user_data, error);
- g_clear_error (&error);
- }
-}
-
-void
-_tp_base_contact_list_remove_from_group (TpBaseContactList *self,
- TpHandle group,
- const GArray *contacts_arr,
- const gchar *message G_GNUC_UNUSED,
- guint reason G_GNUC_UNUSED,
- DBusGMethodInvocation *context)
-{
- TpHandleSet *contacts;
- const gchar *group_name;
- GError *error = NULL;
-
- /* fail if not ready yet, failed, or disconnected, or if handles are bad */
- if (tp_base_contact_list_get_state (self, &error) !=
- TP_CONTACT_LIST_STATE_SUCCESS ||
- !tp_handles_are_valid (self->priv->contact_repo, contacts_arr, FALSE,
- &error))
- goto error;
-
- if (!TP_IS_MUTABLE_CONTACT_GROUP_LIST (self))
- {
- g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
- "Cannot remove contacts from a group");
- goto error;
- }
-
- contacts = tp_handle_set_new_from_array (self->priv->contact_repo,
- contacts_arr);
- group_name = tp_handle_inspect (self->priv->group_repo, group);
-
- tp_base_contact_list_remove_from_group_async (self, group_name, contacts,
- tp_base_contact_list_remove_from_group_cb, context);
-
- tp_handle_set_destroy (contacts);
- return;
-
-error:
- dbus_g_method_return_error (context, error);
- g_error_free (error);
-}
-
-static void
-tp_base_contact_list_delete_group_by_handle_cb (GObject *source,
- GAsyncResult *result,
- gpointer user_data)
-{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
- GError *error = NULL;
-
- g_return_if_fail (TP_IS_BASE_CONTACT_LIST (source));
-
- if (tp_base_contact_list_remove_group_finish (self, result, &error))
- {
- DEBUG ("Removing group '%s' succeeded", (gchar *) user_data);
- }
- else
- {
- DEBUG ("Removing group '%s' failed: %s #%d: %s", (gchar *) user_data,
- g_quark_to_string (error->domain), error->code, error->message);
- g_clear_error (&error);
- }
-
- g_free (user_data);
-}
-
-gboolean
-_tp_base_contact_list_delete_group_by_handle (TpBaseContactList *self,
- TpHandle group,
- GError **error)
-{
- gchar *group_name;
-
- if (tp_base_contact_list_get_state (self, error) !=
- TP_CONTACT_LIST_STATE_SUCCESS)
- {
- g_set_error (error, TP_ERROR, TP_ERROR_DISCONNECTED, "Disconnected");
- return FALSE;
- }
-
- if (!TP_IS_MUTABLE_CONTACT_GROUP_LIST (self))
- {
- g_set_error (error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
- "Cannot remove a group");
- return FALSE;
- }
-
- group_name = g_strdup (tp_handle_inspect (self->priv->group_repo, group));
-
- tp_base_contact_list_remove_group_async (self, group_name,
- tp_base_contact_list_delete_group_by_handle_cb, group_name);
- return TRUE;
-}
-
-typedef struct {
- DBusGMethodInvocation *context;
- TpListHandle list;
-} ListContext;
-
-static ListContext *
-list_context_new (DBusGMethodInvocation *context,
- TpListHandle list)
-{
- ListContext *lc = g_slice_new0 (ListContext);
-
- lc->context = context;
- lc->list = list;
- return lc;
-}
-
-static void
-list_context_finish_take_error (ListContext *lc,
- GError *error)
-{
- if (error == NULL)
- {
- dbus_g_method_return (lc->context);
- }
- else
- {
- dbus_g_method_return_error (lc->context, error);
- g_error_free (error);
- }
-
- g_slice_free (ListContext, lc);
-}
-
-static void
-tp_base_contact_list_add_to_list_cb (GObject *source,
- GAsyncResult *result,
- gpointer user_data)
-{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
- ListContext *lc = user_data;
- GError *error = NULL;
- gboolean ok;
-
- g_return_if_fail (TP_IS_BASE_CONTACT_LIST (source));
-
- switch (lc->list)
- {
- case TP_LIST_HANDLE_SUBSCRIBE:
- ok = tp_base_contact_list_request_subscription_finish (self, result,
- &error);
- break;
-
- case TP_LIST_HANDLE_PUBLISH:
- ok = tp_base_contact_list_authorize_publication_finish (self, result,
- &error);
- break;
-
- case TP_LIST_HANDLE_STORED:
- ok = tp_base_contact_list_store_contacts_finish (self, result, &error);
- break;
-
- case TP_LIST_HANDLE_DENY:
- ok = tp_base_contact_list_block_contacts_finish (self, result, &error);
- break;
-
- default:
- g_return_if_reached ();
- }
-
- g_assert (ok == (error == NULL));
- list_context_finish_take_error (lc, error);
-}
-
-void
-_tp_base_contact_list_add_to_list (TpBaseContactList *self,
- TpHandle list,
- const GArray *contacts_arr,
- const gchar *message,
- DBusGMethodInvocation *context)
-{
- TpHandleSet *contacts;
- GError *error = NULL;
- ListContext *lc;
-
- /* fail if not ready yet, failed, or disconnected, or if handles are bad */
- if (tp_base_contact_list_get_state (self, &error) !=
- TP_CONTACT_LIST_STATE_SUCCESS ||
- !tp_handles_are_valid (self->priv->contact_repo, contacts_arr, FALSE,
- &error))
- goto error;
-
- if (!tp_base_contact_list_can_change_contact_list (self))
- {
- g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
- "Cannot change subscriptions");
- goto error;
- }
-
- contacts = tp_handle_set_new_from_array (self->priv->contact_repo,
- contacts_arr);
- lc = list_context_new (context, list);
-
- switch (list)
- {
- case TP_LIST_HANDLE_SUBSCRIBE:
- tp_base_contact_list_request_subscription_async (self, contacts,
- message, tp_base_contact_list_add_to_list_cb, lc);
- break;
-
- case TP_LIST_HANDLE_PUBLISH:
- tp_base_contact_list_authorize_publication_async (self, contacts,
- tp_base_contact_list_add_to_list_cb, lc);
- break;
-
- case TP_LIST_HANDLE_STORED:
- tp_base_contact_list_store_contacts_async (self, contacts,
- tp_base_contact_list_add_to_list_cb, lc);
- break;
-
- case TP_LIST_HANDLE_DENY:
- tp_base_contact_list_block_contacts_async (self, contacts,
- tp_base_contact_list_add_to_list_cb, lc);
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- tp_handle_set_destroy (contacts);
- return;
-
-error:
- dbus_g_method_return_error (context, error);
- g_error_free (error);
-}
-
-static void
-tp_base_contact_list_remove_from_list_cb (GObject *source,
- GAsyncResult *result,
- gpointer user_data)
-{
- TpBaseContactList *self = TP_BASE_CONTACT_LIST (source);
- ListContext *lc = user_data;
- GError *error = NULL;
- gboolean ok;
-
- g_return_if_fail (TP_IS_BASE_CONTACT_LIST (source));
-
- switch (lc->list)
- {
- case TP_LIST_HANDLE_SUBSCRIBE:
- ok = tp_base_contact_list_unsubscribe_finish (self, result, &error);
- break;
-
- case TP_LIST_HANDLE_PUBLISH:
- ok = tp_base_contact_list_unpublish_finish (self, result, &error);
- break;
-
- case TP_LIST_HANDLE_STORED:
- ok = tp_base_contact_list_remove_contacts_finish (self, result, &error);
- break;
-
- case TP_LIST_HANDLE_DENY:
- ok = tp_base_contact_list_unblock_contacts_finish (self, result, &error);
- break;
-
- default:
- g_return_if_reached ();
- }
-
- g_assert (ok == (error == NULL));
- list_context_finish_take_error (lc, error);
-}
-
-void
-_tp_base_contact_list_remove_from_list (TpBaseContactList *self,
- TpHandle list,
- const GArray *contacts_arr,
- const gchar *message G_GNUC_UNUSED,
- guint reason G_GNUC_UNUSED,
- DBusGMethodInvocation *context)
-{
- TpHandleSet *contacts;
- GError *error = NULL;
- ListContext *lc;
-
- /* fail if not ready yet, failed, or disconnected, or if handles are bad */
- if (tp_base_contact_list_get_state (self, &error) !=
- TP_CONTACT_LIST_STATE_SUCCESS ||
- !tp_handles_are_valid (self->priv->contact_repo, contacts_arr, FALSE,
- &error))
- goto error;
-
- if (!tp_base_contact_list_can_change_contact_list (self))
- {
- g_set_error (&error, TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
- "Cannot change subscriptions");
- goto error;
- }
-
- contacts = tp_handle_set_new_from_array (self->priv->contact_repo,
- contacts_arr);
- lc = list_context_new (context, list);
-
- switch (list)
- {
- case TP_LIST_HANDLE_SUBSCRIBE:
- tp_base_contact_list_unsubscribe_async (self, contacts,
- tp_base_contact_list_remove_from_list_cb, lc);
- break;
-
- case TP_LIST_HANDLE_PUBLISH:
- tp_base_contact_list_unpublish_async (self, contacts,
- tp_base_contact_list_remove_from_list_cb, lc);
- break;
-
- case TP_LIST_HANDLE_STORED:
- tp_base_contact_list_remove_contacts_async (self, contacts,
- tp_base_contact_list_remove_from_list_cb, lc);
- break;
-
- case TP_LIST_HANDLE_DENY:
- tp_base_contact_list_unblock_contacts_async (self, contacts,
- tp_base_contact_list_remove_from_list_cb, lc);
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- tp_handle_set_destroy (contacts);
- return;
-
-error:
- dbus_g_method_return_error (context, error);
- g_error_free (error);
-}
-
/**
* tp_base_contact_list_set_list_pending:
* @self: the contact list manager
@@ -1873,7 +912,6 @@ tp_base_contact_list_set_list_failed (TpBaseContactList *self,
tp_svc_connection_interface_contact_list_emit_contact_list_state_changed (
self->priv->conn, self->priv->state);
- tp_base_contact_list_fail_channel_requests (self, domain, code, message);
tp_base_contact_list_fail_blocked_contact_requests (self,
self->priv->failure);
}
@@ -1916,25 +954,6 @@ tp_base_contact_list_set_list_received (TpBaseContactList *self)
self->priv->state = TP_CONTACT_LIST_STATE_SUCCESS;
/* we emit the signal for this later */
- if (self->priv->lists[TP_LIST_HANDLE_SUBSCRIBE] == NULL)
- {
- tp_base_contact_list_new_channel (self,
- TP_HANDLE_TYPE_LIST, TP_LIST_HANDLE_SUBSCRIBE, NULL);
- }
-
- if (self->priv->lists[TP_LIST_HANDLE_PUBLISH] == NULL)
- {
- tp_base_contact_list_new_channel (self,
- TP_HANDLE_TYPE_LIST, TP_LIST_HANDLE_PUBLISH, NULL);
- }
-
- if (tp_base_contact_list_get_contact_list_persists (self) &&
- self->priv->lists[TP_LIST_HANDLE_STORED] == NULL)
- {
- tp_base_contact_list_new_channel (self,
- TP_HANDLE_TYPE_LIST, TP_LIST_HANDLE_STORED, NULL);
- }
-
contacts = tp_base_contact_list_dup_contacts (self);
g_return_if_fail (contacts != NULL);
@@ -1958,12 +977,6 @@ tp_base_contact_list_set_list_received (TpBaseContactList *self)
{
TpHandleSet *blocked;
- if (self->priv->lists[TP_LIST_HANDLE_DENY] == NULL)
- {
- tp_base_contact_list_new_channel (self,
- TP_HANDLE_TYPE_LIST, TP_LIST_HANDLE_DENY, NULL);
- }
-
blocked = tp_base_contact_list_dup_blocked_contacts (self);
if (DEBUGGING)
@@ -1992,13 +1005,6 @@ tp_base_contact_list_set_list_received (TpBaseContactList *self)
tp_handle_set_destroy (blocked);
}
- for (i = 0; i < TP_NUM_LIST_HANDLES; i++)
- {
- if (self->priv->lists[i] != NULL)
- tp_base_contact_list_announce_channel (self, self->priv->lists[i],
- NULL);
- }
-
/* The natural thing to do here would be to iterate over all contacts, and
* for each contact, emit a signal adding them to their own groups. However,
* that emits a signal per contact. Here we turn the data model inside out,
@@ -2007,8 +1013,6 @@ tp_base_contact_list_set_list_received (TpBaseContactList *self)
if (TP_IS_CONTACT_GROUP_LIST (self))
{
GStrv groups = tp_base_contact_list_dup_groups (self);
- GHashTableIter h_iter;
- gpointer channel;
tp_base_contact_list_groups_created (self,
(const gchar * const *) groups, -1);
@@ -2023,11 +1027,6 @@ tp_base_contact_list_set_list_received (TpBaseContactList *self)
tp_handle_set_destroy (members);
}
- g_hash_table_iter_init (&h_iter, self->priv->groups);
-
- while (g_hash_table_iter_next (&h_iter, NULL, &channel))
- tp_base_contact_list_announce_channel (self, channel, NULL);
-
g_strfreev (groups);
}
@@ -2098,12 +1097,8 @@ tp_base_contact_list_contacts_changed_internal (TpBaseContactList *self,
{
GHashTable *changes;
GHashTable *change_ids;
- GArray *removals;
GHashTable *removal_ids;
TpIntsetFastIter iter;
- TpIntset *pub, *sub, *sub_rp, *unpub, *unsub, *store;
- GObject *sub_chan, *pub_chan, *stored_chan;
- TpHandle self_handle;
TpHandle contact;
g_return_if_fail (TP_IS_BASE_CONTACT_LIST (self));
@@ -2114,26 +1109,6 @@ tp_base_contact_list_contacts_changed_internal (TpBaseContactList *self,
TP_CONTACT_LIST_STATE_SUCCESS)
return;
- self_handle = tp_base_connection_get_self_handle (self->priv->conn),
-
- sub_chan = (GObject *) self->priv->lists[TP_LIST_HANDLE_SUBSCRIBE];
- pub_chan = (GObject *) self->priv->lists[TP_LIST_HANDLE_PUBLISH];
- stored_chan = (GObject *) self->priv->lists[TP_LIST_HANDLE_STORED];
-
- g_return_if_fail (G_IS_OBJECT (sub_chan));
- g_return_if_fail (G_IS_OBJECT (pub_chan));
- /* stored_chan can legitimately be NULL, though */
-
- /* For some changes, we emit signals one by one, because the actor is
- * different every time. However, for these sets of changes, we do them all
- * at once, since they'll share an actor. */
- pub = tp_intset_new ();
- unpub = tp_intset_new ();
- unsub = tp_intset_new ();
- sub = tp_intset_new ();
- sub_rp = tp_intset_new ();
- store = tp_intset_new ();
-
changes = g_hash_table_new_full (NULL, NULL, NULL,
(GDestroyNotify) g_value_array_free);
change_ids = g_hash_table_new (NULL, NULL);
@@ -2147,8 +1122,6 @@ tp_base_contact_list_contacts_changed_internal (TpBaseContactList *self,
TpSubscriptionState publish = TP_SUBSCRIPTION_STATE_NO;
gchar *publish_request = NULL;
- tp_intset_add (store, contact);
-
tp_base_contact_list_dup_states (self, contact,
&subscribe, &publish, &publish_request);
@@ -2161,95 +1134,6 @@ tp_base_contact_list_contacts_changed_internal (TpBaseContactList *self,
_tp_base_contact_list_presence_state_to_letter (publish),
publish_request);
- switch (publish)
- {
- case TP_SUBSCRIPTION_STATE_NO:
- case TP_SUBSCRIPTION_STATE_UNKNOWN:
- tp_intset_add (unpub, contact);
- break;
-
- case TP_SUBSCRIPTION_STATE_ASK:
- {
- /* Emit any publication requests as we go along, since they can
- * each have a different message and actor */
- TpIntset *pub_lp = tp_intset_new_containing (contact);
-
- tp_group_mixin_change_members (pub_chan, publish_request,
- NULL, NULL, pub_lp, NULL, contact,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
- tp_intset_destroy (pub_lp);
- }
- break;
-
- case TP_SUBSCRIPTION_STATE_REMOVED_REMOTELY:
- {
- /* Also emit publication request cancellations as we go along:
- * each one has a different actor */
- TpIntset *pub_cancelled = tp_intset_new_containing (
- contact);
-
- tp_group_mixin_change_members (pub_chan, "",
- NULL, pub_cancelled, NULL, NULL, contact,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
- tp_intset_destroy (pub_cancelled);
- }
- break;
-
- case TP_SUBSCRIPTION_STATE_YES:
- tp_intset_add (pub, contact);
- break;
-
- default:
- g_assert_not_reached ();
- }
-
- switch (subscribe)
- {
- case TP_SUBSCRIPTION_STATE_NO:
- case TP_SUBSCRIPTION_STATE_UNKNOWN:
- tp_intset_add (unsub, contact);
- break;
-
- case TP_SUBSCRIPTION_STATE_REMOVED_REMOTELY:
- {
- /* If our subscription request was rejected, the actor is the
- * other guy, and PERMISSION_DENIED seems a reasonable reason */
- TpIntset *sub_rejected = tp_intset_new_containing (contact);
-
- tp_group_mixin_change_members (sub_chan, "",
- NULL, sub_rejected, NULL, NULL, contact,
- TP_CHANNEL_GROUP_CHANGE_REASON_PERMISSION_DENIED);
- tp_intset_destroy (sub_rejected);
- }
- break;
-
- case TP_SUBSCRIPTION_STATE_ASK:
- tp_intset_add (sub_rp, contact);
- break;
-
- case TP_SUBSCRIPTION_STATE_YES:
- if (is_initial_roster)
- {
- tp_intset_add (sub, contact);
- }
- else
- {
- /* If our subscription request was accepted, the actor is the
- * other guy accepting */
- TpIntset *sub_approved = tp_intset_new_containing (contact);
-
- tp_group_mixin_change_members (sub_chan, "",
- sub_approved, NULL, NULL, NULL, contact,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
- tp_intset_destroy (sub_approved);
- }
-
- break;
-
- default:
- g_assert_not_reached ();
- }
-
g_hash_table_insert (changes, GUINT_TO_POINTER (contact),
tp_value_array_build (3,
G_TYPE_UINT, subscribe,
@@ -2266,89 +1150,35 @@ tp_base_contact_list_contacts_changed_internal (TpBaseContactList *self,
if (removed != NULL)
{
+ GArray *removals = tp_handle_set_to_array (removed);
guint i;
- tp_intset_union_update (unsub, tp_handle_set_peek (removed));
- tp_intset_union_update (unpub, tp_handle_set_peek (removed));
-
- removals = tp_handle_set_to_array (removed);
-
for (i = 0; i < removals->len; i++)
{
- TpHandle handle = g_array_index (removals, guint, i);
+ TpHandle handle = g_array_index (removals, TpHandle, i);
g_hash_table_insert (removal_ids, GUINT_TO_POINTER (handle),
(gchar *) tp_handle_inspect (self->priv->contact_repo, handle));
}
- }
- else
- {
- removals = g_array_sized_new (FALSE, FALSE, sizeof (TpHandle), 0);
- }
- /* The actor is 0 for removals from subscribe and publish: we don't know
- * whether it was our idea, or caused by an unknown contact or by server
- * failure, since those are all represented as No. */
- tp_group_mixin_change_members (sub_chan, "",
- NULL, unsub, NULL, NULL, 0, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
- tp_group_mixin_change_members (pub_chan, "",
- NULL, unpub, NULL, NULL, 0, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
-
- /* pub is the set of contacts changing to publish=Yes (i.e. contacts we'll
- * allow to see our presence), which was presumably our idea. */
- tp_group_mixin_change_members (pub_chan, "",
- pub, NULL, NULL, NULL, self_handle, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
-
- /* sub is the set of contacts with subscribe=Yes while retrieving the
- * initial roster. We don't know if the contacts were already in the roster
- * or if they were added while we were offline, so the actor is 0.
- * Having all the initial contacts grouped together means we emit a single
- * MembersChanged and one MembersChangedDetailed for the whole roster. */
- tp_group_mixin_change_members (sub_chan, "", sub, NULL, NULL, NULL, 0,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
-
- /* sub_rp is the set of contacts changing to subscribe=Ask, which was
- * presumably our idea. */
- tp_group_mixin_change_members (sub_chan, "", NULL, NULL, NULL, sub_rp,
- self_handle, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
-
- /* We use actor 0 for the stored list, since people can land on the stored
- * list for a variety of reasons (if someone has requested we publish to
- * them, they're temporarily claimed to be stored). */
- if (stored_chan != NULL)
- {
- tp_group_mixin_change_members (stored_chan, "",
- store,
- removed == NULL ? NULL : tp_handle_set_peek (removed),
- NULL, NULL,
- 0, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+ g_array_unref (removals);
}
- if (g_hash_table_size (changes) > 0 || removals->len > 0)
+ if (g_hash_table_size (changes) > 0 || g_hash_table_size (removal_ids) > 0)
{
DEBUG ("ContactsChanged([%u changed], [%u removed])",
- g_hash_table_size (changes), removals->len);
+ g_hash_table_size (changes), g_hash_table_size (removal_ids));
if (self->priv->svc_contact_list)
{
- tp_svc_connection_interface_contact_list_emit_contacts_changed_with_id (
- self->priv->conn, changes, change_ids, removal_ids);
tp_svc_connection_interface_contact_list_emit_contacts_changed (
- self->priv->conn, changes, removals);
+ self->priv->conn, changes, change_ids, removal_ids);
}
}
- tp_intset_destroy (pub);
- tp_intset_destroy (unpub);
- tp_intset_destroy (unsub);
- tp_intset_destroy (sub_rp);
- tp_intset_destroy (sub);
- tp_intset_destroy (store);
-
g_hash_table_unref (changes);
g_hash_table_unref (change_ids);
g_hash_table_unref (removal_ids);
- g_array_unref (removals);
}
/**
@@ -2429,10 +1259,8 @@ tp_base_contact_list_contact_blocking_changed (TpBaseContactList *self,
TpHandleSet *changed)
{
TpHandleSet *now_blocked;
- TpIntset *blocked, *unblocked;
GHashTable *blocked_contacts, *unblocked_contacts;
TpIntsetFastIter iter;
- GObject *deny_chan;
TpHandle handle;
g_return_if_fail (TP_IS_BASE_CONTACT_LIST (self));
@@ -2446,13 +1274,8 @@ tp_base_contact_list_contact_blocking_changed (TpBaseContactList *self,
g_return_if_fail (tp_base_contact_list_can_block (self));
- deny_chan = (GObject *) self->priv->lists[TP_LIST_HANDLE_DENY];
- g_return_if_fail (G_IS_OBJECT (deny_chan));
-
now_blocked = tp_base_contact_list_dup_blocked_contacts (self);
- blocked = tp_intset_new ();
- unblocked = tp_intset_new ();
blocked_contacts = g_hash_table_new (NULL, NULL);
unblocked_contacts = g_hash_table_new (NULL, NULL);
@@ -2464,13 +1287,11 @@ tp_base_contact_list_contact_blocking_changed (TpBaseContactList *self,
if (tp_handle_set_is_member (now_blocked, handle))
{
- tp_intset_add (blocked, handle);
g_hash_table_insert (blocked_contacts, GUINT_TO_POINTER (handle),
(gpointer) id);
}
else
{
- tp_intset_add (unblocked, handle);
g_hash_table_insert (unblocked_contacts, GUINT_TO_POINTER (handle),
(gpointer) id);
}
@@ -2479,19 +1300,12 @@ tp_base_contact_list_contact_blocking_changed (TpBaseContactList *self,
tp_handle_set_is_member (now_blocked, handle) ? 'Y' : 'N');
}
- tp_group_mixin_change_members (deny_chan, "",
- blocked, unblocked, NULL, NULL,
- tp_base_connection_get_self_handle (self->priv->conn),
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
-
if (self->priv->svc_contact_blocking &&
(g_hash_table_size (blocked_contacts) > 0 ||
g_hash_table_size (unblocked_contacts) > 0))
tp_svc_connection_interface_contact_blocking_emit_blocked_contacts_changed (
self->priv->conn, blocked_contacts, unblocked_contacts);
- tp_intset_destroy (blocked);
- tp_intset_destroy (unblocked);
g_hash_table_unref (blocked_contacts);
g_hash_table_unref (unblocked_contacts);
tp_handle_set_destroy (now_blocked);
@@ -3706,29 +2520,19 @@ tp_base_contact_list_groups_created (TpBaseContactList *self,
for (i = 0; i < n_created; i++)
{
- TpHandle handle = tp_handle_ensure (self->priv->group_repo, created[i],
- NULL, NULL);
+ gchar *normalized_group = tp_base_contact_list_normalize_group (
+ self, created[i]);
- if (handle != 0)
+ if (g_hash_table_lookup (self->priv->groups, normalized_group) == NULL)
{
- gpointer c = g_hash_table_lookup (self->priv->groups,
- GUINT_TO_POINTER (handle));
-
- if (c == NULL)
- c = tp_base_contact_list_new_channel (self, TP_HANDLE_TYPE_GROUP,
- handle, NULL);
-
- if (g_hash_table_lookup_extended (self->priv->channel_requests, c,
- NULL, NULL))
- {
- /* the channel hasn't been announced yet: do so, and include
- * it in the GroupsCreated signal */
- g_ptr_array_add (actually_created, (gchar *) tp_handle_inspect (
- self->priv->group_repo, handle));
+ g_ptr_array_add (actually_created, (gchar *) created[i]);
- tp_base_contact_list_announce_channel (self, c, NULL);
- }
+ g_hash_table_insert (self->priv->groups,
+ g_strdup (normalized_group),
+ tp_handle_set_new (self->priv->contact_repo));
}
+
+ g_free (normalized_group);
}
if (actually_created->len > 0)
@@ -3805,50 +2609,27 @@ tp_base_contact_list_groups_removed (TpBaseContactList *self,
for (i = 0; i < n_removed; i++)
{
- TpHandle handle = tp_handle_lookup (self->priv->group_repo, removed[i],
- NULL, NULL);
-
- if (handle != 0)
+ gchar *normalized_group = tp_base_contact_list_normalize_group (
+ self, removed[i]);
+ TpHandleSet *group_members = g_hash_table_lookup (self->priv->groups,
+ normalized_group);
+ TpHandle contact;
+ TpIntsetFastIter iter;
+
+ if (group_members != NULL)
{
- gpointer c = g_hash_table_lookup (self->priv->groups,
- GUINT_TO_POINTER (handle));
+ g_ptr_array_add (actually_removed, g_strdup (removed[i]));
- if (c != NULL)
- {
- gchar *name;
- TpHandleSet *group_members;
- TpHandle contact;
- TpIntsetFastIter iter;
-
- /* the handle might get unref'd by closing the channel, so copy
- * the string */
- name = g_strdup (tp_handle_inspect (self->priv->group_repo,
- handle));
- g_ptr_array_add (actually_removed, name);
- group_members = tp_base_contact_list_dup_group_members (self,
- name);
-
- tp_intset_fast_iter_init (&iter,
- tp_handle_set_peek (group_members));
-
- while (tp_intset_fast_iter_next (&iter, &contact))
- tp_handle_set_add (old_members, contact);
-
- /* Remove members if any: presumably the self-handle is the
- * actor. */
- tp_group_mixin_change_members (c, "",
- NULL, tp_handle_set_peek (group_members), NULL, NULL,
- self->priv->conn->self_handle,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
-
- tp_channel_manager_emit_channel_closed_for_object (self, c);
- _tp_base_contact_list_channel_close (c);
- g_hash_table_remove (self->priv->groups,
- GUINT_TO_POINTER (handle));
-
- tp_handle_set_destroy (group_members);
- }
+ tp_intset_fast_iter_init (&iter,
+ tp_handle_set_peek (group_members));
+
+ while (tp_intset_fast_iter_next (&iter, &contact))
+ tp_handle_set_add (old_members, contact);
+
+ g_hash_table_remove (self->priv->groups, normalized_group);
}
+
+ g_free (normalized_group);
}
if (actually_removed->len > 0)
@@ -3908,8 +2689,6 @@ tp_base_contact_list_group_renamed (TpBaseContactList *self,
const gchar *old_name,
const gchar *new_name)
{
- TpHandle old_handle, new_handle;
- gpointer old_chan, new_chan;
const gchar *old_names[] = { old_name, NULL };
const gchar *new_names[] = { new_name, NULL };
const TpIntset *set;
@@ -3921,56 +2700,6 @@ tp_base_contact_list_group_renamed (TpBaseContactList *self,
if (self->priv->state != TP_CONTACT_LIST_STATE_SUCCESS)
return;
- old_handle = tp_handle_ensure (self->priv->group_repo, old_name, NULL, NULL);
-
- if (old_handle == 0)
- return;
-
- old_chan = g_hash_table_lookup (self->priv->groups,
- GUINT_TO_POINTER (old_handle));
-
- new_handle = tp_handle_ensure (self->priv->group_repo, new_name, NULL, NULL);
-
- if (new_handle == 0)
- return;
-
- new_chan = g_hash_table_lookup (self->priv->groups,
- GUINT_TO_POINTER (new_handle));
-
- if (new_chan == NULL)
- {
- new_chan = tp_base_contact_list_new_channel (self, TP_HANDLE_TYPE_GROUP,
- new_handle, NULL);
- }
-
- if (g_hash_table_lookup_extended (self->priv->channel_requests, new_chan,
- NULL, NULL))
- {
- /* the channel hasn't been announced yet: do so */
- tp_base_contact_list_announce_channel (self, new_chan, NULL);
- }
-
- old_members = tp_base_contact_list_dup_group_members (self, old_name);
-
- /* move the members - presumably the self-handle is the actor */
- set = tp_handle_set_peek (old_members);
- tp_group_mixin_change_members (new_chan, "", set, NULL, NULL, NULL,
- self->priv->conn->self_handle, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
-
- if (old_chan != NULL)
- {
- tp_group_mixin_change_members (old_chan, "", NULL, set, NULL, NULL,
- self->priv->conn->self_handle, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
- tp_channel_manager_emit_channel_closed_for_object (self, old_chan);
- _tp_base_contact_list_channel_close (old_chan);
- }
-
- g_hash_table_remove (self->priv->groups, GUINT_TO_POINTER (old_handle));
-
- /* get normalized forms */
- old_names[0] = tp_handle_inspect (self->priv->group_repo, old_handle);
- new_names[0] = tp_handle_inspect (self->priv->group_repo, new_handle);
-
DEBUG ("GroupRenamed('%s', '%s')", old_names[0], new_names[0]);
if (self->priv->svc_contact_groups)
@@ -3985,6 +2714,9 @@ tp_base_contact_list_group_renamed (TpBaseContactList *self,
self->priv->conn, old_names);
}
+ old_members = tp_base_contact_list_dup_group_members (self, old_name);
+ set = tp_handle_set_peek (old_members);
+
if (tp_intset_size (set) > 0)
{
DEBUG ("GroupsChanged([%u contacts], ['%s'], ['%s'])",
@@ -4003,6 +2735,34 @@ tp_base_contact_list_group_renamed (TpBaseContactList *self,
tp_handle_set_destroy (old_members);
}
+static gboolean
+add_contacts_to_handle_set (TpHandleSet *set,
+ TpIntset *contacts)
+{
+ TpIntset *subset;
+ gboolean changed;
+
+ subset = tp_handle_set_update (set, contacts);
+ changed = tp_intset_size (subset) > 0;
+ tp_intset_destroy (subset);
+
+ return changed;
+}
+
+static gboolean
+remove_contacts_from_handle_set (TpHandleSet *set,
+ TpIntset *contacts)
+{
+ TpIntset *subset;
+ gboolean changed;
+
+ subset = tp_handle_set_difference_update (set, contacts);
+ changed = tp_intset_size (subset) > 0;
+ tp_intset_destroy (subset);
+
+ return changed;
+}
+
/**
* tp_base_contact_list_groups_changed:
* @self: a contact list manager
@@ -4099,52 +2859,56 @@ tp_base_contact_list_groups_changed (TpBaseContactList *self,
for (i = 0; i < n_added; i++)
{
- TpHandle handle = tp_handle_lookup (self->priv->group_repo, added[i],
- NULL, NULL);
- gpointer c;
-
- /* it doesn't matter if handle is 0, we'll just get NULL */
- c = g_hash_table_lookup (self->priv->groups,
- GUINT_TO_POINTER (handle));
+ gchar *normalized_group = tp_base_contact_list_normalize_group (
+ self, added[i]);
+ TpHandleSet *contacts_in_group = g_hash_table_lookup (self->priv->groups,
+ normalized_group);
- if (c == NULL)
+ if (contacts_in_group == NULL)
{
- DEBUG ("No channel for group '%s', it must be invalid?", added[i]);
- continue;
+ DEBUG ("No record of group '%s', it must be invalid?",
+ normalized_group);
}
+ else
+ {
+ DEBUG ("Adding %u contacts to group '%s'",
+ tp_handle_set_size (contacts), added[i]);
- DEBUG ("Adding %u contacts to group '%s'", tp_handle_set_size (contacts),
- added[i]);
+ if (add_contacts_to_handle_set (contacts_in_group,
+ tp_handle_set_peek (contacts)))
+ {
+ g_ptr_array_add (really_added, (gchar *) added[i]);
+ }
+ }
- if (tp_group_mixin_change_members (c, "",
- tp_handle_set_peek (contacts), NULL, NULL, NULL,
- self->priv->conn->self_handle, TP_CHANNEL_GROUP_CHANGE_REASON_NONE))
- g_ptr_array_add (really_added, (gchar *) added[i]);
+ g_free (normalized_group);
}
for (i = 0; i < n_removed; i++)
{
- TpHandle handle = tp_handle_lookup (self->priv->group_repo, removed[i],
- NULL, NULL);
- gpointer c;
-
- /* it doesn't matter if handle is 0, we'll just get NULL */
- c = g_hash_table_lookup (self->priv->groups,
- GUINT_TO_POINTER (handle));
+ gchar *normalized_group = tp_base_contact_list_normalize_group (
+ self, removed[i]);
+ TpHandleSet *contacts_in_group = g_hash_table_lookup (self->priv->groups,
+ normalized_group);
- if (c == NULL)
+ if (contacts_in_group == NULL)
{
- DEBUG ("Group '%s' doesn't exist", removed[i]);
- continue;
+ DEBUG ("No record of group '%s', it must be invalid?",
+ normalized_group);
}
+ else
+ {
+ DEBUG ("Removing %u contacts from group '%s'",
+ tp_handle_set_size (contacts), removed[i]);
- DEBUG ("Removing %u contacts from group '%s'",
- tp_handle_set_size (contacts), removed[i]);
+ if (remove_contacts_from_handle_set (contacts_in_group,
+ tp_handle_set_peek (contacts)))
+ {
+ g_ptr_array_add (really_removed, (gchar *) removed[i]);
+ }
+ }
- if (tp_group_mixin_change_members (c, "",
- NULL, tp_handle_set_peek (contacts), NULL, NULL,
- self->priv->conn->self_handle, TP_CHANNEL_GROUP_CHANGE_REASON_NONE))
- g_ptr_array_add (really_removed, (gchar *) removed[i]);
+ g_free (normalized_group);
}
if (really_added->len > 0 || really_removed->len > 0)
@@ -4606,18 +3370,9 @@ tp_base_contact_list_emulate_rename_group (TpBaseContactList *self,
GAsyncReadyCallback callback,
gpointer user_data)
{
- TpHandle old_handle;
- gpointer old_channel;
GSimpleAsyncResult *result;
TpHandleSet *old_members;
- old_handle = tp_handle_lookup (self->priv->group_repo, old_name, NULL,
- NULL);
- g_return_if_fail (old_handle != 0);
- old_channel = g_hash_table_lookup (self->priv->groups,
- GUINT_TO_POINTER (old_handle));
- g_return_if_fail (old_channel != NULL);
-
result = g_simple_async_result_new ((GObject *) self, callback, user_data,
tp_base_contact_list_emulate_rename_group);
@@ -4830,11 +3585,10 @@ static void
tp_base_contact_list_mixin_get_contact_list_attributes (
TpSvcConnectionInterfaceContactList *svc,
const gchar **interfaces,
- gboolean hold,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
TpContactsMixin *contacts_mixin = TP_CONTACTS_MIXIN (svc);
GError *error = NULL;
@@ -4853,23 +3607,17 @@ tp_base_contact_list_mixin_get_contact_list_attributes (
GArray *contacts;
const gchar *assumed[] = { TP_IFACE_CONNECTION,
TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST, NULL };
- gchar *sender = NULL;
GHashTable *result;
- if (hold)
- sender = dbus_g_method_get_sender (context);
-
set = tp_base_contact_list_dup_contacts (self);
contacts = tp_handle_set_to_array (set);
result = tp_contacts_mixin_get_contact_attributes (
- (GObject *) self->priv->conn, contacts, interfaces, assumed,
- sender);
+ (GObject *) self->priv->conn, contacts, interfaces, assumed);
tp_svc_connection_interface_contact_list_return_from_get_contact_list_attributes (
context, result);
g_array_unref (contacts);
tp_handle_set_destroy (set);
- g_free (sender);
g_hash_table_unref (result);
}
}
@@ -5136,8 +3884,8 @@ tp_base_contact_list_mixin_request_subscription (
const gchar *message,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
GError *error = NULL;
TpHandleSet *contacts_set;
@@ -5175,8 +3923,8 @@ tp_base_contact_list_mixin_authorize_publication (
const GArray *contacts,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
GError *error = NULL;
TpHandleSet *contacts_set;
@@ -5214,8 +3962,8 @@ tp_base_contact_list_mixin_remove_contacts (
const GArray *contacts,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
GError *error = NULL;
TpHandleSet *contacts_set;
@@ -5253,8 +4001,8 @@ tp_base_contact_list_mixin_unsubscribe (
const GArray *contacts,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
GError *error = NULL;
TpHandleSet *contacts_set;
@@ -5292,8 +4040,8 @@ tp_base_contact_list_mixin_unpublish (
const GArray *contacts,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
GError *error = NULL;
TpHandleSet *contacts_set;
@@ -5337,8 +4085,7 @@ tp_base_contact_list_get_list_dbus_property (GObject *conn,
GValue *value,
gpointer data)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) conn, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata (conn, BASE_CONTACT_LIST);
ListProp p = GPOINTER_TO_INT (data);
g_return_if_fail (TP_IS_BASE_CONTACT_LIST (self));
@@ -5384,8 +4131,7 @@ tp_base_contact_list_fill_list_contact_attributes (GObject *obj,
const GArray *contacts,
GHashTable *attributes_hash)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) obj, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata (obj, BASE_CONTACT_LIST);
guint i;
g_return_if_fail (TP_IS_BASE_CONTACT_LIST (self));
@@ -5447,8 +4193,8 @@ tp_base_contact_list_mixin_download (
TpSvcConnectionInterfaceContactList *svc,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
tp_base_contact_list_download_async (self,
tp_base_contact_list_mixin_download_cb, context);
@@ -5456,7 +4202,8 @@ tp_base_contact_list_mixin_download (
/**
* tp_base_contact_list_mixin_list_iface_init:
- * @klass: the service-side D-Bus interface
+ * @klass: the service-side D-Bus interface,
+ * a #TpSvcConnectionInterfaceContactListClass
*
* Use the #TpBaseContactList like a mixin, to implement the ContactList
* D-Bus interface.
@@ -5467,8 +4214,7 @@ tp_base_contact_list_mixin_download (
* Since: 0.13.0
*/
void
-tp_base_contact_list_mixin_list_iface_init (
- TpSvcConnectionInterfaceContactListClass *klass)
+tp_base_contact_list_mixin_list_iface_init (gpointer klass)
{
#define IMPLEMENT(x) tp_svc_connection_interface_contact_list_implement_##x (\
klass, tp_base_contact_list_mixin_##x)
@@ -5558,13 +4304,11 @@ tp_base_contact_list_mixin_set_contact_groups (
const gchar **groups,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
const gchar *empty_strv[] = { NULL };
GError *error = NULL;
- TpHandleSet *group_set = NULL;
GPtrArray *normalized_groups = NULL;
- guint i;
if (!tp_base_contact_list_check_group_change (self, NULL, &error))
goto finally;
@@ -5572,24 +4316,20 @@ tp_base_contact_list_mixin_set_contact_groups (
if (groups == NULL)
groups = empty_strv;
- group_set = tp_handle_set_new (self->priv->group_repo);
- normalized_groups = g_ptr_array_sized_new (g_strv_length ((GStrv) groups));
+ normalized_groups = g_ptr_array_new_full (g_strv_length ((GStrv) groups),
+ (GDestroyNotify) g_free);
- for (i = 0; groups[i] != NULL; i++)
+ for (; groups != NULL && *groups != NULL; groups++)
{
- TpHandle group_handle = tp_handle_ensure (self->priv->group_repo,
- groups[i], NULL, NULL);
+ gchar *normalized = tp_base_contact_list_normalize_group (self, *groups);
- if (group_handle != 0)
+ if (normalized != NULL)
{
- g_ptr_array_add (normalized_groups,
- (gchar *) tp_handle_inspect (self->priv->group_repo,
- group_handle));
- tp_handle_set_add (group_set, group_handle);
+ g_ptr_array_add (normalized_groups, normalized);
}
else
{
- DEBUG ("group '%s' not valid, ignoring it", groups[i]);
+ DEBUG ("group '%s' not valid, ignoring it", *groups);
}
}
@@ -5600,7 +4340,6 @@ tp_base_contact_list_mixin_set_contact_groups (
context = NULL; /* ownership transferred to callback */
finally:
- tp_clear_pointer (&group_set, tp_handle_set_destroy);
tp_clear_pointer (&normalized_groups, g_ptr_array_unref);
if (context != NULL)
@@ -5629,8 +4368,8 @@ tp_base_contact_list_mixin_set_group_members (
const GArray *contacts,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
TpHandleSet *contacts_set = NULL;
GError *error = NULL;
@@ -5670,29 +4409,26 @@ tp_base_contact_list_mixin_add_to_group (
const GArray *contacts,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
GError *error = NULL;
- TpHandle group_handle = 0;
+ gchar *normalized_group = NULL;
TpHandleSet *contacts_set;
if (!tp_base_contact_list_check_group_change (self, contacts, &error))
goto sync_exit;
- /* get the handle so we can use the normalized name */
- group_handle = tp_handle_ensure (self->priv->group_repo, group, NULL,
- &error);
+ normalized_group = tp_base_contact_list_normalize_group (self, group);
- /* if the group's name is syntactically invalid, just fail */
- if (group_handle == 0)
+ if (normalized_group == NULL)
goto sync_exit;
contacts_set = tp_handle_set_new_from_array (self->priv->contact_repo,
contacts);
- tp_base_contact_list_add_to_group_async (self,
- tp_handle_inspect (self->priv->group_repo, group_handle),
+ tp_base_contact_list_add_to_group_async (self, normalized_group,
contacts_set, tp_base_contact_list_mixin_add_to_group_cb, context);
tp_handle_set_destroy (contacts_set);
+ g_free (normalized_group);
return;
sync_exit:
@@ -5720,33 +4456,34 @@ tp_base_contact_list_mixin_remove_from_group (
const GArray *contacts,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
GError *error = NULL;
- TpHandle group_handle;
+ gchar *normalized_group = NULL;
TpHandleSet *contacts_set;
if (!tp_base_contact_list_check_group_change (self, contacts, &error))
goto sync_exit;
- /* get the handle so we can use the normalized name */
- group_handle = tp_handle_lookup (self->priv->group_repo, group, NULL, NULL);
+ normalized_group = tp_base_contact_list_normalize_group (self, group);
- /* removing from a group that doesn't exist is a no-op */
- if (group_handle == 0)
+ if (normalized_group == NULL
+ || g_hash_table_lookup (self->priv->groups, normalized_group) == NULL)
goto sync_exit;
contacts_set = tp_handle_set_new_from_array (self->priv->contact_repo,
contacts);
- tp_base_contact_list_remove_from_group_async (self,
- tp_handle_inspect (self->priv->group_repo, group_handle),
+ tp_base_contact_list_remove_from_group_async (self, normalized_group,
contacts_set, tp_base_contact_list_mixin_remove_from_group_cb, context);
tp_handle_set_destroy (contacts_set);
+ g_free (normalized_group);
+
return;
sync_exit:
tp_base_contact_list_mixin_return_void (context, error);
g_clear_error (&error);
+ g_free (normalized_group);
}
static void
@@ -5768,21 +4505,22 @@ tp_base_contact_list_mixin_remove_group (
const gchar *group,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
GError *error = NULL;
- TpHandle group_handle;
+ gchar *normalized_group = NULL;
if (!tp_base_contact_list_check_group_change (self, NULL, &error))
goto sync_exit;
- /* get the handle so we can use the normalized name */
- group_handle = tp_handle_lookup (self->priv->group_repo, group, NULL, NULL);
+ normalized_group = tp_base_contact_list_normalize_group (self, group);
- /* removing from a group that doesn't exist is a no-op */
- if (group_handle == 0)
+ if (normalized_group == NULL
+ || g_hash_table_lookup (self->priv->groups, normalized_group) == NULL)
goto sync_exit;
+ g_free (normalized_group);
+
tp_base_contact_list_remove_group_async (self, group,
tp_base_contact_list_mixin_remove_group_cb, context);
return;
@@ -5790,6 +4528,7 @@ tp_base_contact_list_mixin_remove_group (
sync_exit:
tp_base_contact_list_mixin_return_void (context, error);
g_clear_error (&error);
+ g_free (normalized_group);
}
static void
@@ -5812,45 +4551,42 @@ tp_base_contact_list_mixin_rename_group (
const gchar *after,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
GError *error = NULL;
- TpHandle old_handle;
- gpointer old_channel;
- TpHandle new_handle = 0;
+ gchar *old_normalized;
+ gchar *new_normalized;
if (!tp_base_contact_list_check_group_change (self, NULL, &error))
goto sync_exit;
- old_handle = tp_handle_lookup (self->priv->group_repo, before, NULL, NULL);
- old_channel = g_hash_table_lookup (self->priv->groups,
- GUINT_TO_POINTER (old_handle));
+ /* jtodo: just use the normalize func directly */
- if (old_handle == 0 || old_channel == NULL)
+ old_normalized = tp_base_contact_list_normalize_group (self, before);
+
+ if (g_hash_table_lookup (self->priv->groups, old_normalized) == NULL)
{
g_set_error (&error, TP_ERROR, TP_ERROR_DOES_NOT_EXIST,
"Group '%s' does not exist", before);
+ g_free (old_normalized);
goto sync_exit;
}
- new_handle = tp_handle_ensure (self->priv->group_repo, after, NULL, &error);
+ new_normalized = tp_base_contact_list_normalize_group (self, after);
- if (new_handle == 0)
- goto sync_exit;
-
- if (g_hash_table_lookup (self->priv->groups, GUINT_TO_POINTER (new_handle))
- != NULL)
+ if (g_hash_table_lookup (self->priv->groups, new_normalized) != NULL)
{
g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
- "Group '%s' already exists",
- tp_handle_inspect (self->priv->group_repo, new_handle));
+ "Group '%s' already exists", new_normalized);
+ g_free (new_normalized);
goto sync_exit;
}
tp_base_contact_list_rename_group_async (self,
- tp_handle_inspect (self->priv->group_repo, old_handle),
- tp_handle_inspect (self->priv->group_repo, new_handle),
+ old_normalized, new_normalized,
tp_base_contact_list_mixin_rename_group_cb, context);
+ g_free (old_normalized);
+ g_free (new_normalized);
return;
sync_exit:
@@ -5879,8 +4615,7 @@ tp_base_contact_list_get_group_dbus_property (GObject *conn,
GValue *value,
gpointer data)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) conn, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata (conn, BASE_CONTACT_LIST);
GroupProp p = GPOINTER_TO_INT (data);
g_return_if_fail (TP_IS_BASE_CONTACT_LIST (self));
@@ -5918,8 +4653,7 @@ tp_base_contact_list_fill_groups_contact_attributes (GObject *obj,
const GArray *contacts,
GHashTable *attributes_hash)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) obj, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata (obj, BASE_CONTACT_LIST);
guint i;
g_return_if_fail (TP_IS_BASE_CONTACT_LIST (self));
@@ -5948,8 +4682,7 @@ tp_base_contact_list_fill_blocking_contact_attributes (GObject *obj,
const GArray *contacts,
GHashTable *attributes_hash)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) obj, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata (obj, BASE_CONTACT_LIST);
guint i;
TpHandleSet *blocked;
@@ -5982,7 +4715,8 @@ tp_base_contact_list_fill_blocking_contact_attributes (GObject *obj,
/**
* tp_base_contact_list_mixin_groups_iface_init:
- * @klass: the service-side D-Bus interface
+ * @klass: the service-side D-Bus interface,
+ * a #TpSvcConnectionInterfaceContactGroupsClass
*
* Use the #TpBaseContactList like a mixin, to implement the ContactGroups
* D-Bus interface.
@@ -5993,8 +4727,7 @@ tp_base_contact_list_fill_blocking_contact_attributes (GObject *obj,
* Since: 0.13.0
*/
void
-tp_base_contact_list_mixin_groups_iface_init (
- TpSvcConnectionInterfaceContactGroupsClass *klass)
+tp_base_contact_list_mixin_groups_iface_init (gpointer klass)
{
#define IMPLEMENT(x) tp_svc_connection_interface_contact_groups_implement_##x (\
klass, tp_base_contact_list_mixin_##x)
@@ -6021,8 +4754,8 @@ tp_base_contact_list_mixin_request_blocked_contacts (
TpSvcConnectionInterfaceContactBlocking *svc,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
ERROR_IF_BLOCKING_NOT_SUPPORTED (self, context);
@@ -6091,8 +4824,8 @@ tp_base_contact_list_mixin_block_contacts (
gboolean report_abusive,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
TpHandleSet *contacts;
ERROR_IF_BLOCKING_NOT_SUPPORTED (self, context);
@@ -6131,8 +4864,8 @@ tp_base_contact_list_mixin_unblock_contacts (
const GArray *contacts_arr,
DBusGMethodInvocation *context)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) svc, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata ((GObject *) svc,
+ BASE_CONTACT_LIST);
TpHandleSet *contacts;
ERROR_IF_BLOCKING_NOT_SUPPORTED (self, context);
@@ -6146,7 +4879,8 @@ tp_base_contact_list_mixin_unblock_contacts (
/**
* tp_base_contact_list_mixin_blocking_iface_init:
- * @klass: the service-side D-Bus interface
+ * @klass: the service-side D-Bus interface,
+ * a #TpSvcConnectionInterfaceContactBlockingClass
*
* Use the #TpBaseContactList like a mixin, to implement the ContactBlocking
* D-Bus interface.
@@ -6157,8 +4891,7 @@ tp_base_contact_list_mixin_unblock_contacts (
* Since: 0.15.1
*/
void
-tp_base_contact_list_mixin_blocking_iface_init (
- TpSvcConnectionInterfaceContactBlockingClass *klass)
+tp_base_contact_list_mixin_blocking_iface_init (gpointer klass)
{
#define IMPLEMENT(x) tp_svc_connection_interface_contact_blocking_implement_##x (\
klass, tp_base_contact_list_mixin_##x)
@@ -6180,8 +4913,7 @@ tp_base_contact_list_get_blocking_dbus_property (GObject *conn,
GValue *value,
gpointer data)
{
- TpBaseContactList *self = _tp_base_connection_find_channel_manager (
- (TpBaseConnection *) conn, TP_TYPE_BASE_CONTACT_LIST);
+ TpBaseContactList *self = g_object_get_qdata (conn, BASE_CONTACT_LIST);
TpBlockableContactListInterface *iface =
TP_BLOCKABLE_CONTACT_LIST_GET_INTERFACE (self);
static GQuark contact_blocking_capabilities_q = 0;
@@ -6255,6 +4987,7 @@ tp_base_contact_list_mixin_class_init (TpBaseConnectionClass *cls)
/**
* tp_base_contact_list_mixin_register_with_contacts_mixin:
+ * @self: a contact list
* @conn: An instance of #TpBaseConnection that uses a #TpContactsMixin,
* and implements #TpSvcConnectionInterfaceContactList using
* #TpBaseContactList
@@ -6274,15 +5007,14 @@ tp_base_contact_list_mixin_class_init (TpBaseConnectionClass *cls)
*/
void
tp_base_contact_list_mixin_register_with_contacts_mixin (
+ TpBaseContactList *self,
TpBaseConnection *conn)
{
- TpBaseContactList *self;
GType type = G_OBJECT_TYPE (conn);
GObject *object = (GObject *) conn;
+ g_return_if_fail (TP_IS_BASE_CONTACT_LIST (self));
g_return_if_fail (TP_IS_BASE_CONNECTION (conn));
- self = _tp_base_connection_find_channel_manager (conn,
- TP_TYPE_BASE_CONTACT_LIST);
g_return_if_fail (self != NULL);
g_return_if_fail (g_type_is_a (type,
TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_LIST));
diff --git a/telepathy-glib/base-contact-list.h b/telepathy-glib/base-contact-list.h
index 345b16fa6..7988602ef 100644
--- a/telepathy-glib/base-contact-list.h
+++ b/telepathy-glib/base-contact-list.h
@@ -26,7 +26,6 @@
#include <telepathy-glib/base-connection.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/handle-repo.h>
-#include <telepathy-glib/svc-connection.h>
G_BEGIN_DECLS
@@ -584,14 +583,11 @@ struct _TpMutableContactGroupListInterface {
void tp_base_contact_list_mixin_class_init (TpBaseConnectionClass *cls);
void tp_base_contact_list_mixin_register_with_contacts_mixin (
- TpBaseConnection *conn);
-void tp_base_contact_list_mixin_list_iface_init (
- TpSvcConnectionInterfaceContactListClass *klass);
-void tp_base_contact_list_mixin_groups_iface_init (
- TpSvcConnectionInterfaceContactGroupsClass *klass);
+ TpBaseContactList *self, TpBaseConnection *conn);
+void tp_base_contact_list_mixin_list_iface_init (gpointer klass);
+void tp_base_contact_list_mixin_groups_iface_init (gpointer klass);
_TP_AVAILABLE_IN_0_16
-void tp_base_contact_list_mixin_blocking_iface_init (
- TpSvcConnectionInterfaceContactBlockingClass *klass);
+void tp_base_contact_list_mixin_blocking_iface_init (gpointer klass);
G_END_DECLS
diff --git a/telepathy-glib/base-protocol.c b/telepathy-glib/base-protocol.c
index 3732c5bda..d6779c932 100644
--- a/telepathy-glib/base-protocol.c
+++ b/telepathy-glib/base-protocol.c
@@ -25,6 +25,9 @@
#include <dbus/dbus-protocol.h>
#include <telepathy-glib/channel-manager.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/svc-generic.h>
#include <telepathy-glib/svc-protocol.h>
#include <telepathy-glib/telepathy-glib.h>
diff --git a/telepathy-glib/base-protocol.h b/telepathy-glib/base-protocol.h
index 23104cac4..a2e764bc5 100644
--- a/telepathy-glib/base-protocol.h
+++ b/telepathy-glib/base-protocol.h
@@ -24,6 +24,7 @@
#include <glib-object.h>
#include <telepathy-glib/base-connection.h>
+#include <telepathy-glib/dbus-properties-mixin.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/presence-mixin.h>
diff --git a/telepathy-glib/basic-proxy-factory.c b/telepathy-glib/basic-proxy-factory.c
deleted file mode 100644
index 6f98799a3..000000000
--- a/telepathy-glib/basic-proxy-factory.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Simple client channel factory creating TpChannel
- *
- * Copyright © 2010 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * SECTION:basic-proxy-factory
- * @title: TpBasicProxyFactory
- * @short_description: channel factory creating TpChannel objects
- * @see_also: #TpAutomaticProxyFactory
- *
- * This factory implements the #TpClientChannelFactory interface to create
- * plain #TpChannel objects. Unlike #TpAutomaticProxyFactory, it will
- * not create higher-level subclasses like #TpStreamTubeChannel.
- * The only feature this factory asks to prepare is #TP_CHANNEL_FEATURE_CORE.
- *
- * TpProxy subclasses other than TpChannel are not currently supported.
- *
- * Since: 0.13.2
- */
-
-/**
- * TpBasicProxyFactory:
- *
- * Data structure representing a #TpBasicProxyFactory
- *
- * Since: 0.13.2
- */
-
-/**
- * TpBasicProxyFactoryClass:
- * @parent_class: the parent class
- *
- * The class of a #TpBasicProxyFactory.
- *
- * Since: 0.13.2
- */
-
-#include "config.h"
-
-#include "telepathy-glib/basic-proxy-factory.h"
-
-#include <telepathy-glib/client-channel-factory.h>
-
-#define DEBUG_FLAG TP_DEBUG_CLIENT
-#include "telepathy-glib/debug-internal.h"
-
-/* We rely on the default (lack of) implementation of everything */
-G_DEFINE_TYPE_WITH_CODE(TpBasicProxyFactory, tp_basic_proxy_factory, G_TYPE_OBJECT,
- G_IMPLEMENT_INTERFACE (TP_TYPE_CLIENT_CHANNEL_FACTORY, NULL))
-
-static void
-tp_basic_proxy_factory_init (TpBasicProxyFactory *self)
-{
-}
-
-static void
-tp_basic_proxy_factory_class_init (TpBasicProxyFactoryClass *cls)
-{
-}
-
-/**
- * tp_basic_proxy_factory_new:
- *
- * Convenient function to create a new #TpBasicProxyFactory instance.
- *
- * Returns: a new #TpBasicProxyFactory
- *
- * Since: 0.13.2
- * Deprecated: New code should use #TpSimpleClientFactory instead
- */
-static TpBasicProxyFactory *
-_tp_basic_proxy_factory_new (void)
-{
- return g_object_new (TP_TYPE_BASIC_PROXY_FACTORY,
- NULL);
-}
-
-TpBasicProxyFactory *
-tp_basic_proxy_factory_new (void)
-{
- return _tp_basic_proxy_factory_new ();
-}
-
-/**
- * tp_basic_proxy_factory_dup:
- *
- * Returns a cached #TpBasicProxyFactory; the same #TpBasicProxyFactory object
- * will be returned by this function repeatedly, as long as at least one
- * reference exists.
- *
- * Returns: (transfer full): a #TpBasicProxyFactory
- *
- * Since: 0.13.2
- * Deprecated: New code should use #TpSimpleClientFactory instead
- */
-TpBasicProxyFactory *
-tp_basic_proxy_factory_dup (void)
-{
- static TpBasicProxyFactory *singleton = NULL;
-
- if (singleton != NULL)
- return g_object_ref (singleton);
-
- singleton = _tp_basic_proxy_factory_new ();
-
- g_object_add_weak_pointer (G_OBJECT (singleton), (gpointer) &singleton);
-
- return singleton;
-}
diff --git a/telepathy-glib/basic-proxy-factory.h b/telepathy-glib/basic-proxy-factory.h
deleted file mode 100644
index c521d3e42..000000000
--- a/telepathy-glib/basic-proxy-factory.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Basic proxy factory
- *
- * Copyright © 2010 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __TP_BASIC_PROXY_FACTORY_H__
-#define __TP_BASIC_PROXY_FACTORY_H__
-
-#include <glib-object.h>
-
-#include <telepathy-glib/defs.h>
-
-G_BEGIN_DECLS
-
-typedef struct _TpBasicProxyFactory TpBasicProxyFactory;
-typedef struct _TpBasicProxyFactoryClass TpBasicProxyFactoryClass;
-
-struct _TpBasicProxyFactoryClass {
- /*<public>*/
- GObjectClass parent_class;
-};
-
-struct _TpBasicProxyFactory {
- /*<private>*/
- GObject parent;
-};
-
-GType tp_basic_proxy_factory_get_type (void);
-
-#define TP_TYPE_BASIC_PROXY_FACTORY \
- (tp_basic_proxy_factory_get_type ())
-#define TP_BASIC_PROXY_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), TP_TYPE_BASIC_PROXY_FACTORY, \
- TpBasicProxyFactory))
-#define TP_BASIC_PROXY_FACTORY_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), TP_TYPE_BASIC_PROXY_FACTORY, \
- TpBasicProxyFactoryClass))
-#define TP_IS_BASIC_PROXY_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TP_TYPE_BASIC_PROXY_FACTORY))
-#define TP_IS_BASIC_PROXY_FACTORY_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), TP_TYPE_BASIC_PROXY_FACTORY))
-#define TP_BASIC_PROXY_FACTORY_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_BASIC_PROXY_FACTORY, \
- TpBasicProxyFactoryClass))
-
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_new)
-TpBasicProxyFactory * tp_basic_proxy_factory_new (void);
-
-_TP_DEPRECATED_IN_0_16_FOR (tp_simple_client_factory_new)
-TpBasicProxyFactory * tp_basic_proxy_factory_dup (void);
-#endif
-
-G_END_DECLS
-
-#endif
diff --git a/telepathy-glib/call-channel.c b/telepathy-glib/call-channel.c
index 2473f510a..9a2275b48 100644
--- a/telepathy-glib/call-channel.c
+++ b/telepathy-glib/call-channel.c
@@ -52,6 +52,8 @@
#include <telepathy-glib/call-content.h>
#include <telepathy-glib/call-misc.h>
#include <telepathy-glib/call-stream.h>
+#include <telepathy-glib/cli-channel.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
@@ -583,7 +585,6 @@ got_all_properties_cb (TpProxy *proxy,
}
connection = tp_channel_borrow_connection ((TpChannel *) self);
- g_assert (tp_connection_has_immortal_handles (connection));
self->priv->properties_retrieved = TRUE;
@@ -1122,7 +1123,7 @@ tp_call_channel_class_init (TpCallChannelClass *klass)
* changes.
*
* The #TpContact objects are guaranteed to have all of the features
- * previously passed to tp_simple_client_factory_add_contact_features()
+ * previously passed to tp_client_factory_add_contact_features()
* prepared.
*
* Since: 0.17.5
@@ -1147,7 +1148,7 @@ tp_call_channel_init (TpCallChannel *self)
}
TpCallChannel *
-_tp_call_channel_new_with_factory (TpSimpleClientFactory *factory,
+_tp_call_channel_new_with_factory (TpClientFactory *factory,
TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
@@ -1326,7 +1327,7 @@ tp_call_channel_has_mutable_contents (TpCallChannel *self)
* Get the members of this call.
*
* The #TpContact objects are guaranteed to have all of the features
- * previously passed to tp_simple_client_factory_add_contact_features()
+ * previously passed to tp_client_factory_add_contact_features()
* prepared.
*
* Returns: (transfer none) (type GLib.HashTable) (element-type TelepathyGLib.Contact uint):
diff --git a/telepathy-glib/call-content-media-description.xml b/telepathy-glib/call-content-media-description.xml
index 5601c91ed..0e1cc85bf 100644
--- a/telepathy-glib/call-content-media-description.xml
+++ b/telepathy-glib/call-content-media-description.xml
@@ -4,9 +4,9 @@
<tp:title>Call misc interfaces, version 1</tp:title>
-<xi:include href="../spec/Call_Content_Media_Description_Interface_RTCP_Extended_Reports.xml" />
-<xi:include href="../spec/Call_Content_Media_Description_Interface_RTCP_Feedback.xml" />
-<xi:include href="../spec/Call_Content_Media_Description_Interface_RTP_Header_Extensions.xml" />
-<xi:include href="../spec/Call_Content_Media_Description.xml" />
+<xi:include href="../spec/Call1_Content_Media_Description_Interface_RTCP_Extended_Reports1.xml" />
+<xi:include href="../spec/Call1_Content_Media_Description_Interface_RTCP_Feedback1.xml" />
+<xi:include href="../spec/Call1_Content_Media_Description_Interface_RTP_Header_Extensions1.xml" />
+<xi:include href="../spec/Call1_Content_Media_Description.xml" />
</tp:spec>
diff --git a/telepathy-glib/call-content.c b/telepathy-glib/call-content.c
index 071e304e7..3ae3a06b3 100644
--- a/telepathy-glib/call-content.c
+++ b/telepathy-glib/call-content.c
@@ -50,6 +50,8 @@
#include <telepathy-glib/call-channel.h>
#include <telepathy-glib/call-misc.h>
#include <telepathy-glib/call-stream.h>
+#include <telepathy-glib/cli-call.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/dtmf.h>
#include <telepathy-glib/enums.h>
@@ -65,8 +67,6 @@
#include "telepathy-glib/proxy-internal.h"
#include "telepathy-glib/util-internal.h"
-#include "_gen/tp-cli-call-content-body.h"
-
G_DEFINE_TYPE (TpCallContent, tp_call_content, TP_TYPE_PROXY)
typedef struct _SendTonesData SendTonesData;
diff --git a/telepathy-glib/call-content.h b/telepathy-glib/call-content.h
index 635edb073..df694eadc 100644
--- a/telepathy-glib/call-content.h
+++ b/telepathy-glib/call-content.h
@@ -94,6 +94,4 @@ gboolean tp_call_content_send_tones_finish (TpCallContent *self,
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-call-content.h>
-
#endif
diff --git a/telepathy-glib/call-content.xml b/telepathy-glib/call-content.xml
index c8582ca79..5e0184976 100644
--- a/telepathy-glib/call-content.xml
+++ b/telepathy-glib/call-content.xml
@@ -4,10 +4,10 @@
<tp:title>Call Content interfaces, version 1</tp:title>
-<xi:include href="../spec/Call_Content_Interface_Media.xml" />
-<xi:include href="../spec/Call_Content_Interface_DTMF.xml" />
-<xi:include href="../spec/Call_Content_Interface_Video_Control.xml" />
-<xi:include href="../spec/Call_Content_Interface_Audio_Control.xml" />
-<xi:include href="../spec/Call_Content.xml" />
+<xi:include href="../spec/Call1_Content_Interface_Media.xml" />
+<xi:include href="../spec/Call1_Content_Interface_DTMF1.xml" />
+<xi:include href="../spec/Call1_Content_Interface_Video_Control1.xml" />
+<xi:include href="../spec/Call1_Content_Interface_Audio_Control1.xml" />
+<xi:include href="../spec/Call1_Content.xml" />
</tp:spec>
diff --git a/telepathy-glib/call-misc.c b/telepathy-glib/call-misc.c
index 5d16f3d53..aee48f1f8 100644
--- a/telepathy-glib/call-misc.c
+++ b/telepathy-glib/call-misc.c
@@ -31,13 +31,11 @@
#include "config.h"
#include "telepathy-glib/call-misc.h"
+#include "telepathy-glib/cli-call.h"
#include "telepathy-glib/errors.h"
#include "telepathy-glib/interfaces.h"
#include "telepathy-glib/proxy-subclass.h"
-#include "_gen/tp-cli-call-content-media-description-body.h"
-#include "_gen/tp-cli-call-stream-endpoint-body.h"
-
/**
* tp_call_stream_endpoint_init_known_interfaces:
*
diff --git a/telepathy-glib/call-misc.h b/telepathy-glib/call-misc.h
index b420a0a8e..56cc75938 100644
--- a/telepathy-glib/call-misc.h
+++ b/telepathy-glib/call-misc.h
@@ -33,7 +33,4 @@ void tp_call_content_media_description_init_known_interfaces (void);
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-call-content-media-description.h>
-#include <telepathy-glib/_gen/tp-cli-call-stream-endpoint.h>
-
#endif
diff --git a/telepathy-glib/call-stream-endpoint.c b/telepathy-glib/call-stream-endpoint.c
index 698c473c1..2f87d2d3f 100644
--- a/telepathy-glib/call-stream-endpoint.c
+++ b/telepathy-glib/call-stream-endpoint.c
@@ -549,7 +549,7 @@ tp_call_stream_endpoint_get_state (TpCallStreamEndpoint *self,
TpStreamComponent component)
{
g_return_val_if_fail (TP_IS_CALL_STREAM_ENDPOINT (self),
- TP_MEDIA_STREAM_STATE_DISCONNECTED);
+ TP_STREAM_ENDPOINT_STATE_FAILED);
return GPOINTER_TO_UINT (g_hash_table_lookup (self->priv->endpoint_state,
GUINT_TO_POINTER (component)));
diff --git a/telepathy-glib/call-stream-endpoint.xml b/telepathy-glib/call-stream-endpoint.xml
index 691e66526..a9712c06b 100644
--- a/telepathy-glib/call-stream-endpoint.xml
+++ b/telepathy-glib/call-stream-endpoint.xml
@@ -4,6 +4,6 @@
<tp:title>Call misc interfaces, version 1</tp:title>
-<xi:include href="../spec/Call_Stream_Endpoint.xml" />
+<xi:include href="../spec/Call1_Stream_Endpoint.xml" />
</tp:spec>
diff --git a/telepathy-glib/call-stream.c b/telepathy-glib/call-stream.c
index ac05b8f37..3f3b64c86 100644
--- a/telepathy-glib/call-stream.c
+++ b/telepathy-glib/call-stream.c
@@ -47,8 +47,10 @@
#include "telepathy-glib/call-stream.h"
-#include <telepathy-glib/call-misc.h>
#include <telepathy-glib/call-content.h>
+#include <telepathy-glib/call-misc.h>
+#include <telepathy-glib/cli-call.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/enums.h>
#include <telepathy-glib/errors.h>
@@ -63,8 +65,6 @@
#include "telepathy-glib/proxy-internal.h"
#include "telepathy-glib/util-internal.h"
-#include "_gen/tp-cli-call-stream-body.h"
-
G_DEFINE_TYPE (TpCallStream, tp_call_stream, TP_TYPE_PROXY)
struct _TpCallStreamPrivate
diff --git a/telepathy-glib/call-stream.h b/telepathy-glib/call-stream.h
index 50f0c3643..38452712c 100644
--- a/telepathy-glib/call-stream.h
+++ b/telepathy-glib/call-stream.h
@@ -93,6 +93,4 @@ gboolean tp_call_stream_request_receiving_finish (TpCallStream *self,
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-call-stream.h>
-
#endif
diff --git a/telepathy-glib/call-stream.xml b/telepathy-glib/call-stream.xml
index d587ae059..ef0d530bc 100644
--- a/telepathy-glib/call-stream.xml
+++ b/telepathy-glib/call-stream.xml
@@ -4,7 +4,7 @@
<tp:title>Call Stream interfaces, version 1</tp:title>
-<xi:include href="../spec/Call_Stream_Interface_Media.xml" />
-<xi:include href="../spec/Call_Stream.xml" />
+<xi:include href="../spec/Call1_Stream_Interface_Media.xml" />
+<xi:include href="../spec/Call1_Stream.xml" />
</tp:spec>
diff --git a/telepathy-glib/channel-contacts.c b/telepathy-glib/channel-contacts.c
deleted file mode 100644
index 3e55584cd..000000000
--- a/telepathy-glib/channel-contacts.c
+++ /dev/null
@@ -1,1165 +0,0 @@
-/*
- * channel-contacts.c - proxy for a Telepathy channel (contacts feature)
- *
- * Copyright (C) 2011 Collabora Ltd. <http://www.collabora.co.uk/>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-
-#include "telepathy-glib/channel-internal.h"
-
-#include <telepathy-glib/gtypes.h>
-#include <telepathy-glib/proxy.h>
-#include <telepathy-glib/simple-client-factory.h>
-#include <telepathy-glib/util.h>
-
-#define DEBUG_FLAG TP_DEBUG_GROUPS
-#include "telepathy-glib/connection-internal.h"
-#include "telepathy-glib/debug-internal.h"
-#include "telepathy-glib/util-internal.h"
-
-static GArray *
-dup_handle_array (const GArray *source)
-{
- GArray *target;
-
- target = g_array_sized_new (FALSE, FALSE, sizeof (TpHandle), source->len);
- g_array_append_vals (target, source->data, source->len);
-
- return target;
-}
-
-static TpContact *
-dup_contact (TpChannel *self,
- TpHandle handle,
- GHashTable *identifiers)
-{
- const gchar *id;
-
- if (handle == 0)
- return NULL;
-
- id = g_hash_table_lookup (identifiers, GUINT_TO_POINTER (handle));
- if (id == NULL)
- {
- DEBUG ("Missing identifier for handle %u - broken CM", handle);
- return NULL;
- }
-
- return tp_simple_client_factory_ensure_contact (
- tp_proxy_get_factory (self->priv->connection), self->priv->connection,
- handle, id);
-}
-
-static GPtrArray *
-dup_contact_array (TpChannel *self,
- const GArray *handles,
- GHashTable *identifiers)
-{
- GPtrArray *array;
- guint i;
-
- array = g_ptr_array_new_full (handles->len, g_object_unref);
-
- for (i = 0; i < handles->len; i++)
- {
- TpHandle handle = g_array_index (handles, TpHandle, i);
- TpContact *contact = dup_contact (self, handle, identifiers);
-
- if (contact != NULL)
- g_ptr_array_add (array, contact);
- }
-
- return array;
-}
-
-static GHashTable *
-dup_contacts_table (TpChannel *self,
- TpIntset *source,
- GHashTable *identifiers)
-{
- GHashTable *target;
- TpIntsetFastIter iter;
- TpHandle handle;
-
- target = g_hash_table_new_full (NULL, NULL, NULL, g_object_unref);
-
- tp_intset_fast_iter_init (&iter, source);
- while (tp_intset_fast_iter_next (&iter, &handle))
- {
- TpContact *contact = dup_contact (self, handle, identifiers);
-
- if (contact != NULL)
- g_hash_table_insert (target, GUINT_TO_POINTER (handle), contact);
- }
-
- return target;
-}
-
-/* self->priv->group_contact_owners may contain NULL TpContact and
- * g_object_unref isn't NULL safe */
-static void
-safe_g_object_unref (gpointer data)
-{
- if (data == NULL)
- return;
-
- g_object_unref (data);
-}
-
-static gpointer
-safe_g_object_ref (gpointer data)
-{
- if (data == NULL)
- return NULL;
-
- return g_object_ref (data);
-}
-
-static GHashTable *
-dup_owners_table (TpChannel *self,
- GHashTable *source,
- GHashTable *identifiers)
-{
- GHashTable *target;
- GHashTableIter iter;
- gpointer key, value;
-
- target = g_hash_table_new_full (NULL, NULL, NULL, safe_g_object_unref);
-
- g_hash_table_iter_init (&iter, source);
- while (g_hash_table_iter_next (&iter, &key, &value))
- {
- TpHandle owner_handle = GPOINTER_TO_UINT (value);
- TpContact *contact = dup_contact (self, owner_handle, identifiers);
-
- g_hash_table_insert (target, key, contact);
- }
-
- return target;
-}
-
-void
-_tp_channel_contacts_init (TpChannel *self)
-{
- /* Create TpContact objects if we have them for free */
-
- if (!tp_connection_has_immortal_handles (self->priv->connection))
- {
- self->priv->cm_too_old_for_contacts = TRUE;
- return;
- }
-
- g_assert (self->priv->target_contact == NULL);
- g_assert (self->priv->initiator_contact == NULL);
-
- if (self->priv->handle != 0 && self->priv->identifier != NULL &&
- self->priv->handle_type == TP_HANDLE_TYPE_CONTACT)
- {
- self->priv->target_contact = tp_simple_client_factory_ensure_contact (
- tp_proxy_get_factory (self->priv->connection), self->priv->connection,
- self->priv->handle, self->priv->identifier);
- }
-
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- if (tp_channel_get_initiator_handle (self) != 0 &&
- !tp_str_empty (tp_channel_get_initiator_identifier (self)))
- {
- self->priv->initiator_contact = tp_simple_client_factory_ensure_contact (
- tp_proxy_get_factory (self->priv->connection), self->priv->connection,
- tp_channel_get_initiator_handle (self),
- tp_channel_get_initiator_identifier (self));
- }
- G_GNUC_END_IGNORE_DEPRECATIONS
-}
-
-void
-_tp_channel_contacts_group_init (TpChannel *self,
- GHashTable *identifiers)
-{
- GHashTableIter iter;
- gpointer value;
-
- /* Create TpContact objects if we have them for free */
-
- if (!tp_connection_has_immortal_handles (self->priv->connection) ||
- identifiers == NULL)
- {
- self->priv->cm_too_old_for_contacts = TRUE;
- return;
- }
-
- g_assert (self->priv->group_self_contact == NULL);
- g_assert (self->priv->group_members_contacts == NULL);
- g_assert (self->priv->group_local_pending_contacts == NULL);
- g_assert (self->priv->group_remote_pending_contacts == NULL);
- g_assert (self->priv->group_contact_owners == NULL);
-
- self->priv->group_self_contact = dup_contact (self,
- self->priv->group_self_handle, identifiers);
-
- self->priv->group_members_contacts = dup_contacts_table (self,
- self->priv->group_members, identifiers);
-
- self->priv->group_local_pending_contacts = dup_contacts_table (self,
- self->priv->group_local_pending, identifiers);
-
- self->priv->group_remote_pending_contacts = dup_contacts_table (self,
- self->priv->group_remote_pending, identifiers);
-
- self->priv->group_contact_owners = dup_owners_table (self,
- self->priv->group_handle_owners, identifiers);
-
- if (self->priv->group_local_pending_info != NULL)
- {
- g_hash_table_iter_init (&iter, self->priv->group_local_pending_info);
- while (g_hash_table_iter_next (&iter, NULL, &value))
- {
- LocalPendingInfo *info = value;
-
- info->actor_contact = dup_contact (self, info->actor, identifiers);
- }
- }
-}
-
-struct _ContactsQueueItem
-{
- GPtrArray *contacts;
- GPtrArray *ids;
- GArray *handles;
-};
-
-static void
-contacts_queue_item_free (ContactsQueueItem *item)
-{
- tp_clear_pointer (&item->contacts, g_ptr_array_unref);
- tp_clear_pointer (&item->ids, g_ptr_array_unref);
- tp_clear_pointer (&item->handles, g_array_unref);
- g_slice_free (ContactsQueueItem, item);
-}
-
-static void process_contacts_queue (TpChannel *self);
-
-static void
-contacts_queue_head_ready (TpChannel *self,
- const GError *error)
-{
- GSimpleAsyncResult *result = self->priv->current_contacts_queue_result;
-
- if (error != NULL)
- {
- DEBUG ("Error preparing channel contacts queue item: %s", error->message);
- g_simple_async_result_set_from_error (result, error);
- }
- g_simple_async_result_complete (result);
-
- self->priv->current_contacts_queue_result = NULL;
- process_contacts_queue (self);
-
- g_object_unref (result);
-}
-
-static void
-contacts_queue_item_upgraded_cb (TpConnection *connection,
- guint n_contacts,
- TpContact * const *contacts,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- TpChannel *self = (TpChannel *) weak_object;
-
- contacts_queue_head_ready (self, error);
-}
-
-static void
-contacts_queue_item_set_contacts (ContactsQueueItem *item,
- guint n_contacts,
- TpContact * const *contacts)
-{
- guint i;
-
- g_assert (item->contacts == NULL);
- item->contacts = g_ptr_array_new_full (n_contacts, g_object_unref);
- for (i = 0; i < n_contacts; i++)
- g_ptr_array_add (item->contacts, g_object_ref (contacts[i]));
-}
-
-static void
-contacts_queue_item_by_id_cb (TpConnection *connection,
- guint n_contacts,
- TpContact * const *contacts,
- const gchar * const *requested_ids,
- GHashTable *failed_id_errors,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- TpChannel *self = (TpChannel *) weak_object;
- ContactsQueueItem *item = user_data;
-
- contacts_queue_item_set_contacts (item, n_contacts, contacts);
- contacts_queue_head_ready (self, error);
-}
-
-static void
-contacts_queue_item_by_handle_cb (TpConnection *connection,
- guint n_contacts,
- TpContact * const *contacts,
- guint n_failed,
- const TpHandle *failed,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- TpChannel *self = (TpChannel *) weak_object;
- ContactsQueueItem *item = user_data;
-
- contacts_queue_item_set_contacts (item, n_contacts, contacts);
- contacts_queue_head_ready (self, error);
-}
-
-static gboolean
-contacts_queue_item_idle_cb (gpointer user_data)
-{
- TpChannel *self = user_data;
-
- contacts_queue_head_ready (self, NULL);
-
- return FALSE;
-}
-
-static void
-process_contacts_queue (TpChannel *self)
-{
- GSimpleAsyncResult *result;
- ContactsQueueItem *item;
- GArray *features;
- const GError *error = NULL;
-
- if (self->priv->current_contacts_queue_result != NULL)
- return;
-
- /* self can't die while there are queued items because item->result keeps a
- * ref to it. But it could have been invalidated. */
- error = tp_proxy_get_invalidated (self);
- if (error != NULL)
- {
- g_object_ref (self);
- while ((result = g_queue_pop_head (self->priv->contacts_queue)) != NULL)
- {
- g_simple_async_result_set_from_error (result, error);
- g_simple_async_result_complete (result);
- g_object_unref (result);
- }
- g_object_unref (self);
-
- return;
- }
-
- result = g_queue_pop_head (self->priv->contacts_queue);
-
- if (result == NULL)
- return;
-
- self->priv->current_contacts_queue_result = result;
- item = g_simple_async_result_get_op_res_gpointer (result);
-
- features = tp_simple_client_factory_dup_contact_features (
- tp_proxy_get_factory (self->priv->connection), self->priv->connection);
-
- /* We can't use upgrade_contacts_async() because we need compat with older
- * CMs. by_id and by_handle are used only by TpTextChannel and are needed for
- * older CMs that does not give both message-sender and message-sender-id */
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- if (item->contacts != NULL && item->contacts->len > 0)
- {
- g_assert (item->ids == NULL);
- g_assert (item->handles == NULL);
-
- tp_connection_upgrade_contacts (self->priv->connection,
- item->contacts->len, (TpContact **) item->contacts->pdata,
- features->len, (TpContactFeature *) features->data,
- contacts_queue_item_upgraded_cb,
- item, NULL,
- (GObject *) self);
- }
- else if (item->ids != NULL && item->ids->len > 0)
- {
- g_assert (item->contacts == NULL);
- g_assert (item->handles == NULL);
-
- tp_connection_get_contacts_by_id (self->priv->connection,
- item->ids->len, (const gchar * const*) item->ids->pdata,
- features->len, (TpContactFeature *) features->data,
- contacts_queue_item_by_id_cb,
- item, NULL,
- (GObject *) self);
- }
- else if (item->handles != NULL && item->handles->len > 0)
- {
- g_assert (item->contacts == NULL);
- g_assert (item->ids == NULL);
-
- tp_connection_get_contacts_by_handle (self->priv->connection,
- item->handles->len, (TpHandle *) item->handles->data,
- features->len, (TpContactFeature *) features->data,
- contacts_queue_item_by_handle_cb,
- item, NULL,
- (GObject *) self);
- }
- else
- {
- /* It can happen there is no contact to prepare, and can still be useful
- * in order to not reorder some events.
- * We have to use an idle though, to guarantee callback is never called
- * without reentering mainloop first. */
- g_idle_add (contacts_queue_item_idle_cb, self);
- }
- G_GNUC_END_IGNORE_DEPRECATIONS
-
- g_array_unref (features);
-}
-
-static void
-contacts_queue_item (TpChannel *self,
- GPtrArray *contacts,
- GPtrArray *ids,
- GArray *handles,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- ContactsQueueItem *item = g_slice_new (ContactsQueueItem);
- GSimpleAsyncResult *result;
-
- item->contacts = contacts != NULL ? g_ptr_array_ref (contacts) : NULL;
- item->ids = ids != NULL ? g_ptr_array_ref (ids) : NULL;
- item->handles = handles != NULL ? g_array_ref (handles) : NULL;
- result = g_simple_async_result_new ((GObject *) self,
- callback, user_data, contacts_queue_item);
-
- g_simple_async_result_set_op_res_gpointer (result, item,
- (GDestroyNotify) contacts_queue_item_free);
-
- g_queue_push_tail (self->priv->contacts_queue, result);
- process_contacts_queue (self);
-}
-
-void
-_tp_channel_contacts_queue_prepare_async (TpChannel *self,
- GPtrArray *contacts,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- contacts_queue_item (self, contacts, NULL, NULL, callback, user_data);
-}
-
-void
-_tp_channel_contacts_queue_prepare_by_id_async (TpChannel *self,
- GPtrArray *ids,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- contacts_queue_item (self, NULL, ids, NULL, callback, user_data);
-}
-
-void
-_tp_channel_contacts_queue_prepare_by_handle_async (TpChannel *self,
- GArray *handles,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- contacts_queue_item (self, NULL, NULL, handles, callback, user_data);
-}
-
-gboolean
-_tp_channel_contacts_queue_prepare_finish (TpChannel *self,
- GAsyncResult *result,
- GPtrArray **contacts,
- GError **error)
-{
- GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
- ContactsQueueItem *item;
-
- item = g_simple_async_result_get_op_res_gpointer (simple);
-
- if (contacts != NULL)
- {
- if (item->contacts != NULL)
- *contacts = g_ptr_array_ref (item->contacts);
- else
- *contacts = g_ptr_array_new ();
- }
-
- if (g_simple_async_result_propagate_error (simple, error))
- return FALSE;
-
- g_return_val_if_fail (g_simple_async_result_is_valid (result,
- G_OBJECT (self), contacts_queue_item), FALSE);
-
- return TRUE;
-}
-
-typedef struct
-{
- GPtrArray *added;
- GArray *removed;
- GPtrArray *local_pending;
- GPtrArray *remote_pending;
- TpContact *actor;
- GHashTable *details;
-} MembersChangedData;
-
-static void
-members_changed_data_free (MembersChangedData *data)
-{
- tp_clear_pointer (&data->added, g_ptr_array_unref);
- tp_clear_pointer (&data->removed, g_array_unref);
- tp_clear_pointer (&data->local_pending, g_ptr_array_unref);
- tp_clear_pointer (&data->remote_pending, g_ptr_array_unref);
- g_clear_object (&data->actor);
- tp_clear_pointer (&data->details, g_hash_table_unref);
-
- g_slice_free (MembersChangedData, data);
-}
-
-static void
-members_changed_prepared_cb (GObject *object,
- GAsyncResult *result,
- gpointer user_data)
-{
- TpChannel *self = (TpChannel *) object;
- MembersChangedData *data = user_data;
- GPtrArray *removed;
- guint i;
-
- _tp_channel_contacts_queue_prepare_finish (self, result, NULL, NULL);
-
- /* For removed contacts, we have only handles because we are supposed to
- * already know them. So we have to search them in our tables, construct an
- * array of removed contacts and then remove them from our tables */
- removed = g_ptr_array_new_full (data->removed->len, g_object_unref);
- for (i = 0; i < data->removed->len; i++)
- {
- TpHandle handle = g_array_index (data->removed, TpHandle, i);
- gpointer key = GUINT_TO_POINTER (handle);
- TpContact *contact;
-
- contact = g_hash_table_lookup (self->priv->group_members_contacts, key);
- if (contact == NULL)
- contact = g_hash_table_lookup (
- self->priv->group_local_pending_contacts, key);
- if (contact == NULL)
- contact = g_hash_table_lookup (
- self->priv->group_remote_pending_contacts, key);
-
- if (contact == NULL)
- {
- DEBUG ("Handle %u removed but not found in our tables - broken CM",
- handle);
- continue;
- }
-
- g_ptr_array_add (removed, g_object_ref (contact));
-
- g_hash_table_remove (self->priv->group_members_contacts, key);
- g_hash_table_remove (self->priv->group_local_pending_contacts, key);
- g_hash_table_remove (self->priv->group_remote_pending_contacts, key);
- }
-
- for (i = 0; i < data->added->len; i++)
- {
- TpContact *contact = g_ptr_array_index (data->added, i);
- gpointer key = GUINT_TO_POINTER (tp_contact_get_handle (contact));
-
- g_hash_table_insert (self->priv->group_members_contacts, key,
- g_object_ref (contact));
- g_hash_table_remove (self->priv->group_local_pending_contacts, key);
- g_hash_table_remove (self->priv->group_remote_pending_contacts, key);
- }
-
- for (i = 0; i < data->local_pending->len; i++)
- {
- TpContact *contact = g_ptr_array_index (data->local_pending, i);
- gpointer key = GUINT_TO_POINTER (tp_contact_get_handle (contact));
-
- g_hash_table_remove (self->priv->group_members_contacts, key);
- g_hash_table_insert (self->priv->group_local_pending_contacts, key,
- g_object_ref (contact));
- g_hash_table_remove (self->priv->group_remote_pending_contacts, key);
-
- if (data->actor != NULL)
- {
- LocalPendingInfo *info;
-
- info = g_hash_table_lookup (self->priv->group_local_pending_info, key);
- if (info != NULL)
- info->actor_contact = g_object_ref (data->actor);
- }
- }
-
- for (i = 0; i < data->remote_pending->len; i++)
- {
- TpContact *contact = g_ptr_array_index (data->remote_pending, i);
- gpointer key = GUINT_TO_POINTER (tp_contact_get_handle (contact));
-
- g_hash_table_remove (self->priv->group_members_contacts, key);
- g_hash_table_remove (self->priv->group_local_pending_contacts, key);
- g_hash_table_insert (self->priv->group_remote_pending_contacts, key,
- g_object_ref (contact));
- }
-
- g_signal_emit_by_name (self, "group-contacts-changed", data->added,
- removed, data->local_pending, data->remote_pending, data->actor,
- data->details);
-
- g_ptr_array_unref (removed);
- members_changed_data_free (data);
-}
-
-void
-_tp_channel_contacts_members_changed (TpChannel *self,
- const GArray *added,
- const GArray *removed,
- const GArray *local_pending,
- const GArray *remote_pending,
- guint actor,
- GHashTable *details)
-{
- MembersChangedData *data;
- GPtrArray *contacts;
- GHashTable *ids;
-
- if (self->priv->cm_too_old_for_contacts)
- return;
-
- ids = tp_asv_get_boxed (details, "contact-ids",
- TP_HASH_TYPE_HANDLE_IDENTIFIER_MAP);
- if (ids == NULL && (added->len > 0 || local_pending->len > 0 ||
- remote_pending->len > 0 || actor != 0 ))
- {
- DEBUG ("CM did not give identifiers, can't create TpContact");
- return;
- }
-
- g_assert (self->priv->group_members_contacts != NULL);
- g_assert (self->priv->group_local_pending_contacts != NULL);
- g_assert (self->priv->group_remote_pending_contacts != NULL);
-
- /* Ensure all TpContact, and push to a queue. This is to ensure that signals
- * does not get reordered while we prepare them. */
- data = g_slice_new (MembersChangedData);
- data->added = dup_contact_array (self, added, ids);
- data->removed = dup_handle_array (removed);
- data->local_pending = dup_contact_array (self, local_pending, ids);
- data->remote_pending = dup_contact_array (self, remote_pending, ids);
- data->actor = dup_contact (self, actor, ids);
- data->details = g_hash_table_ref (details);
-
- contacts = g_ptr_array_new ();
- tp_g_ptr_array_extend (contacts, data->added);
- tp_g_ptr_array_extend (contacts, data->local_pending);
- tp_g_ptr_array_extend (contacts, data->remote_pending);
- if (data->actor != NULL)
- g_ptr_array_add (contacts, data->actor);
-
- _tp_channel_contacts_queue_prepare_async (self, contacts,
- members_changed_prepared_cb, data);
-
- g_ptr_array_unref (contacts);
-}
-
-typedef struct
-{
- GHashTable *added;
- GArray *removed;
-} HandleOwnersChangedData;
-
-static void
-handle_owners_changed_data_free (HandleOwnersChangedData *data)
-{
- tp_clear_pointer (&data->added, g_hash_table_unref);
- tp_clear_pointer (&data->removed, g_array_unref);
-
- g_slice_free (HandleOwnersChangedData, data);
-}
-
-static void
-handle_owners_changed_prepared_cb (GObject *object,
- GAsyncResult *result,
- gpointer user_data)
-{
- TpChannel *self = (TpChannel *) object;
- HandleOwnersChangedData *data = user_data;
- guint i;
-
- _tp_channel_contacts_queue_prepare_finish (self, result, NULL, NULL);
-
- for (i = 0; i < data->removed->len; i++)
- {
- g_hash_table_remove (self->priv->group_contact_owners,
- GUINT_TO_POINTER (g_array_index (data->removed, TpHandle, i)));
- }
-
- tp_g_hash_table_update (self->priv->group_contact_owners, data->added, NULL,
- safe_g_object_ref);
-
- handle_owners_changed_data_free (data);
-}
-
-void
-_tp_channel_contacts_handle_owners_changed (TpChannel *self,
- GHashTable *added,
- const GArray *removed,
- GHashTable *identifiers)
-{
- HandleOwnersChangedData *data;
- GPtrArray *contacts;
-
- if (self->priv->cm_too_old_for_contacts)
- return;
-
- g_assert (self->priv->group_contact_owners != NULL);
-
- data = g_slice_new (HandleOwnersChangedData);
- data->added = dup_owners_table (self, added, identifiers);
- data->removed = dup_handle_array (removed);
-
- contacts = _tp_contacts_from_values (data->added);
-
- _tp_channel_contacts_queue_prepare_async (self, contacts,
- handle_owners_changed_prepared_cb, data);
-
- g_ptr_array_unref (contacts);
-}
-
-static void
-self_contact_changed_prepared_cb (GObject *object,
- GAsyncResult *result,
- gpointer user_data)
-{
- TpChannel *self = (TpChannel *) object;
- TpContact *contact = user_data;
-
- _tp_channel_contacts_queue_prepare_finish (self, result, NULL, NULL);
-
- g_clear_object (&self->priv->group_self_contact);
- self->priv->group_self_contact = contact;
-
- g_object_notify ((GObject *) self, "group-self-contact");
-}
-
-void
-_tp_channel_contacts_self_contact_changed (TpChannel *self,
- guint self_handle,
- const gchar *identifier)
-{
- TpContact *contact;
- GPtrArray *contacts;
-
- if (self->priv->cm_too_old_for_contacts)
- return;
-
- contacts = g_ptr_array_new_with_free_func (g_object_unref);
- contact = tp_simple_client_factory_ensure_contact (
- tp_proxy_get_factory (self->priv->connection), self->priv->connection,
- self_handle, identifier);
- g_ptr_array_add (contacts, g_object_ref (contact));
-
- _tp_channel_contacts_queue_prepare_async (self, contacts,
- self_contact_changed_prepared_cb, contact);
-
- g_ptr_array_unref (contacts);
-}
-
-/**
- * tp_channel_get_target_contact:
- * @self: a channel
- *
- * <!-- -->
- *
- * Returns: (transfer none): the value of #TpChannel:target-contact
- * Since: 0.15.6
- */
-TpContact *
-tp_channel_get_target_contact (TpChannel *self)
-{
- g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
-
- return self->priv->target_contact;
-}
-
-/**
- * tp_channel_get_initiator_contact:
- * @self: a channel
- *
- * <!-- -->
- *
- * Returns: (transfer none): the value of #TpChannel:initiator-contact
- * Since: 0.15.6
- */
-TpContact *
-tp_channel_get_initiator_contact (TpChannel *self)
-{
- g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
-
- return self->priv->initiator_contact;
-}
-
-/**
- * tp_channel_group_get_self_contact:
- * @self: a channel
- *
- * <!-- -->
- *
- * Returns: (transfer none): the value of #TpChannel:group-self-contact
- * Since: 0.15.6
- */
-TpContact *
-tp_channel_group_get_self_contact (TpChannel *self)
-{
- g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
-
- return self->priv->group_self_contact;
-}
-
-/**
- * tp_channel_group_dup_members_contacts:
- * @self: a channel
- *
- * If @self is a group and the %TP_CHANNEL_FEATURE_CONTACTS feature has been
- * prepared, return a #GPtrArray containing its members.
- *
- * If @self is a group but %TP_CHANNEL_FEATURE_CONTACTS has not been prepared,
- * the result may either be a set of members, or %NULL.
- *
- * If @self is not a group, return %NULL.
- *
- * Returns: (transfer container) (type GLib.PtrArray) (element-type TelepathyGLib.Contact):
- * a new #GPtrArray of #TpContact, free it with g_ptr_array_unref(), or %NULL.
- *
- * Since: 0.15.6
- */
-GPtrArray *
-tp_channel_group_dup_members_contacts (TpChannel *self)
-{
- g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
-
- return _tp_contacts_from_values (self->priv->group_members_contacts);
-}
-
-/**
- * tp_channel_group_dup_local_pending_contacts:
- * @self: a channel
- *
- * If @self is a group and the %TP_CHANNEL_FEATURE_CONTACTS feature has been
- * prepared, return a #GPtrArray containing its local-pending members.
- *
- * If @self is a group but %TP_CHANNEL_FEATURE_CONTACTS has not been prepared,
- * the result may either be a set of local-pending members, or %NULL.
- *
- * If @self is not a group, return %NULL.
- *
- * Returns: (transfer container) (type GLib.PtrArray) (element-type TelepathyGLib.Contact):
- * a new #GPtrArray of #TpContact, free it with g_ptr_array_unref(), or %NULL.
- *
- * Since: 0.15.6
- */
-GPtrArray *
-tp_channel_group_dup_local_pending_contacts (TpChannel *self)
-{
- g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
-
- return _tp_contacts_from_values (self->priv->group_local_pending_contacts);
-}
-
-/**
- * tp_channel_group_dup_remote_pending_contacts:
- * @self: a channel
- *
- * If @self is a group and the %TP_CHANNEL_FEATURE_CONTACTS feature has been
- * prepared, return a #GPtrArray containing its remote-pending members.
- *
- * If @self is a group but %TP_CHANNEL_FEATURE_CONTACTS has not been prepared,
- * the result may either be a set of remote-pending members, or %NULL.
- *
- * If @self is not a group, return %NULL.
- *
- * Returns: (transfer container) (type GLib.PtrArray) (element-type TelepathyGLib.Contact):
- * a new #GPtrArray of #TpContact, free it with g_ptr_array_unref(), or %NULL.
- *
- * Since: 0.15.6
- */
-GPtrArray *
-tp_channel_group_dup_remote_pending_contacts (TpChannel *self)
-{
- g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
-
- return _tp_contacts_from_values (self->priv->group_remote_pending_contacts);
-}
-
-/**
- * tp_channel_group_get_local_pending_contact_info:
- * @self: a channel
- * @local_pending: the #TpContact of a local-pending contact about whom more
- * information is needed
- * @actor: (out) (allow-none) (transfer none): either %NULL or a location to
- * return the contact who requested the change
- * @reason: (out) (allow-none): either %NULL or a location to return the reason
- * for the change
- * @message: (out) (allow-none) (transfer none): either %NULL or a location to
- * return the
- * user-supplied message
- *
- * If @local_pending is actually a local-pending contact,
- * write additional information into @actor, @reason and @message and return
- * %TRUE. The contact and message are not referenced or copied, and can only be
- * assumed to remain valid until the main loop is re-entered.
- *
- * If @local_pending is not the handle of a local-pending contact,
- * write %NULL into @actor, %TP_CHANNEL_GROUP_CHANGE_REASON_NONE into @reason
- * and "" into @message, and return %FALSE.
- *
- * Returns: %TRUE if the contact is in fact local-pending
- * Since: 0.15.6
- */
-gboolean
-tp_channel_group_get_local_pending_contact_info (TpChannel *self,
- TpContact *local_pending,
- TpContact **actor,
- TpChannelGroupChangeReason *reason,
- const gchar **message)
-{
- gboolean ret = FALSE;
- TpContact *a = NULL;
- TpChannelGroupChangeReason r = TP_CHANNEL_GROUP_CHANGE_REASON_NONE;
- const gchar *m = "";
-
- g_return_val_if_fail (TP_IS_CHANNEL (self), FALSE);
- g_return_val_if_fail (TP_IS_CONTACT (local_pending), FALSE);
- g_return_val_if_fail (tp_contact_get_connection (local_pending) ==
- self->priv->connection, FALSE);
-
- if (self->priv->group_local_pending != NULL)
- {
- TpHandle handle = tp_contact_get_handle (local_pending);
-
- /* it could conceivably be someone who is local-pending */
-
- ret = tp_intset_is_member (self->priv->group_local_pending, handle);
-
- if (ret && self->priv->group_local_pending_info != NULL)
- {
- /* we might even have information about them */
- LocalPendingInfo *info = g_hash_table_lookup (
- self->priv->group_local_pending_info,
- GUINT_TO_POINTER (handle));
-
- if (info != NULL)
- {
- a = info->actor_contact;
- r = info->reason;
-
- if (info->message != NULL)
- m = info->message;
- }
- /* else we have no info, which means (NULL, NONE, NULL) */
- }
- }
-
- if (actor != NULL)
- *actor = a;
-
- if (message != NULL)
- *message = m;
-
- if (reason != NULL)
- *reason = r;
-
- return ret;
-}
-
-/**
- * tp_channel_group_get_contact_owner:
- * @self: a channel
- * @contact: a contact which is a member of this channel
- *
- * Synopsis (see below for further explanation):
- *
- * - if @self is not a group or @contact is not a member of this channel,
- * result is undefined;
- * - if %TP_CHANNEL_FEATURE_CONTACTS has not yet been prepared, result is
- * undefined;
- * - if @self does not have flags that include
- * %TP_CHANNEL_GROUP_FLAG_PROPERTIES,
- * result is undefined;
- * - if @contact is channel-specific and its globally valid "owner" is known,
- * return that owner;
- * - if @contact is channel-specific and its globally valid "owner" is unknown,
- * return %NULL;
- * - if @contact is globally valid, return @contact itself
- *
- * Some channels (those with flags that include
- * %TP_CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES) have a concept of
- * "channel-specific contacts". These are contacts that only have meaning within
- * the context of the channel - for instance, in XMPP Multi-User Chat,
- * participants in a chatroom are identified by an in-room JID consisting
- * of the JID of the chatroom plus a local nickname.
- *
- * Depending on the protocol and configuration, it might be possible to find
- * out what globally valid contact (i.e. a contact that you could add to
- * your contact list) "owns" a channel-specific contact. For instance, in
- * most XMPP MUC chatrooms, normal users cannot see what global JID
- * corresponds to an in-room JID, but moderators can.
- *
- * This is further complicated by the fact that channels with channel-specific
- * contacts can sometimes have members with globally valid contacts (for
- * instance, if you invite someone to an XMPP MUC using their globally valid
- * JID, you would expect to see the contact representing that JID in the
- * Group's remote-pending set).
- *
- * Returns: (transfer none): the global contact that owns the given contact,
- * or %NULL.
- * Since: 0.15.6
- */
-TpContact *
-tp_channel_group_get_contact_owner (TpChannel *self,
- TpContact *contact)
-{
- TpHandle handle;
- gpointer value;
-
- g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
- g_return_val_if_fail (TP_IS_CONTACT (contact), NULL);
- g_return_val_if_fail (tp_contact_get_connection (contact) ==
- self->priv->connection, NULL);
-
- if (self->priv->group_contact_owners == NULL)
- {
- /* undefined result - pretending it's global is probably as good as
- * any other behaviour, since we can't know either way */
- return contact;
- }
-
- handle = tp_contact_get_handle (contact);
-
- if (g_hash_table_lookup_extended (self->priv->group_contact_owners,
- GUINT_TO_POINTER (handle), NULL, &value))
- {
- /* channel-specific, value is either owner or NULL if unknown */
- return value;
- }
- else
- {
- /* either already globally valid, or not a member */
- return contact;
- }
-}
-
-static void
-contacts_prepared_cb (GObject *object,
- GAsyncResult *res,
- gpointer user_data)
-{
- TpChannel *self = (TpChannel *) object;
- GSimpleAsyncResult *result = user_data;
- GError *error = NULL;
-
- if (!_tp_channel_contacts_queue_prepare_finish (self, res, NULL, &error))
- g_simple_async_result_take_error (result, error);
-
- g_simple_async_result_complete (result);
-}
-
-static void
-append_contacts (GPtrArray *contacts,
- GHashTable *table)
-{
- GHashTableIter iter;
- gpointer value;
-
- if (table == NULL)
- return;
-
- g_hash_table_iter_init (&iter, table);
- while (g_hash_table_iter_next (&iter, NULL, &value))
- {
- if (value == NULL)
- continue;
-
- g_ptr_array_add (contacts, value);
- }
-}
-
-void
-_tp_channel_contacts_prepare_async (TpProxy *proxy,
- const TpProxyFeature *feature,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- TpChannel *self = (TpChannel *) proxy;
- GSimpleAsyncResult *result;
- GHashTableIter iter;
- gpointer value;
- GPtrArray *contacts;
-
- if (self->priv->cm_too_old_for_contacts)
- {
- g_simple_async_report_error_in_idle ((GObject *) self, callback,
- user_data, TP_ERROR, TP_ERROR_SOFTWARE_UPGRADE_REQUIRED,
- "The Connection Manager does not implement the required telepathy "
- "specification (>= 0.23.4) to prepare TP_CHANNEL_FEATURE_CONTACTS.");
- return;
- }
-
- result = g_simple_async_result_new ((GObject *) self, callback, user_data,
- _tp_channel_contacts_prepare_async);
-
- contacts = g_ptr_array_new ();
-
- /* Collect all the TpContacts we have for this channel */
- if (self->priv->target_contact != NULL)
- g_ptr_array_add (contacts, self->priv->target_contact);
-
- if (self->priv->initiator_contact != NULL)
- g_ptr_array_add (contacts, self->priv->initiator_contact);
-
- if (self->priv->group_self_contact != NULL)
- g_ptr_array_add (contacts, self->priv->group_self_contact);
-
- append_contacts (contacts, self->priv->group_members_contacts);
- append_contacts (contacts, self->priv->group_local_pending_contacts);
- append_contacts (contacts, self->priv->group_remote_pending_contacts);
- append_contacts (contacts, self->priv->group_contact_owners);
-
- if (self->priv->group_local_pending_info != NULL)
- {
- g_hash_table_iter_init (&iter, self->priv->group_local_pending_info);
- while (g_hash_table_iter_next (&iter, NULL, &value))
- {
- LocalPendingInfo *info = value;
-
- if (info->actor_contact != NULL)
- g_ptr_array_add (contacts, info->actor_contact);
- }
- }
-
- _tp_channel_contacts_queue_prepare_async (self, contacts,
- contacts_prepared_cb, result);
-
- g_ptr_array_unref (contacts);
-}
diff --git a/telepathy-glib/channel-dispatch-operation.c b/telepathy-glib/channel-dispatch-operation.c
index 1c26b813e..1d6799c3a 100644
--- a/telepathy-glib/channel-dispatch-operation.c
+++ b/telepathy-glib/channel-dispatch-operation.c
@@ -26,6 +26,7 @@
#include <telepathy-glib/base-client-internal.h>
#include <telepathy-glib/channel.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/errors.h>
#include <telepathy-glib/gtypes.h>
@@ -38,9 +39,7 @@
#define DEBUG_FLAG TP_DEBUG_DISPATCHER
#include "telepathy-glib/dbus-internal.h"
#include "telepathy-glib/debug-internal.h"
-#include "telepathy-glib/simple-client-factory-internal.h"
-
-#include "telepathy-glib/_gen/tp-cli-channel-dispatch-operation-body.h"
+#include "telepathy-glib/client-factory-internal.h"
/**
* SECTION:channel-dispatch-operation
@@ -72,7 +71,7 @@
*
* If the user wishes to reject the communication channels, or if the user
* accepts the channels and the approver will handle them itself, the approver
- * should call tp_cli_channel_dispatch_operation_call_claim(). If this method
+ * should call tp_channel_dispatch_operation_claim_with_async(). If this method
* succeeds, the approver immediately has control over the channels as their
* primary handler, and may do anything with them (in particular, it may close
* them in whatever way seems most appropriate).
@@ -100,8 +99,7 @@
* will be notified again.
*
* This proxy is usable but incomplete: accessors for the D-Bus properties will
- * be added in a later version of telepathy-glib, along with a mechanism
- * similar to tp_connection_call_when_ready().
+ * be added in a later version of telepathy-glib.
*
* Since: 0.7.32
*/
@@ -253,7 +251,7 @@ maybe_set_connection (TpChannelDispatchOperation *self,
if (path == NULL)
return;
- self->priv->connection = tp_simple_client_factory_ensure_connection (
+ self->priv->connection = tp_client_factory_ensure_connection (
tp_proxy_get_factory (self), path, NULL, &error);
if (self->priv->connection == NULL)
{
@@ -285,7 +283,7 @@ maybe_set_account (TpChannelDispatchOperation *self,
if (path == NULL)
return;
- self->priv->account = tp_simple_client_factory_ensure_account (
+ self->priv->account = tp_client_factory_ensure_account (
tp_proxy_get_factory (self), path, NULL, &error);
if (self->priv->account == NULL)
{
@@ -538,7 +536,7 @@ update_channels_array (TpChannelDispatchOperation *self,
}
else
{
- channel = tp_simple_client_factory_ensure_channel (
+ channel = tp_client_factory_ensure_channel (
tp_proxy_get_factory (self), self->priv->connection,
path, chan_props, &err);
@@ -649,7 +647,7 @@ out:
if (e != NULL)
g_simple_async_result_set_from_error (result, e);
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
if (!prepared)
{
@@ -898,7 +896,7 @@ tp_channel_dispatch_operation_new (TpDBusDaemon *bus_daemon,
}
TpChannelDispatchOperation *
-_tp_channel_dispatch_operation_new_with_factory (TpSimpleClientFactory *factory,
+_tp_channel_dispatch_operation_new_with_factory (TpClientFactory *factory,
TpDBusDaemon *bus_daemon,
const gchar *object_path,
GHashTable *immutable_properties,
@@ -1079,7 +1077,7 @@ handle_with_cb (TpChannelDispatchOperation *self,
g_simple_async_result_set_from_error (result, error);
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -1106,7 +1104,7 @@ handle_with_cb (TpChannelDispatchOperation *self,
* invoked as the handler.
*
* Approvers which are also channel handlers SHOULD use
- * tp_channel_dispatch_operation_claim_async() instead
+ * tp_channel_dispatch_operation_claim_with_async() instead
* of tp_channel_dispatch_operation_handle_with_async() to request
* that they can handle a channel bundle themselves.
*
@@ -1153,89 +1151,8 @@ tp_channel_dispatch_operation_handle_with_finish (
tp_channel_dispatch_operation_handle_with_async);
}
-static void
-claim_cb (TpChannelDispatchOperation *self,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- GSimpleAsyncResult *result = user_data;
-
- if (error != NULL)
- {
- DEBUG ("Claim failed: %s", error->message);
- g_simple_async_result_set_from_error (result, error);
- }
-
- g_simple_async_result_complete_in_idle (result);
- g_object_unref (result);
-}
-
-/**
- * tp_channel_dispatch_operation_claim_async:
- * @self: a #TpChannelDispatchOperation
- * @callback: a callback to call when the call returns
- * @user_data: data to pass to @callback
- *
- * Called by an approver to claim channels for handling internally.
- * If this method is called successfully, the process calling this
- * method becomes the handler for the channel.
- *
- * If successful, this method will cause the #TpProxy::invalidated signal
- * to be emitted, in the same way as for
- * tp_channel_dispatch_operation_handle_with_async().
- *
- * This method may fail because the dispatch operation has already
- * been completed. Again, see tp_channel_dispatch_operation_handle_with_async()
- * for more details. The approver MUST NOT attempt to interact with
- * the channels further in this case.
- *
- * Since: 0.11.5
- * Deprecated: since 0.15.0. Use
- * tp_channel_dispatch_operation_claim_with_async()
- */
-void
-tp_channel_dispatch_operation_claim_async (
- TpChannelDispatchOperation *self,
- GAsyncReadyCallback callback,
- gpointer user_data)
-{
- GSimpleAsyncResult *result;
-
- g_return_if_fail (TP_IS_CHANNEL_DISPATCH_OPERATION (self));
-
- result = g_simple_async_result_new (G_OBJECT (self),
- callback, user_data, tp_channel_dispatch_operation_claim_async);
-
- tp_cli_channel_dispatch_operation_call_claim (self, -1,
- claim_cb, result, NULL, G_OBJECT (self));
-}
-
-/**
- * tp_channel_dispatch_operation_claim_finish:
- * @self: a #TpChannelDispatchOperation
- * @result: a #GAsyncResult
- * @error: a #GError to fill
- *
- * Finishes an async call to Claim().
- *
- * Returns: %TRUE if the Claim() call was successful, otherwise %FALSE
- *
- * Since: 0.11.5
- * Deprecated: since 0.15.0. Use
- * tp_channel_dispatch_operation_claim_with_finish()
- */
-gboolean
-tp_channel_dispatch_operation_claim_finish (
- TpChannelDispatchOperation *self,
- GAsyncResult *result,
- GError **error)
-{
- _tp_implement_finish_void (self, tp_channel_dispatch_operation_claim_async);
-}
-
/* FIXME: This is temporary solution to share TpChannel objects until
- * TpSimpleClientFactory can be used for that */
+ * TpClientFactory can be used for that */
void
_tp_channel_dispatch_operation_ensure_channels (TpChannelDispatchOperation *self,
GPtrArray *channels)
@@ -1339,7 +1256,7 @@ claim_with_cb (TpChannelDispatchOperation *self,
_tp_base_client_now_handling_channels (client, self->priv->channels);
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -1363,9 +1280,6 @@ claim_with_cb (TpChannelDispatchOperation *self,
* for more details. The approver MUST NOT attempt to interact with
* the channels further in this case.
*
- * This is an improved version of tp_channel_dispatch_operation_claim_async()
- * as it tells @client about the new channels being handled.
- *
* %TP_CHANNEL_DISPATCH_OPERATION_FEATURE_CORE feature must be prepared before
* calling this function.
*
@@ -1450,7 +1364,7 @@ claim_close_channels_cb (TpChannelDispatchOperation *self,
tp_channel_close_async (channel, channel_close_cb, NULL);
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -1580,7 +1494,7 @@ claim_leave_channels_cb (TpChannelDispatchOperation *self,
channel_leave_cb, NULL);
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -1691,7 +1605,7 @@ claim_destroy_channels_cb (TpChannelDispatchOperation *self,
tp_channel_destroy_async (channel, channel_destroy_cb, NULL);
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
diff --git a/telepathy-glib/channel-dispatch-operation.h b/telepathy-glib/channel-dispatch-operation.h
index fb1262f9c..fe8c38d37 100644
--- a/telepathy-glib/channel-dispatch-operation.h
+++ b/telepathy-glib/channel-dispatch-operation.h
@@ -109,16 +109,6 @@ gboolean tp_channel_dispatch_operation_handle_with_finish (
GAsyncResult *result,
GError **error);
-void tp_channel_dispatch_operation_claim_async (
- TpChannelDispatchOperation *self,
- GAsyncReadyCallback callback,
- gpointer user_data);
-
-gboolean tp_channel_dispatch_operation_claim_finish (
- TpChannelDispatchOperation *self,
- GAsyncResult *result,
- GError **error);
-
void tp_channel_dispatch_operation_handle_with_time_async (
TpChannelDispatchOperation *self,
const gchar *handler,
@@ -186,6 +176,4 @@ gboolean tp_channel_dispatch_operation_destroy_channels_finish (
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-channel-dispatch-operation.h>
-
#endif
diff --git a/telepathy-glib/channel-dispatcher.c b/telepathy-glib/channel-dispatcher.c
index 21638244c..77c4f70ad 100644
--- a/telepathy-glib/channel-dispatcher.c
+++ b/telepathy-glib/channel-dispatcher.c
@@ -23,6 +23,7 @@
#include "telepathy-glib/channel-dispatcher.h"
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/errors.h>
@@ -33,8 +34,6 @@
#define DEBUG_FLAG TP_DEBUG_DISPATCHER
#include "telepathy-glib/debug-internal.h"
-#include "telepathy-glib/_gen/tp-cli-channel-dispatcher-body.h"
-
/**
* SECTION:channel-dispatcher
* @title: TpChannelDispatcher
@@ -62,8 +61,7 @@
* See the Telepathy D-Bus Interface Specification for details.
*
* This proxy is usable but incomplete: convenience methods will be added in
- * a later version of telepathy-glib, along with a mechanism similar to
- * tp_connection_call_when_ready().
+ * a later version of telepathy-glib.
*
* Since: 0.7.32
*/
@@ -183,7 +181,7 @@ present_channel_cb (TpChannelDispatcher *cd,
g_simple_async_result_set_from_error (result, error);
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
/**
diff --git a/telepathy-glib/channel-dispatcher.h b/telepathy-glib/channel-dispatcher.h
index 91e6b72bf..3459ed6a1 100644
--- a/telepathy-glib/channel-dispatcher.h
+++ b/telepathy-glib/channel-dispatcher.h
@@ -86,6 +86,4 @@ gboolean tp_channel_dispatcher_present_channel_finish (
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-channel-dispatcher.h>
-
#endif
diff --git a/telepathy-glib/channel-dispatcher.xml b/telepathy-glib/channel-dispatcher.xml
index 82d6d63f6..32a537fcf 100644
--- a/telepathy-glib/channel-dispatcher.xml
+++ b/telepathy-glib/channel-dispatcher.xml
@@ -5,6 +5,6 @@
<tp:title>Channel Dispatcher interfaces</tp:title>
<xi:include href="../spec/Channel_Dispatcher.xml"/>
-<xi:include href="../spec/Channel_Dispatcher_Interface_Operation_List.xml"/>
+<xi:include href="../spec/Channel_Dispatcher_Interface_Operation_List1.xml"/>
</tp:spec>
diff --git a/telepathy-glib/channel-factory-iface.c b/telepathy-glib/channel-factory-iface.c
deleted file mode 100644
index c2e1756e8..000000000
--- a/telepathy-glib/channel-factory-iface.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- * tp-channel-factory-iface.c - Stubs for Telepathy Channel Factory interface
- *
- * Copyright (C) 2006-2008 Collabora Ltd.
- * Copyright (C) 2006-2008 Nokia Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * SECTION:channel-factory-iface
- * @title: TpChannelFactoryIface
- * @short_description: interface for channel allocation/tracking
- * @see_also: #TpSvcConnection, #TpChannelManager
- *
- * A channel factory is attached to a connection. It carries out channel
- * requests from the connection, and responds to channel-related events
- * on the underlying network connection (e.g. incoming calls).
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager, a newer
- * interface which can be used to implement modern D-Bus APIs, instead.
- *
- * Deprecated: 0.11.7
- */
-
-#include "config.h"
-
-#include <telepathy-glib/channel-factory-iface.h>
-
-#include <glib-object.h>
-
-#include <telepathy-glib/channel-iface.h>
-
-enum {
- NEW_CHANNEL,
- CHANNEL_ERROR,
- N_SIGNALS
-};
-
-static guint signals[N_SIGNALS] = {0};
-
-static void
-tp_channel_factory_iface_base_init (gpointer klass)
-{
- static gboolean initialized = FALSE;
-
- if (!initialized) {
- initialized = TRUE;
-
- /**
- * TpChannelFactoryIface::new-channel:
- * @self: an object implementing #TpChannelFactoryIface
- * @channel: a new channel (an object implementing #TpChannelIface)
- * @request_context: a request context as passed to
- * tp_channel_factory_iface_request(), or %NULL
- *
- * Emitted when a new channel has been created.
- *
- * If the @channel was created in response to a channel request, the
- * request was for a nonzero handle type, and the channel has zero handle
- * type, @request_context will be the request context passed to
- * tp_channel_factory_iface_request().
- *
- * Otherwise, request may either be %NULL or a request that led to
- * @channel's creation; callers are expected to determine which channels
- * satisfy which requests based on the handle and handle-type.
- */
- signals[NEW_CHANNEL] = g_signal_new ("new-channel",
- G_OBJECT_CLASS_TYPE (klass),
- G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
- 0,
- NULL, NULL, NULL,
- G_TYPE_NONE, 2, G_TYPE_OBJECT, G_TYPE_POINTER);
-
- /**
- * TpChannelFactoryIface::channel-error:
- * @self: an object implementing #TpChannelFactoryIface
- * @channel: an object implementing #TpChannelIface
- * @error: the #GError that made the channel request fail
- * @request_context: a request context as passed to
- * tp_channel_factory_iface_request(), or %NULL
- *
- * Emitted when a new channel has been created, but an error occurred
- * before it could become useful.
- *
- * @request is the same as for #TpChannelFactoryIface::new-channel.
- */
- signals[CHANNEL_ERROR] = g_signal_new ("channel-error",
- G_OBJECT_CLASS_TYPE (klass),
- G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
- 0,
- NULL, NULL, NULL,
- G_TYPE_NONE,
- 3, G_TYPE_OBJECT, G_TYPE_POINTER, G_TYPE_POINTER);
- }
-}
-
-GType
-tp_channel_factory_iface_get_type (void)
-{
- static GType type = 0;
-
- if (type == 0) {
- static const GTypeInfo info = {
- sizeof (TpChannelFactoryIfaceClass),
- tp_channel_factory_iface_base_init, /* base_init */
- NULL, /* base_finalize */
- NULL, /* class_init */
- NULL, /* class_finalize */
- NULL, /* class_data */
- 0,
- 0, /* n_preallocs */
- NULL /* instance_init */
- };
-
- type = g_type_register_static (G_TYPE_INTERFACE, "TpChannelFactoryIface",
- &info, 0);
- }
-
- return type;
-}
-
-/**
- * tp_channel_factory_iface_close_all:
- * @self: An object implementing #TpChannelFactoryIface
- *
- * Close all channels and shut down the channel factory. It is not expected
- * to be usable afterwards. This is called when the connection goes to
- * disconnected state, before either emitting the StatusChanged signal or
- * calling disconnected().
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager instead.
- *
- * Deprecated: 0.11.7
- */
-void
-tp_channel_factory_iface_close_all (TpChannelFactoryIface *self)
-{
- void (*virtual_method)(TpChannelFactoryIface *) =
- TP_CHANNEL_FACTORY_IFACE_GET_CLASS (self)->close_all;
- g_assert (virtual_method != NULL);
- virtual_method (self);
-}
-
-/**
- * tp_channel_factory_iface_connecting:
- * @self: An implementation of the channel factory interface
- *
- * Indicate that the connection has gone from disconnected to connecting
- * state.
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager instead.
- *
- * Deprecated: 0.11.7
- */
-void
-tp_channel_factory_iface_connecting (TpChannelFactoryIface *self)
-{
- void (*virtual_method)(TpChannelFactoryIface *) =
- TP_CHANNEL_FACTORY_IFACE_GET_CLASS (self)->connecting;
- if (virtual_method)
- virtual_method (self);
-}
-
-/**
- * tp_channel_factory_iface_connected:
- * @self: An implementation of the channel factory interface
- *
- * Indicate that the connection has gone from connecting to connected state.
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager instead.
- *
- * Deprecated: 0.11.7
- */
-void
-tp_channel_factory_iface_connected (TpChannelFactoryIface *self)
-{
- void (*virtual_method)(TpChannelFactoryIface *) =
- TP_CHANNEL_FACTORY_IFACE_GET_CLASS (self)->connected;
- if (virtual_method)
- virtual_method (self);
-}
-
-/**
- * tp_channel_factory_iface_disconnected:
- * @self: An implementation of the channel factory interface
- *
- * Indicate that the connection has become disconnected.
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager instead.
- *
- * Deprecated: 0.11.7
- */
-void
-tp_channel_factory_iface_disconnected (TpChannelFactoryIface *self)
-{
- void (*virtual_method)(TpChannelFactoryIface *) =
- TP_CHANNEL_FACTORY_IFACE_GET_CLASS (self)->disconnected;
- if (virtual_method)
- virtual_method (self);
-}
-
-/**
- * tp_channel_factory_iface_foreach:
- * @self: An implementation of the channel factory interface
- * @func: A callback to be called once per channel
- * @data: Extra data to be passed to @func
- *
- * Call func(channel, data) for each channel managed by this factory.
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager instead.
- *
- * Deprecated: 0.11.7
- */
-void
-tp_channel_factory_iface_foreach (TpChannelFactoryIface *self,
- TpChannelFunc func,
- gpointer data)
-{
- void (*virtual_method)(TpChannelFactoryIface *, TpChannelFunc, gpointer) =
- TP_CHANNEL_FACTORY_IFACE_GET_CLASS (self)->foreach;
- g_assert (virtual_method != NULL);
- virtual_method (self, func, data);
-}
-
-/**
- * tp_channel_factory_iface_request:
- * @self: An object implementing #TpChannelFactoryIface
- * @chan_type: The channel type, e.g. %TP_IFACE_CHANNEL_TYPE_TEXT
- * @handle_type: The handle type of the channel's associated handle,
- * or 0 if the channel has no associated handle
- * @handle: The channel's associated handle, of type @handle_type,
- * or 0 if the channel has no associated handle
- * @request: An opaque data structure representing the channel request;
- * if this request is satisfied by a newly created channel,
- * this structure MUST be included in the new-channel signal
- * if the newly created channel has handle 0, and MAY be
- * included in the signal if the newly created channel has
- * nonzero handle.
- * @ret: Set to the new channel if it is available immediately, as
- * documented in the description of #TpChannelFactoryRequestStatus
- * @error: Set to the error if the return is
- * %TP_CHANNEL_FACTORY_REQUEST_STATUS_ERROR, unset otherwise
- *
- * Request a channel.
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager instead.
- *
- * Deprecated: 0.11.7
- *
- * Returns: one of the values of #TpChannelFactoryRequestStatus, and
- * behaves as documented for that return value
- */
-TpChannelFactoryRequestStatus
-tp_channel_factory_iface_request (TpChannelFactoryIface *self,
- const gchar *chan_type,
- TpHandleType handle_type,
- TpHandle handle,
- gpointer request,
- TpChannelIface **ret,
- GError **error)
-{
- TpChannelFactoryRequestStatus (*virtual_method) (TpChannelFactoryIface *,
- const gchar *, TpHandleType, guint, gpointer, TpChannelIface **,
- GError **) = TP_CHANNEL_FACTORY_IFACE_GET_CLASS (self)->request;
- g_assert (virtual_method != NULL);
- return virtual_method (self, chan_type, handle_type, handle, request,
- ret, error);
-}
-
-/**
- * tp_channel_factory_iface_emit_new_channel:
- * @instance: An object implementing #TpChannelFactoryIface
- * @channel: The new channel
- * @request: A request context as passed to tp_channel_factory_iface_request(),
- * or %NULL
- *
- * Signal that a new channel has been created (new-channel signal).
- *
- * If the channel was created in response to a channel request, the request
- * was for a nonzero handle type, and the channel has zero handle type,
- * request will be the request context passed to
- * tp_channel_factory_iface_request().
- *
- * Otherwise, request may either be
- * %NULL or a request that led to the channel's creation; callers are expected
- * to determine which channels satisfy which requests based on the handle
- * and handle-type.
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager instead.
- *
- * Deprecated: 0.11.7
- */
-void
-tp_channel_factory_iface_emit_new_channel (gpointer instance,
- TpChannelIface *channel,
- gpointer context)
-{
- g_signal_emit (instance, signals[NEW_CHANNEL], 0, channel, context);
-}
-
-/**
- * tp_channel_factory_iface_emit_channel_error:
- * @instance: An object implementing #TpChannelFactoryIface
- * @channel: The new channel
- * @error: The error that made the channel request fail
- * @request: A request context as passed to tp_channel_factory_iface_request(),
- * or %NULL
- *
- * Signal that a new channel was created, but an error occurred before it
- * could become useful.
- *
- * request is as for tp_channel_factory_iface_emit_new_channel().
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager instead.
- *
- * Deprecated: 0.11.7
- */
-void
-tp_channel_factory_iface_emit_channel_error (gpointer instance,
- TpChannelIface *channel,
- GError *error,
- gpointer context)
-{
- g_signal_emit (instance, signals[CHANNEL_ERROR], 0, channel, error, context);
-}
diff --git a/telepathy-glib/channel-factory-iface.h b/telepathy-glib/channel-factory-iface.h
deleted file mode 100644
index b14bc60c0..000000000
--- a/telepathy-glib/channel-factory-iface.h
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * tp-channel-factory-iface.h - Headers for Telepathy Channel Factory interface
- *
- * Copyright (C) 2006 Collabora Ltd.
- * Copyright (C) 2006 Nokia Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __TP_CHANNEL_FACTORY_IFACE_H__
-#define __TP_CHANNEL_FACTORY_IFACE_H__
-
-#include <glib-object.h>
-
-#include <telepathy-glib/channel-iface.h>
-#include <telepathy-glib/defs.h>
-#include <telepathy-glib/enums.h>
-#include <telepathy-glib/handle.h>
-
-G_BEGIN_DECLS
-
-#ifndef TP_DISABLE_DEPRECATED
-
-#define TP_TYPE_CHANNEL_FACTORY_IFACE (tp_channel_factory_iface_get_type ())
-
-#define TP_CHANNEL_FACTORY_IFACE(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
- TP_TYPE_CHANNEL_FACTORY_IFACE, TpChannelFactoryIface))
-
-#define TP_IS_CHANNEL_FACTORY_IFACE(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
- TP_TYPE_CHANNEL_FACTORY_IFACE))
-
-#define TP_CHANNEL_FACTORY_IFACE_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_INTERFACE ((obj), \
- TP_TYPE_CHANNEL_FACTORY_IFACE, TpChannelFactoryIfaceClass))
-
-/**
- * TpChannelFactoryIface:
- *
- * Opaque typedef representing any channel factory implementation.
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager instead.
- *
- * Deprecated: 0.11.7
- */
-typedef struct _TpChannelFactoryIface TpChannelFactoryIface;
-
-/* documented below */
-typedef struct _TpChannelFactoryIfaceClass TpChannelFactoryIfaceClass;
-
-/**
- * TpChannelFactoryRequestStatus:
- * @TP_CHANNEL_FACTORY_REQUEST_STATUS_NOT_IMPLEMENTED: Same as the Telepathy
- * error NotImplemented. The connection will try the next factory in its
- * list; if all return this, the overall result of the request will be
- * NotImplemented. *@ret and *@error are not set
- * @TP_CHANNEL_FACTORY_REQUEST_STATUS_NOT_AVAILABLE: Same as the Telepathy
- * error NotAvailable. *@ret and *@error are not set
- * @TP_CHANNEL_FACTORY_REQUEST_STATUS_INVALID_HANDLE: Same as the Telepathy
- * error InvalidHandle. *@ret and *@error are not set
- * @TP_CHANNEL_FACTORY_REQUEST_STATUS_ERROR: An error other than the above.
- * *@ret is not set, *@error is set
- * @TP_CHANNEL_FACTORY_REQUEST_STATUS_CREATED: A new channel was created
- * (possibly in response to more than one request). new-channel has already
- * been emitted and *@ret is set to the new channel.
- * @TP_CHANNEL_FACTORY_REQUEST_STATUS_QUEUED: A new channel will be created,
- * or was created but is not ready yet. Either new-channel or channel-error
- * will be emitted later. *@ret and *@error are not set.
- * @TP_CHANNEL_FACTORY_REQUEST_STATUS_EXISTING: An existing channel
- * satisfies the request: new-channel was not emitted. *@ret is set to the
- * existing channel.
- *
- * Indicates the result of a channel request.
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager instead.
- *
- * Deprecated: 0.11.7
- */
-typedef enum { /*< skip >*/
- TP_CHANNEL_FACTORY_REQUEST_STATUS_NOT_IMPLEMENTED = 0,
- TP_CHANNEL_FACTORY_REQUEST_STATUS_NOT_AVAILABLE,
- TP_CHANNEL_FACTORY_REQUEST_STATUS_INVALID_HANDLE,
- TP_CHANNEL_FACTORY_REQUEST_STATUS_ERROR,
- TP_CHANNEL_FACTORY_REQUEST_STATUS_CREATED,
- TP_CHANNEL_FACTORY_REQUEST_STATUS_QUEUED,
- TP_CHANNEL_FACTORY_REQUEST_STATUS_EXISTING
-} TpChannelFactoryRequestStatus;
-
-/**
- * TpChannelFactoryIfaceProc:
- * @self: An object implementing #TpChannelFactoryIface
- *
- * A virtual method on a channel factory that takes no extra parameters
- * and returns nothing.
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager instead.
- *
- * Deprecated: 0.11.7
- */
-typedef void (*TpChannelFactoryIfaceProc) (TpChannelFactoryIface *self);
-
-/**
- * TpChannelFactoryIfaceRequestImpl:
- * @self: An object implementing #TpChannelFactoryIface
- * @chan_type: The channel type, e.g. %TP_IFACE_CHANNEL_TYPE_TEXT
- * @handle_type: The handle type of the channel's associated handle,
- * or 0 if the channel has no associated handle
- * @handle: The channel's associated handle, of type @handle_type,
- * or 0 if the channel has no associated handle
- * @request: An opaque data structure representing the channel request;
- * if this request is satisfied by a newly created channel,
- * this structure MUST be included in the new-channel signal
- * if the newly created channel has handle 0, and MAY be
- * included in the signal if the newly created channel has
- * nonzero handle.
- * @ret: Set to the new channel if it is available immediately, as
- * documented in the description of #TpChannelFactoryRequestStatus
- * @error: Set to the error if the return is
- * %TP_CHANNEL_FACTORY_REQUEST_STATUS_ERROR, unset otherwise
- *
- * Signature of an implementation of RequestChannel.
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager instead.
- *
- * Deprecated: 0.11.7
- *
- * Returns: one of the values of #TpChannelFactoryRequestStatus, and
- * behaves as documented for that return value
- */
-typedef TpChannelFactoryRequestStatus (*TpChannelFactoryIfaceRequestImpl) (
- TpChannelFactoryIface *self, const gchar *chan_type,
- TpHandleType handle_type, guint handle, gpointer request,
- TpChannelIface **ret, GError **error);
-
-/**
- * TpChannelFactoryIfaceForeachImpl:
- * @self: An object implementing #TpChannelFactoryIface
- * @func: A function
- * @data: Arbitrary data to pass to @func as the second argument
- *
- * Signature of an implementation of foreach, which must call
- * func(channel, data) for each channel managed by this factory.
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager instead.
- *
- * Deprecated: 0.11.7
- */
-typedef void (*TpChannelFactoryIfaceForeachImpl) (TpChannelFactoryIface *self,
- TpChannelFunc func, gpointer data);
-
-/**
- * TpChannelFactoryIfaceClass:
- * @parent_class: Fields shared with GTypeInterface
- * @close_all: Close all channels and shut down the channel factory. It is not
- * expected to be usable afterwards. This is called when the connection goes
- * to disconnected state, before emitting the StatusChanged signal or calling
- * disconnected(). Must be filled in by implementations.
- * @connecting: Called just after the connection goes from disconnected to
- * connecting state. May be NULL if nothing special needs to happen.
- * @connected: Called just after the connection goes from connecting to
- * connected state. May be NULL if nothing special needs to happen.
- * @disconnected: Called just after the connection goes to disconnected state.
- * This is always called after @close_all. May be NULL if nothing special
- * needs to happen.
- * @foreach: Call func(channel, data) for each channel managed by this
- * factory. Must be filled in by implementations.
- * @request: Respond to a request for a channel. Must be filled in by
- * implementations. See #TpChannelFactoryIfaceRequestImpl for details.
- *
- * The class structure and vtable for a channel factory implementation.
- *
- * Deprecated since version 0.11.7. Use #TpChannelManager instead.
- *
- * Deprecated: 0.11.7
- */
-struct _TpChannelFactoryIfaceClass {
- GTypeInterface parent_class;
-
- TpChannelFactoryIfaceProc close_all;
- TpChannelFactoryIfaceProc connecting;
- TpChannelFactoryIfaceProc connected;
- TpChannelFactoryIfaceProc disconnected;
- TpChannelFactoryIfaceForeachImpl foreach;
- TpChannelFactoryIfaceRequestImpl request;
-} _TP_GNUC_DEPRECATED;
-
-GType tp_channel_factory_iface_get_type (void);
-
-_TP_DEPRECATED
-void tp_channel_factory_iface_close_all (TpChannelFactoryIface *self);
-
-_TP_DEPRECATED
-void tp_channel_factory_iface_connecting (TpChannelFactoryIface *self);
-
-_TP_DEPRECATED
-void tp_channel_factory_iface_connected (TpChannelFactoryIface *self);
-
-_TP_DEPRECATED
-void tp_channel_factory_iface_disconnected (TpChannelFactoryIface *self);
-
-_TP_DEPRECATED
-void tp_channel_factory_iface_foreach (TpChannelFactoryIface *self,
- TpChannelFunc func, gpointer data);
-
-_TP_DEPRECATED
-TpChannelFactoryRequestStatus tp_channel_factory_iface_request (
- TpChannelFactoryIface *self, const gchar *chan_type,
- TpHandleType handle_type, guint handle, gpointer request,
- TpChannelIface **ret, GError **error);
-
-_TP_DEPRECATED
-void tp_channel_factory_iface_emit_new_channel (gpointer instance,
- TpChannelIface *channel, gpointer request);
-
-_TP_DEPRECATED
-void tp_channel_factory_iface_emit_channel_error (gpointer instance,
- TpChannelIface *channel, GError *error, gpointer request);
-
-#endif /* not TP_DISABLE_DEPRECATED */
-
-G_END_DECLS
-
-#endif /* __TP_CHANNEL_FACTORY_IFACE_H__ */
diff --git a/telepathy-glib/channel-group.c b/telepathy-glib/channel-group.c
index c7f2b07cf..17dc6614e 100644
--- a/telepathy-glib/channel-group.c
+++ b/telepathy-glib/channel-group.c
@@ -1,8 +1,7 @@
/*
- * channel.c - proxy for a Telepathy channel (Group interface)
+ * channel-group.c - proxy for a Telepathy channel (GROUP feature)
*
- * Copyright (C) 2007-2008 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright (C) 2007-2008 Nokia Corporation
+ * Copyright (C) 2011 Collabora Ltd. <http://www.collabora.co.uk/>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -23,19 +22,18 @@
#include "telepathy-glib/channel-internal.h"
-#include <telepathy-glib/dbus.h>
+#include <telepathy-glib/cli-channel.h>
+#include <telepathy-glib/cli-misc.h>
+#include <telepathy-glib/client-factory.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/proxy-subclass.h>
+#include <telepathy-glib/proxy.h>
#include <telepathy-glib/util.h>
#define DEBUG_FLAG TP_DEBUG_GROUPS
+#include "telepathy-glib/connection-internal.h"
#include "telepathy-glib/debug-internal.h"
-#include "telepathy-glib/proxy-internal.h"
-
-/* channel-group.c is ~all deprecated APIs, modern APIs are in
- * channel-contacts.c. So we allow this module to use deprecated functions. */
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+#include "telepathy-glib/util-internal.h"
/**
* TP_ERRORS_REMOVED_FROM_GROUP:
@@ -63,824 +61,446 @@ tp_errors_removed_from_group_quark (void)
return q;
}
-
-static void
-local_pending_info_free (LocalPendingInfo *info)
+static GArray *
+dup_handle_array (const GArray *source)
{
- g_free (info->message);
- g_clear_object (&info->actor_contact);
- g_slice_free (LocalPendingInfo, info);
-}
+ GArray *target;
+ target = g_array_sized_new (FALSE, FALSE, sizeof (TpHandle), source->len);
+ g_array_append_vals (target, source->data, source->len);
-/**
- * tp_channel_group_get_self_handle:
- * @self: a channel
- *
- * Return the #TpChannel:group-self-handle property (see the description
- * of that property for notes on validity).
- *
- * Returns: the handle representing the user, or 0
- * Since: 0.7.12
- * Deprecated: New code should use tp_channel_group_get_self_contact() instead.
- */
-TpHandle
-tp_channel_group_get_self_handle (TpChannel *self)
-{
- g_return_val_if_fail (TP_IS_CHANNEL (self), 0);
-
- return self->priv->group_self_handle;
+ return target;
}
-
-/**
- * tp_channel_group_get_flags:
- * @self: a channel
- *
- * Return the #TpChannel:group-flags property (see the description
- * of that property for notes on validity).
- *
- * Returns: the group flags, or 0
- * Since: 0.7.12
- */
-TpChannelGroupFlags
-tp_channel_group_get_flags (TpChannel *self)
+static TpContact *
+dup_contact (TpChannel *self,
+ TpHandle handle,
+ GHashTable *identifiers)
{
- g_return_val_if_fail (TP_IS_CHANNEL (self), 0);
-
- return self->priv->group_flags;
-}
+ const gchar *id;
+ if (handle == 0)
+ return NULL;
-/**
- * tp_channel_group_get_members:
- * @self: a channel
- *
- * If @self is a group and the %TP_CHANNEL_FEATURE_GROUP feature has been
- * prepared, return a #TpIntset containing its members.
- *
- * If @self is a group but %TP_CHANNEL_FEATURE_GROUP has not been prepared,
- * the result may either be a set of members, or %NULL.
- *
- * If @self is not a group, return %NULL.
- *
- * Returns: (transfer none): the members, or %NULL
- * Since: 0.7.12
- * Deprecated: New code should use tp_channel_group_dup_members_contacts()
- * instead.
- */
-const TpIntset *
-tp_channel_group_get_members (TpChannel *self)
-{
- g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
+ id = g_hash_table_lookup (identifiers, GUINT_TO_POINTER (handle));
+ if (id == NULL)
+ {
+ DEBUG ("Missing identifier for handle %u - broken CM", handle);
+ return NULL;
+ }
- return self->priv->group_members;
+ return tp_client_factory_ensure_contact (
+ tp_proxy_get_factory (self->priv->connection), self->priv->connection,
+ handle, id);
}
-
-/**
- * tp_channel_group_get_local_pending:
- * @self: a channel
- *
- * If @self is a group and the %TP_CHANNEL_FEATURE_GROUP feature has been
- * prepared, return a #TpIntset containing its local-pending members.
- *
- * If @self is a group but %TP_CHANNEL_FEATURE_GROUP has not been prepared,
- * the result may either be a set of local-pending members, or %NULL.
- *
- * If @self is not a group, return %NULL.
- *
- * Returns: (transfer none): the local-pending members, or %NULL
- * Since: 0.7.12
- * Deprecated: New code should use tp_channel_group_dup_local_pending_contacts()
- * instead.
- */
-const TpIntset *
-tp_channel_group_get_local_pending (TpChannel *self)
+static GPtrArray *
+dup_contact_array (TpChannel *self,
+ const GArray *handles,
+ GHashTable *identifiers)
{
- g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
+ GPtrArray *array;
+ guint i;
- return self->priv->group_local_pending;
-}
+ array = g_ptr_array_new_full (handles->len, g_object_unref);
+ if (handles == NULL)
+ return array;
+ for (i = 0; i < handles->len; i++)
+ {
+ TpHandle handle = g_array_index (handles, TpHandle, i);
+ TpContact *contact = dup_contact (self, handle, identifiers);
-/**
- * tp_channel_group_get_remote_pending:
- * @self: a channel
- *
- * If @self is a group and the %TP_CHANNEL_FEATURE_GROUP feature has been
- * prepared, return a #TpIntset containing its remote-pending members.
- *
- * If @self is a group but %TP_CHANNEL_FEATURE_GROUP has not been prepared,
- * the result may either be a set of remote-pending members, or %NULL.
- *
- * If @self is not a group, return %NULL.
- *
- * Returns: (transfer none): the remote-pending members, or %NULL
- * Since: 0.7.12
- * Deprecated: New code should use
- * tp_channel_group_dup_remote_pending_contacts() instead.
- */
-const TpIntset *
-tp_channel_group_get_remote_pending (TpChannel *self)
-{
- g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
+ if (contact != NULL)
+ g_ptr_array_add (array, contact);
+ }
- return self->priv->group_remote_pending;
+ return array;
}
-
-/**
- * tp_channel_group_get_local_pending_info:
- * @self: a channel
- * @local_pending: the handle of a local-pending contact about whom more
- * information is needed
- * @actor: (out) (allow-none): either %NULL or a location to return the contact
- * who requested the change
- * @reason: (out) (allow-none): either %NULL or a location to return the reason
- * for the change
- * @message: (out) (transfer none) (allow-none): either %NULL or a location to
- * return the user-supplied message
- *
- * If @local_pending is actually the handle of a local-pending contact,
- * write additional information into @actor, @reason and @message and return
- * %TRUE. The handle and message are not referenced or copied, and can only be
- * assumed to remain valid until the main loop is re-entered.
- *
- * If @local_pending is not the handle of a local-pending contact,
- * write 0 into @actor, %TP_CHANNEL_GROUP_CHANGE_REASON_NONE into @reason
- * and "" into @message, and return %FALSE.
- *
- * Returns: %TRUE if the contact is in fact local-pending
- * Since: 0.7.12
- * Deprecated: New code should use
- * tp_channel_group_get_local_pending_contact_info() instead.
- */
-gboolean
-tp_channel_group_get_local_pending_info (TpChannel *self,
- TpHandle local_pending,
- TpHandle *actor,
- TpChannelGroupChangeReason *reason,
- const gchar **message)
+static GHashTable *
+dup_contacts_table (TpChannel *self,
+ const GArray *handles,
+ GHashTable *identifiers)
{
- gboolean ret = FALSE;
- TpHandle a = 0;
- TpChannelGroupChangeReason r = TP_CHANNEL_GROUP_CHANGE_REASON_NONE;
- const gchar *m = "";
+ GHashTable *target;
+ guint i;
- g_return_val_if_fail (TP_IS_CHANNEL (self), FALSE);
+ target = g_hash_table_new_full (NULL, NULL, NULL, g_object_unref);
+ if (handles == NULL)
+ return target;
- if (self->priv->group_local_pending != NULL)
+ for (i = 0; i < handles->len; i++)
{
- /* it could conceivably be someone who is local-pending */
-
- ret = tp_intset_is_member (self->priv->group_local_pending,
- local_pending);
-
- if (ret && self->priv->group_local_pending_info != NULL)
- {
- /* we might even have information about them */
- LocalPendingInfo *info = g_hash_table_lookup (
- self->priv->group_local_pending_info,
- GUINT_TO_POINTER (local_pending));
-
- if (info != NULL)
- {
- a = info->actor;
- r = info->reason;
+ TpHandle handle = g_array_index (handles, TpHandle, i);
+ TpContact *contact = dup_contact (self, handle, identifiers);
- if (info->message != NULL)
- m = info->message;
- }
- /* else we have no info, which means (0, NONE, NULL) */
- }
+ if (contact != NULL)
+ g_hash_table_insert (target, GUINT_TO_POINTER (handle), contact);
}
- if (actor != NULL)
- *actor = a;
-
- if (message != NULL)
- *message = m;
+ return target;
+}
- if (reason != NULL)
- *reason = r;
+/* self->priv->group_contact_owners may contain NULL TpContact and
+ * g_object_unref isn't NULL safe */
+static void
+safe_g_object_unref (gpointer data)
+{
+ if (data == NULL)
+ return;
- return ret;
+ g_object_unref (data);
}
+static gpointer
+safe_g_object_ref (gpointer data)
+{
+ if (data == NULL)
+ return NULL;
-/**
- * tp_channel_group_get_handle_owner:
- * @self: a channel
- * @handle: a handle which is a member of this channel
- *
- * Synopsis (see below for further explanation):
- *
- * - if @self is not a group or @handle is not a member of this channel,
- * result is undefined;
- * - if %TP_CHANNEL_FEATURE_GROUP has not yet been prepared, result is
- * undefined;
- * - if @self does not have flags that include
- * %TP_CHANNEL_GROUP_FLAG_PROPERTIES,
- * result is undefined;
- * - if @handle is channel-specific and its globally valid "owner" is known,
- * return that owner;
- * - if @handle is channel-specific and its globally valid "owner" is unknown,
- * return zero;
- * - if @handle is globally valid, return @handle itself
- *
- * Some channels (those with flags that include
- * %TP_CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES) have a concept of
- * "channel-specific handles". These are handles that only have meaning within
- * the context of the channel - for instance, in XMPP Multi-User Chat,
- * participants in a chatroom are identified by an in-room JID consisting
- * of the JID of the chatroom plus a local nickname.
- *
- * Depending on the protocol and configuration, it might be possible to find
- * out what globally valid handle (i.e. an identifier that you could add to
- * your contact list) "owns" a channel-specific handle. For instance, in
- * most XMPP MUC chatrooms, normal users cannot see what global JID
- * corresponds to an in-room JID, but moderators can.
- *
- * This is further complicated by the fact that channels with channel-specific
- * handles can sometimes have members with globally valid handles (for
- * instance, if you invite someone to an XMPP MUC using their globally valid
- * JID, you would expect to see the handle representing that JID in the
- * Group's remote-pending set).
- *
- * This function's result is undefined unless the channel is ready
- * and its flags include %TP_CHANNEL_GROUP_FLAG_PROPERTIES (an implementation
- * without extra D-Bus round trips is not possible using the older API).
- *
- * Returns: the global handle that owns the given handle, or 0
- * Since: 0.7.12
- * Deprecated: New code should use tp_channel_group_get_contact_owner() instead.
- */
-TpHandle
-tp_channel_group_get_handle_owner (TpChannel *self,
- TpHandle handle)
+ return g_object_ref (data);
+}
+
+static GHashTable *
+dup_owners_table (TpChannel *self,
+ GHashTable *source,
+ GHashTable *identifiers)
{
+ GHashTable *target;
+ GHashTableIter iter;
gpointer key, value;
- g_return_val_if_fail (TP_IS_CHANNEL (self), 0);
+ target = g_hash_table_new_full (NULL, NULL, NULL, safe_g_object_unref);
+ if (source == NULL)
+ return target;
- if (self->priv->group_handle_owners == NULL)
+ g_hash_table_iter_init (&iter, source);
+ while (g_hash_table_iter_next (&iter, &key, &value))
{
- /* undefined result - pretending it's global is probably as good as
- * any other behaviour, since we can't know either way */
- return handle;
- }
+ TpHandle owner_handle = GPOINTER_TO_UINT (value);
+ TpContact *contact = dup_contact (self, owner_handle, identifiers);
- if (g_hash_table_lookup_extended (self->priv->group_handle_owners,
- GUINT_TO_POINTER (handle), &key, &value))
- {
- /* channel-specific, value is either owner or 0 if unknown */
- return GPOINTER_TO_UINT (value);
- }
- else
- {
- /* either already globally valid, or not a member */
- return handle;
+ g_hash_table_insert (target, key, contact);
}
+
+ return target;
}
+struct _ContactsQueueItem
+{
+ GPtrArray *contacts;
+ GPtrArray *ids;
+ GArray *handles;
+};
-/* This must be called before the local group members lists are created. Until
- * this is called, the proxy is listening to both MembersChanged and
- * MembersChangedDetailed, but they are ignored until priv->group_members
- * exists. If that list is created before one signal is disconnected, the
- * proxy will react to state changes twice and madness will ensue.
- */
static void
-_got_initial_group_flags (TpChannel *self,
- TpChannelGroupFlags flags)
+contacts_queue_item_free (ContactsQueueItem *item)
{
- TpChannelPrivate *priv = self->priv;
-
- g_assert (priv->group_flags == 0);
- g_assert (self->priv->group_members == NULL);
-
- priv->group_flags = flags;
- DEBUG ("Initial GroupFlags: %u", flags);
- priv->have_group_flags = TRUE;
-
- if (flags != 0)
- g_object_notify ((GObject *) self, "group-flags");
-
- if (tp_proxy_get_invalidated (self) != NULL)
- {
- /* Because the proxy has been invalidated, it is not safe to call
- * tp_proxy_signal_connection_disconnect (below), so just return early */
- return;
- }
-
- /* If the channel claims to support MembersChangedDetailed, disconnect from
- * MembersChanged. Otherwise, disconnect from MembersChangedDetailed in case
- * it secretly emits it anyway, so we're only listening to one change
- * notification.
- */
- if (flags & TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED)
- tp_proxy_signal_connection_disconnect (priv->members_changed_sig);
- else
- tp_proxy_signal_connection_disconnect (priv->members_changed_detailed_sig);
-
- priv->members_changed_sig = NULL;
- priv->members_changed_detailed_sig = NULL;
+ tp_clear_pointer (&item->contacts, g_ptr_array_unref);
+ tp_clear_pointer (&item->ids, g_ptr_array_unref);
+ tp_clear_pointer (&item->handles, g_array_unref);
+ g_slice_free (ContactsQueueItem, item);
}
+static void process_contacts_queue (TpChannel *self);
static void
-tp_channel_got_group_flags_0_16_cb (TpChannel *self,
- guint flags,
- const GError *error,
- gpointer user_data G_GNUC_UNUSED,
- GObject *weak_object G_GNUC_UNUSED)
+contacts_queue_head_ready (TpChannel *self,
+ const GError *error)
{
- g_assert (self->priv->group_flags == 0);
+ GSimpleAsyncResult *result = self->priv->current_contacts_queue_result;
if (error != NULL)
{
- /* GetGroupFlags() has existed with its current signature since November
- * 2005. I think it's reasonable to say that if it doesn't work, the
- * channel is broken.
- */
- _tp_channel_abort_introspection (self, "GetGroupFlags() failed", error);
- return;
+ DEBUG ("Error preparing channel contacts queue item: %s", error->message);
+ g_simple_async_result_set_from_error (result, error);
}
+ g_simple_async_result_complete (result);
- /* If we reach this point, GetAll has already failed... */
- if (flags & TP_CHANNEL_GROUP_FLAG_PROPERTIES)
- {
- DEBUG ("Treason uncloaked! The channel claims to support Group "
- "properties, but GetAll didn't work");
- flags &= ~TP_CHANNEL_GROUP_FLAG_PROPERTIES;
- }
+ self->priv->current_contacts_queue_result = NULL;
+ process_contacts_queue (self);
- _got_initial_group_flags (self, flags);
- _tp_channel_continue_introspection (self);
+ g_object_unref (result);
}
-
static void
-tp_channel_group_self_handle_changed_cb (TpChannel *self,
- guint self_handle,
- gpointer unused G_GNUC_UNUSED,
- GObject *unused_object G_GNUC_UNUSED)
+contacts_queue_item_upgraded_cb (TpConnection *connection,
+ guint n_contacts,
+ TpContact * const *contacts,
+ const GError *error,
+ gpointer user_data,
+ GObject *weak_object)
{
- if (self_handle == self->priv->group_self_handle)
- return;
-
- DEBUG ("%p SelfHandle changed to %u", self, self_handle);
+ TpChannel *self = (TpChannel *) weak_object;
- self->priv->group_self_handle = self_handle;
- g_object_notify ((GObject *) self, "group-self-handle");
+ contacts_queue_head_ready (self, error);
}
+static void
+contacts_queue_item_set_contacts (ContactsQueueItem *item,
+ guint n_contacts,
+ TpContact * const *contacts)
+{
+ guint i;
+
+ g_assert (item->contacts == NULL);
+ item->contacts = g_ptr_array_new_full (n_contacts, g_object_unref);
+ for (i = 0; i < n_contacts; i++)
+ g_ptr_array_add (item->contacts, g_object_ref (contacts[i]));
+}
static void
-tp_channel_group_self_contact_changed_cb (TpChannel *self,
- guint self_handle,
- const gchar *identifier,
+contacts_queue_item_by_id_cb (TpConnection *connection,
+ guint n_contacts,
+ TpContact * const *contacts,
+ const gchar * const *requested_ids,
+ GHashTable *failed_id_errors,
+ const GError *error,
gpointer user_data,
GObject *weak_object)
{
- tp_channel_group_self_handle_changed_cb (self, self_handle, user_data,
- weak_object);
+ TpChannel *self = (TpChannel *) weak_object;
+ ContactsQueueItem *item = user_data;
- _tp_channel_contacts_self_contact_changed (self, self_handle,
- identifier);
+ contacts_queue_item_set_contacts (item, n_contacts, contacts);
+ contacts_queue_head_ready (self, error);
}
-
static void
-tp_channel_got_self_handle_0_16_cb (TpChannel *self,
- guint self_handle,
- const GError *error,
- gpointer user_data G_GNUC_UNUSED,
- GObject *weak_object G_GNUC_UNUSED)
+contacts_queue_item_by_handle_cb (TpConnection *connection,
+ guint n_contacts,
+ TpContact * const *contacts,
+ guint n_failed,
+ const TpHandle *failed,
+ const GError *error,
+ gpointer user_data,
+ GObject *weak_object)
{
- if (error != NULL)
- {
- DEBUG ("%p Group.GetSelfHandle() failed, assuming 0: %s", self,
- error->message);
- tp_channel_group_self_handle_changed_cb (self, 0, NULL, NULL);
- }
- else
- {
- DEBUG ("Initial Group.SelfHandle: %u", self_handle);
- tp_channel_group_self_handle_changed_cb (self, self_handle, NULL, NULL);
- }
+ TpChannel *self = (TpChannel *) weak_object;
+ ContactsQueueItem *item = user_data;
- _tp_channel_continue_introspection (self);
+ contacts_queue_item_set_contacts (item, n_contacts, contacts);
+ contacts_queue_head_ready (self, error);
}
-
-static void
-_tp_channel_get_self_handle_0_16 (TpChannel *self)
+static gboolean
+contacts_queue_item_idle_cb (gpointer user_data)
{
- tp_cli_channel_interface_group_call_get_self_handle (self, -1,
- tp_channel_got_self_handle_0_16_cb, NULL, NULL, NULL);
-}
+ TpChannel *self = user_data;
+ contacts_queue_head_ready (self, NULL);
-static void
-_tp_channel_get_group_flags_0_16 (TpChannel *self)
-{
- tp_cli_channel_interface_group_call_get_group_flags (self, -1,
- tp_channel_got_group_flags_0_16_cb, NULL, NULL, NULL);
+ return FALSE;
}
-
static void
-_tp_channel_group_set_one_lp (TpChannel *self,
- TpHandle handle,
- TpHandle actor,
- TpChannelGroupChangeReason reason,
- const gchar *message)
+process_contacts_queue (TpChannel *self)
{
- LocalPendingInfo *info = NULL;
-
- g_assert (self->priv->group_local_pending != NULL);
+ GSimpleAsyncResult *result;
+ ContactsQueueItem *item;
+ GArray *features;
+ const GError *error = NULL;
- tp_intset_add (self->priv->group_local_pending, handle);
- tp_intset_remove (self->priv->group_members, handle);
- tp_intset_remove (self->priv->group_remote_pending, handle);
+ if (self->priv->current_contacts_queue_result != NULL)
+ return;
- if (actor == 0 && reason == TP_CHANNEL_GROUP_CHANGE_REASON_NONE &&
- tp_str_empty (message))
+ /* self can't die while there are queued items because item->result keeps a
+ * ref to it. But it could have been invalidated. */
+ error = tp_proxy_get_invalidated (self);
+ if (error != NULL)
{
- /* we just don't bother storing informationless local-pending */
- if (self->priv->group_local_pending_info != NULL)
+ g_object_ref (self);
+ while ((result = g_queue_pop_head (self->priv->contacts_queue)) != NULL)
{
- g_hash_table_remove (self->priv->group_local_pending_info,
- GUINT_TO_POINTER (handle));
+ g_simple_async_result_set_from_error (result, error);
+ g_simple_async_result_complete (result);
+ g_object_unref (result);
}
+ g_object_unref (self);
return;
}
- if (self->priv->group_local_pending_info == NULL)
+ result = g_queue_pop_head (self->priv->contacts_queue);
+
+ if (result == NULL)
+ return;
+
+ self->priv->current_contacts_queue_result = result;
+ item = g_simple_async_result_get_op_res_gpointer (result);
+
+ features = tp_client_factory_dup_contact_features (
+ tp_proxy_get_factory (self->priv->connection), self->priv->connection);
+
+ /* We can't use upgrade_contacts_async() because we need compat with older
+ * CMs. by_id and by_handle are used only by TpTextChannel and are needed for
+ * older CMs that does not give both message-sender and message-sender-id */
+ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ if (item->contacts != NULL && item->contacts->len > 0)
{
- self->priv->group_local_pending_info = g_hash_table_new_full (
- g_direct_hash, g_direct_equal, NULL,
- (GDestroyNotify) local_pending_info_free);
+ g_assert (item->ids == NULL);
+ g_assert (item->handles == NULL);
+
+ tp_connection_upgrade_contacts (self->priv->connection,
+ item->contacts->len, (TpContact **) item->contacts->pdata,
+ (const GQuark *) features->data,
+ contacts_queue_item_upgraded_cb,
+ item, NULL,
+ (GObject *) self);
}
- else
+ else if (item->ids != NULL && item->ids->len > 0)
{
- info = g_hash_table_lookup (self->priv->group_local_pending_info,
- GUINT_TO_POINTER (handle));
+ g_assert (item->contacts == NULL);
+ g_assert (item->handles == NULL);
+
+ tp_connection_get_contacts_by_id (self->priv->connection,
+ item->ids->len, (const gchar * const*) item->ids->pdata,
+ (const GQuark *) features->data,
+ contacts_queue_item_by_id_cb,
+ item, NULL,
+ (GObject *) self);
}
-
- if (info == NULL)
+ else if (item->handles != NULL && item->handles->len > 0)
{
- info = g_slice_new0 (LocalPendingInfo);
+ g_assert (item->contacts == NULL);
+ g_assert (item->ids == NULL);
+
+ tp_connection_get_contacts_by_handle (self->priv->connection,
+ item->handles->len, (TpHandle *) item->handles->data,
+ (const GQuark *) features->data,
+ contacts_queue_item_by_handle_cb,
+ item, NULL,
+ (GObject *) self);
}
else
{
- g_hash_table_steal (self->priv->group_local_pending_info,
- GUINT_TO_POINTER (handle));
+ /* It can happen there is no contact to prepare, and can still be useful
+ * in order to not reorder some events.
+ * We have to use an idle though, to guarantee callback is never called
+ * without reentering mainloop first. */
+ g_idle_add (contacts_queue_item_idle_cb, self);
}
+ G_GNUC_END_IGNORE_DEPRECATIONS
- info->actor = actor;
- info->reason = reason;
- g_free (info->message);
-
- if (tp_str_empty (message))
- info->message = NULL;
- else
- info->message = g_strdup (message);
-
- g_hash_table_insert (self->priv->group_local_pending_info,
- GUINT_TO_POINTER (handle), info);
+ g_array_unref (features);
}
-
static void
-_tp_channel_group_set_lp (TpChannel *self,
- const GPtrArray *info)
+contacts_queue_item (TpChannel *self,
+ GPtrArray *contacts,
+ GPtrArray *ids,
+ GArray *handles,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
- guint i;
-
- /* should only be called during initialization */
- g_assert (self->priv->group_local_pending != NULL);
- g_assert (self->priv->group_local_pending_info == NULL);
-
- tp_intset_clear (self->priv->group_local_pending);
+ ContactsQueueItem *item = g_slice_new (ContactsQueueItem);
+ GSimpleAsyncResult *result;
- /* NULL-safe for ease of use with tp_asv_get_boxed */
- if (info == NULL)
- {
- return;
- }
+ item->contacts = contacts != NULL ? g_ptr_array_ref (contacts) : NULL;
+ item->ids = ids != NULL ? g_ptr_array_ref (ids) : NULL;
+ item->handles = handles != NULL ? g_array_ref (handles) : NULL;
+ result = g_simple_async_result_new ((GObject *) self,
+ callback, user_data, contacts_queue_item);
- for (i = 0; i < info->len; i++)
- {
- GValueArray *item = g_ptr_array_index (info, i);
- TpHandle handle = g_value_get_uint (item->values + 0);
- TpHandle actor = g_value_get_uint (item->values + 1);
- TpChannelGroupChangeReason reason = g_value_get_uint (
- item->values + 2);
- const gchar *message = g_value_get_string (item->values + 3);
-
- if (handle == 0)
- {
- DEBUG ("Ignoring handle 0, claimed to be in local-pending");
- continue;
- }
+ g_simple_async_result_set_op_res_gpointer (result, item,
+ (GDestroyNotify) contacts_queue_item_free);
- DEBUG ("+L %u, actor=%u, reason=%u, message=%s", handle,
- actor, reason, message);
- _tp_channel_group_set_one_lp (self, handle, actor,
- reason, message);
- }
+ g_queue_push_tail (self->priv->contacts_queue, result);
+ process_contacts_queue (self);
}
-
-static void
-tp_channel_got_all_members_0_16_cb (TpChannel *self,
- const GArray *members,
- const GArray *local_pending,
- const GArray *remote_pending,
- const GError *error,
- gpointer user_data G_GNUC_UNUSED,
- GObject *weak_object G_GNUC_UNUSED)
+void
+_tp_channel_contacts_queue_prepare_async (TpChannel *self,
+ GPtrArray *contacts,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
- g_assert (self->priv->group_local_pending == NULL);
- g_assert (self->priv->group_local_pending_info == NULL);
- g_assert (self->priv->group_members == NULL);
- g_assert (self->priv->group_remote_pending == NULL);
-
- if (error == NULL)
- {
- DEBUG ("%p GetAllMembers returned %u members + %u LP + %u RP",
- self, members->len, local_pending->len, remote_pending->len);
-
- self->priv->group_local_pending = tp_intset_from_array (local_pending);
- self->priv->group_members = tp_intset_from_array (members);
- self->priv->group_remote_pending = tp_intset_from_array (remote_pending);
-
- if (tp_intset_remove (self->priv->group_members, 0))
- {
- DEBUG ("Ignoring handle 0, claimed to be in group");
- }
-
- if (tp_intset_remove (self->priv->group_local_pending, 0))
- {
- DEBUG ("Ignoring handle 0, claimed to be in local-pending");
- }
-
- if (tp_intset_remove (self->priv->group_remote_pending, 0))
- {
- DEBUG ("Ignoring handle 0, claimed to be in remote-pending");
- }
-
- /* the local-pending info will be filled in with the result of
- * GetLocalPendingMembersWithInfo, if it succeeds */
- }
- else
- {
- DEBUG ("%p GetAllMembers failed, assuming empty: %s", self,
- error->message);
-
- self->priv->group_local_pending = tp_intset_new ();
- self->priv->group_members = tp_intset_new ();
- self->priv->group_remote_pending = tp_intset_new ();
- }
-
- g_assert (self->priv->group_local_pending != NULL);
- g_assert (self->priv->group_members != NULL);
- g_assert (self->priv->group_remote_pending != NULL);
-
- _tp_channel_continue_introspection (self);
+ contacts_queue_item (self, contacts, NULL, NULL, callback, user_data);
}
-
-static void
-_tp_channel_get_all_members_0_16 (TpChannel *self)
+void
+_tp_channel_contacts_queue_prepare_by_id_async (TpChannel *self,
+ GPtrArray *ids,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
- tp_cli_channel_interface_group_call_get_all_members (self, -1,
- tp_channel_got_all_members_0_16_cb, NULL, NULL, NULL);
+ contacts_queue_item (self, NULL, ids, NULL, callback, user_data);
}
+void
+_tp_channel_contacts_queue_prepare_by_handle_async (TpChannel *self,
+ GArray *handles,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ contacts_queue_item (self, NULL, NULL, handles, callback, user_data);
+}
-static void
-tp_channel_glpmwi_0_16_cb (TpChannel *self,
- const GPtrArray *info,
- const GError *error,
- gpointer user_data G_GNUC_UNUSED,
- GObject *object G_GNUC_UNUSED)
+gboolean
+_tp_channel_contacts_queue_prepare_finish (TpChannel *self,
+ GAsyncResult *result,
+ GPtrArray **contacts,
+ GError **error)
{
- /* this should always run after tp_channel_got_all_members_0_16 */
- g_assert (self->priv->group_local_pending != NULL);
- g_assert (self->priv->group_local_pending_info == NULL);
+ GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
+ ContactsQueueItem *item;
- if (error == NULL)
- {
- DEBUG ("%p GetLocalPendingMembersWithInfo returned %u records",
- self, info->len);
- _tp_channel_group_set_lp (self, info);
- }
- else
+ item = g_simple_async_result_get_op_res_gpointer (simple);
+
+ if (contacts != NULL)
{
- DEBUG ("%p GetLocalPendingMembersWithInfo failed, keeping result of "
- "GetAllMembers instead: %s", self, error->message);
+ if (item->contacts != NULL)
+ *contacts = g_ptr_array_ref (item->contacts);
+ else
+ *contacts = g_ptr_array_new ();
}
- _tp_channel_continue_introspection (self);
-}
+ if (g_simple_async_result_propagate_error (simple, error))
+ return FALSE;
+ g_return_val_if_fail (g_simple_async_result_is_valid (result,
+ G_OBJECT (self), contacts_queue_item), FALSE);
-static void
-_tp_channel_glpmwi_0_16 (TpChannel *self)
-{
- tp_cli_channel_interface_group_call_get_local_pending_members_with_info (
- self, -1, tp_channel_glpmwi_0_16_cb, NULL, NULL, NULL);
+ return TRUE;
}
static void
-_tp_channel_emit_initial_sets (TpChannel *self)
+local_pending_info_free (LocalPendingInfo *info)
{
- GArray *added, *remote_pending;
- GArray empty_array = { NULL, 0 };
- TpIntsetFastIter iter;
- TpHandle handle;
-
- tp_intset_fast_iter_init (&iter, self->priv->group_local_pending);
-
- added = tp_intset_to_array (self->priv->group_members);
- remote_pending = tp_intset_to_array (self->priv->group_remote_pending);
-
- g_signal_emit_by_name (self, "group-members-changed", "",
- added, &empty_array, &empty_array, remote_pending, 0, 0);
-
- while (tp_intset_fast_iter_next (&iter, &handle))
- {
- GArray local_pending = { (gchar *) &handle, 1 };
- TpHandle actor;
- TpChannelGroupChangeReason reason;
- const gchar *message;
-
- tp_channel_group_get_local_pending_info (self, handle, &actor, &reason,
- &message);
-
- g_signal_emit_by_name (self, "group-members-changed", message,
- &empty_array, &empty_array, &local_pending, &empty_array, actor,
- reason);
- }
-
- g_array_unref (added);
- g_array_unref (remote_pending);
-
- _tp_channel_continue_introspection (self);
+ g_free (info->message);
+ g_clear_object (&info->actor_contact);
+ g_slice_free (LocalPendingInfo, info);
}
static void
-tp_channel_got_group_properties_cb (TpProxy *proxy,
- GHashTable *asv,
- const GError *error,
- gpointer unused G_GNUC_UNUSED,
- GObject *unused_object G_GNUC_UNUSED)
+set_local_pending_info (TpChannel *self,
+ TpContact *contact,
+ TpContact *actor,
+ TpChannelGroupChangeReason reason,
+ const gchar *message)
{
- TpChannel *self = TP_CHANNEL (proxy);
- static GType au_type = 0;
+ LocalPendingInfo *info;
- if (G_UNLIKELY (au_type == 0))
- {
- au_type = dbus_g_type_get_collection ("GArray", G_TYPE_UINT);
- }
+ if (tp_str_empty (message))
+ message = NULL;
- if (error != NULL)
+ if (actor == NULL && message == NULL &&
+ reason == TP_CHANNEL_GROUP_CHANGE_REASON_NONE)
{
- DEBUG ("Error getting group properties, falling back to 0.16 API: %s",
- error->message);
- }
- else if ((tp_asv_get_uint32 (asv, "GroupFlags", NULL)
- & TP_CHANNEL_GROUP_FLAG_PROPERTIES) == 0)
- {
- DEBUG ("Got group properties, but no Properties flag: assuming a "
- "broken implementation and falling back to 0.16 API");
- }
- else
- {
- GHashTable *table;
- GArray *arr;
-
- DEBUG ("Received %u group properties", g_hash_table_size (asv));
-
- _got_initial_group_flags (self,
- tp_asv_get_uint32 (asv, "GroupFlags", NULL));
-
- tp_channel_group_self_handle_changed_cb (self,
- tp_asv_get_uint32 (asv, "SelfHandle", NULL), NULL, NULL);
-
- g_assert (self->priv->group_members == NULL);
- g_assert (self->priv->group_remote_pending == NULL);
-
- arr = tp_asv_get_boxed (asv, "Members", au_type);
-
- if (arr == NULL)
- self->priv->group_members = tp_intset_new ();
- else
- self->priv->group_members = tp_intset_from_array (arr);
-
- if (tp_intset_remove (self->priv->group_members, 0))
- {
- DEBUG ("Ignoring handle 0, claimed to be in group");
- }
-
- arr = tp_asv_get_boxed (asv, "RemotePendingMembers", au_type);
-
- if (arr == NULL)
- self->priv->group_remote_pending = tp_intset_new ();
- else
- self->priv->group_remote_pending = tp_intset_from_array (arr);
-
- if (tp_intset_remove (self->priv->group_remote_pending, 0))
- {
- DEBUG ("Ignoring handle 0, claimed to be in remote-pending");
- }
-
- g_assert (self->priv->group_local_pending == NULL);
- g_assert (self->priv->group_local_pending_info == NULL);
-
- self->priv->group_local_pending = tp_intset_new ();
-
- /* this is NULL-safe with respect to the array */
- _tp_channel_group_set_lp (self,
- tp_asv_get_boxed (asv, "LocalPendingMembers",
- TP_ARRAY_TYPE_LOCAL_PENDING_INFO_LIST));
-
- table = tp_asv_get_boxed (asv, "HandleOwners",
- TP_HASH_TYPE_HANDLE_OWNER_MAP);
-
- self->priv->group_handle_owners = g_hash_table_new (g_direct_hash,
- g_direct_equal);
-
- if (table != NULL)
- tp_g_hash_table_update (self->priv->group_handle_owners,
- table, NULL, NULL);
-
- table = tp_asv_get_boxed (asv, "MemberIdentifiers",
- TP_HASH_TYPE_HANDLE_IDENTIFIER_MAP);
-
- /* If CM implements MemberIdentifiers property, assume it also emits
- * SelfContactChanged and HandleOwnersChangedDetailed */
- if (table != NULL)
- {
- tp_proxy_signal_connection_disconnect (
- self->priv->self_handle_changed_sig);
- tp_proxy_signal_connection_disconnect (
- self->priv->handle_owners_changed_sig);
- }
- else
- {
- tp_proxy_signal_connection_disconnect (
- self->priv->self_contact_changed_sig);
- tp_proxy_signal_connection_disconnect (
- self->priv->handle_owners_changed_detailed_sig);
- }
-
- self->priv->self_handle_changed_sig = NULL;
- self->priv->self_contact_changed_sig = NULL;
- self->priv->handle_owners_changed_sig = NULL;
- self->priv->handle_owners_changed_detailed_sig = NULL;
-
- _tp_channel_contacts_group_init (self, table);
-
- goto OUT;
+ /* we just don't bother storing informationless local-pending */
+ g_hash_table_remove (self->priv->group_local_pending_info,
+ GUINT_TO_POINTER (tp_contact_get_handle (contact)));
+ return;
}
- /* Failure case: fall back. This is quite annoying, as we need to combine:
- *
- * - GetGroupFlags
- * - GetAllMembers
- * - GetLocalPendingMembersWithInfo
- *
- * Channel-specific handles can't really have a sane client API (without
- * lots of silly round-trips) unless the CM implements the HandleOwners
- * property, so I intend to ignore this in the fallback case.
- */
-
- g_queue_push_tail (self->priv->introspect_needed,
- _tp_channel_get_group_flags_0_16);
-
- g_queue_push_tail (self->priv->introspect_needed,
- _tp_channel_get_self_handle_0_16);
-
- g_queue_push_tail (self->priv->introspect_needed,
- _tp_channel_get_all_members_0_16);
-
- g_queue_push_tail (self->priv->introspect_needed,
- _tp_channel_glpmwi_0_16);
-
- self->priv->cm_too_old_for_contacts = TRUE;
-
-OUT:
-
- g_queue_push_tail (self->priv->introspect_needed,
- _tp_channel_emit_initial_sets);
+ info = g_slice_new0 (LocalPendingInfo);
+ info->actor_contact = safe_g_object_ref (actor);
+ info->reason = reason;
+ info->message = g_strdup (message);
- _tp_channel_continue_introspection (self);
+ g_hash_table_insert (self->priv->group_local_pending_info,
+ GUINT_TO_POINTER (tp_contact_get_handle (contact)), info);
}
/*
@@ -889,7 +509,7 @@ OUT:
*/
static void
_tp_channel_group_improve_remove_error (TpChannel *self,
- TpHandle actor)
+ TpContact *actor)
{
GError *error = self->priv->group_remove_error;
@@ -899,8 +519,8 @@ _tp_channel_group_improve_remove_error (TpChannel *self,
switch (error->code)
{
case TP_CHANNEL_GROUP_CHANGE_REASON_NONE:
- if (actor == self->priv->group_self_handle ||
- actor == tp_connection_get_self_handle (self->priv->connection))
+ if (actor == self->priv->group_self_contact ||
+ actor == tp_connection_get_self_contact (self->priv->connection))
{
error->code = TP_ERROR_CANCELLED;
}
@@ -976,124 +596,144 @@ _tp_channel_group_improve_remove_error (TpChannel *self,
error->domain = TP_ERROR;
}
+typedef struct
+{
+ GPtrArray *added;
+ GArray *removed;
+ GPtrArray *local_pending;
+ GPtrArray *remote_pending;
+ TpContact *actor;
+ GHashTable *details;
+} MembersChangedData;
+
+static void
+members_changed_data_free (MembersChangedData *data)
+{
+ tp_clear_pointer (&data->added, g_ptr_array_unref);
+ tp_clear_pointer (&data->removed, g_array_unref);
+ tp_clear_pointer (&data->local_pending, g_ptr_array_unref);
+ tp_clear_pointer (&data->remote_pending, g_ptr_array_unref);
+ g_clear_object (&data->actor);
+ tp_clear_pointer (&data->details, g_hash_table_unref);
+
+ g_slice_free (MembersChangedData, data);
+}
+
static void
-handle_members_changed (TpChannel *self,
- const gchar *message,
- const GArray *added,
- const GArray *removed,
- const GArray *local_pending,
- const GArray *remote_pending,
- guint actor,
- guint reason,
- GHashTable *details)
+members_changed_prepared_cb (GObject *object,
+ GAsyncResult *result,
+ gpointer user_data)
{
+ TpChannel *self = (TpChannel *) object;
+ MembersChangedData *data = user_data;
+ TpChannelGroupChangeReason reason;
+ const gchar *message;
+ GPtrArray *removed;
guint i;
- if (self->priv->group_members == NULL)
- return;
+ _tp_channel_contacts_queue_prepare_finish (self, result, NULL, NULL);
- g_assert (self->priv->group_local_pending != NULL);
- g_assert (self->priv->group_remote_pending != NULL);
+ reason = tp_asv_get_uint32 (data->details, "change-reason", NULL);
+ message = tp_asv_get_string (data->details, "message");
- for (i = 0; i < added->len; i++)
+ for (i = 0; i < data->added->len; i++)
{
- TpHandle handle = g_array_index (added, guint, i);
-
- DEBUG ("+++ contact#%u", handle);
-
- if (handle == 0)
- {
- DEBUG ("handle 0 shouldn't be in MembersChanged, ignoring");
- continue;
- }
-
- tp_intset_add (self->priv->group_members, handle);
- tp_intset_remove (self->priv->group_local_pending, handle);
- tp_intset_remove (self->priv->group_remote_pending, handle);
+ TpContact *contact = g_ptr_array_index (data->added, i);
+ gpointer key = GUINT_TO_POINTER (tp_contact_get_handle (contact));
+
+ g_hash_table_insert (self->priv->group_members, key,
+ g_object_ref (contact));
+ g_hash_table_remove (self->priv->group_local_pending, key);
+ g_hash_table_remove (self->priv->group_local_pending_info, key);
+ g_hash_table_remove (self->priv->group_remote_pending, key);
}
- for (i = 0; i < local_pending->len; i++)
+ for (i = 0; i < data->local_pending->len; i++)
{
- TpHandle handle = g_array_index (local_pending, guint, i);
+ TpContact *contact = g_ptr_array_index (data->local_pending, i);
+ gpointer key = GUINT_TO_POINTER (tp_contact_get_handle (contact));
- DEBUG ("+LP contact#%u", handle);
-
- if (handle == 0)
- {
- DEBUG ("handle 0 shouldn't be in MembersChanged, ignoring");
- continue;
- }
+ g_hash_table_remove (self->priv->group_members, key);
+ g_hash_table_insert (self->priv->group_local_pending, key,
+ g_object_ref (contact));
+ g_hash_table_remove (self->priv->group_remote_pending, key);
/* Special-case renaming a local-pending contact, if the
* signal is spec-compliant. Keep the old actor/reason/message in
* this case */
if (reason == TP_CHANNEL_GROUP_CHANGE_REASON_RENAMED &&
- added->len == 0 &&
- local_pending->len == 1 &&
- remote_pending->len == 0 &&
- removed->len == 1 &&
- self->priv->group_local_pending_info != NULL)
+ data->added->len == 0 &&
+ data->local_pending->len == 1 &&
+ data->remote_pending->len == 0 &&
+ data->removed->len == 1)
{
- TpHandle old = g_array_index (removed, guint, 0);
+ TpHandle old = g_array_index (data->removed, TpHandle, 0);
LocalPendingInfo *info = g_hash_table_lookup (
self->priv->group_local_pending_info,
GUINT_TO_POINTER (old));
if (info != NULL)
{
- _tp_channel_group_set_one_lp (self, handle,
- info->actor, info->reason, info->message);
+ set_local_pending_info (self, contact,
+ info->actor_contact, info->reason, info->message);
continue;
}
}
/* not reached if the Renamed special case occurred */
- _tp_channel_group_set_one_lp (self, handle, actor,
- reason, message);
+ set_local_pending_info (self, contact, data->actor, reason, message);
}
- for (i = 0; i < remote_pending->len; i++)
+ for (i = 0; i < data->remote_pending->len; i++)
{
- TpHandle handle = g_array_index (remote_pending, guint, i);
-
- DEBUG ("+RP contact#%u", handle);
-
- if (handle == 0)
- {
- DEBUG ("handle 0 shouldn't be in MembersChanged, ignoring");
- continue;
- }
-
- tp_intset_add (self->priv->group_remote_pending, handle);
- tp_intset_remove (self->priv->group_members, handle);
- tp_intset_remove (self->priv->group_local_pending, handle);
+ TpContact *contact = g_ptr_array_index (data->remote_pending, i);
+ gpointer key = GUINT_TO_POINTER (tp_contact_get_handle (contact));
+
+ g_hash_table_remove (self->priv->group_members, key);
+ g_hash_table_remove (self->priv->group_local_pending, key);
+ g_hash_table_remove (self->priv->group_local_pending_info, key);
+ g_hash_table_insert (self->priv->group_remote_pending, key,
+ g_object_ref (contact));
}
- for (i = 0; i < removed->len; i++)
+ /* For removed contacts, we have only handles because we are supposed to
+ * already know them. So we have to search them in our tables, construct an
+ * array of removed contacts and then remove them from our tables */
+ removed = g_ptr_array_new_full (data->removed->len, g_object_unref);
+ for (i = 0; i < data->removed->len; i++)
{
- TpHandle handle = g_array_index (removed, guint, i);
-
- DEBUG ("--- contact#%u", handle);
-
- if (handle == 0)
+ TpHandle handle = g_array_index (data->removed, TpHandle, i);
+ gpointer key = GUINT_TO_POINTER (handle);
+ TpContact *contact;
+
+ contact = g_hash_table_lookup (self->priv->group_members, key);
+ if (contact == NULL)
+ contact = g_hash_table_lookup (
+ self->priv->group_local_pending, key);
+ if (contact == NULL)
+ contact = g_hash_table_lookup (
+ self->priv->group_remote_pending, key);
+
+ if (contact == NULL)
{
- DEBUG ("handle 0 shouldn't be in MembersChanged, ignoring");
+ DEBUG ("Handle %u removed but not found in our tables - broken CM",
+ handle);
continue;
}
- if (self->priv->group_local_pending_info != NULL)
- g_hash_table_remove (self->priv->group_local_pending_info,
- GUINT_TO_POINTER (handle));
+ g_ptr_array_add (removed, g_object_ref (contact));
- tp_intset_remove (self->priv->group_members, handle);
- tp_intset_remove (self->priv->group_local_pending, handle);
- tp_intset_remove (self->priv->group_remote_pending, handle);
+ g_hash_table_remove (self->priv->group_members, key);
+ g_hash_table_remove (self->priv->group_local_pending, key);
+ g_hash_table_remove (self->priv->group_local_pending_info, key);
+ g_hash_table_remove (self->priv->group_remote_pending, key);
- if (handle == self->priv->group_self_handle ||
- handle == tp_connection_get_self_handle (self->priv->connection))
+ if (contact == self->priv->group_self_contact ||
+ contact == tp_connection_get_self_contact (self->priv->connection))
{
- const gchar *error_detail = tp_asv_get_string (details, "error");
- const gchar *debug_message = tp_asv_get_string (details,
+ const gchar *error_detail = tp_asv_get_string (data->details,
+ "error");
+ const gchar *debug_message = tp_asv_get_string (data->details,
"debug-message");
if (debug_message == NULL && message[0] != '\0')
@@ -1126,7 +766,7 @@ handle_members_changed (TpChannel *self,
TP_ERRORS_REMOVED_FROM_GROUP;
self->priv->group_remove_error->code = reason;
- _tp_channel_group_improve_remove_error (self, actor);
+ _tp_channel_group_improve_remove_error (self, data->actor);
}
}
else
@@ -1135,268 +775,666 @@ handle_members_changed (TpChannel *self,
g_set_error_literal (&self->priv->group_remove_error,
TP_ERRORS_REMOVED_FROM_GROUP, reason, debug_message);
- _tp_channel_group_improve_remove_error (self, actor);
+ _tp_channel_group_improve_remove_error (self, data->actor);
}
}
}
- g_signal_emit_by_name (self, "group-members-changed", message,
- added, removed, local_pending, remote_pending, actor, reason);
- g_signal_emit_by_name (self, "group-members-changed-detailed", added,
- removed, local_pending, remote_pending, details);
+ g_signal_emit_by_name (self, "group-members-changed", data->added,
+ removed, data->local_pending, data->remote_pending, data->actor,
+ data->details);
- _tp_channel_contacts_members_changed (self, added, removed,
- local_pending, remote_pending, actor, details);
+ g_ptr_array_unref (removed);
+ members_changed_data_free (data);
}
-
static void
-tp_channel_group_members_changed_cb (TpChannel *self,
- const gchar *message,
- const GArray *added,
- const GArray *removed,
- const GArray *local_pending,
- const GArray *remote_pending,
- guint actor,
- guint reason,
- gpointer unused G_GNUC_UNUSED,
- GObject *unused_object G_GNUC_UNUSED)
+members_changed_cb (TpChannel *self,
+ const GArray *added,
+ const GArray *removed,
+ const GArray *local_pending,
+ const GArray *remote_pending,
+ GHashTable *details,
+ gpointer user_data,
+ GObject *weak_object)
{
- GHashTable *details = g_hash_table_new_full (g_str_hash, g_str_equal, NULL,
- (GDestroyNotify) tp_g_value_slice_free);
+ MembersChangedData *data;
+ GPtrArray *contacts;
+ GHashTable *ids;
+ TpHandle actor;
- DEBUG ("%p MembersChanged: added %u, removed %u, "
- "moved %u to LP and %u to RP, actor %u, reason %u, message %s",
- self, added->len, removed->len, local_pending->len, remote_pending->len,
- actor, reason, message);
+ if (!self->priv->group_properties_retrieved)
+ return;
- if (actor != 0)
- {
- g_hash_table_insert (details, "actor",
- tp_g_value_slice_new_uint (actor));
- }
+ actor = tp_asv_get_uint32 (details, "actor", NULL);
- if (reason != TP_CHANNEL_GROUP_CHANGE_REASON_NONE)
+ ids = tp_asv_get_boxed (details, "contact-ids",
+ TP_HASH_TYPE_HANDLE_IDENTIFIER_MAP);
+ if (ids == NULL && (added->len > 0 || local_pending->len > 0 ||
+ remote_pending->len > 0 || actor != 0 ))
{
- g_hash_table_insert (details, "change-reason",
- tp_g_value_slice_new_uint (reason));
+ DEBUG ("CM did not give identifiers, can't create TpContact");
+ return;
}
- if (*message != '\0')
+ /* Ensure all TpContact, and push to a queue. This is to ensure that signals
+ * does not get reordered while we prepare them. */
+ data = g_slice_new (MembersChangedData);
+ data->added = dup_contact_array (self, added, ids);
+ data->removed = dup_handle_array (removed);
+ data->local_pending = dup_contact_array (self, local_pending, ids);
+ data->remote_pending = dup_contact_array (self, remote_pending, ids);
+ data->actor = dup_contact (self, actor, ids);
+ data->details = g_hash_table_ref (details);
+
+ contacts = g_ptr_array_new ();
+ tp_g_ptr_array_extend (contacts, data->added);
+ tp_g_ptr_array_extend (contacts, data->local_pending);
+ tp_g_ptr_array_extend (contacts, data->remote_pending);
+ if (data->actor != NULL)
+ g_ptr_array_add (contacts, data->actor);
+
+ _tp_channel_contacts_queue_prepare_async (self, contacts,
+ members_changed_prepared_cb, data);
+
+ g_ptr_array_unref (contacts);
+}
+
+typedef struct
+{
+ GHashTable *added;
+ GArray *removed;
+} HandleOwnersChangedData;
+
+static void
+handle_owners_changed_data_free (HandleOwnersChangedData *data)
+{
+ tp_clear_pointer (&data->added, g_hash_table_unref);
+ tp_clear_pointer (&data->removed, g_array_unref);
+
+ g_slice_free (HandleOwnersChangedData, data);
+}
+
+static void
+handle_owners_changed_prepared_cb (GObject *object,
+ GAsyncResult *result,
+ gpointer user_data)
+{
+ TpChannel *self = (TpChannel *) object;
+ HandleOwnersChangedData *data = user_data;
+ guint i;
+
+ _tp_channel_contacts_queue_prepare_finish (self, result, NULL, NULL);
+
+ for (i = 0; i < data->removed->len; i++)
{
- g_hash_table_insert (details, "message",
- tp_g_value_slice_new_string (message));
+ g_hash_table_remove (self->priv->group_contact_owners,
+ GUINT_TO_POINTER (g_array_index (data->removed, TpHandle, i)));
}
- handle_members_changed (self, message, added, removed, local_pending,
- remote_pending, actor, reason, details);
+ tp_g_hash_table_update (self->priv->group_contact_owners, data->added, NULL,
+ safe_g_object_ref);
- g_hash_table_unref (details);
+ handle_owners_changed_data_free (data);
}
-
static void
-tp_channel_group_members_changed_detailed_cb (TpChannel *self,
- const GArray *added,
- const GArray *removed,
- const GArray *local_pending,
- const GArray *remote_pending,
- GHashTable *details,
- gpointer unused G_GNUC_UNUSED,
- GObject *weak_obj G_GNUC_UNUSED)
+handle_owners_changed_cb (TpChannel *self,
+ GHashTable *added,
+ const GArray *removed,
+ GHashTable *identifiers,
+ gpointer user_data,
+ GObject *weak_object)
{
- const gchar *message;
- guint actor;
- guint reason;
+ HandleOwnersChangedData *data;
+ GPtrArray *contacts;
- DEBUG ("%p MembersChangedDetailed: added %u, removed %u, "
- "moved %u to LP and %u to RP",
- self, added->len, removed->len, local_pending->len, remote_pending->len);
+ if (!self->priv->group_properties_retrieved)
+ return;
- actor = tp_asv_get_uint32 (details, "actor", NULL);
- reason = tp_asv_get_uint32 (details, "change-reason", NULL);
- message = tp_asv_get_string (details, "message");
+ data = g_slice_new (HandleOwnersChangedData);
+ data->added = dup_owners_table (self, added, identifiers);
+ data->removed = dup_handle_array (removed);
+
+ contacts = _tp_contacts_from_values (data->added);
- if (message == NULL)
- message = "";
+ _tp_channel_contacts_queue_prepare_async (self, contacts,
+ handle_owners_changed_prepared_cb, data);
- handle_members_changed (self, message, added, removed, local_pending,
- remote_pending, actor, reason, details);
+ g_ptr_array_unref (contacts);
}
+static void
+self_contact_changed_prepared_cb (GObject *object,
+ GAsyncResult *result,
+ gpointer user_data)
+{
+ TpChannel *self = (TpChannel *) object;
+ TpContact *contact = user_data;
+
+ _tp_channel_contacts_queue_prepare_finish (self, result, NULL, NULL);
+
+ g_clear_object (&self->priv->group_self_contact);
+ self->priv->group_self_contact = contact;
+
+ g_object_notify ((GObject *) self, "group-self-contact");
+}
static void
-tp_channel_handle_owners_changed_cb (TpChannel *self,
- GHashTable *added,
- const GArray *removed,
- gpointer unused G_GNUC_UNUSED,
- GObject *unused_object G_GNUC_UNUSED)
+self_contact_changed_cb (TpChannel *self,
+ guint self_handle,
+ const gchar *identifier,
+ gpointer user_data,
+ GObject *weak_object)
{
- guint i;
+ TpContact *contact;
+ GPtrArray *contacts;
- /* ignore the signal if we don't have the initial set yet */
- if (self->priv->group_handle_owners == NULL)
+ if (!self->priv->group_properties_retrieved)
return;
- tp_g_hash_table_update (self->priv->group_handle_owners, added, NULL, NULL);
+ contacts = g_ptr_array_new_with_free_func (g_object_unref);
+ contact = tp_client_factory_ensure_contact (
+ tp_proxy_get_factory (self->priv->connection), self->priv->connection,
+ self_handle, identifier);
+ g_ptr_array_add (contacts, g_object_ref (contact));
- for (i = 0; i < removed->len; i++)
- {
- g_hash_table_remove (self->priv->group_handle_owners,
- GUINT_TO_POINTER (g_array_index (removed, guint, i)));
- }
-}
+ _tp_channel_contacts_queue_prepare_async (self, contacts,
+ self_contact_changed_prepared_cb, contact);
+ g_ptr_array_unref (contacts);
+}
static void
-tp_channel_handle_owners_changed_detailed_cb (TpChannel *self,
- GHashTable *added,
- const GArray *removed,
- GHashTable *identifiers,
+group_flags_changed_cb (TpChannel *self,
+ guint added,
+ guint removed,
gpointer user_data,
GObject *weak_object)
{
- tp_channel_handle_owners_changed_cb (self, added, removed, user_data,
- weak_object);
+ if (!self->priv->group_properties_retrieved)
+ return;
- _tp_channel_contacts_handle_owners_changed (self, added, removed,
- identifiers);
+ DEBUG ("%p GroupFlagsChanged: +%u -%u", self, added, removed);
+
+ added &= ~(self->priv->group_flags);
+ removed &= self->priv->group_flags;
+
+ DEBUG ("%p GroupFlagsChanged (after filtering): +%u -%u",
+ self, added, removed);
+
+ self->priv->group_flags |= added;
+ self->priv->group_flags &= ~removed;
+
+ if (added != 0 || removed != 0)
+ {
+ g_object_notify ((GObject *) self, "group-flags");
+ g_signal_emit_by_name (self, "group-flags-changed", added, removed);
+ }
}
+static void
+contacts_prepared_cb (GObject *object,
+ GAsyncResult *res,
+ gpointer user_data)
+{
+ TpChannel *self = (TpChannel *) object;
+ GSimpleAsyncResult *result = user_data;
+ GError *error = NULL;
+
+ if (!_tp_channel_contacts_queue_prepare_finish (self, res, NULL, &error))
+ g_simple_async_result_take_error (result, error);
-#define IMMUTABLE_FLAGS \
- (TP_CHANNEL_GROUP_FLAG_PROPERTIES | \
- TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED)
+ g_simple_async_result_complete (result);
+ g_object_unref (result);
+}
static void
-tp_channel_group_flags_changed_cb (TpChannel *self,
- guint added,
- guint removed,
- gpointer unused G_GNUC_UNUSED,
- GObject *unused_object G_GNUC_UNUSED)
+append_contacts (GPtrArray *contacts,
+ GHashTable *table)
{
- if (self->priv->have_group_flags)
+ GHashTableIter iter;
+ gpointer value;
+
+ if (table == NULL)
+ return;
+
+ g_hash_table_iter_init (&iter, table);
+ while (g_hash_table_iter_next (&iter, NULL, &value))
{
- DEBUG ("%p GroupFlagsChanged: +%u -%u", self, added, removed);
+ if (value == NULL)
+ continue;
- added &= ~(self->priv->group_flags);
- removed &= self->priv->group_flags;
+ g_ptr_array_add (contacts, value);
+ }
+}
- DEBUG ("%p GroupFlagsChanged (after filtering): +%u -%u",
- self, added, removed);
+static void
+set_local_pending (TpChannel *self,
+ const GPtrArray *info,
+ GHashTable *identifiers)
+{
+ guint i;
- if ((added & IMMUTABLE_FLAGS) || (removed & IMMUTABLE_FLAGS))
- {
- GError *e = g_error_new (TP_DBUS_ERRORS, TP_DBUS_ERROR_INCONSISTENT,
- "CM is broken: it changed the Properties/"
- "Members_Changed_Detailed flags on an existing group channel "
- "(offending changes: added=%u, removed=%u)",
- added & IMMUTABLE_FLAGS, removed & IMMUTABLE_FLAGS);
-
- tp_proxy_invalidate ((TpProxy *) self, e);
- g_error_free (e);
- return;
- }
+ self->priv->group_local_pending = g_hash_table_new_full (NULL, NULL,
+ NULL, g_object_unref);
+ self->priv->group_local_pending_info = g_hash_table_new_full (NULL, NULL,
+ NULL, (GDestroyNotify) local_pending_info_free);
- self->priv->group_flags |= added;
- self->priv->group_flags &= ~removed;
+ if (info == NULL)
+ return;
- if (added != 0 || removed != 0)
- {
- g_object_notify ((GObject *) self, "group-flags");
- g_signal_emit_by_name (self, "group-flags-changed", added, removed);
- }
+ for (i = 0; i < info->len; i++)
+ {
+ GValueArray *va = g_ptr_array_index (info, i);
+ TpHandle handle;
+ TpHandle actor;
+ TpChannelGroupChangeReason reason;
+ const gchar *message;
+ TpContact *contact;
+ TpContact *actor_contact;
+
+ tp_value_array_unpack (va, 4, &handle, &actor, &reason, &message);
+
+ contact = dup_contact (self, handle, identifiers);
+ if (contact == NULL)
+ continue;
+
+ g_hash_table_insert (self->priv->group_local_pending,
+ GUINT_TO_POINTER (handle), contact);
+
+ actor_contact = dup_contact (self, actor, identifiers);
+ set_local_pending_info (self, contact, actor_contact, reason, message);
+ g_clear_object (&actor_contact);
}
}
-#undef IMMUTABLE_FLAGS
+static void
+got_group_properties_cb (TpProxy *proxy,
+ GHashTable *asv,
+ const GError *error,
+ gpointer user_data,
+ GObject *weak_object)
+{
+ static GType au_type = 0;
+ TpChannel *self = TP_CHANNEL (proxy);
+ GSimpleAsyncResult *result = user_data;
+ GHashTable *identifiers;
+ GHashTableIter iter;
+ gpointer value;
+ GPtrArray *contacts;
+
+ if (error != NULL)
+ {
+ g_simple_async_result_set_from_error (result, error);
+ g_simple_async_result_complete (result);
+ return;
+ }
+
+ if (G_UNLIKELY (au_type == 0))
+ {
+ au_type = dbus_g_type_get_collection ("GArray", G_TYPE_UINT);
+ }
+
+ DEBUG ("Received %u group properties", g_hash_table_size (asv));
+ self->priv->group_properties_retrieved = TRUE;
+
+ self->priv->group_flags = tp_asv_get_uint32 (asv, "GroupFlags", NULL);
+
+ identifiers = tp_asv_get_boxed (asv, "MemberIdentifiers",
+ TP_HASH_TYPE_HANDLE_IDENTIFIER_MAP);
+
+ self->priv->group_self_contact = dup_contact (self,
+ tp_asv_get_uint32 (asv, "SelfHandle", NULL),
+ identifiers);
+
+ self->priv->group_members = dup_contacts_table (self,
+ tp_asv_get_boxed (asv, "Members", au_type),
+ identifiers);
+
+ set_local_pending (self,
+ tp_asv_get_boxed (asv, "LocalPendingMembers",
+ TP_ARRAY_TYPE_LOCAL_PENDING_INFO_LIST),
+ identifiers);
+
+ self->priv->group_remote_pending = dup_contacts_table (self,
+ tp_asv_get_boxed (asv, "RemotePendingMembers", au_type),
+ identifiers);
+
+ self->priv->group_contact_owners = dup_owners_table (self,
+ tp_asv_get_boxed (asv, "HandleOwners", TP_HASH_TYPE_HANDLE_OWNER_MAP),
+ identifiers);
+
+ contacts = g_ptr_array_new ();
+
+ /* Collect all the TpContacts we have for this channel */
+ if (self->priv->group_self_contact != NULL)
+ g_ptr_array_add (contacts, self->priv->group_self_contact);
+
+ append_contacts (contacts, self->priv->group_members);
+ append_contacts (contacts, self->priv->group_local_pending);
+ append_contacts (contacts, self->priv->group_remote_pending);
+ append_contacts (contacts, self->priv->group_contact_owners);
+
+ g_hash_table_iter_init (&iter, self->priv->group_local_pending_info);
+ while (g_hash_table_iter_next (&iter, NULL, &value))
+ {
+ LocalPendingInfo *info = value;
+
+ if (info->actor_contact != NULL)
+ g_ptr_array_add (contacts, info->actor_contact);
+ }
+
+ _tp_channel_contacts_queue_prepare_async (self, contacts,
+ contacts_prepared_cb, g_object_ref (result));
+ g_ptr_array_unref (contacts);
+}
void
-_tp_channel_get_group_properties (TpChannel *self)
+_tp_channel_group_prepare_async (TpProxy *proxy,
+ const TpProxyFeature *feature,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
- TpChannelPrivate *priv = self->priv;
- TpProxySignalConnection *sc;
+ TpChannel *self = (TpChannel *) proxy;
+ GSimpleAsyncResult *result;
GError *error = NULL;
if (!tp_proxy_has_interface_by_id (self,
TP_IFACE_QUARK_CHANNEL_INTERFACE_GROUP))
{
- _tp_proxy_set_feature_prepared ((TpProxy *) self,
- TP_CHANNEL_FEATURE_GROUP, FALSE);
-
- DEBUG ("%p: not a Group, continuing", self);
- _tp_channel_continue_introspection (self);
+ g_simple_async_report_error_in_idle ((GObject *) self, callback,
+ user_data, TP_ERROR, TP_ERROR_NOT_CAPABLE,
+ "Channel has no GROUP interface");
return;
}
- DEBUG ("%p", self);
+ tp_cli_channel_interface_group_connect_to_group_flags_changed (self,
+ group_flags_changed_cb, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
- /* If this callback has been called, 'self' has not been invalidated. And we
- * just checked above that the proxy has the Group interface. So, connecting
- * to these signals must succeed. */
-#define DIE(sig) \
- { \
- CRITICAL ("couldn't connect to " sig ": %s", error->message); \
- g_assert_not_reached (); \
- g_error_free (error); \
- return; \
- }
+ tp_cli_channel_interface_group_connect_to_self_contact_changed (self,
+ self_contact_changed_cb, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
- priv->members_changed_sig =
- tp_cli_channel_interface_group_connect_to_members_changed (self,
- tp_channel_group_members_changed_cb, NULL, NULL, NULL, &error);
+ tp_cli_channel_interface_group_connect_to_members_changed (self,
+ members_changed_cb, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
- if (priv->members_changed_sig == NULL)
- DIE ("MembersChanged");
+ tp_cli_channel_interface_group_connect_to_handle_owners_changed (self,
+ handle_owners_changed_cb, NULL, NULL, NULL, &error);
+ g_assert_no_error (error);
- priv->members_changed_detailed_sig =
- tp_cli_channel_interface_group_connect_to_members_changed_detailed (self,
- tp_channel_group_members_changed_detailed_cb, NULL, NULL, NULL,
- &error);
+ result = g_simple_async_result_new ((GObject *) self, callback, user_data,
+ _tp_channel_group_prepare_async);
- if (priv->members_changed_detailed_sig == NULL)
- DIE ("MembersChangedDetailed");
+ tp_cli_dbus_properties_call_get_all (self, -1,
+ TP_IFACE_CHANNEL_INTERFACE_GROUP, got_group_properties_cb,
+ result, g_object_unref, NULL);
+}
- sc = tp_cli_channel_interface_group_connect_to_group_flags_changed (self,
- tp_channel_group_flags_changed_cb, NULL, NULL, NULL, &error);
+/**
+ * tp_channel_group_get_flags:
+ * @self: a channel
+ *
+ * <!-- -->
+ *
+ * Returns: the value of #TpChannel:group-flags
+ * Since: 0.UNRELEASED
+ */
+TpChannelGroupFlags
+tp_channel_group_get_flags (TpChannel *self)
+{
+ g_return_val_if_fail (TP_IS_CHANNEL (self), 0);
- if (sc == NULL)
- DIE ("GroupFlagsChanged");
+ return self->priv->group_flags;
+}
- priv->self_handle_changed_sig =
- tp_cli_channel_interface_group_connect_to_self_handle_changed (self,
- tp_channel_group_self_handle_changed_cb, NULL, NULL, NULL, &error);
+/**
+ * tp_channel_group_get_self_contact:
+ * @self: a channel
+ *
+ * <!-- -->
+ *
+ * Returns: (transfer none): the value of #TpChannel:group-self-contact
+ * Since: 0.UNRELEASED
+ */
+TpContact *
+tp_channel_group_get_self_contact (TpChannel *self)
+{
+ g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
- if (priv->self_handle_changed_sig == NULL)
- DIE ("SelfHandleChanged");
+ return self->priv->group_self_contact;
+}
- priv->self_contact_changed_sig =
- tp_cli_channel_interface_group_connect_to_self_contact_changed (self,
- tp_channel_group_self_contact_changed_cb, NULL, NULL, NULL, &error);
+/**
+ * tp_channel_group_dup_members:
+ * @self: a channel
+ *
+ * If @self is a group and the %TP_CHANNEL_FEATURE_GROUP feature has been
+ * prepared, return a #GPtrArray containing its members.
+ *
+ * If @self is a group but %TP_CHANNEL_FEATURE_GROUP has not been prepared,
+ * the result may either be a set of members, or %NULL.
+ *
+ * If @self is not a group, return %NULL.
+ *
+ * Returns: (transfer container) (type GLib.PtrArray) (element-type TelepathyGLib.Contact):
+ * a new #GPtrArray of #TpContact, free it with g_ptr_array_unref(), or %NULL.
+ *
+ * Since: 0.UNRELEASED
+ */
+GPtrArray *
+tp_channel_group_dup_members (TpChannel *self)
+{
+ g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
- if (priv->self_contact_changed_sig == NULL)
- DIE ("SelfContactChanged");
+ return _tp_contacts_from_values (self->priv->group_members);
+}
- priv->handle_owners_changed_sig =
- tp_cli_channel_interface_group_connect_to_handle_owners_changed (self,
- tp_channel_handle_owners_changed_cb, NULL, NULL, NULL, &error);
+/**
+ * tp_channel_group_dup_local_pending:
+ * @self: a channel
+ *
+ * If @self is a group and the %TP_CHANNEL_FEATURE_GROUP feature has been
+ * prepared, return a #GPtrArray containing its local-pending members.
+ *
+ * If @self is a group but %TP_CHANNEL_FEATURE_GROUP has not been prepared,
+ * the result may either be a set of local-pending members, or %NULL.
+ *
+ * If @self is not a group, return %NULL.
+ *
+ * Returns: (transfer container) (type GLib.PtrArray) (element-type TelepathyGLib.Contact):
+ * a new #GPtrArray of #TpContact, free it with g_ptr_array_unref(), or %NULL.
+ *
+ * Since: 0.UNRELEASED
+ */
+GPtrArray *
+tp_channel_group_dup_local_pending (TpChannel *self)
+{
+ g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
- if (priv->handle_owners_changed_sig == NULL)
- DIE ("HandleOwnersChanged");
+ return _tp_contacts_from_values (self->priv->group_local_pending);
+}
- priv->handle_owners_changed_detailed_sig =
- tp_cli_channel_interface_group_connect_to_handle_owners_changed_detailed (
- self, tp_channel_handle_owners_changed_detailed_cb, NULL, NULL, NULL,
- &error);
+/**
+ * tp_channel_group_dup_remote_pending:
+ * @self: a channel
+ *
+ * If @self is a group and the %TP_CHANNEL_FEATURE_GROUP feature has been
+ * prepared, return a #GPtrArray containing its remote-pending members.
+ *
+ * If @self is a group but %TP_CHANNEL_FEATURE_GROUP has not been prepared,
+ * the result may either be a set of remote-pending members, or %NULL.
+ *
+ * If @self is not a group, return %NULL.
+ *
+ * Returns: (transfer container) (type GLib.PtrArray) (element-type TelepathyGLib.Contact):
+ * a new #GPtrArray of #TpContact, free it with g_ptr_array_unref(), or %NULL.
+ *
+ * Since: 0.UNRELEASED
+ */
+GPtrArray *
+tp_channel_group_dup_remote_pending (TpChannel *self)
+{
+ g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
- if (priv->handle_owners_changed_detailed_sig == NULL)
- DIE ("HandleOwnersChangedDetailed");
+ return _tp_contacts_from_values (self->priv->group_remote_pending);
+}
- /* First try the 0.17 API (properties). If this fails we'll fall back */
- tp_cli_dbus_properties_call_get_all (self, -1,
- TP_IFACE_CHANNEL_INTERFACE_GROUP, tp_channel_got_group_properties_cb,
- NULL, NULL, NULL);
+/**
+ * tp_channel_group_get_local_pending_info:
+ * @self: a channel
+ * @local_pending: the #TpContact of a local-pending contact about whom more
+ * information is needed
+ * @actor: (out) (allow-none) (transfer none): either %NULL or a location to
+ * return the contact who requested the change
+ * @reason: (out) (allow-none): either %NULL or a location to return the reason
+ * for the change
+ * @message: (out) (allow-none) (transfer none): either %NULL or a location to
+ * return the user-supplied message
+ *
+ * If @local_pending is actually a local-pending contact,
+ * write additional information into @actor, @reason and @message and return
+ * %TRUE. The contact and message are not referenced or copied, and can only be
+ * assumed to remain valid until the main loop is re-entered.
+ *
+ * If @local_pending is not the handle of a local-pending contact,
+ * write %NULL into @actor, %TP_CHANNEL_GROUP_CHANGE_REASON_NONE into @reason
+ * and "" into @message, and return %FALSE.
+ *
+ * Returns: %TRUE if the contact is in fact local-pending
+ * Since: 0.UNRELEASED
+ */
+gboolean
+tp_channel_group_get_local_pending_info (TpChannel *self,
+ TpContact *local_pending,
+ TpContact **actor,
+ TpChannelGroupChangeReason *reason,
+ const gchar **message)
+{
+ gboolean ret = FALSE;
+ TpContact *a = NULL;
+ TpChannelGroupChangeReason r = TP_CHANNEL_GROUP_CHANGE_REASON_NONE;
+ const gchar *m = "";
+
+ g_return_val_if_fail (TP_IS_CHANNEL (self), FALSE);
+ g_return_val_if_fail (TP_IS_CONTACT (local_pending), FALSE);
+ g_return_val_if_fail (tp_contact_get_connection (local_pending) ==
+ self->priv->connection, FALSE);
+
+ if (self->priv->group_properties_retrieved)
+ {
+ gpointer key = GUINT_TO_POINTER (tp_contact_get_handle (local_pending));
+
+ /* it could conceivably be someone who is local-pending */
+ ret = g_hash_table_contains (self->priv->group_local_pending,
+ key);
+
+ if (ret)
+ {
+ /* we might even have information about them */
+ LocalPendingInfo *info = g_hash_table_lookup (
+ self->priv->group_local_pending_info, key);
+
+ if (info != NULL)
+ {
+ a = info->actor_contact;
+ r = info->reason;
+
+ if (info->message != NULL)
+ m = info->message;
+ }
+ /* else we have no info, which means (NULL, NONE, NULL) */
+ }
+ }
+
+ if (actor != NULL)
+ *actor = a;
+
+ if (message != NULL)
+ *message = m;
+
+ if (reason != NULL)
+ *reason = r;
+
+ return ret;
}
-G_GNUC_END_IGNORE_DEPRECATIONS
+/**
+ * tp_channel_group_get_contact_owner:
+ * @self: a channel
+ * @contact: a contact which is a member of this channel
+ *
+ * Synopsis (see below for further explanation):
+ *
+ * - if @self is not a group or @contact is not a member of this channel,
+ * result is undefined;
+ * - if %TP_CHANNEL_FEATURE_GROUP has not yet been prepared, result is
+ * undefined;
+ * - if @self does not have flags that include
+ * %TP_CHANNEL_GROUP_FLAG_PROPERTIES,
+ * result is undefined;
+ * - if @contact is channel-specific and its globally valid "owner" is known,
+ * return that owner;
+ * - if @contact is channel-specific and its globally valid "owner" is unknown,
+ * return %NULL;
+ * - if @contact is globally valid, return @contact itself
+ *
+ * Some channels (those with flags that include
+ * %TP_CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES) have a concept of
+ * "channel-specific contacts". These are contacts that only have meaning within
+ * the context of the channel - for instance, in XMPP Multi-User Chat,
+ * participants in a chatroom are identified by an in-room JID consisting
+ * of the JID of the chatroom plus a local nickname.
+ *
+ * Depending on the protocol and configuration, it might be possible to find
+ * out what globally valid contact (i.e. a contact that you could add to
+ * your contact list) "owns" a channel-specific contact. For instance, in
+ * most XMPP MUC chatrooms, normal users cannot see what global JID
+ * corresponds to an in-room JID, but moderators can.
+ *
+ * This is further complicated by the fact that channels with channel-specific
+ * contacts can sometimes have members with globally valid contacts (for
+ * instance, if you invite someone to an XMPP MUC using their globally valid
+ * JID, you would expect to see the contact representing that JID in the
+ * Group's remote-pending set).
+ *
+ * Returns: (transfer none): the global contact that owns the given contact,
+ * or %NULL.
+ * Since: 0.UNRELEASED
+ */
+TpContact *
+tp_channel_group_get_contact_owner (TpChannel *self,
+ TpContact *contact)
+{
+ TpHandle handle;
+ gpointer value;
+
+ g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
+ g_return_val_if_fail (TP_IS_CONTACT (contact), NULL);
+ g_return_val_if_fail (tp_contact_get_connection (contact) ==
+ self->priv->connection, NULL);
+
+ if (self->priv->group_contact_owners == NULL)
+ {
+ /* undefined result - pretending it's global is probably as good as
+ * any other behaviour, since we can't know either way */
+ return contact;
+ }
+
+ handle = tp_contact_get_handle (contact);
+
+ if (g_hash_table_lookup_extended (self->priv->group_contact_owners,
+ GUINT_TO_POINTER (handle), NULL, &value))
+ {
+ /* channel-specific, value is either owner or NULL if unknown */
+ return value;
+ }
+ else
+ {
+ /* either already globally valid, or not a member */
+ return contact;
+ }
+}
diff --git a/telepathy-glib/channel-internal.h b/telepathy-glib/channel-internal.h
index 17d6f8816..ae405c603 100644
--- a/telepathy-glib/channel-internal.h
+++ b/telepathy-glib/channel-internal.h
@@ -31,7 +31,6 @@ typedef void (*TpChannelProc) (TpChannel *self);
typedef struct {
TpContact *actor_contact;
- TpHandle actor;
TpChannelGroupChangeReason reason;
gchar *message;
} LocalPendingInfo;
@@ -53,41 +52,24 @@ struct _TpChannelPrivate {
/* owned string (iface + "." + prop) => slice-allocated GValue */
GHashTable *channel_properties;
- /* Set until introspection discovers which to use; both NULL after one has
- * been disconnected.
- */
- TpProxySignalConnection *members_changed_sig;
- TpProxySignalConnection *members_changed_detailed_sig;
- TpProxySignalConnection *self_handle_changed_sig;
- TpProxySignalConnection *self_contact_changed_sig;
- TpProxySignalConnection *handle_owners_changed_sig;
- TpProxySignalConnection *handle_owners_changed_detailed_sig;
-
- TpHandle group_self_handle;
TpChannelGroupFlags group_flags;
- /* NULL if members not discovered yet */
- TpIntset *group_members;
- TpIntset *group_local_pending;
- TpIntset *group_remote_pending;
- /* (TpHandle => LocalPendingInfo), or NULL if members not discovered yet */
- GHashTable *group_local_pending_info;
/* reason the self-handle left */
GError *group_remove_error /* implicitly zero-initialized */ ;
- /* guint => guint, NULL if not discovered yet */
- GHashTable *group_handle_owners;
/* reffed TpContact */
TpContact *target_contact;
TpContact *initiator_contact;
TpContact *group_self_contact;
/* TpHandle -> reffed TpContact */
- GHashTable *group_members_contacts;
- GHashTable *group_local_pending_contacts;
- GHashTable *group_remote_pending_contacts;
- /* the TpContact can be NULL if the owner is unknown */
+ GHashTable *group_members;
+ GHashTable *group_local_pending;
+ GHashTable *group_remote_pending;
+ /* TpHandle -> reffed TpContact or NULL */
GHashTable *group_contact_owners;
- gboolean cm_too_old_for_contacts;
+ /* TpHandle -> LocalPendingInfo */
+ GHashTable *group_local_pending_info;
+ gboolean group_properties_retrieved;
/* Queue of GSimpleAsyncResult with ContactsQueueItem payload */
GQueue *contacts_queue;
@@ -100,8 +82,6 @@ struct _TpChannelPrivate {
/* These are really booleans, but gboolean is signed. Thanks, GLib */
- /* channel-ready */
- unsigned ready:1;
/* Enough method calls have succeeded that we believe that the channel
* exists (implied by ready) */
unsigned exists:1;
@@ -120,20 +100,7 @@ void _tp_channel_abort_introspection (TpChannel *self,
/* channel-group.c internals */
-void _tp_channel_get_group_properties (TpChannel *self);
-
-/* channel-contacts.c internals */
-
-void _tp_channel_contacts_init (TpChannel *self);
-void _tp_channel_contacts_group_init (TpChannel *self, GHashTable *identifiers);
-void _tp_channel_contacts_members_changed (TpChannel *self,
- const GArray *added, const GArray *removed, const GArray *local_pending,
- const GArray *remote_pending, guint actor, GHashTable *details);
-void _tp_channel_contacts_handle_owners_changed (TpChannel *self,
- GHashTable *added, const GArray *removed, GHashTable *identifiers);
-void _tp_channel_contacts_self_contact_changed (TpChannel *self,
- guint self_handle, const gchar *identifier);
-void _tp_channel_contacts_prepare_async (TpProxy *proxy,
+void _tp_channel_group_prepare_async (TpProxy *proxy,
const TpProxyFeature *feature,
GAsyncReadyCallback callback,
gpointer user_data);
diff --git a/telepathy-glib/channel-manager.c b/telepathy-glib/channel-manager.c
index da24493f9..796107030 100644
--- a/telepathy-glib/channel-manager.c
+++ b/telepathy-glib/channel-manager.c
@@ -343,41 +343,6 @@ tp_channel_manager_get_type (void)
/* Signal emission wrappers */
-
-/**
- * tp_channel_manager_emit_new_channels:
- * @instance: An object implementing #TpChannelManager
- * @channels: a #GHashTable where the keys are
- * #TpExportableChannel instances (hashed and compared
- * by g_direct_hash() and g_direct_equal()) and the values are
- * linked lists (#GSList) of request tokens (opaque pointers) satisfied by
- * these channels
- *
- * If @channels is non-empty, emit the #TpChannelManager::new-channels
- * signal indicating that those channels have been created.
- *
- * Deprecated: in 0.UNRELEASED this function should not be
- * used. Signalling the creation of multiple channels together in a
- * single signal is strongly recommended against as it's very
- * complicated, hard to get right in clients, and not nearly as
- * useful as it originally sounded. Use
- * tp_channel_manager_emit_new_channel() instead.
- *
- * Since: 0.7.15
- */
-void
-tp_channel_manager_emit_new_channels (gpointer instance,
- GHashTable *channels)
-{
- g_return_if_fail (TP_IS_CHANNEL_MANAGER (instance));
-
- if (g_hash_table_size (channels) == 0)
- return;
-
- g_signal_emit (instance, signals[S_NEW_CHANNELS], 0, channels);
-}
-
-
/**
* tp_channel_manager_emit_new_channel:
* @instance: An object implementing #TpChannelManager
diff --git a/telepathy-glib/channel-manager.h b/telepathy-glib/channel-manager.h
index 7b2f64d39..72bcb56bd 100644
--- a/telepathy-glib/channel-manager.h
+++ b/telepathy-glib/channel-manager.h
@@ -131,10 +131,6 @@ GType tp_channel_manager_get_type (void);
void tp_channel_manager_emit_new_channel (gpointer instance,
TpExportableChannel *channel, GSList *request_tokens);
-_TP_DEPRECATED_IN_UNRELEASED
-void tp_channel_manager_emit_new_channels (gpointer instance,
- GHashTable *channels);
-
void tp_channel_manager_emit_channel_closed (gpointer instance,
const gchar *path);
void tp_channel_manager_emit_channel_closed_for_object (gpointer instance,
diff --git a/telepathy-glib/channel-request.c b/telepathy-glib/channel-request.c
index 636456ab1..9cf157f3f 100644
--- a/telepathy-glib/channel-request.c
+++ b/telepathy-glib/channel-request.c
@@ -24,8 +24,8 @@
#include "telepathy-glib/channel-request.h"
#include <telepathy-glib/account-manager.h>
-#include <telepathy-glib/automatic-proxy-factory.h>
#include <telepathy-glib/channel.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/errors.h>
@@ -37,10 +37,8 @@
#define DEBUG_FLAG TP_DEBUG_DISPATCHER
#include "telepathy-glib/dbus-internal.h"
#include "telepathy-glib/debug-internal.h"
-#include "telepathy-glib/deprecated-internal.h"
#include "telepathy-glib/proxy-internal.h"
-#include "telepathy-glib/simple-client-factory-internal.h"
-#include "telepathy-glib/_gen/tp-cli-channel-request-body.h"
+#include "telepathy-glib/client-factory-internal.h"
/**
* SECTION:channel-request
@@ -80,8 +78,7 @@
*
* This proxy is usable but incomplete: accessors for the Account,
* UserActionTime, PreferredHandler, Requests and Interfaces properties will
- * be added in a later version of telepathy-glib, along with a mechanism
- * similar to tp_connection_call_when_ready().
+ * be added in a later version of telepathy-glib.
*
* Until suitable convenience methods are implemented, the generic
* tp_cli_dbus_properties_call_get_all() method can be used to get those
@@ -98,13 +95,11 @@
enum {
SIGNAL_SUCCEEDED,
- SIGNAL_SUCCEEDED_WITH_CHANNEL,
N_SIGNALS
};
enum {
- PROP_CHANNEL_FACTORY = 1,
- PROP_IMMUTABLE_PROPERTIES,
+ PROP_IMMUTABLE_PROPERTIES = 1,
PROP_ACCOUNT,
PROP_USER_ACTION_TIME,
PROP_PREFERRED_HANDLER,
@@ -115,9 +110,6 @@ static guint signals[N_SIGNALS] = { 0 };
struct _TpChannelRequestPrivate {
GHashTable *immutable_properties;
-
- TpClientChannelFactory *channel_factory;
- gboolean succeeded_with_chan_fired;
TpAccount *account;
};
@@ -140,11 +132,6 @@ tp_channel_request_set_property (GObject *object,
switch (property_id)
{
- case PROP_CHANNEL_FACTORY:
- tp_clear_object (&self->priv->channel_factory);
- self->priv->channel_factory = g_value_dup_object (value);
- break;
-
case PROP_IMMUTABLE_PROPERTIES:
g_assert (self->priv->immutable_properties == NULL);
self->priv->immutable_properties = g_value_dup_boxed (value);
@@ -166,10 +153,6 @@ tp_channel_request_get_property (GObject *object,
switch (property_id)
{
- case PROP_CHANNEL_FACTORY:
- g_value_set_object (value, self->priv->channel_factory);
- break;
-
case PROP_IMMUTABLE_PROPERTIES:
g_value_set_boxed (value, self->priv->immutable_properties);
break;
@@ -214,30 +197,6 @@ tp_channel_request_failed_cb (TpChannelRequest *self,
static void
tp_channel_request_succeeded_cb (TpChannelRequest *self,
- gpointer unused G_GNUC_UNUSED,
- GObject *object G_GNUC_UNUSED)
-{
- GError e = { TP_DBUS_ERRORS, TP_DBUS_ERROR_OBJECT_REMOVED,
- "ChannelRequest succeeded and was removed" };
-
- if (!self->priv->succeeded_with_chan_fired)
- {
- DEBUG ("MC is too old and didn't fired SucceededWithChannel");
-
- g_signal_emit (self, signals[SIGNAL_SUCCEEDED_WITH_CHANNEL], 0,
- NULL, NULL);
-
- self->priv->succeeded_with_chan_fired = TRUE;
- }
-
- /* Fire the old legacy signal as well */
- g_signal_emit (self, signals[SIGNAL_SUCCEEDED], 0);
-
- tp_proxy_invalidate ((TpProxy *) self, &e);
-}
-
-static void
-tp_channel_request_succeeded_with_channel_cb (TpChannelRequest *self,
const gchar *conn_path,
GHashTable *conn_props,
const gchar *chan_path,
@@ -248,8 +207,10 @@ tp_channel_request_succeeded_with_channel_cb (TpChannelRequest *self,
TpConnection *connection;
TpChannel *channel;
GError *error = NULL;
+ GError e = { TP_DBUS_ERRORS, TP_DBUS_ERROR_OBJECT_REMOVED,
+ "ChannelRequest succeeded and was removed" };
- connection = tp_simple_client_factory_ensure_connection (
+ connection = tp_client_factory_ensure_connection (
tp_proxy_get_factory (self), conn_path, NULL, &error);
if (connection == NULL)
{
@@ -258,12 +219,8 @@ tp_channel_request_succeeded_with_channel_cb (TpChannelRequest *self,
return;
}
- if (self->priv->channel_factory != NULL)
- channel = tp_client_channel_factory_create_channel (
- self->priv->channel_factory, connection, chan_path, chan_props, &error);
- else
- channel = tp_simple_client_factory_ensure_channel (tp_proxy_get_factory (self),
- connection, chan_path, chan_props, &error);
+ channel = tp_client_factory_ensure_channel (tp_proxy_get_factory (self),
+ connection, chan_path, chan_props, &error);
if (channel == NULL)
{
DEBUG ("Failed to create TpChannel: %s", error->message);
@@ -272,10 +229,10 @@ tp_channel_request_succeeded_with_channel_cb (TpChannelRequest *self,
return;
}
- g_signal_emit (self, signals[SIGNAL_SUCCEEDED_WITH_CHANNEL], 0,
+ g_signal_emit (self, signals[SIGNAL_SUCCEEDED], 0,
connection, channel);
- self->priv->succeeded_with_chan_fired = TRUE;
+ tp_proxy_invalidate ((TpProxy *) self, &e);
g_object_unref (connection);
g_object_unref (channel);
@@ -313,18 +270,7 @@ tp_channel_request_constructed (GObject *object)
if (sc == NULL)
{
- CRITICAL ("Couldn't connect to Succeeded: %s", error->message);
- g_error_free (error);
- g_assert_not_reached ();
- return;
- }
-
- sc = tp_cli_channel_request_connect_to_succeeded_with_channel (self,
- tp_channel_request_succeeded_with_channel_cb, NULL, NULL, NULL, &error);
-
- if (sc == NULL)
- {
- DEBUG ("Couldn't connect to SucceededWithChannel: %s", error->message);
+ DEBUG ("Couldn't connect to Succeeded: %s", error->message);
g_error_free (error);
return;
}
@@ -339,7 +285,6 @@ tp_channel_request_dispose (GObject *object)
tp_clear_pointer (&self->priv->immutable_properties, g_hash_table_unref);
- tp_clear_object (&self->priv->channel_factory);
tp_clear_object (&self->priv->account);
if (dispose != NULL)
@@ -365,27 +310,6 @@ tp_channel_request_class_init (TpChannelRequestClass *klass)
proxy_class->must_have_unique_name = TRUE;
/**
- * TpChannelRequest:channel-factory:
- *
- * The object implementing the #TpClientChannelFactoryInterface interface
- * that will be used to create channel proxies when the
- * #TpChannelRequest::succeeded-with-channel signal is fired.
- * This property can be changed using
- * tp_channel_request_set_channel_factory().
- *
- * If no channel factory is specified then #TpAutomaticProxyFactory is used.
- *
- * Since: 0.13.14
- * Deprecated: since 0.15.5. Use #TpProxy:factory instead.
- */
- param_spec = g_param_spec_object ("channel-factory", "Channel factory",
- "Object implementing TpClientChannelFactoryInterface",
- G_TYPE_OBJECT,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_CHANNEL_FACTORY,
- param_spec);
-
- /**
* TpChannelRequest:immutable-properties:
*
* The immutable D-Bus properties of this channel request, represented by a
@@ -477,23 +401,6 @@ tp_channel_request_class_init (TpChannelRequestClass *klass)
/**
* TpChannelRequest::succeeded:
* @self: the channel request proxy
- *
- * Emitted when the channel request succeeds.
- *
- * Deprecated: since 0.13.14. Use
- * #TpChannelRequest::succeeded-with-channel, which provides the resulting
- * channel, instead.
- */
- signals[SIGNAL_SUCCEEDED] = g_signal_new ("succeeded",
- G_OBJECT_CLASS_TYPE (klass),
- G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
- 0,
- NULL, NULL, NULL,
- G_TYPE_NONE, 0);
-
- /**
- * TpChannelRequest::succeeded-with-channel:
- * @self: the channel request proxy
* @connection: the #TpConnection of @channel, or %NULL
* @channel: the #TpChannel created, or %NULL
*
@@ -503,15 +410,14 @@ tp_channel_request_class_init (TpChannelRequestClass *klass)
* @channel will be %NULL. When using newer versions, they will be correctly
* set to the newly-created channel, and the connection which owns it.
*
- * The #TpChannel is created using #TpChannelRequest:channel-factory or
- * #TpProxy:factory but the features of the factory are NOT prepared.
- * It's up to the user to prepare the features returned by
- * tp_simple_client_factory_dup_channel_features() himself.
+ * The #TpChannel is created using #TpProxy:factory but the features of the
+ * factory are NOT prepared. It's up to the user to prepare the features
+ * returned by tp_client_factory_dup_channel_features() himself.
*
* Since: 0.13.14
*/
- signals[SIGNAL_SUCCEEDED_WITH_CHANNEL] = g_signal_new (
- "succeeded-with-channel",
+ signals[SIGNAL_SUCCEEDED] = g_signal_new (
+ "succeeded",
G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
0,
@@ -579,7 +485,7 @@ tp_channel_request_new (TpDBusDaemon *bus_daemon,
}
TpChannelRequest *
-_tp_channel_request_new_with_factory (TpSimpleClientFactory *factory,
+_tp_channel_request_new_with_factory (TpClientFactory *factory,
TpDBusDaemon *bus_daemon,
const gchar *object_path,
GHashTable *immutable_properties,
@@ -614,35 +520,6 @@ _tp_channel_request_new_with_factory (TpSimpleClientFactory *factory,
}
/**
- * tp_channel_request_set_channel_factory:
- * @self: a #TpChannelRequest
- * @factory: an object implementing the #TpClientChannelFactoryInterface
- * interface
- *
- * Change the value of the #TpChannelRequest:channel-factory property.
- *
- * Since: 0.13.14
- * Deprecated: since 0.15.5. Use #TpProxy:factory instead.
- */
-void
-tp_channel_request_set_channel_factory (TpChannelRequest *self,
- TpClientChannelFactory *factory)
-{
- _tp_channel_request_set_channel_factory (self, factory);
-}
-
-void
-_tp_channel_request_set_channel_factory (TpChannelRequest *self,
- TpClientChannelFactory *factory)
-{
- tp_clear_object (&self->priv->channel_factory);
-
- if (factory != NULL)
- self->priv->channel_factory = g_object_ref (factory);
- g_object_notify (G_OBJECT (self), "channel-factory");
-}
-
-/**
* tp_channel_request_get_immutable_properties:
* @self: a #TpChannelRequest
*
@@ -700,7 +577,7 @@ tp_channel_request_get_account (TpChannelRequest *self)
if (path == NULL)
return NULL;
- self->priv->account = tp_simple_client_factory_ensure_account (
+ self->priv->account = tp_client_factory_ensure_account (
tp_proxy_get_factory (self), path, NULL, NULL);
}
diff --git a/telepathy-glib/channel-request.h b/telepathy-glib/channel-request.h
index 9cdf3794a..68f04f5f6 100644
--- a/telepathy-glib/channel-request.h
+++ b/telepathy-glib/channel-request.h
@@ -23,7 +23,6 @@
#define TP_CHANNEL_REQUEST_H
#include <telepathy-glib/account.h>
-#include <telepathy-glib/client-channel-factory.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/proxy.h>
@@ -72,12 +71,6 @@ TpChannelRequest *tp_channel_request_new (TpDBusDaemon *bus_daemon,
void tp_channel_request_init_known_interfaces (void);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_16
-void tp_channel_request_set_channel_factory (TpChannelRequest *self,
- TpClientChannelFactory *factory);
-#endif
-
const GHashTable * tp_channel_request_get_immutable_properties (
TpChannelRequest *self);
@@ -91,6 +84,4 @@ const GHashTable * tp_channel_request_get_hints (TpChannelRequest *self);
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-channel-request.h>
-
#endif
diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c
index 6d9d6d87b..49e72a9e1 100644
--- a/telepathy-glib/channel.c
+++ b/telepathy-glib/channel.c
@@ -24,6 +24,8 @@
#include "telepathy-glib/channel-internal.h"
#include <telepathy-glib/channel-iface.h>
+#include <telepathy-glib/cli-channel.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
@@ -34,9 +36,7 @@
#define DEBUG_FLAG TP_DEBUG_CHANNEL
#include "telepathy-glib/debug-internal.h"
#include "telepathy-glib/proxy-internal.h"
-#include "telepathy-glib/simple-client-factory-internal.h"
-
-#include "_gen/tp-cli-channel-body.h"
+#include "telepathy-glib/client-factory-internal.h"
/**
* SECTION:channel
@@ -51,10 +51,6 @@
*
* * calling GetChannelType(), GetInterfaces(), GetHandles() automatically
*
- * This section also documents the auto-generated C wrappers for the
- * Channel D-Bus interface. Of these, in general, only
- * tp_cli_channel_call_close() and tp_cli_channel_run_close() are useful (the
- * #TpChannel object provides a more convenient API for the rest).
*
* Since: 0.7.1
*/
@@ -95,13 +91,9 @@ enum
PROP_HANDLE_TYPE,
PROP_HANDLE,
PROP_IDENTIFIER,
- PROP_CHANNEL_READY,
PROP_CHANNEL_PROPERTIES,
- PROP_GROUP_SELF_HANDLE,
PROP_GROUP_FLAGS,
PROP_REQUESTED,
- PROP_INITIATOR_HANDLE,
- PROP_INITIATOR_IDENTIFIER,
PROP_PASSWORD_NEEDED,
PROP_TARGET_CONTACT,
PROP_INITIATOR_CONTACT,
@@ -112,8 +104,6 @@ enum
enum {
SIGNAL_GROUP_FLAGS_CHANGED,
SIGNAL_GROUP_MEMBERS_CHANGED,
- SIGNAL_GROUP_MEMBERS_CHANGED_DETAILED,
- SIGNAL_GROUP_CONTACTS_CHANGED,
SIGNAL_CHAT_STATE_CHANGED,
N_SIGNALS
};
@@ -142,12 +132,6 @@ G_DEFINE_TYPE_WITH_CODE (TpChannel,
* - any extra interfaces will have been set up in TpProxy (i.e.
* #TpProxy:interfaces contains at least all extra Channel interfaces)
*
- * (These are a subset of the guarantees offered by the older
- * #TpChannel:channel-ready
- * and tp_channel_call_when_ready() mechanisms, which are now equivalent to
- * (%TP_CHANNEL_FEATURE_CORE, %TP_CHANNEL_FEATURE_GROUP) if the channel is
- * a group, or just %TP_CHANNEL_FEATURE_CORE otherwise.)
- *
* One can ask for a feature to be prepared using the
* tp_proxy_prepare_async() function, and waiting for it to callback.
*
@@ -163,25 +147,25 @@ tp_channel_get_feature_quark_core (void)
/**
* TP_CHANNEL_FEATURE_GROUP:
*
- * Expands to a call to a function that returns a quark representing the Group
- * features of a TpChannel.
+ * Expands to a call to a function that returns a quark representing the
+ * group features of a TpChannel.
*
* When this feature is prepared, the Group properties of the
* Channel have been retrieved and are available for use, and
* change-notification has been set up for those that can change:
*
- * - the initial value of the #TpChannel:group-self-handle property will
+ * - the initial value of the #TpChannel:group-self-contact property will
* have been fetched and change notification will have been set up
* - the initial value of the #TpChannel:group-flags property will
* have been fetched and change notification will have been set up
*
- * (These are the same guarantees offered for Group channels by the older
- * #TpChannel:channel-ready and tp_channel_call_when_ready() mechanisms.)
+ * All #TpContact objects are guaranteed to have all of the features previously
+ * passed to tp_client_factory_add_contact_features() prepared.
*
* One can ask for a feature to be prepared using the
* tp_proxy_prepare_async() function, and waiting for it to callback.
*
- * Since: 0.11.3
+ * Since: 0.UNRELEASED
*/
GQuark
@@ -191,30 +175,6 @@ tp_channel_get_feature_quark_group (void)
}
/**
- * TP_CHANNEL_FEATURE_CONTACTS:
- *
- * Expands to a call to a function that returns a quark representing the
- * Contacts features of a TpChannel.
- *
- * When this feature is prepared, the #TpContact objects of this channel are
- * guaranteed to have all of the features previously passed to
- * tp_simple_client_factory_add_contact_features() prepared.
- *
- * On older connection managers, this feature may fail to prepare.
- *
- * One can ask for a feature to be prepared using the
- * tp_proxy_prepare_async() function, and waiting for it to callback.
- *
- * Since: 0.15.6
- */
-
-GQuark
-tp_channel_get_feature_quark_contacts (void)
-{
- return g_quark_from_static_string ("tp-channel-feature-contacts");
-}
-
-/**
* TP_CHANNEL_FEATURE_CHAT_STATES:
*
* Expands to a call to a function that returns a quark representing the
@@ -353,39 +313,6 @@ tp_channel_get_identifier (TpChannel *self)
}
/**
- * tp_channel_is_ready: (skip)
- * @self: a channel
- *
- * Returns the same thing as the #TpChannel:channel-ready property.
- *
- * New code should use tp_proxy_is_prepared(), which is a more general form of
- * this method.
- *
- * For group channels, this method is equivalent to checking for the
- * combination of %TP_CHANNEL_FEATURE_CORE and %TP_CHANNEL_FEATURE_GROUP; for
- * non-group channels, it's equivalent to checking for
- * %TP_CHANNEL_FEATURE_CORE.
- *
- * One important difference is that after #TpProxy::invalidated is
- * signalled, #TpChannel:channel-ready keeps its current value - which might
- * be %TRUE, if the channel was successfully prepared before it became
- * invalidated - but tp_proxy_is_prepared() returns %FALSE for all features.
- *
- * Returns: %TRUE if introspection has completed
- * Since: 0.7.12
- * Deprecated: 0.17.6: use tp_proxy_is_prepared() with
- * %TP_CHANNEL_FEATURE_CORE
- */
-gboolean
-tp_channel_is_ready (TpChannel *self)
-{
- g_return_val_if_fail (TP_IS_CHANNEL (self), FALSE);
-
- return self->priv->ready;
-}
-
-
-/**
* tp_channel_borrow_connection:
* @self: a channel
*
@@ -436,6 +363,39 @@ tp_channel_borrow_immutable_properties (TpChannel *self)
return self->priv->channel_properties;
}
+/**
+ * tp_channel_get_target_contact:
+ * @self: a channel
+ *
+ * <!-- -->
+ *
+ * Returns: (transfer none): the value of #TpChannel:target-contact
+ * Since: 0.15.6
+ */
+TpContact *
+tp_channel_get_target_contact (TpChannel *self)
+{
+ g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
+
+ return self->priv->target_contact;
+}
+
+/**
+ * tp_channel_get_initiator_contact:
+ * @self: a channel
+ *
+ * <!-- -->
+ *
+ * Returns: (transfer none): the value of #TpChannel:initiator-contact
+ * Since: 0.15.6
+ */
+TpContact *
+tp_channel_get_initiator_contact (TpChannel *self)
+{
+ g_return_val_if_fail (TP_IS_CHANNEL (self), NULL);
+
+ return self->priv->initiator_contact;
+}
static void
tp_channel_get_property (GObject *object,
@@ -445,16 +405,11 @@ tp_channel_get_property (GObject *object,
{
TpChannel *self = TP_CHANNEL (object);
- /* We still need to use deprecated getters funcs */
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
switch (property_id)
{
case PROP_CONNECTION:
g_value_set_object (value, self->priv->connection);
break;
- case PROP_CHANNEL_READY:
- g_value_set_boolean (value, self->priv->ready);
- break;
case PROP_CHANNEL_TYPE:
g_value_set_static_string (value,
g_quark_to_string (self->priv->channel_type));
@@ -471,21 +426,12 @@ tp_channel_get_property (GObject *object,
case PROP_CHANNEL_PROPERTIES:
g_value_set_boxed (value, self->priv->channel_properties);
break;
- case PROP_GROUP_SELF_HANDLE:
- g_value_set_uint (value, self->priv->group_self_handle);
- break;
case PROP_GROUP_FLAGS:
g_value_set_uint (value, self->priv->group_flags);
break;
case PROP_REQUESTED:
g_value_set_boolean (value, tp_channel_get_requested (self));
break;
- case PROP_INITIATOR_HANDLE:
- g_value_set_uint (value, tp_channel_get_initiator_handle (self));
- break;
- case PROP_INITIATOR_IDENTIFIER:
- g_value_set_string (value, tp_channel_get_initiator_identifier (self));
- break;
case PROP_PASSWORD_NEEDED:
g_value_set_boolean (value, tp_channel_password_needed (self));
break;
@@ -502,7 +448,6 @@ tp_channel_get_property (GObject *object,
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
- G_GNUC_END_IGNORE_DEPRECATIONS
}
/**
@@ -751,7 +696,7 @@ tp_channel_get_initial_chat_states_cb (TpProxy *proxy,
/* else just ignore it and assume everyone was initially in the default
* Inactive state, unless we already saw a signal for them */
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
static void
@@ -800,17 +745,9 @@ _tp_channel_continue_introspection (TpChannel *self)
self->priv->introspect_needed = NULL;
DEBUG ("%p: channel ready", self);
- self->priv->ready = TRUE;
- g_object_notify ((GObject *) self, "channel-ready");
- /* for now, we only have one introspection queue, so CORE and
- * (if supported) GROUP turn up simultaneously */
_tp_proxy_set_feature_prepared ((TpProxy *) self,
TP_CHANNEL_FEATURE_CORE, TRUE);
- _tp_proxy_set_feature_prepared ((TpProxy *) self,
- TP_CHANNEL_FEATURE_GROUP,
- tp_proxy_has_interface_by_id (self,
- TP_IFACE_QUARK_CHANNEL_INTERFACE_GROUP));
}
else
{
@@ -820,393 +757,216 @@ _tp_channel_continue_introspection (TpChannel *self)
}
}
-
static void
-tp_channel_got_interfaces_cb (TpChannel *self,
- const gchar **interfaces,
- const GError *error,
- gpointer unused,
- GObject *unused2)
+_tp_channel_got_properties (TpProxy *proxy,
+ GHashTable *asv,
+ const GError *error,
+ gpointer unused G_GNUC_UNUSED,
+ GObject *object G_GNUC_UNUSED)
{
+ TpChannel *self = TP_CHANNEL (proxy);
+ gboolean valid;
+ guint u;
+ const gchar *s;
+ gboolean b;
+
+
if (error != NULL)
{
- _tp_channel_abort_introspection (self, "GetInterfaces() failed", error);
+ _tp_channel_abort_introspection (self, "GetAll failed", error);
return;
}
- self->priv->exists = TRUE;
- _tp_channel_maybe_set_interfaces (self, interfaces);
-
- /* FIXME: give subclasses a chance to influence the definition of "ready"
- * now that we have our interfaces? */
-
- _tp_channel_continue_introspection (self);
-}
+ DEBUG ("Received %u channel properties", g_hash_table_size (asv));
+ self->priv->exists = TRUE;
-static void
-_tp_channel_get_interfaces (TpChannel *self)
-{
- DEBUG ("%p", self);
+ _tp_channel_maybe_set_channel_type (self,
+ tp_asv_get_string (asv, "ChannelType"));
+ _tp_channel_maybe_set_interfaces (self,
+ tp_asv_get_boxed (asv, "Interfaces", G_TYPE_STRV));
- if (tp_asv_lookup (self->priv->channel_properties,
- TP_PROP_CHANNEL_INTERFACES) != NULL &&
- (self->priv->exists ||
- tp_proxy_has_interface_by_id (self,
- TP_IFACE_QUARK_CHANNEL_INTERFACE_GROUP)))
- {
- /* If we already know the channel's interfaces, and either have already
- * successfully called a method on the channel (so know it's alive) or
- * are going to call one on it when we introspect the Group properties,
- * then we don't need to do anything here.
- */
- _tp_channel_continue_introspection (self);
- }
- else
- {
- /* either we don't know the Interfaces, or we just want to verify the
- * channel's existence */
- tp_cli_channel_call_get_interfaces (self, -1,
- tp_channel_got_interfaces_cb, NULL, NULL, NULL);
- }
-}
+ u = tp_asv_get_uint32 (asv, "TargetHandleType", &valid);
+ _tp_channel_maybe_set_handle_type (self, u, valid);
+ u = tp_asv_get_uint32 (asv, "TargetHandle", &valid);
+ _tp_channel_maybe_set_handle (self, u, valid);
-static void
-tp_channel_got_channel_type_cb (TpChannel *self,
- const gchar *channel_type,
- const GError *error,
- gpointer unused,
- GObject *unused2)
-{
- GError *err2 = NULL;
+ _tp_channel_maybe_set_identifier (self,
+ tp_asv_get_string (asv, "TargetID"));
- if (error != NULL)
- {
- _tp_channel_abort_introspection (self, "GetChannelType failed", error);
- }
- else if (tp_dbus_check_valid_interface_name (channel_type, &err2))
- {
- self->priv->exists = TRUE;
- DEBUG ("%p: Introspected channel type %s", self, channel_type);
- _tp_channel_maybe_set_channel_type (self, channel_type);
- g_object_notify ((GObject *) self, "channel-type");
+ u = tp_asv_get_uint32 (asv, "InitiatorHandle", &valid);
- _tp_channel_continue_introspection (self);
- }
- else
+ if (valid)
{
- _tp_channel_abort_introspection (self,
- "GetChannelType returned invalid type", err2);
- g_error_free (err2);
+ g_hash_table_insert (self->priv->channel_properties,
+ g_strdup (TP_PROP_CHANNEL_INITIATOR_HANDLE),
+ tp_g_value_slice_new_uint (u));
}
-}
+ s = tp_asv_get_string (asv, "InitiatorID");
-static void
-_tp_channel_get_channel_type (TpChannel *self)
-{
- if (self->priv->channel_type == 0)
- {
- DEBUG ("%p: calling GetChannelType", self);
- tp_cli_channel_call_get_channel_type (self, -1,
- tp_channel_got_channel_type_cb, NULL, NULL, NULL);
- }
- else
+ if (s != NULL)
{
- DEBUG ("%p: channel type %s already determined", self,
- g_quark_to_string (self->priv->channel_type));
- _tp_channel_continue_introspection (self);
+ g_hash_table_insert (self->priv->channel_properties,
+ g_strdup (TP_PROP_CHANNEL_INITIATOR_ID),
+ tp_g_value_slice_new_string (s));
}
-}
+ b = tp_asv_get_boolean (asv, "Requested", &valid);
-static void
-tp_channel_got_handle_cb (TpChannel *self,
- guint handle_type,
- guint handle,
- const GError *error,
- gpointer unused,
- GObject *unused2)
-{
- if (error == NULL)
+ if (valid)
{
- self->priv->exists = TRUE;
-
- DEBUG ("%p: Introspected handle #%d of type %d", self, handle,
- handle_type);
- self->priv->handle_type = handle_type;
- self->priv->handle = handle;
-
- g_hash_table_insert (self->priv->channel_properties,
- g_strdup (TP_PROP_CHANNEL_TARGET_HANDLE_TYPE),
- tp_g_value_slice_new_uint (handle_type));
-
g_hash_table_insert (self->priv->channel_properties,
- g_strdup (TP_PROP_CHANNEL_TARGET_HANDLE),
- tp_g_value_slice_new_uint (handle));
+ g_strdup (TP_PROP_CHANNEL_REQUESTED),
+ tp_g_value_slice_new_boolean (b));
+ }
- g_object_notify ((GObject *) self, "handle-type");
- g_object_notify ((GObject *) self, "handle");
+ g_object_notify ((GObject *) self, "channel-type");
+ g_object_notify ((GObject *) self, "interfaces");
+ g_object_notify ((GObject *) self, "handle-type");
+ g_object_notify ((GObject *) self, "handle");
+ g_object_notify ((GObject *) self, "identifier");
- _tp_channel_continue_introspection (self);
- }
- else
- {
- _tp_channel_abort_introspection (self, "GetHandle failed", error);
- }
+ _tp_channel_continue_introspection (self);
}
-
static void
-_tp_channel_get_handle (TpChannel *self)
+_tp_channel_get_properties (TpChannel *self)
{
- if (self->priv->handle_type == TP_UNKNOWN_HANDLE_TYPE
- || (self->priv->handle == 0 &&
- self->priv->handle_type != TP_HANDLE_TYPE_NONE))
- {
- DEBUG ("%p: calling GetHandle", self);
- tp_cli_channel_call_get_handle (self, -1,
- tp_channel_got_handle_cb, NULL, NULL, NULL);
- }
- else
- {
- DEBUG ("%p: handle already known to be %u of type %u", self,
- self->priv->handle, self->priv->handle_type);
- _tp_channel_continue_introspection (self);
- }
+ tp_cli_dbus_properties_call_get_all (self, -1,
+ TP_IFACE_CHANNEL, _tp_channel_got_properties, NULL, NULL, NULL);
}
-
-
static void
-tp_channel_got_identifier_cb (TpConnection *connection,
- const gchar **identifier,
- const GError *error,
- gpointer user_data,
- GObject *unused2)
+connection_prepared_cb (GObject *object,
+ GAsyncResult *res,
+ gpointer user_data)
{
TpChannel *self = user_data;
+ GError *error = NULL;
- if (error != NULL)
+ if (!tp_proxy_prepare_finish (object, res, &error))
{
- _tp_channel_abort_introspection (self, "InspectHandles failed", error);
- goto finally;
+ _tp_channel_abort_introspection (self, "Preparing connection failed", error);
+ g_clear_error (&error);
}
-
- if (identifier == NULL || identifier[0] == NULL || identifier[1] != NULL)
+ else
{
- GError e = { TP_DBUS_ERRORS, TP_DBUS_ERROR_INCONSISTENT,
- "CM is broken: InspectHandles(CONTACT, [TargetHandle]) returned "
- "non-1 length" };
-
- _tp_channel_abort_introspection (self, "InspectHandles inconsistent",
- &e);
- goto finally;
+ _tp_channel_continue_introspection (self);
}
- DEBUG ("%p: Introspected identifier %s", self, identifier[0]);
- _tp_channel_maybe_set_identifier (self, identifier[0]);
- g_object_notify ((GObject *) self, "identifier");
-
- _tp_channel_continue_introspection (self);
-
-finally:
g_object_unref (self);
}
-
static void
-_tp_channel_get_identifier (TpChannel *self)
+_tp_channel_prepare_connection (TpChannel *self)
{
- if (self->priv->identifier == NULL &&
- (self->priv->handle == 0 ||
- self->priv->handle_type == TP_HANDLE_TYPE_NONE))
- {
- /* no need to emit GObject::notify here since the initial value was "" */
- _tp_channel_maybe_set_identifier (self, "");
- }
-
- if (self->priv->identifier == NULL)
- {
- GArray handles = {(gchar *) &self->priv->handle, 1};
-
- DEBUG ("%p: calling InspectHandles", self);
- tp_cli_connection_call_inspect_handles (self->priv->connection, -1,
- self->priv->handle_type, &handles,
- tp_channel_got_identifier_cb, g_object_ref (self), NULL, NULL);
- }
- else
+ /* Skip if connection is already prepared */
+ if (tp_proxy_is_prepared (self->priv->connection, TP_CONNECTION_FEATURE_CORE))
{
- DEBUG ("%p: identifier already known to be %s", self,
- self->priv->identifier);
_tp_channel_continue_introspection (self);
+ return;
}
-}
+ tp_proxy_prepare_async (self->priv->connection, NULL,
+ connection_prepared_cb, g_object_ref (self));
+}
static void
-_tp_channel_got_properties (TpProxy *proxy,
- GHashTable *asv,
- const GError *error,
- gpointer unused G_GNUC_UNUSED,
- GObject *object G_GNUC_UNUSED)
+upgrade_contacts_cb (GObject *object,
+ GAsyncResult *result,
+ gpointer user_data)
{
- TpChannel *self = TP_CHANNEL (proxy);
-
- if (error == NULL)
- {
- gboolean valid;
- guint u;
- const gchar *s;
- gboolean b;
-
- DEBUG ("Received %u channel properties", g_hash_table_size (asv));
-
- self->priv->exists = TRUE;
-
- _tp_channel_maybe_set_channel_type (self,
- tp_asv_get_string (asv, "ChannelType"));
- _tp_channel_maybe_set_interfaces (self,
- tp_asv_get_boxed (asv, "Interfaces", G_TYPE_STRV));
-
- u = tp_asv_get_uint32 (asv, "TargetHandleType", &valid);
- _tp_channel_maybe_set_handle_type (self, u, valid);
-
- u = tp_asv_get_uint32 (asv, "TargetHandle", &valid);
- _tp_channel_maybe_set_handle (self, u, valid);
-
- _tp_channel_maybe_set_identifier (self,
- tp_asv_get_string (asv, "TargetID"));
-
- u = tp_asv_get_uint32 (asv, "InitiatorHandle", &valid);
-
- if (valid)
- {
- g_hash_table_insert (self->priv->channel_properties,
- g_strdup (TP_PROP_CHANNEL_INITIATOR_HANDLE),
- tp_g_value_slice_new_uint (u));
- }
-
- s = tp_asv_get_string (asv, "InitiatorID");
-
- if (s != NULL)
- {
- g_hash_table_insert (self->priv->channel_properties,
- g_strdup (TP_PROP_CHANNEL_INITIATOR_ID),
- tp_g_value_slice_new_string (s));
- }
-
- b = tp_asv_get_boolean (asv, "Requested", &valid);
-
- if (valid)
- {
- g_hash_table_insert (self->priv->channel_properties,
- g_strdup (TP_PROP_CHANNEL_REQUESTED),
- tp_g_value_slice_new_boolean (b));
- }
+ TpChannel *self = user_data;
+ TpConnection *connection = (TpConnection *) object;
+ GError *error = NULL;
- g_object_notify ((GObject *) self, "channel-type");
- g_object_notify ((GObject *) self, "interfaces");
- g_object_notify ((GObject *) self, "handle-type");
- g_object_notify ((GObject *) self, "handle");
- g_object_notify ((GObject *) self, "identifier");
- }
- else
+ if (!tp_connection_upgrade_contacts_finish (connection, result, NULL, &error))
{
- /* GetAll failed; it's not mandatory, so continue with the separate
- * (spec 0.16.x-style) method calls */
- DEBUG ("GetAll failed, falling back to 0.16 API:"
- " %s", error->message);
+ _tp_channel_abort_introspection (self, "Upgrading contacts failed",
+ error);
+ g_clear_error (&error);
+ return;
}
- /* Either way, we'll fill in any other gaps in the properties, then
- * continue with any other introspection */
_tp_channel_continue_introspection (self);
}
-
static void
-_tp_channel_get_properties (TpChannel *self)
+_tp_channel_create_contacts (TpChannel *self)
{
- /* skip it if we already have all the details we want */
- if (self->priv->handle_type != TP_UNKNOWN_HANDLE_TYPE
- && (self->priv->handle != 0 ||
- self->priv->handle_type == TP_HANDLE_TYPE_NONE)
- && self->priv->channel_type != 0
- /* currently we always re-fetch the interfaces later, so don't check:
- && tp_asv_get_boxed (self->priv->channel_properties,
- TP_PROP_CHANNEL_INTERFACES, G_TYPE_STRV) != NULL
- */
- && tp_asv_get_string (self->priv->channel_properties,
- TP_PROP_CHANNEL_TARGET_ID) != NULL
- && tp_asv_get_string (self->priv->channel_properties,
- TP_PROP_CHANNEL_INITIATOR_ID) != NULL
- )
- {
- gboolean valid;
+ GPtrArray *contacts;
+ TpHandle initiator_handle;
+ const gchar *initiator_id;
- tp_asv_get_uint32 (self->priv->channel_properties,
- TP_PROP_CHANNEL_INITIATOR_HANDLE, &valid);
+ g_assert (self->priv->target_contact == NULL);
+ g_assert (self->priv->initiator_contact == NULL);
- if (!valid)
- goto missing;
+ contacts = g_ptr_array_new ();
- tp_asv_get_boolean (self->priv->channel_properties,
- TP_PROP_CHANNEL_REQUESTED, &valid);
-
- if (!valid)
- goto missing;
+ /* Create target contact */
+ if (self->priv->handle_type == TP_HANDLE_TYPE_CONTACT)
+ {
+ if (self->priv->handle == 0 || self->priv->identifier == NULL)
+ {
+ GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
+ "Channel with HandleType CONTACT must have a valid handle "
+ "and identifier" };
+ _tp_channel_abort_introspection (self, e.message, &e);
+ return;
+ }
- _tp_channel_continue_introspection (self);
- return;
+ self->priv->target_contact = tp_client_factory_ensure_contact (
+ tp_proxy_get_factory (self->priv->connection), self->priv->connection,
+ self->priv->handle, self->priv->identifier);
+ g_ptr_array_add (contacts, self->priv->target_contact);
}
-missing:
- tp_cli_dbus_properties_call_get_all (self, -1,
- TP_IFACE_CHANNEL, _tp_channel_got_properties, NULL, NULL, NULL);
-}
-
-static void
-connection_prepared_cb (GObject *object,
- GAsyncResult *res,
- gpointer user_data)
-{
- TpChannel *self = user_data;
- GError *error = NULL;
+ /* Create initiator contact */
+ initiator_handle = tp_asv_get_uint32 (self->priv->channel_properties,
+ TP_PROP_CHANNEL_INITIATOR_HANDLE, NULL);
+ initiator_id = tp_asv_get_string (self->priv->channel_properties,
+ TP_PROP_CHANNEL_INITIATOR_ID);
- if (!tp_proxy_prepare_finish (object, res, &error))
+ if (initiator_handle != 0 && !tp_str_empty (initiator_id))
{
- _tp_channel_abort_introspection (self, "Preparing connection failed", error);
- g_clear_error (&error);
+ self->priv->initiator_contact = tp_client_factory_ensure_contact (
+ tp_proxy_get_factory (self->priv->connection), self->priv->connection,
+ initiator_handle, initiator_id);
+ g_ptr_array_add (contacts, self->priv->initiator_contact);
}
- else
+ else if ((initiator_handle == 0) != (tp_str_empty (initiator_id)))
{
- _tp_channel_continue_introspection (self);
+ GError e = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
+ "Channel must have both initiator handle and identifier, "
+ "or none of them" };
+ _tp_channel_abort_introspection (self, e.message, &e);
+ return;
}
- g_object_unref (self);
-}
+ /* Prepare initiator and target contacts */
+ if (contacts->len > 0)
+ {
+ GArray *features;
-static void
-_tp_channel_prepare_connection (TpChannel *self)
-{
- /* Skip if connection is already prepared */
- if (tp_proxy_is_prepared (self->priv->connection, TP_CONNECTION_FEATURE_CORE))
+ features = tp_client_factory_dup_contact_features (
+ tp_proxy_get_factory (self->priv->connection),
+ self->priv->connection);
+
+ tp_connection_upgrade_contacts_async (self->priv->connection,
+ contacts->len, (TpContact **) contacts->pdata,
+ (GQuark *) features->data,
+ upgrade_contacts_cb, self);
+
+ g_array_unref (features);
+ }
+ else
{
_tp_channel_continue_introspection (self);
- return;
}
- tp_proxy_prepare_async (self->priv->connection, NULL,
- connection_prepared_cb, g_object_ref (self));
-}
-
-static void
-_tp_channel_create_contacts (TpChannel *self)
-{
- _tp_channel_contacts_init (self);
- _tp_channel_continue_introspection (self);
+ g_ptr_array_unref (contacts);
}
static void
@@ -1306,34 +1066,9 @@ tp_channel_constructor (GType type,
g_queue_push_tail (self->priv->introspect_needed,
_tp_channel_get_properties);
- /* this does nothing if we already know the handle */
- g_queue_push_tail (self->priv->introspect_needed,
- _tp_channel_get_handle);
-
- /* this does nothing if we already know the identifier */
- g_queue_push_tail (self->priv->introspect_needed,
- _tp_channel_get_identifier);
-
- /* this does nothing if we already know the channel type */
- g_queue_push_tail (self->priv->introspect_needed,
- _tp_channel_get_channel_type);
-
g_queue_push_tail (self->priv->introspect_needed,
_tp_channel_create_contacts);
- /* This makes a call unless (a) we already know the Interfaces by now, and
- * (b) priv->exists is TRUE (i.e. either GetAll, GetHandle or GetChannelType
- * has succeeded).
- *
- * This means the channel never becomes ready until we re-enter the
- * main loop, and we always verify that the channel does actually exist. */
- g_queue_push_tail (self->priv->introspect_needed,
- _tp_channel_get_interfaces);
-
- /* this needs doing *after* GetInterfaces so we know whether we're a group */
- g_queue_push_tail (self->priv->introspect_needed,
- _tp_channel_get_group_properties);
-
_tp_channel_continue_introspection (self);
return (GObject *) self;
@@ -1374,11 +1109,13 @@ tp_channel_dispose (GObject *object)
g_clear_object (&self->priv->target_contact);
g_clear_object (&self->priv->initiator_contact);
g_clear_object (&self->priv->group_self_contact);
- tp_clear_pointer (&self->priv->group_members_contacts,
+ tp_clear_pointer (&self->priv->group_members,
g_hash_table_unref);
- tp_clear_pointer (&self->priv->group_local_pending_contacts,
+ tp_clear_pointer (&self->priv->group_local_pending,
g_hash_table_unref);
- tp_clear_pointer (&self->priv->group_remote_pending_contacts,
+ tp_clear_pointer (&self->priv->group_local_pending_info,
+ g_hash_table_unref);
+ tp_clear_pointer (&self->priv->group_remote_pending,
g_hash_table_unref);
tp_clear_pointer (&self->priv->group_contact_owners,
g_hash_table_unref);
@@ -1395,11 +1132,6 @@ tp_channel_finalize (GObject *object)
DEBUG ("%p", self);
g_clear_error (&self->priv->group_remove_error);
- tp_clear_pointer (&self->priv->group_local_pending_info, g_hash_table_unref);
- tp_clear_pointer (&self->priv->group_members, tp_intset_destroy);
- tp_clear_pointer (&self->priv->group_local_pending, tp_intset_destroy);
- tp_clear_pointer (&self->priv->group_remote_pending, tp_intset_destroy);
- tp_clear_pointer (&self->priv->group_handle_owners, g_hash_table_unref);
tp_clear_pointer (&self->priv->introspect_needed, g_queue_free);
tp_clear_pointer (&self->priv->chat_states, g_hash_table_unref);
tp_clear_pointer (&self->priv->channel_properties, g_hash_table_unref);
@@ -1434,7 +1166,7 @@ got_password_flags_cb (TpChannel *self,
}
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
static void
@@ -1480,7 +1212,6 @@ tp_channel_prepare_password_async (TpProxy *proxy,
enum {
FEAT_CORE,
FEAT_GROUP,
- FEAT_CONTACTS,
FEAT_CHAT_STATES,
FEAT_PASSWORD,
N_FEAT
@@ -1500,10 +1231,8 @@ tp_channel_list_features (TpProxyClass *cls G_GNUC_UNUSED)
features[FEAT_CORE].core = TRUE;
features[FEAT_GROUP].name = TP_CHANNEL_FEATURE_GROUP;
-
- features[FEAT_CONTACTS].name = TP_CHANNEL_FEATURE_CONTACTS;
- features[FEAT_CONTACTS].prepare_async =
- _tp_channel_contacts_prepare_async;
+ features[FEAT_GROUP].prepare_async =
+ _tp_channel_group_prepare_async;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
features[FEAT_CHAT_STATES].name = TP_CHANNEL_FEATURE_CHAT_STATES;
@@ -1531,7 +1260,6 @@ tp_channel_class_init (TpChannelClass *klass)
GParamSpec *param_spec;
TpProxyClass *proxy_class = (TpProxyClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
- GType au_type = dbus_g_type_get_collection ("GArray", G_TYPE_UINT);
tp_channel_init_known_interfaces ();
@@ -1601,33 +1329,6 @@ tp_channel_class_init (TpChannelClass *klass)
param_spec);
/**
- * TpChannel:channel-ready:
- *
- * Initially %FALSE; changes to %TRUE when tp_proxy_prepare_async() has
- * finished preparing %TP_CHANNEL_FEATURE_CORE, and if the channel is a
- * group, %TP_CHANNEL_FEATURE_GROUP.
- *
- * This is a less general form of tp_proxy_is_prepared(), which should be
- * used in new code.
- *
- * One important difference is that after #TpProxy::invalidated is
- * signalled, #TpChannel:channel-ready keeps its current value - which might
- * be %TRUE, if the channel was successfully prepared before it became
- * invalidated - but tp_proxy_is_prepared() returns %FALSE for all features.
- *
- * Change notification is via notify::channel-ready.
- *
- * Deprecated: 0.17.6: use tp_proxy_is_prepared() with
- * %TP_CHANNEL_FEATURE_CORE for checks, or tp_proxy_prepare_async() for
- * notification
- */
- param_spec = g_param_spec_boolean ("channel-ready", "Channel ready?",
- "Initially FALSE; changes to TRUE when introspection finishes", FALSE,
- G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED);
- g_object_class_install_property (object_class, PROP_CHANNEL_READY,
- param_spec);
-
- /**
* TpChannel:connection:
*
* The #TpConnection to which this #TpChannel belongs. Used for e.g.
@@ -1640,26 +1341,6 @@ tp_channel_class_init (TpChannelClass *klass)
param_spec);
/**
- * TpChannel:group-self-handle:
- *
- * If this channel is a group and %TP_CHANNEL_FEATURE_GROUP has been
- * prepared, and the user is a member of the group, the #TpHandle
- * representing them in this group.
- *
- * Otherwise, the result may be either a handle representing the user, or 0.
- *
- * Change notification is via notify::group-self-handle.
- *
- * Since: 0.7.12
- * Deprecated: Use #TpChannel:group-self-contact instead.
- */
- param_spec = g_param_spec_uint ("group-self-handle", "Group.SelfHandle",
- "Undefined if not a group", 0, G_MAXUINT32, 0,
- G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_GROUP_SELF_HANDLE,
- param_spec);
-
- /**
* TpChannel:group-flags:
*
* If the %TP_CHANNEL_FEATURE_GROUP feature has been prepared successfully,
@@ -1671,7 +1352,7 @@ tp_channel_class_init (TpChannelClass *klass)
* Change notification is via notify::group-flags or
* TpChannel::group-flags-changed.
*
- * Since: 0.7.12
+ * Since: 0.UNRELEASED
*/
param_spec = g_param_spec_uint ("group-flags", "Group.GroupFlags",
"0 if not a group", 0, G_MAXUINT32, 0,
@@ -1685,7 +1366,7 @@ tp_channel_class_init (TpChannelClass *klass)
* %TRUE if this channel was created in response to a local request, such
* as a call to tp_account_channel_request_create_channel_async(). %FALSE
* if this channel was initiated by a remote contact
- * (the #TpChannel:initiator-handle), or if it appeared as a side-effect
+ * (the #TpChannel:initiator-contact), or if it appeared as a side-effect
* of some other action.
*
* For instance, this is %FALSE on incoming calls and file transfers,
@@ -1707,59 +1388,6 @@ tp_channel_class_init (TpChannelClass *klass)
param_spec);
/**
- * TpChannel:initiator-handle:
- *
- * The %TP_HANDLE_TYPE_CONTACT #TpHandle of the initiator of this
- * channel, or 0 if there is no particular initiator.
- *
- * If the channel was initiated by a remote contact, this handle represents
- * that contact, and #TpChannel:requested will be %FALSE. For instance,
- * for an incoming call this property indicates the caller, and for a
- * chatroom invitation this property indicates who sent the invitation.
- *
- * If the channel was requested by the local user, #TpChannel:requested
- * will be %TRUE, and this property may be the #TpChannel:group-self-handle
- * or #TpConnection:self-handle.
- *
- * If the channel appeared for some other reason (for instance as a
- * side-effect of connecting to the server), this property may be 0.
- *
- * This is not guaranteed to be set until tp_proxy_prepare_async() has
- * finished preparing %TP_CHANNEL_FEATURE_CORE; until then, it may be 0.
- *
- * Since: 0.11.15
- * Deprecated: Use #TpChannel:initiator-contact instead.
- */
- param_spec = g_param_spec_uint ("initiator-handle", "TpHandle",
- "The handle of the initiator of the channel",
- 0, G_MAXUINT32, 0,
- G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_INITIATOR_HANDLE,
- param_spec);
-
- /**
- * TpChannel:initiator-identifier:
- *
- * If #TpChannel:initiator-handle is 0, this will always be "".
- * Otherwise, this will be the #TpContact:identifier of the contact
- * with that handle.
- *
- * This is not guaranteed to be set until tp_proxy_prepare_async() has
- * finished preparing %TP_CHANNEL_FEATURE_CORE; until then, it may be
- * the empty string.
- *
- * Since: 0.11.15
- * Deprecated: Use #TpChannel:initiator-contact instead.
- */
- param_spec = g_param_spec_string ("initiator-identifier",
- "Initiator identifier",
- "The identifier of the initiator of the channel",
- "",
- G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_INITIATOR_IDENTIFIER,
- param_spec);
-
- /**
* TpChannel:password-needed:
*
* If %TRUE, tp_channel_provide_password_async() has to be called
@@ -1800,66 +1428,6 @@ tp_channel_class_init (TpChannelClass *klass)
G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
/**
- * TpChannel::group-members-changed: (skip)
- * @self: a channel
- * @message: an optional textual message
- * @added: a #GArray of #guint containing the full members added
- * @removed: a #GArray of #guint containing the members (full,
- * local-pending or remote-pending) removed
- * @local_pending: a #GArray of #guint containing the local-pending
- * members added
- * @remote_pending: a #GArray of #guint containing the remote-pending
- * members added
- * @actor: the #TpHandle of the contact causing the change, or 0
- * @reason: the reason for the change as a #TpChannelGroupChangeReason
- *
- * Emitted when the group members change in a Group channel that is ready.
- *
- * Since: 0.7.12
- * Deprecated: Use #TpChannel::group-contacts-changed instead.
- */
- signals[SIGNAL_GROUP_MEMBERS_CHANGED] = g_signal_new (
- "group-members-changed", G_OBJECT_CLASS_TYPE (klass),
- G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
- 0,
- NULL, NULL, NULL,
- G_TYPE_NONE, 7,
- G_TYPE_STRING, au_type, au_type, au_type, au_type, G_TYPE_UINT,
- G_TYPE_UINT);
-
- /**
- * TpChannel::group-members-changed-detailed:
- * @self: a channel
- * @added: (type GLib.Array) (element-type uint): a #GArray of #guint
- * containing the full members added
- * @removed: (type GLib.Array) (element-type uint): a #GArray of #guint
- * containing the members (full, local-pending or remote-pending) removed
- * @local_pending: (type GLib.Array) (element-type uint): a #GArray of
- * #guint containing the local-pending members added
- * @remote_pending: (type GLib.Array) (element-type uint): a #GArray of
- * #guint containing the remote-pending members added
- * @details: (type GLib.HashTable) (element-type utf8 GObject.Value):
- * a #GHashTable mapping (gchar *) to #GValue containing details
- * about the change, as described in the specification of the
- * MembersChangedDetailed signal.
- *
- * Emitted when the group members change in a Group channel that is ready.
- * Contains a superset of the information in the
- * TpChannel::group-members-changed signal, and is emitted at the same time;
- * applications can connect to this signal and ignore the other.
- *
- * Since: 0.7.21
- * Deprecated: Use #TpChannel::group-contacts-changed instead.
- */
- signals[SIGNAL_GROUP_MEMBERS_CHANGED_DETAILED] = g_signal_new (
- "group-members-changed-detailed", G_OBJECT_CLASS_TYPE (klass),
- G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
- 0,
- NULL, NULL, NULL,
- G_TYPE_NONE, 5,
- au_type, au_type, au_type, au_type, TP_HASH_TYPE_STRING_VARIANT_MAP);
-
- /**
* TpChannel::chat-state-changed:
* @self: a channel
* @contact: a contact handle for the local user or another contact
@@ -1887,9 +1455,12 @@ tp_channel_class_init (TpChannelClass *klass)
* other channels without a single remote contact, %NULL.
*
* This is not guaranteed to be set until tp_proxy_prepare_async() has
- * finished preparing %TP_CHANNEL_FEATURE_CONTACTS; until then, it may be
+ * finished preparing %TP_CHANNEL_FEATURE_CORE; until then, it may be
* %NULL.
*
+ * The #TpContact object is guaranteed to have all of the features previously
+ * passed to tp_client_factory_add_contact_features() prepared.
+ *
* Since: 0.15.6
*/
param_spec = g_param_spec_object ("target-contact", "Target Contact",
@@ -1917,9 +1488,12 @@ tp_channel_class_init (TpChannelClass *klass)
* side-effect of connecting to the server), this property may be %NULL.
*
* This is not guaranteed to be set until tp_proxy_prepare_async() has
- * finished preparing %TP_CHANNEL_FEATURE_CONTACTS; until then, it may be
+ * finished preparing %TP_CHANNEL_FEATURE_CORE; until then, it may be
* %NULL.
*
+ * The #TpContact object is guaranteed to have all of the features previously
+ * passed to tp_client_factory_add_contact_features() prepared.
+ *
* Since: 0.15.6
*/
param_spec = g_param_spec_object ("initiator-contact", "Initiator Contact",
@@ -1931,7 +1505,7 @@ tp_channel_class_init (TpChannelClass *klass)
/**
* TpChannel:group-self-contact:
*
- * If this channel is a group and %TP_CHANNEL_FEATURE_CONTACTS has been
+ * If this channel is a group and %TP_CHANNEL_FEATURE_GROUP has been
* prepared, and the user is a member of the group, the #TpContact
* representing them in this group.
*
@@ -1940,7 +1514,7 @@ tp_channel_class_init (TpChannelClass *klass)
*
* Change notification is via notify::group-self-contact.
*
- * Since: 0.15.6
+ * Since: 0.UNRELEASED
*/
param_spec = g_param_spec_object ("group-self-contact", "Group.SelfHandle",
"Undefined if not a group", TP_TYPE_CONTACT,
@@ -1949,7 +1523,7 @@ tp_channel_class_init (TpChannelClass *klass)
param_spec);
/**
- * TpChannel::group-contacts-changed:
+ * TpChannel::group-members-changed:
* @self: a channel
* @added: (type GLib.PtrArray) (element-type TelepathyGLib.Contact):
* a #GPtrArray of #TpContact containing the full members added
@@ -1964,18 +1538,18 @@ tp_channel_class_init (TpChannelClass *klass)
* @details: (type GLib.HashTable) (element-type utf8 GObject.Value):
* a #GHashTable mapping (gchar *) to #GValue containing details
* about the change, as described in the specification of the
- * MembersChangedDetailed signal.
+ * MembersChanged signal.
*
* Emitted when the group members change in a Group channel.
*
* This is not guaranteed to be emitted until tp_proxy_prepare_async() has
- * finished preparing %TP_CHANNEL_FEATURE_CONTACTS; until then, it may be
+ * finished preparing %TP_CHANNEL_FEATURE_GROUP; until then, it may be
* omitted.
*
- * Since: 0.15.6
+ * Since: 0.UNRELEASED
*/
- signals[SIGNAL_GROUP_CONTACTS_CHANGED] = g_signal_new (
- "group-contacts-changed", G_OBJECT_CLASS_TYPE (klass),
+ signals[SIGNAL_GROUP_MEMBERS_CHANGED] = g_signal_new (
+ "group-members-changed", G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
0,
NULL, NULL, NULL,
@@ -2012,7 +1586,7 @@ tp_channel_new_from_properties (TpConnection *conn,
}
TpChannel *
-_tp_channel_new_with_factory (TpSimpleClientFactory *factory,
+_tp_channel_new_with_factory (TpClientFactory *factory,
TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
@@ -2122,194 +1696,6 @@ finally:
return ret;
}
-/**
- * tp_channel_run_until_ready: (skip)
- * @self: a channel
- * @error: if not %NULL and %FALSE is returned, used to raise an error
- * @loop: if not %NULL, a #GMainLoop is placed here while it is being run
- * (so calling code can call g_main_loop_quit() to abort), and %NULL is
- * placed here after the loop has been run
- *
- * If @self is ready for use (introspection has finished, etc.), return
- * immediately. Otherwise, re-enter the main loop until the channel either
- * becomes invalid or becomes ready for use, or until the main loop stored
- * via @loop is cancelled.
- *
- * Returns: %TRUE if the channel has been introspected and is ready for use,
- * %FALSE if the channel has become invalid.
- *
- * Since: 0.7.1
- * Deprecated: 0.11.0: Use tp_proxy_prepare_async() and re-enter the main
- * loop yourself, or restructure your program in such a way as to avoid
- * re-entering the main loop.
- */
-gboolean
-tp_channel_run_until_ready (TpChannel *self,
- GError **error,
- GMainLoop **loop)
-{
- TpProxy *as_proxy = (TpProxy *) self;
- GMainLoop *my_loop;
- gulong invalidated_id, ready_id;
-
- g_return_val_if_fail (TP_IS_CHANNEL (self), FALSE);
-
- if (as_proxy->invalidated)
- goto raise_invalidated;
-
- if (self->priv->ready)
- return TRUE;
-
- my_loop = g_main_loop_new (NULL, FALSE);
- invalidated_id = g_signal_connect_swapped (self, "invalidated",
- G_CALLBACK (g_main_loop_quit), my_loop);
- ready_id = g_signal_connect_swapped (self, "notify::channel-ready",
- G_CALLBACK (g_main_loop_quit), my_loop);
-
- if (loop != NULL)
- *loop = my_loop;
-
- g_main_loop_run (my_loop);
-
- if (loop != NULL)
- *loop = NULL;
-
- g_signal_handler_disconnect (self, invalidated_id);
- g_signal_handler_disconnect (self, ready_id);
- g_main_loop_unref (my_loop);
-
- if (as_proxy->invalidated)
- goto raise_invalidated;
-
- g_assert (self->priv->ready);
- return TRUE;
-
-raise_invalidated:
- if (error != NULL)
- {
- g_return_val_if_fail (*error == NULL, FALSE);
- *error = g_error_copy (as_proxy->invalidated);
- }
-
- return FALSE;
-}
-
-typedef struct {
- TpChannelWhenReadyCb callback;
- gpointer user_data;
- gulong invalidated_id;
- gulong ready_id;
-} CallWhenReadyContext;
-
-static void
-cwr_invalidated (TpChannel *self,
- guint domain,
- gint code,
- gchar *message,
- gpointer user_data)
-{
- CallWhenReadyContext *ctx = user_data;
- GError e = { domain, code, message };
-
- DEBUG ("enter");
-
- g_assert (ctx->callback != NULL);
-
- ctx->callback (self, &e, ctx->user_data);
-
- g_signal_handler_disconnect (self, ctx->invalidated_id);
- g_signal_handler_disconnect (self, ctx->ready_id);
-
- ctx->callback = NULL; /* poison it to detect errors */
- g_slice_free (CallWhenReadyContext, ctx);
-}
-
-static void
-cwr_ready (TpChannel *self,
- GParamSpec *unused G_GNUC_UNUSED,
- gpointer user_data)
-{
- CallWhenReadyContext *ctx = user_data;
-
- DEBUG ("enter");
-
- g_assert (ctx->callback != NULL);
-
- ctx->callback (self, NULL, ctx->user_data);
-
- g_signal_handler_disconnect (self, ctx->invalidated_id);
- g_signal_handler_disconnect (self, ctx->ready_id);
-
- ctx->callback = NULL; /* poison it to detect errors */
- g_slice_free (CallWhenReadyContext, ctx);
-}
-
-/**
- * TpChannelWhenReadyCb:
- * @channel: the channel (which may be in the middle of being disposed,
- * if error is non-%NULL, error->domain is TP_DBUS_ERRORS and error->code is
- * TP_DBUS_ERROR_PROXY_UNREFERENCED)
- * @error: %NULL if the channel is ready for use, or the error with which
- * it was invalidated if it is now invalid
- * @user_data: whatever was passed to tp_channel_call_when_ready()
- *
- * Signature of a callback passed to tp_channel_call_when_ready(), which
- * will be called exactly once, when the channel becomes ready or
- * invalid (whichever happens first)
- *
- * Deprecated: 0.17.6
- */
-
-/**
- * tp_channel_call_when_ready: (skip)
- * @self: a channel
- * @callback: called when the channel becomes ready or invalidated, whichever
- * happens first
- * @user_data: arbitrary user-supplied data passed to the callback
- *
- * If @self is ready for use or has been invalidated, call @callback
- * immediately, then return. Otherwise, arrange
- * for @callback to be called when @self either becomes ready for use
- * or becomes invalid.
- *
- * This is a less general form of tp_proxy_prepare_async(), which should be
- * used in new code. (One important difference is that this function can call
- * @callback before it has returned, whereas tp_proxy_prepare_async() always
- * calls @callback from the main loop.)
- *
- * Since: 0.7.7
- * Deprecated: 0.17.6: Use tp_proxy_prepare_async()
- */
-void
-tp_channel_call_when_ready (TpChannel *self,
- TpChannelWhenReadyCb callback,
- gpointer user_data)
-{
- TpProxy *as_proxy = (TpProxy *) self;
-
- g_return_if_fail (TP_IS_CHANNEL (self));
- g_return_if_fail (callback != NULL);
-
- if (self->priv->ready || as_proxy->invalidated != NULL)
- {
- DEBUG ("already ready or invalidated");
- callback (self, as_proxy->invalidated, user_data);
- }
- else
- {
- CallWhenReadyContext *ctx = g_slice_new (CallWhenReadyContext);
-
- DEBUG ("arranging callback later");
-
- ctx->callback = callback;
- ctx->user_data = user_data;
- ctx->invalidated_id = g_signal_connect (self, "invalidated",
- G_CALLBACK (cwr_invalidated), ctx);
- ctx->ready_id = g_signal_connect (self, "notify::channel-ready",
- G_CALLBACK (cwr_ready), ctx);
- }
-}
-
static gpointer
tp_channel_once (gpointer data G_GNUC_UNUSED)
{
@@ -2362,46 +1748,6 @@ tp_channel_get_requested (TpChannel *self)
TP_PROP_CHANNEL_REQUESTED, NULL);
}
-/**
- * tp_channel_get_initiator_handle: (skip)
- * @self: a #TpChannel
- *
- * Return the #TpChannel:initiator-handle property
- *
- * Returns: the value of #TpChannel:initiator-handle
- *
- * Since: 0.11.15
- * Deprecated: New code should use tp_channel_get_initiator_contact() instead.
- */
-TpHandle
-tp_channel_get_initiator_handle (TpChannel *self)
-{
- return tp_asv_get_uint32 (self->priv->channel_properties,
- TP_PROP_CHANNEL_INITIATOR_HANDLE, NULL);
-}
-
-/**
- * tp_channel_get_initiator_identifier: (skip)
- * @self: a #TpChannel
- *
- * Return the #TpChannel:initiator-identifier property
- *
- * Returns: the value of #TpChannel:initiator-identifier
- *
- * Since: 0.11.15
- * Deprecated: New code should use tp_channel_get_initiator_contact() instead.
- */
-const gchar *
-tp_channel_get_initiator_identifier (TpChannel *self)
-{
- const gchar *id;
-
- id = tp_asv_get_string (self->priv->channel_properties,
- TP_PROP_CHANNEL_INITIATOR_ID);
-
- return id != NULL ? id : "";
-}
-
/* tp_cli callbacks can potentially be called in a re-entrant way,
* so we can't necessarily complete @result without using an idle. */
static void
@@ -2434,10 +1780,10 @@ channel_join_cb (TpChannel *self,
* You can then call tp_channel_join_finish() to get the result of
* the operation.
*
- * Note that unlike tp_channel_leave_async(), %TP_CHANNEL_FEATURE_GROUP feature
- * must be prepared before calling this function.
+ * %TP_CHANNEL_FEATURE_GROUP feature must be prepared before calling this
+ * function.
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
void
tp_channel_join_async (TpChannel *self,
@@ -2446,6 +1792,7 @@ tp_channel_join_async (TpChannel *self,
gpointer user_data)
{
GSimpleAsyncResult *result;
+ TpHandle self_handle;
GArray *array;
g_return_if_fail (TP_IS_CHANNEL (self));
@@ -2455,7 +1802,8 @@ tp_channel_join_async (TpChannel *self,
user_data, tp_channel_join_async);
array = g_array_sized_new (FALSE, FALSE, sizeof (TpHandle), 1);
- g_array_append_val (array, self->priv->group_self_handle);
+ self_handle = tp_contact_get_handle (self->priv->group_self_contact);
+ g_array_append_val (array, self_handle);
tp_cli_channel_interface_group_call_add_members (self, -1, array, message,
channel_join_cb, result, g_object_unref, NULL);
@@ -2473,7 +1821,7 @@ tp_channel_join_async (TpChannel *self,
*
* Returns: %TRUE if the channel was successfully joined; %FALSE otherwise
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
gboolean
tp_channel_join_finish (TpChannel *self,
@@ -2511,9 +1859,6 @@ channel_close_cb (TpChannel *channel,
g_object_unref (result);
}
-/* This is only called from the main loop, as a result of group_prepared_cb
- * having the same property, so it can complete LeaveCtx.result without
- * an idle. */
static void
channel_remove_self_cb (TpChannel *channel,
const GError *error,
@@ -2537,82 +1882,6 @@ channel_remove_self_cb (TpChannel *channel,
g_object_unref (result);
}
-typedef struct
-{
- GSimpleAsyncResult *result;
- gchar *message;
- TpChannelGroupChangeReason reason;
-} LeaveCtx;
-
-/* Takes the reference on @result */
-static LeaveCtx *
-leave_ctx_new (GSimpleAsyncResult *result,
- const gchar *message,
- TpChannelGroupChangeReason reason)
-{
- LeaveCtx *ctx = g_slice_new (LeaveCtx);
-
- ctx->result = result;
- ctx->message = message != NULL ? g_strdup (message) : g_strdup ("");
- ctx->reason = reason;
-
- return ctx;
-}
-
-static void
-leave_ctx_free (LeaveCtx *ctx)
-{
- g_object_unref (ctx->result);
- g_free (ctx->message);
-
- g_slice_free (LeaveCtx, ctx);
-}
-
-/* This is only called from the main loop, so it can safely complete
- * LeaveCtx.result without an idle. */
-static void
-group_prepared_cb (GObject *source,
- GAsyncResult *res,
- gpointer user_data)
-{
- LeaveCtx *ctx = user_data;
- TpChannel *self = (TpChannel *) source;
- GError *error = NULL;
- GArray *handles;
-
- if (!tp_proxy_prepare_finish (source, res, &error))
- {
- DEBUG ("Failed to prepare Group feature; fallback to Close(): %s",
- error->message);
-
- g_error_free (error);
- goto call_close;
- }
-
- if (self->priv->group_self_handle == 0)
- {
- DEBUG ("We are not in the channel, fallback to Close()");
- goto call_close;
- }
-
- handles = g_array_sized_new (FALSE, FALSE, sizeof (TpHandle), 1);
- g_array_append_val (handles, self->priv->group_self_handle);
-
- tp_cli_channel_interface_group_call_remove_members_with_reason (
- self, -1, handles, ctx->message, ctx->reason,
- channel_remove_self_cb, g_object_ref (ctx->result), NULL, NULL);
-
- g_array_unref (handles);
- leave_ctx_free (ctx);
- return;
-
-call_close:
- tp_cli_channel_call_close (self, -1, channel_close_cb,
- g_object_ref (ctx->result), NULL, NULL);
-
- leave_ctx_free (ctx);
-}
-
/**
* tp_channel_leave_async:
* @self: a #TpChannel
@@ -2622,18 +1891,13 @@ call_close:
* @user_data: data to pass to @callback
*
* Leave channel @self with @reason as reason and @message as leave message.
- * If @self doesn't implement #TP_IFACE_QUARK_CHANNEL_INTERFACE_GROUP or if
- * for any reason we can't properly leave the channel, we close it.
+ * If %TP_CHANNEL_FEATURE_GROUP feature is not prepared, we close it.
*
* When we left the channel, @callback will be called.
* You can then call tp_channel_leave_finish() to get the result of
* the operation.
*
- * Note that unlike tp_channel_join_async(), %TP_CHANNEL_FEATURE_GROUP feature
- * does not have to be prepared and will be prepared for you. But this is a
- * deprecated behaviour.
- *
- * Since: 0.13.10
+ * Since: 0.UNRELEASED
*/
void
tp_channel_leave_async (TpChannel *self,
@@ -2643,30 +1907,33 @@ tp_channel_leave_async (TpChannel *self,
gpointer user_data)
{
GSimpleAsyncResult *result;
- GQuark features[] = { TP_CHANNEL_FEATURE_GROUP, 0 };
- LeaveCtx *ctx;
+ TpHandle self_handle;
+ GArray *handles;
g_return_if_fail (TP_IS_CHANNEL (self));
result = g_simple_async_result_new (G_OBJECT (self), callback,
user_data, tp_channel_leave_async);
- if (tp_proxy_is_prepared (self, TP_CHANNEL_FEATURE_CORE) &&
- !tp_proxy_has_interface_by_id (self,
- TP_IFACE_QUARK_CHANNEL_INTERFACE_GROUP))
+ if (!tp_proxy_is_prepared (self, TP_CHANNEL_FEATURE_GROUP))
{
- DEBUG ("Channel doesn't implement Group; fallback to Close()");
+ DEBUG ("TP_CHANNEL_FEATURE_GROUP is not prepared; "
+ "fallback to Close()");
tp_cli_channel_call_close (self, -1, channel_close_cb, result,
NULL, NULL);
return;
}
- /* We need to prepare TP_CHANNEL_FEATURE_GROUP to get
- * tp_channel_group_get_self_handle() working */
- ctx = leave_ctx_new (result, message, reason);
+ handles = g_array_sized_new (FALSE, FALSE, sizeof (TpHandle), 1);
+ self_handle = tp_contact_get_handle (self->priv->group_self_contact);
+ g_array_append_val (handles, self_handle);
+
+ tp_cli_channel_interface_group_call_remove_members (
+ self, -1, handles, message, reason,
+ channel_remove_self_cb, result, NULL, NULL);
- tp_proxy_prepare_async (self, features, group_prepared_cb, ctx);
+ g_array_unref (handles);
}
/**
@@ -2764,7 +2031,7 @@ channel_destroy_cb (TpChannel *channel,
return;
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -2889,7 +2156,7 @@ provide_password_cb (TpChannel *self,
TP_ERROR_AUTHENTICATION_FAILED, "Password was not correct");
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
/**
diff --git a/telepathy-glib/channel.h b/telepathy-glib/channel.h
index 87ea77322..80f97601c 100644
--- a/telepathy-glib/channel.h
+++ b/telepathy-glib/channel.h
@@ -82,23 +82,6 @@ TpChannel *tp_channel_new_from_properties (TpConnection *conn,
const gchar *object_path, const GHashTable *immutable_properties,
GError **error) G_GNUC_WARN_UNUSED_RESULT;
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_18
-gboolean tp_channel_run_until_ready (TpChannel *self, GError **error,
- GMainLoop **loop);
-
-typedef void (*TpChannelWhenReadyCb) (TpChannel *channel, const GError *error,
- gpointer user_data);
-
-_TP_DEPRECATED_IN_0_18_FOR (tp_proxy_prepare_async)
-void tp_channel_call_when_ready (TpChannel *self,
- TpChannelWhenReadyCb callback,
- gpointer user_data);
-
-_TP_DEPRECATED_IN_0_18_FOR (tp_proxy_is_prepared)
-gboolean tp_channel_is_ready (TpChannel *self);
-#endif
-
void tp_channel_init_known_interfaces (void);
TpConnection *tp_channel_borrow_connection (TpChannel *self);
@@ -144,78 +127,46 @@ GQuark tp_channel_get_channel_type_id (TpChannel *self);
TpHandle tp_channel_get_handle (TpChannel *self, TpHandleType *handle_type);
const gchar *tp_channel_get_identifier (TpChannel *self);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_20_FOR (tp_channel_get_initiator_contact)
-TpHandle tp_channel_get_initiator_handle (TpChannel *self);
-
-_TP_DEPRECATED_IN_0_20_FOR (tp_channel_get_initiator_contact)
-const gchar * tp_channel_get_initiator_identifier (TpChannel *self);
-#endif
+_TP_AVAILABLE_IN_0_16
+TpContact *tp_channel_get_target_contact (TpChannel *self);
+_TP_AVAILABLE_IN_0_16
+TpContact *tp_channel_get_initiator_contact (TpChannel *self);
#define TP_CHANNEL_FEATURE_GROUP \
tp_channel_get_feature_quark_group ()
+_TP_AVAILABLE_IN_UNRELEASED
GQuark tp_channel_get_feature_quark_group (void) G_GNUC_CONST;
+_TP_AVAILABLE_IN_UNRELEASED
TpChannelGroupFlags tp_channel_group_get_flags (TpChannel *self);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_20_FOR (tp_channel_group_get_self_contact)
-TpHandle tp_channel_group_get_self_handle (TpChannel *self);
-
-_TP_DEPRECATED_IN_0_20_FOR (tp_channel_group_dup_members_contacts)
-const TpIntset *tp_channel_group_get_members (TpChannel *self);
-
-_TP_DEPRECATED_IN_0_20_FOR (tp_channel_group_dup_local_pending_contacts)
-const TpIntset *tp_channel_group_get_local_pending (TpChannel *self);
-
-_TP_DEPRECATED_IN_0_20_FOR (tp_channel_group_dup_remote_pending_contacts)
-const TpIntset *tp_channel_group_get_remote_pending (TpChannel *self);
-
-_TP_DEPRECATED_IN_0_20_FOR (tp_channel_group_get_local_pending_contact_info)
+_TP_AVAILABLE_IN_UNRELEASED
+TpContact *tp_channel_group_get_self_contact (TpChannel *self);
+_TP_AVAILABLE_IN_UNRELEASED
+GPtrArray *tp_channel_group_dup_members (TpChannel *self);
+_TP_AVAILABLE_IN_UNRELEASED
+GPtrArray *tp_channel_group_dup_local_pending (TpChannel *self);
+_TP_AVAILABLE_IN_UNRELEASED
+GPtrArray *tp_channel_group_dup_remote_pending (TpChannel *self);
+_TP_AVAILABLE_IN_UNRELEASED
gboolean tp_channel_group_get_local_pending_info (TpChannel *self,
- TpHandle local_pending, TpHandle *actor,
+ TpContact *local_pending, TpContact **actor,
TpChannelGroupChangeReason *reason, const gchar **message);
+_TP_AVAILABLE_IN_UNRELEASED
+TpContact *tp_channel_group_get_contact_owner (TpChannel *self,
+ TpContact *contact);
-_TP_DEPRECATED_IN_0_20_FOR (tp_channel_group_get_contact_owner)
-TpHandle tp_channel_group_get_handle_owner (TpChannel *self, TpHandle handle);
-#endif
-
-_TP_AVAILABLE_IN_0_16
+_TP_AVAILABLE_IN_UNRELEASED
void tp_channel_join_async (TpChannel *self,
const gchar *message,
GAsyncReadyCallback callback,
gpointer user_data);
-_TP_AVAILABLE_IN_0_16
+_TP_AVAILABLE_IN_UNRELEASED
gboolean tp_channel_join_finish (TpChannel *self,
GAsyncResult *result,
GError **error);
-#define TP_CHANNEL_FEATURE_CONTACTS \
- tp_channel_get_feature_quark_contacts ()
-_TP_AVAILABLE_IN_0_16
-GQuark tp_channel_get_feature_quark_contacts (void) G_GNUC_CONST;
-
-_TP_AVAILABLE_IN_0_16
-TpContact *tp_channel_get_target_contact (TpChannel *self);
-_TP_AVAILABLE_IN_0_16
-TpContact *tp_channel_get_initiator_contact (TpChannel *self);
-_TP_AVAILABLE_IN_0_16
-TpContact *tp_channel_group_get_self_contact (TpChannel *self);
-_TP_AVAILABLE_IN_0_16
-GPtrArray *tp_channel_group_dup_members_contacts (TpChannel *self);
-_TP_AVAILABLE_IN_0_16
-GPtrArray *tp_channel_group_dup_local_pending_contacts (TpChannel *self);
-_TP_AVAILABLE_IN_0_16
-GPtrArray *tp_channel_group_dup_remote_pending_contacts (TpChannel *self);
-_TP_AVAILABLE_IN_0_16
-gboolean tp_channel_group_get_local_pending_contact_info (TpChannel *self,
- TpContact *local_pending, TpContact **actor,
- TpChannelGroupChangeReason *reason, const gchar **message);
-_TP_AVAILABLE_IN_0_16
-TpContact *tp_channel_group_get_contact_owner (TpChannel *self,
- TpContact *contact);
-
#define TP_CHANNEL_FEATURE_CHAT_STATES \
tp_channel_get_feature_quark_chat_states ()
_TP_DEPRECATED_IN_0_20_FOR(tp_text_channel_get_feature_quark_chat_states)
@@ -247,6 +198,4 @@ gboolean tp_channel_provide_password_finish (TpChannel *self,
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-channel.h>
-
#endif
diff --git a/telepathy-glib/channel.xml b/telepathy-glib/channel.xml
index 1da1fd93b..e5af6ea10 100644
--- a/telepathy-glib/channel.xml
+++ b/telepathy-glib/channel.xml
@@ -5,40 +5,34 @@
<tp:title>Channel interfaces</tp:title>
<xi:include href="../spec/Channel.xml"/>
-
-<xi:include href="../spec/Channel_Type_Call.xml"/>
-<xi:include href="../spec/Channel_Type_Contact_List.xml"/>
-<xi:include href="../spec/Channel_Type_Contact_Search.xml"/>
-<xi:include href="../spec/Channel_Type_File_Transfer.xml"/>
-<xi:include href="../spec/Channel_Type_Streamed_Media.xml"/>
-<xi:include href="../spec/Channel_Type_Room_List.xml"/>
<xi:include href="../spec/Channel_Type_Text.xml"/>
-<xi:include href="../spec/Channel_Type_Tubes.xml"/>
-<xi:include href="../spec/Channel_Type_Stream_Tube.xml"/>
-<xi:include href="../spec/Channel_Type_DBus_Tube.xml"/>
-<xi:include href="../spec/Channel_Type_Server_Authentication.xml"/>
-<xi:include href="../spec/Channel_Type_Server_TLS_Connection.xml"/>
-<xi:include href="../spec/Channel_Interface_Anonymity.xml"/>
-<xi:include href="../spec/Channel_Interface_Call_State.xml"/>
-<xi:include href="../spec/Channel_Interface_Captcha_Authentication.xml"/>
-<xi:include href="../spec/Channel_Interface_Chat_State.xml"/>
-<xi:include href="../spec/Channel_Interface_Conference.xml"/>
-<xi:include href="../spec/Channel_Interface_Destroyable.xml"/>
-<xi:include href="../spec/Channel_Interface_DTMF.xml"/>
-<xi:include href="../spec/Channel_Interface_File_Transfer_Metadata.xml"/>
-<xi:include href="../spec/Channel_Interface_Group.xml"/>
-<xi:include href="../spec/Channel_Interface_Hold.xml"/>
-<xi:include href="../spec/Channel_Interface_Media_Signalling.xml"/>
-<xi:include href="../spec/Channel_Interface_Messages.xml"/>
-<xi:include href="../spec/Channel_Interface_Password.xml"/>
-<xi:include href="../spec/Channel_Interface_Room.xml"/>
-<xi:include href="../spec/Channel_Interface_Room_Config.xml"/>
-<xi:include href="../spec/Channel_Interface_SASL_Authentication.xml"/>
-<xi:include href="../spec/Channel_Interface_Securable.xml"/>
-<xi:include href="../spec/Channel_Interface_Service_Point.xml"/>
-<xi:include href="../spec/Channel_Interface_Subject.xml"/>
-<xi:include href="../spec/Channel_Interface_SMS.xml"/>
-<xi:include href="../spec/Channel_Interface_Tube.xml"/>
+<xi:include href="../spec/Channel_Type_Call1.xml"/>
+<xi:include href="../spec/Channel_Type_Contact_Search1.xml"/>
+<xi:include href="../spec/Channel_Type_File_Transfer1.xml"/>
+<xi:include href="../spec/Channel_Type_Room_List1.xml"/>
+<xi:include href="../spec/Channel_Type_Stream_Tube1.xml"/>
+<xi:include href="../spec/Channel_Type_DBus_Tube1.xml"/>
+<xi:include href="../spec/Channel_Type_Server_Authentication1.xml"/>
+<xi:include href="../spec/Channel_Type_Server_TLS_Connection1.xml"/>
+
+<xi:include href="../spec/Channel_Interface_Anonymity1.xml"/>
+<xi:include href="../spec/Channel_Interface_Captcha_Authentication1.xml"/>
+<xi:include href="../spec/Channel_Interface_Chat_State1.xml"/>
+<xi:include href="../spec/Channel_Interface_Conference1.xml"/>
+<xi:include href="../spec/Channel_Interface_Destroyable1.xml"/>
+<xi:include href="../spec/Channel_Interface_DTMF1.xml"/>
+<xi:include href="../spec/Channel_Interface_File_Transfer_Metadata1.xml"/>
+<xi:include href="../spec/Channel_Interface_Group1.xml"/>
+<xi:include href="../spec/Channel_Interface_Hold1.xml"/>
+<xi:include href="../spec/Channel_Interface_Password1.xml"/>
+<xi:include href="../spec/Channel_Interface_Room1.xml"/>
+<xi:include href="../spec/Channel_Interface_Room_Config1.xml"/>
+<xi:include href="../spec/Channel_Interface_SASL_Authentication1.xml"/>
+<xi:include href="../spec/Channel_Interface_Securable1.xml"/>
+<xi:include href="../spec/Channel_Interface_Service_Point1.xml"/>
+<xi:include href="../spec/Channel_Interface_Subject1.xml"/>
+<xi:include href="../spec/Channel_Interface_SMS1.xml"/>
+<xi:include href="../spec/Channel_Interface_Tube1.xml"/>
</tp:spec>
diff --git a/telepathy-glib/cli-call.h b/telepathy-glib/cli-call.h
new file mode 100644
index 000000000..d611564a0
--- /dev/null
+++ b/telepathy-glib/cli-call.h
@@ -0,0 +1,35 @@
+/*
+ * cli-call.h - auto-generated methods for Call classes
+ *
+ * Copyright © 2007-2012 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright © 2007 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef TELEPATHY_GLIB_CLI_CALL_H
+#define TELEPATHY_GLIB_CLI_CALL_H
+
+#include <telepathy-glib/call-content.h>
+#include <telepathy-glib/call-misc.h>
+#include <telepathy-glib/call-stream.h>
+
+#include <telepathy-glib/_gen/tp-cli-call-content.h>
+#include <telepathy-glib/_gen/tp-cli-call-content-media-description.h>
+#include <telepathy-glib/_gen/tp-cli-call-stream.h>
+#include <telepathy-glib/_gen/tp-cli-call-stream-endpoint.h>
+
+#endif
+
diff --git a/telepathy-glib/cli-channel.c b/telepathy-glib/cli-channel.c
new file mode 100644
index 000000000..a2f6226c2
--- /dev/null
+++ b/telepathy-glib/cli-channel.c
@@ -0,0 +1,29 @@
+/*
+ * cli-channel.c - host the generated code for a Telepathy channel
+ *
+ * Copyright © 2007-2012 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright © 2007-2008 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+
+#include <telepathy-glib/cli-channel.h>
+
+#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/proxy-subclass.h>
+
+#include "_gen/tp-cli-channel-body.h"
diff --git a/telepathy-glib/cli-channel.h b/telepathy-glib/cli-channel.h
new file mode 100644
index 000000000..c66484555
--- /dev/null
+++ b/telepathy-glib/cli-channel.h
@@ -0,0 +1,30 @@
+/*
+ * cli-channel.h - auto-generated client API for a Telepathy channel
+ *
+ * Copyright © 2007-2012 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright © 2007 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef TELEPATHY_GLIB_CLI_CHANNEL_H
+#define TELEPATHY_GLIB_CLI_CHANNEL_H
+
+#include <telepathy-glib/channel.h>
+
+#include <telepathy-glib/_gen/tp-cli-channel.h>
+
+#endif
+
diff --git a/telepathy-glib/cli-connection.c b/telepathy-glib/cli-connection.c
new file mode 100644
index 000000000..cf75d7b70
--- /dev/null
+++ b/telepathy-glib/cli-connection.c
@@ -0,0 +1,29 @@
+/*
+ * cli-connection.c - host the generated code for a Telepathy connection
+ *
+ * Copyright © 2007-2012 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright © 2007-2011 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+
+#include <telepathy-glib/cli-connection.h>
+
+#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/proxy-subclass.h>
+
+#include "_gen/tp-cli-connection-body.h"
diff --git a/telepathy-glib/cli-connection.h b/telepathy-glib/cli-connection.h
new file mode 100644
index 000000000..9980ab376
--- /dev/null
+++ b/telepathy-glib/cli-connection.h
@@ -0,0 +1,52 @@
+/*
+ * cli-connection.h - auto-generated client API for a Telepathy connection
+ *
+ * Copyright © 2007-2012 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright © 2007 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef TELEPATHY_GLIB_CLI_CONNECTION_H
+#define TELEPATHY_GLIB_CLI_CONNECTION_H
+
+#include <telepathy-glib/connection.h>
+
+#include <telepathy-glib/_gen/tp-cli-connection.h>
+
+G_BEGIN_DECLS
+
+/* connection-handles.c - this has to come after the auto-generated
+ * stuff because it uses an auto-generated typedef */
+
+#ifndef TP_DISABLE_DEPRECATED
+_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_client_factory_ensure_contact)
+void tp_connection_get_contact_attributes (TpConnection *self,
+ gint timeout_ms, guint n_handles, const TpHandle *handles,
+ const gchar * const *interfaces,
+ tp_cli_connection_interface_contacts_callback_for_get_contact_attributes callback,
+ gpointer user_data, GDestroyNotify destroy, GObject *weak_object);
+
+_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_connection_dup_contact_list)
+void tp_connection_get_contact_list_attributes (TpConnection *self,
+ gint timeout_ms, const gchar * const *interfaces,
+ tp_cli_connection_interface_contacts_callback_for_get_contact_attributes callback,
+ gpointer user_data, GDestroyNotify destroy, GObject *weak_object);
+#endif
+
+G_END_DECLS
+
+#endif
+
diff --git a/telepathy-glib/cli-misc.c b/telepathy-glib/cli-misc.c
new file mode 100644
index 000000000..4479109d1
--- /dev/null
+++ b/telepathy-glib/cli-misc.c
@@ -0,0 +1,44 @@
+/*
+ * cli-misc.c - host the generated code for most Telepathy classes
+ *
+ * Copyright © 2007-2012 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright © 2007-2011 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+
+#include <telepathy-glib/cli-call.h>
+#include <telepathy-glib/cli-misc.h>
+
+#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/proxy-subclass.h>
+
+#include "telepathy-glib/_gen/tp-cli-account-body.h"
+#include "telepathy-glib/_gen/tp-cli-account-manager-body.h"
+#include "telepathy-glib/_gen/tp-cli-call-content-body.h"
+#include "telepathy-glib/_gen/tp-cli-call-content-media-description-body.h"
+#include "telepathy-glib/_gen/tp-cli-call-stream-body.h"
+#include "telepathy-glib/_gen/tp-cli-call-stream-endpoint-body.h"
+#include "telepathy-glib/_gen/tp-cli-channel-dispatcher-body.h"
+#include "telepathy-glib/_gen/tp-cli-channel-dispatch-operation-body.h"
+#include "telepathy-glib/_gen/tp-cli-channel-request-body.h"
+#include "telepathy-glib/_gen/tp-cli-client-body.h"
+#include "telepathy-glib/_gen/tp-cli-connection-manager-body.h"
+#include "telepathy-glib/_gen/tp-cli-dbus-daemon-body.h"
+#include "telepathy-glib/_gen/tp-cli-debug-body.h"
+#include "telepathy-glib/_gen/tp-cli-generic-body.h"
+#include "telepathy-glib/_gen/tp-cli-protocol-body.h"
diff --git a/telepathy-glib/cli-misc.h b/telepathy-glib/cli-misc.h
new file mode 100644
index 000000000..7c8bc9b63
--- /dev/null
+++ b/telepathy-glib/cli-misc.h
@@ -0,0 +1,51 @@
+/*
+ * cli-misc.h - auto-generated methods for "small" classes
+ *
+ * Copyright © 2007-2012 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright © 2007 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef TELEPATHY_GLIB_CLI_MISC_H
+#define TELEPATHY_GLIB_CLI_MISC_H
+
+#include <telepathy-glib/account.h>
+#include <telepathy-glib/account-manager.h>
+#include <telepathy-glib/channel-dispatcher.h>
+#include <telepathy-glib/channel-dispatch-operation.h>
+#include <telepathy-glib/channel-request.h>
+#include <telepathy-glib/client.h>
+#include <telepathy-glib/connection-manager.h>
+#include <telepathy-glib/debug-client.h>
+#include <telepathy-glib/protocol.h>
+#include <telepathy-glib/proxy.h>
+#include <telepathy-glib/tls-certificate.h>
+
+#include <telepathy-glib/_gen/tp-cli-account.h>
+#include <telepathy-glib/_gen/tp-cli-account-manager.h>
+#include <telepathy-glib/_gen/tp-cli-channel-dispatcher.h>
+#include <telepathy-glib/_gen/tp-cli-channel-dispatch-operation.h>
+#include <telepathy-glib/_gen/tp-cli-channel-request.h>
+#include <telepathy-glib/_gen/tp-cli-client.h>
+#include <telepathy-glib/_gen/tp-cli-connection-manager.h>
+#include <telepathy-glib/_gen/tp-cli-dbus-daemon.h>
+#include <telepathy-glib/_gen/tp-cli-debug.h>
+#include <telepathy-glib/_gen/tp-cli-generic.h>
+#include <telepathy-glib/_gen/tp-cli-protocol.h>
+#include <telepathy-glib/_gen/tp-cli-tls-cert.h>
+
+#endif
+
diff --git a/telepathy-glib/client-channel-factory.c b/telepathy-glib/client-channel-factory.c
deleted file mode 100644
index addfc6fac..000000000
--- a/telepathy-glib/client-channel-factory.c
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Interface for channel factories
- *
- * Copyright © 2010 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * SECTION:client-channel-factory
- * @title: TpClientChannelFactoryInterface
- * @short_description: an interface for client channel factories
- *
- * Client channel factories are used to create channel proxies. An application
- * wanting to use its own #TpChannel subclass has to implement an object
- * implementing the #TpClientChannelFactoryInterface interface.
- *
- * Once a channel has been created by a factory using
- * tp_client_channel_factory_create_channel(), the caller should then prepare
- * on it the channel features returned by
- * tp_client_channel_factory_dup_channel_features() using
- * tp_proxy_prepare_async().
- *
- * Since: 0.13.2
- */
-
-/**
- * TpClientChannelFactory:
- *
- * Opaque typedef representing a #GObject that implements
- * the %TP_TYPE_CLIENT_CHANNEL_FACTORY interface.
- *
- * Since: 0.13.6
- */
-
-/**
- * TpClientChannelFactoryInterface:
- * @parent: the parent
- * @create_channel: obsolete version of @obj_create_channel which does not
- * receive the object instance as an argument
- * @dup_channel_features: obsolete version of @obj_dup_channel_features which
- * does not receive the object instance as an argument
- * @obj_create_channel: virtual method used to create channels;
- * see tp_client_channel_factory_create_channel()
- * @obj_dup_channel_features: virtual method returning channel features that
- * have to be prepared on newly created channels;
- * see tp_client_channel_factory_dup_channel_features()
- *
- * Interface for a channel factory
- *
- * Since: 0.13.2
- */
-
-#include "config.h"
-
-#include "telepathy-glib/client-channel-factory.h"
-
-#include <telepathy-glib/util.h>
-
-#define DEBUG_FLAG TP_DEBUG_CLIENT
-#include "telepathy-glib/debug-internal.h"
-
-G_DEFINE_INTERFACE(TpClientChannelFactory, tp_client_channel_factory,
- G_TYPE_OBJECT)
-
-static void
-tp_client_channel_factory_default_init (TpClientChannelFactoryInterface *iface)
-{
-}
-
-/**
- * tp_client_channel_factory_create_channel:
- * @self: a client channel factory
- * @conn: a #TpConnection
- * @path: the object path of the channel
- * @properties: (transfer none) (element-type utf8 GObject.Value):
- * the immutable properties of the channel
- * @error: used to indicate the error if %NULL is returned
- *
- * Function called when a channel need to be created.
- * Implementation can return a subclass of #TpChannel if they need to.
- *
- * Changed in 0.13.6: the function's signature was previously wrong;
- * it expected an object instance as its first parameter, but the type of the
- * parameter was the type of the interface vtable.
- *
- * Returns: (transfer full): a new channel proxy, or %NULL on invalid arguments
- *
- * Since: 0.13.2
- */
-TpChannel *
-tp_client_channel_factory_create_channel (TpClientChannelFactory *self,
- TpConnection *conn,
- const gchar *path,
- GHashTable *properties,
- GError **error)
-{
- TpClientChannelFactoryInterface *iface = TP_CLIENT_CHANNEL_FACTORY_GET_IFACE (
- self);
-
- g_return_val_if_fail (TP_IS_CLIENT_CHANNEL_FACTORY (self), NULL);
- g_return_val_if_fail (TP_IS_CONNECTION (conn), NULL);
- g_return_val_if_fail (path != NULL, NULL);
- g_return_val_if_fail (properties != NULL, NULL);
-
- if (iface->obj_create_channel != NULL)
- return iface->obj_create_channel (self, conn, path, properties, error);
-
- if (iface->create_channel != NULL)
- return iface->create_channel (iface, conn, path, properties, error);
-
- return tp_channel_new_from_properties (conn, path, properties, error);
-}
-
-/**
- * tp_client_channel_factory_dup_channel_features:
- * @self: a client channel factory
- * @channel: a #TpChannel
- *
- * Return a zero terminated #GArray containing the #TpChannel features that
- * should be prepared on @channel.
- *
- * Changed in 0.13.6: the function's signature was previously wrong;
- * it expected an object instance as its first parameter, but the type of the
- * parameter was the type of the interface vtable.
- *
- * Returns: (transfer full): a newly allocated #GArray
- *
- * Since: 0.13.3
- */
-GArray *
-tp_client_channel_factory_dup_channel_features (
- TpClientChannelFactory *self,
- TpChannel *channel)
-{
- TpClientChannelFactoryInterface *iface = TP_CLIENT_CHANNEL_FACTORY_GET_IFACE (
- self);
- GArray *arr;
- GQuark feature = TP_CHANNEL_FEATURE_CORE;
-
- g_return_val_if_fail (TP_IS_CLIENT_CHANNEL_FACTORY (self), NULL);
- g_return_val_if_fail (TP_IS_CHANNEL (channel), NULL);
-
- if (iface->obj_dup_channel_features != NULL)
- return iface->obj_dup_channel_features (self, channel);
-
- if (iface->dup_channel_features != NULL)
- return iface->dup_channel_features (iface, channel);
-
- arr = g_array_sized_new (TRUE, FALSE, sizeof (GQuark), 1);
-
- g_array_append_val (arr, feature);
-
- return arr;
-}
diff --git a/telepathy-glib/client-channel-factory.h b/telepathy-glib/client-channel-factory.h
deleted file mode 100644
index 12e8b1ee6..000000000
--- a/telepathy-glib/client-channel-factory.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Interface for channel factories
- *
- * Copyright © 2010 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __TP_CLIENT_CHANNEL_FACTORY_H__
-#define __TP_CLIENT_CHANNEL_FACTORY_H__
-
-#include <glib-object.h>
-
-#include <telepathy-glib/channel.h>
-
-G_BEGIN_DECLS
-
-typedef struct _TpClientChannelFactory TpClientChannelFactory;
-typedef struct _TpClientChannelFactoryInterface TpClientChannelFactoryInterface;
-
-struct _TpClientChannelFactoryInterface {
- GTypeInterface parent;
-
- TpChannel * (* create_channel) (TpClientChannelFactoryInterface *self,
- TpConnection *conn,
- const gchar *path,
- GHashTable *properties,
- GError **error);
-
- GArray * (* dup_channel_features) (TpClientChannelFactoryInterface *self,
- TpChannel *channel);
-
- TpChannel *(*obj_create_channel) (TpClientChannelFactory *self,
- TpConnection *conn,
- const gchar *path,
- GHashTable *properties,
- GError **error);
-
- GArray *(*obj_dup_channel_features) (TpClientChannelFactory *self,
- TpChannel *channel);
-};
-
-GType tp_client_channel_factory_get_type (void);
-
-#define TP_TYPE_CLIENT_CHANNEL_FACTORY \
- (tp_client_channel_factory_get_type ())
-#define TP_CLIENT_CHANNEL_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), TP_TYPE_CLIENT_CHANNEL_FACTORY, \
- TpClientChannelFactory))
-#define TP_IS_CLIENT_CHANNEL_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TP_TYPE_CLIENT_CHANNEL_FACTORY))
-#define TP_CLIENT_CHANNEL_FACTORY_GET_IFACE(obj) \
- (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TP_TYPE_CLIENT_CHANNEL_FACTORY, \
- TpClientChannelFactoryInterface))
-
-TpChannel *tp_client_channel_factory_create_channel (
- TpClientChannelFactory *self,
- TpConnection *conn,
- const gchar *path,
- GHashTable *properties,
- GError **error);
-
-GArray *tp_client_channel_factory_dup_channel_features (
- TpClientChannelFactory *self,
- TpChannel *channel);
-
-G_END_DECLS
-
-#endif
diff --git a/telepathy-glib/simple-client-factory-internal.h b/telepathy-glib/client-factory-internal.h
index 495052f70..c2ac274a8 100644
--- a/telepathy-glib/simple-client-factory-internal.h
+++ b/telepathy-glib/client-factory-internal.h
@@ -1,6 +1,6 @@
/*<private_header>*/
/*
- * Internal methods of TpSimpleClientFactory
+ * Internal methods of TpClientFactory
*
* Copyright © 2011 Collabora Ltd.
*
@@ -19,48 +19,47 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef __TP_SIMPLE_CLIENT_FACTORY_INTERNAL_H__
-#define __TP_SIMPLE_CLIENT_FACTORY_INTERNAL_H__
+#ifndef __TP_CLIENT_FACTORY_INTERNAL_H__
+#define __TP_CLIENT_FACTORY_INTERNAL_H__
-#include <telepathy-glib/simple-client-factory.h>
+#include <telepathy-glib/client-factory.h>
G_BEGIN_DECLS
-void _tp_simple_client_factory_insert_proxy (TpSimpleClientFactory *self,
+void _tp_client_factory_insert_proxy (TpClientFactory *self,
gpointer proxy);
-TpChannelRequest *_tp_simple_client_factory_ensure_channel_request (
- TpSimpleClientFactory *self,
+TpChannelRequest *_tp_client_factory_ensure_channel_request (
+ TpClientFactory *self,
const gchar *object_path,
GHashTable *immutable_properties,
GError **error);
TpChannelDispatchOperation *
-_tp_simple_client_factory_ensure_channel_dispatch_operation (
- TpSimpleClientFactory *self,
+_tp_client_factory_ensure_channel_dispatch_operation (TpClientFactory *self,
const gchar *object_path,
GHashTable *immutable_properties,
GError **error);
-TpAccount *_tp_account_new_with_factory (TpSimpleClientFactory *factory,
+TpAccount *_tp_account_new_with_factory (TpClientFactory *factory,
TpDBusDaemon *bus_daemon,
const gchar *object_path,
GError **error);
-TpConnection *_tp_connection_new_with_factory (TpSimpleClientFactory *factory,
+TpConnection *_tp_connection_new_with_factory (TpClientFactory *factory,
TpDBusDaemon *dbus,
const gchar *bus_name,
const gchar *object_path,
GError **error);
-TpChannel *_tp_channel_new_with_factory (TpSimpleClientFactory *factory,
+TpChannel *_tp_channel_new_with_factory (TpClientFactory *factory,
TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
GError **error);
TpChannelRequest *_tp_channel_request_new_with_factory (
- TpSimpleClientFactory *factory,
+ TpClientFactory *factory,
TpDBusDaemon *bus_daemon,
const gchar *object_path,
GHashTable *immutable_properties,
@@ -69,7 +68,7 @@ void _tp_channel_request_ensure_immutable_properties (TpChannelRequest *self,
GHashTable *immutable_properties);
TpChannelDispatchOperation *_tp_channel_dispatch_operation_new_with_factory (
- TpSimpleClientFactory *factory,
+ TpClientFactory *factory,
TpDBusDaemon *bus_daemon,
const gchar *object_path,
GHashTable *immutable_properties,
diff --git a/telepathy-glib/simple-client-factory.c b/telepathy-glib/client-factory.c
index fa8fd0431..d08e21326 100644
--- a/telepathy-glib/simple-client-factory.c
+++ b/telepathy-glib/client-factory.c
@@ -19,8 +19,8 @@
*/
/**
- * SECTION:simple-client-factory
- * @title: TpSimpleClientFactory
+ * SECTION:client-factory
+ * @title: TpClientFactory
* @short_description: a factory for #TpContact<!-- -->s and plain subclasses
* of #TpProxy
* @see_also: #TpAutomaticClientFactory
@@ -38,7 +38,7 @@
* #TpChannel and #TpContact. Those objects should always be acquired through a
* factory, rather than being constructed directly.
*
- * One can subclass #TpSimpleClientFactory and override some of its virtual
+ * One can subclass #TpClientFactory and override some of its virtual
* methods to construct more specialized objects. See #TpAutomaticClientFactory
* for a subclass which automatically constructs subclasses of #TpChannel for
* common channel types.
@@ -47,7 +47,7 @@
* |[
* int main(int argc, char *argv[])
* {
- * TpSimpleClientFactory *factory;
+ * TpClientFactory *factory;
* TpAccountManager *manager;
*
* g_type_init ();
@@ -66,37 +66,37 @@
* will ensure that any libraries or plugins which also use Telepathy (and call
* tp_account_manager_dup()) will share your #TpAccountManager.
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
/**
- * TpSimpleClientFactory:
+ * TpClientFactory:
*
- * Data structure representing a #TpSimpleClientFactory
+ * Data structure representing a #TpClientFactory
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
/**
- * TpSimpleClientFactoryClass:
+ * TpClientFactoryClass:
* @parent_class: the parent
* @create_account: create a #TpAccount;
- * see tp_simple_client_factory_ensure_account()
- * @dup_account_features: implementation of tp_simple_client_factory_dup_account_features()
+ * see tp_client_factory_ensure_account()
+ * @dup_account_features: implementation of tp_client_factory_dup_account_features()
* @create_connection: create a #TpConnection;
- * see tp_simple_client_factory_ensure_connection()
+ * see tp_client_factory_ensure_connection()
* @dup_connection_features: implementation of
- * tp_simple_client_factory_dup_connection_features()
+ * tp_client_factory_dup_connection_features()
* @create_channel: create a #TpChannel;
- * see tp_simple_client_factory_ensure_channel()
- * @dup_channel_features: implementation of tp_simple_client_factory_dup_channel_features()
+ * see tp_client_factory_ensure_channel()
+ * @dup_channel_features: implementation of tp_client_factory_dup_channel_features()
* @create_contact: create a #TpContact;
- * see tp_simple_client_factory_ensure_contact()
- * @dup_contact_features: implementation of tp_simple_client_factory_dup_contact_features()
+ * see tp_client_factory_ensure_contact()
+ * @dup_contact_features: implementation of tp_client_factory_dup_contact_features()
*
- * The class structure for #TpSimpleClientFactory.
+ * The class structure for #TpClientFactory.
*
- * #TpSimpleClientFactory maintains a cache of previously-constructed proxy
+ * #TpClientFactory maintains a cache of previously-constructed proxy
* objects, so the implementations of @create_account,
* @create_connection, @create_channel, and @create_contact may assume that a
* new object should be created when they are called. The default
@@ -106,17 +106,17 @@
*
* The default implementation of @dup_channel_features returns
* #TP_CHANNEL_FEATURE_CORE, plus all features passed to
- * tp_simple_client_factory_add_channel_features() by the application.
+ * tp_client_factory_add_channel_features() by the application.
* Subclasses may override this method to prepare more interesting features
* from subclasses of #TpChannel, for instance. The default implementations of
* the other <function>dup_x_features</function> methods behave similarly.
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
#include "config.h"
-#include "telepathy-glib/simple-client-factory.h"
+#include "telepathy-glib/client-factory.h"
#include <telepathy-glib/util.h>
@@ -124,10 +124,10 @@
#include "telepathy-glib/connection-internal.h"
#include "telepathy-glib/contact-internal.h"
#include "telepathy-glib/debug-internal.h"
-#include "telepathy-glib/simple-client-factory-internal.h"
+#include "telepathy-glib/client-factory-internal.h"
#include "telepathy-glib/util-internal.h"
-struct _TpSimpleClientFactoryPrivate
+struct _TpClientFactoryPrivate
{
TpDBusDaemon *dbus;
/* Owned object-path -> weakref to TpProxy */
@@ -144,21 +144,21 @@ enum
N_PROPS
};
-G_DEFINE_TYPE (TpSimpleClientFactory, tp_simple_client_factory, G_TYPE_OBJECT)
+G_DEFINE_TYPE (TpClientFactory, tp_client_factory, G_TYPE_OBJECT)
static void
proxy_invalidated_cb (TpProxy *proxy,
guint domain,
gint code,
gchar *message,
- TpSimpleClientFactory *self)
+ TpClientFactory *self)
{
g_hash_table_remove (self->priv->proxy_cache,
tp_proxy_get_object_path (proxy));
}
static void
-insert_proxy (TpSimpleClientFactory *self,
+insert_proxy (TpClientFactory *self,
gpointer proxy)
{
if (proxy == NULL)
@@ -174,14 +174,14 @@ insert_proxy (TpSimpleClientFactory *self,
}
static gpointer
-lookup_proxy (TpSimpleClientFactory *self,
+lookup_proxy (TpClientFactory *self,
const gchar *object_path)
{
return g_hash_table_lookup (self->priv->proxy_cache, object_path);
}
void
-_tp_simple_client_factory_insert_proxy (TpSimpleClientFactory *self,
+_tp_client_factory_insert_proxy (TpClientFactory *self,
gpointer proxy)
{
g_return_if_fail (lookup_proxy (self,
@@ -191,7 +191,7 @@ _tp_simple_client_factory_insert_proxy (TpSimpleClientFactory *self,
}
static TpAccount *
-create_account_impl (TpSimpleClientFactory *self,
+create_account_impl (TpClientFactory *self,
const gchar *object_path,
const GHashTable *immutable_properties G_GNUC_UNUSED,
GError **error)
@@ -201,7 +201,7 @@ create_account_impl (TpSimpleClientFactory *self,
}
static GArray *
-dup_account_features_impl (TpSimpleClientFactory *self,
+dup_account_features_impl (TpClientFactory *self,
TpAccount *account)
{
return _tp_quark_array_copy (
@@ -209,7 +209,7 @@ dup_account_features_impl (TpSimpleClientFactory *self,
}
static TpConnection *
-create_connection_impl (TpSimpleClientFactory *self,
+create_connection_impl (TpClientFactory *self,
const gchar *object_path,
const GHashTable *immutable_properties G_GNUC_UNUSED,
GError **error)
@@ -219,7 +219,7 @@ create_connection_impl (TpSimpleClientFactory *self,
}
static GArray *
-dup_connection_features_impl (TpSimpleClientFactory *self,
+dup_connection_features_impl (TpClientFactory *self,
TpConnection *connection)
{
return _tp_quark_array_copy (
@@ -227,7 +227,7 @@ dup_connection_features_impl (TpSimpleClientFactory *self,
}
static TpChannel *
-create_channel_impl (TpSimpleClientFactory *self,
+create_channel_impl (TpClientFactory *self,
TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
@@ -238,7 +238,7 @@ create_channel_impl (TpSimpleClientFactory *self,
}
static GArray *
-dup_channel_features_impl (TpSimpleClientFactory *self,
+dup_channel_features_impl (TpClientFactory *self,
TpChannel *channel)
{
return _tp_quark_array_copy (
@@ -246,7 +246,7 @@ dup_channel_features_impl (TpSimpleClientFactory *self,
}
static TpContact *
-create_contact_impl (TpSimpleClientFactory *self,
+create_contact_impl (TpClientFactory *self,
TpConnection *connection,
TpHandle handle,
const gchar *identifier)
@@ -255,26 +255,20 @@ create_contact_impl (TpSimpleClientFactory *self,
}
static GArray *
-dup_contact_features_impl (TpSimpleClientFactory *self,
+dup_contact_features_impl (TpClientFactory *self,
TpConnection *connection)
{
- GArray *array;
-
- array = g_array_sized_new (FALSE, FALSE, sizeof (TpContactFeature),
- self->priv->desired_contact_features->len);
- g_array_append_vals (array, self->priv->desired_contact_features->data,
- self->priv->desired_contact_features->len);
-
- return array;
+ return _tp_quark_array_copy (
+ (GQuark *) self->priv->desired_contact_features->data);
}
static void
-tp_simple_client_factory_get_property (GObject *object,
+tp_client_factory_get_property (GObject *object,
guint property_id,
GValue *value,
GParamSpec *pspec)
{
- TpSimpleClientFactory *self = (TpSimpleClientFactory *) object;
+ TpClientFactory *self = (TpClientFactory *) object;
switch (property_id)
{
@@ -288,12 +282,12 @@ tp_simple_client_factory_get_property (GObject *object,
}
static void
-tp_simple_client_factory_set_property (GObject *object,
+tp_client_factory_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
- TpSimpleClientFactory *self = (TpSimpleClientFactory *) object;
+ TpClientFactory *self = (TpClientFactory *) object;
switch (property_id)
{
@@ -308,19 +302,20 @@ tp_simple_client_factory_set_property (GObject *object,
}
static void
-tp_simple_client_factory_constructed (GObject *object)
+tp_client_factory_constructed (GObject *object)
{
- TpSimpleClientFactory *self = (TpSimpleClientFactory *) object;
+ TpClientFactory *self = (TpClientFactory *) object;
- g_assert (TP_IS_DBUS_DAEMON (self->priv->dbus));
+ if (self->priv->dbus == NULL)
+ self->priv->dbus = tp_dbus_daemon_dup (NULL);
- G_OBJECT_CLASS (tp_simple_client_factory_parent_class)->constructed (object);
+ G_OBJECT_CLASS (tp_client_factory_parent_class)->constructed (object);
}
static void
-tp_simple_client_factory_finalize (GObject *object)
+tp_client_factory_finalize (GObject *object)
{
- TpSimpleClientFactory *self = (TpSimpleClientFactory *) object;
+ TpClientFactory *self = (TpClientFactory *) object;
g_clear_object (&self->priv->dbus);
tp_clear_pointer (&self->priv->proxy_cache, g_hash_table_unref);
@@ -329,16 +324,16 @@ tp_simple_client_factory_finalize (GObject *object)
tp_clear_pointer (&self->priv->desired_channel_features, g_array_unref);
tp_clear_pointer (&self->priv->desired_contact_features, g_array_unref);
- G_OBJECT_CLASS (tp_simple_client_factory_parent_class)->finalize (object);
+ G_OBJECT_CLASS (tp_client_factory_parent_class)->finalize (object);
}
static void
-tp_simple_client_factory_init (TpSimpleClientFactory *self)
+tp_client_factory_init (TpClientFactory *self)
{
GQuark feature;
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, TP_TYPE_SIMPLE_CLIENT_FACTORY,
- TpSimpleClientFactoryPrivate);
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, TP_TYPE_CLIENT_FACTORY,
+ TpClientFactoryPrivate);
self->priv->proxy_cache = g_hash_table_new (g_str_hash, g_str_equal);
@@ -357,22 +352,22 @@ tp_simple_client_factory_init (TpSimpleClientFactory *self)
feature = TP_CHANNEL_FEATURE_CORE;
g_array_append_val (self->priv->desired_channel_features, feature);
- self->priv->desired_contact_features = g_array_new (FALSE, FALSE,
- sizeof (TpContactFeature));
+ self->priv->desired_contact_features = g_array_new (TRUE, FALSE,
+ sizeof (GQuark));
}
static void
-tp_simple_client_factory_class_init (TpSimpleClientFactoryClass *klass)
+tp_client_factory_class_init (TpClientFactoryClass *klass)
{
GObjectClass *object_class = (GObjectClass *) klass;
GParamSpec *param_spec;
- g_type_class_add_private (klass, sizeof (TpSimpleClientFactoryPrivate));
+ g_type_class_add_private (klass, sizeof (TpClientFactoryPrivate));
- object_class->get_property = tp_simple_client_factory_get_property;
- object_class->set_property = tp_simple_client_factory_set_property;
- object_class->constructed = tp_simple_client_factory_constructed;
- object_class->finalize = tp_simple_client_factory_finalize;
+ object_class->get_property = tp_client_factory_get_property;
+ object_class->set_property = tp_client_factory_set_property;
+ object_class->constructed = tp_client_factory_constructed;
+ object_class->finalize = tp_client_factory_finalize;
klass->create_account = create_account_impl;
klass->dup_account_features = dup_account_features_impl;
@@ -384,7 +379,7 @@ tp_simple_client_factory_class_init (TpSimpleClientFactoryClass *klass)
klass->dup_contact_features = dup_contact_features_impl;
/**
- * TpSimpleClientFactory:dbus-daemon:
+ * TpClientFactory:dbus-daemon:
*
* The D-Bus daemon for this object.
*/
@@ -397,45 +392,48 @@ tp_simple_client_factory_class_init (TpSimpleClientFactoryClass *klass)
}
/**
- * tp_simple_client_factory_new:
- * @dbus: a #TpDBusDaemon
+ * tp_client_factory_new:
+ * @dbus: a #TpDBusDaemon, or %NULL
*
- * Creates a new #TpSimpleClientFactory instance.
+ * Creates a new #TpClientFactory instance. If @dbus is %NULL then
+ * tp_dbus_daemon_dup() will be used.
*
- * Returns: a new #TpSimpleClientFactory
+ * Returns: a new #TpClientFactory
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
-TpSimpleClientFactory *
-tp_simple_client_factory_new (TpDBusDaemon *dbus)
+TpClientFactory *
+tp_client_factory_new (TpDBusDaemon *dbus)
{
- return g_object_new (TP_TYPE_SIMPLE_CLIENT_FACTORY,
+ g_return_val_if_fail (dbus == NULL || TP_IS_DBUS_DAEMON (dbus), NULL);
+
+ return g_object_new (TP_TYPE_CLIENT_FACTORY,
"dbus-daemon", dbus,
NULL);
}
/**
- * tp_simple_client_factory_get_dbus_daemon:
- * @self: a #TpSimpleClientFactory object
+ * tp_client_factory_get_dbus_daemon:
+ * @self: a #TpClientFactory object
*
* <!-- -->
*
- * Returns: (transfer none): the value of the #TpSimpleClientFactory:dbus-daemon
+ * Returns: (transfer none): the value of the #TpClientFactory:dbus-daemon
* property
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
TpDBusDaemon *
-tp_simple_client_factory_get_dbus_daemon (TpSimpleClientFactory *self)
+tp_client_factory_get_dbus_daemon (TpClientFactory *self)
{
- g_return_val_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self), NULL);
+ g_return_val_if_fail (TP_IS_CLIENT_FACTORY (self), NULL);
return self->priv->dbus;
}
/**
- * tp_simple_client_factory_ensure_account:
- * @self: a #TpSimpleClientFactory object
+ * tp_client_factory_ensure_account:
+ * @self: a #TpClientFactory object
* @object_path: the object path of an account
* @immutable_properties: (transfer none) (element-type utf8 GObject.Value):
* the immutable properties of the account, or %NULL.
@@ -447,29 +445,29 @@ tp_simple_client_factory_get_dbus_daemon (TpSimpleClientFactory *self)
*
* Note that the returned #TpAccount is not guaranteed to be ready; the caller
* is responsible for calling tp_proxy_prepare_async() with the desired
- * features (as given by tp_simple_client_factory_dup_account_features()).
+ * features (as given by tp_client_factory_dup_account_features()).
*
* Returns: (transfer full): a reference to a #TpAccount;
* see tp_account_new().
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
TpAccount *
-tp_simple_client_factory_ensure_account (TpSimpleClientFactory *self,
+tp_client_factory_ensure_account (TpClientFactory *self,
const gchar *object_path,
const GHashTable *immutable_properties,
GError **error)
{
TpAccount *account;
- g_return_val_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self), NULL);
+ g_return_val_if_fail (TP_IS_CLIENT_FACTORY (self), NULL);
g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
account = lookup_proxy (self, object_path);
if (account != NULL)
return g_object_ref (account);
- account = TP_SIMPLE_CLIENT_FACTORY_GET_CLASS (self)->create_account (self,
+ account = TP_CLIENT_FACTORY_GET_CLASS (self)->create_account (self,
object_path, immutable_properties, error);
insert_proxy (self, account);
@@ -477,8 +475,8 @@ tp_simple_client_factory_ensure_account (TpSimpleClientFactory *self,
}
/**
- * tp_simple_client_factory_dup_account_features:
- * @self: a #TpSimpleClientFactory object
+ * tp_client_factory_dup_account_features:
+ * @self: a #TpClientFactory object
* @account: a #TpAccount
*
* Return a zero-terminated #GArray containing the #TpAccount features that
@@ -487,30 +485,30 @@ tp_simple_client_factory_ensure_account (TpSimpleClientFactory *self,
* Returns: (transfer full) (element-type GLib.Quark): a newly allocated
* #GArray
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
GArray *
-tp_simple_client_factory_dup_account_features (TpSimpleClientFactory *self,
+tp_client_factory_dup_account_features (TpClientFactory *self,
TpAccount *account)
{
- g_return_val_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self), NULL);
+ g_return_val_if_fail (TP_IS_CLIENT_FACTORY (self), NULL);
g_return_val_if_fail (TP_IS_ACCOUNT (account), NULL);
g_return_val_if_fail (tp_proxy_get_factory (account) == self, NULL);
- return TP_SIMPLE_CLIENT_FACTORY_GET_CLASS (self)->dup_account_features (self,
+ return TP_CLIENT_FACTORY_GET_CLASS (self)->dup_account_features (self,
account);
}
/**
- * tp_simple_client_factory_add_account_features:
- * @self: a #TpSimpleClientFactory object
+ * tp_client_factory_add_account_features:
+ * @self: a #TpClientFactory object
* @features: (transfer none) (array zero-terminated=1) (allow-none): an array
* of desired features, ending with 0; %NULL is equivalent to an array
* containing only 0
*
* Add @features to the desired features to be prepared on #TpAccount
* objects. Those features will be added to the features already returned be
- * tp_simple_client_factory_dup_account_features().
+ * tp_client_factory_dup_account_features().
*
* It is not necessary to add %TP_ACCOUNT_FEATURE_CORE as it is already
* included by default.
@@ -518,38 +516,38 @@ tp_simple_client_factory_dup_account_features (TpSimpleClientFactory *self,
* Note that these features will not be added to existing #TpAccount
* objects; the user must call tp_proxy_prepare_async() themself.
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
void
-tp_simple_client_factory_add_account_features (
- TpSimpleClientFactory *self,
+tp_client_factory_add_account_features (
+ TpClientFactory *self,
const GQuark *features)
{
- g_return_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self));
+ g_return_if_fail (TP_IS_CLIENT_FACTORY (self));
_tp_quark_array_merge (self->priv->desired_account_features, features, -1);
}
/**
- * tp_simple_client_factory_add_account_features_varargs: (skip)
- * @self: a #TpSimpleClientFactory
+ * tp_client_factory_add_account_features_varargs: (skip)
+ * @self: a #TpClientFactory
* @feature: the first feature
* @...: the second and subsequent features, if any, ending with 0
*
- * The same as tp_simple_client_factory_add_account_features(), but with a more
+ * The same as tp_client_factory_add_account_features(), but with a more
* convenient calling convention from C.
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
void
-tp_simple_client_factory_add_account_features_varargs (
- TpSimpleClientFactory *self,
+tp_client_factory_add_account_features_varargs (
+ TpClientFactory *self,
GQuark feature,
...)
{
va_list var_args;
- g_return_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self));
+ g_return_if_fail (TP_IS_CLIENT_FACTORY (self));
va_start (var_args, feature);
_tp_quark_array_merge_valist (self->priv->desired_account_features, feature,
@@ -558,8 +556,8 @@ tp_simple_client_factory_add_account_features_varargs (
}
/**
- * tp_simple_client_factory_ensure_connection:
- * @self: a #TpSimpleClientFactory object
+ * tp_client_factory_ensure_connection:
+ * @self: a #TpClientFactory object
* @object_path: the object path of a connection
* @immutable_properties: (transfer none) (element-type utf8 GObject.Value):
* the immutable properties of the connection.
@@ -572,29 +570,29 @@ tp_simple_client_factory_add_account_features_varargs (
*
* Note that the returned #TpConnection is not guaranteed to be ready; the
* caller is responsible for calling tp_proxy_prepare_async() with the desired
- * features (as given by tp_simple_client_factory_dup_connection_features()).
+ * features (as given by tp_client_factory_dup_connection_features()).
*
* Returns: (transfer full): a reference to a #TpConnection;
* see tp_connection_new().
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
TpConnection *
-tp_simple_client_factory_ensure_connection (TpSimpleClientFactory *self,
+tp_client_factory_ensure_connection (TpClientFactory *self,
const gchar *object_path,
const GHashTable *immutable_properties,
GError **error)
{
TpConnection *connection;
- g_return_val_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self), NULL);
+ g_return_val_if_fail (TP_IS_CLIENT_FACTORY (self), NULL);
g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
connection = lookup_proxy (self, object_path);
if (connection != NULL)
return g_object_ref (connection);
- connection = TP_SIMPLE_CLIENT_FACTORY_GET_CLASS (self)->create_connection (
+ connection = TP_CLIENT_FACTORY_GET_CLASS (self)->create_connection (
self, object_path, immutable_properties, error);
insert_proxy (self, connection);
@@ -602,8 +600,8 @@ tp_simple_client_factory_ensure_connection (TpSimpleClientFactory *self,
}
/**
- * tp_simple_client_factory_dup_connection_features:
- * @self: a #TpSimpleClientFactory object
+ * tp_client_factory_dup_connection_features:
+ * @self: a #TpClientFactory object
* @connection: a #TpConnection
*
* Return a zero-terminated #GArray containing the #TpConnection features that
@@ -612,30 +610,30 @@ tp_simple_client_factory_ensure_connection (TpSimpleClientFactory *self,
* Returns: (transfer full) (element-type GLib.Quark): a newly allocated
* #GArray
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
GArray *
-tp_simple_client_factory_dup_connection_features (TpSimpleClientFactory *self,
+tp_client_factory_dup_connection_features (TpClientFactory *self,
TpConnection *connection)
{
- g_return_val_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self), NULL);
+ g_return_val_if_fail (TP_IS_CLIENT_FACTORY (self), NULL);
g_return_val_if_fail (TP_IS_CONNECTION (connection), NULL);
g_return_val_if_fail (tp_proxy_get_factory (connection) == self, NULL);
- return TP_SIMPLE_CLIENT_FACTORY_GET_CLASS (self)->dup_connection_features (
+ return TP_CLIENT_FACTORY_GET_CLASS (self)->dup_connection_features (
self, connection);
}
/**
- * tp_simple_client_factory_add_connection_features:
- * @self: a #TpSimpleClientFactory object
+ * tp_client_factory_add_connection_features:
+ * @self: a #TpClientFactory object
* @features: (transfer none) (array zero-terminated=1) (allow-none): an array
* of desired features, ending with 0; %NULL is equivalent to an array
* containing only 0
*
* Add @features to the desired features to be prepared on #TpConnection
* objects. Those features will be added to the features already returned be
- * tp_simple_client_factory_dup_connection_features().
+ * tp_client_factory_dup_connection_features().
*
* It is not necessary to add %TP_CONNECTION_FEATURE_CORE as it is already
* included by default.
@@ -643,38 +641,38 @@ tp_simple_client_factory_dup_connection_features (TpSimpleClientFactory *self,
* Note that these features will not be added to existing #TpConnection
* objects; the user must call tp_proxy_prepare_async() themself.
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
void
-tp_simple_client_factory_add_connection_features (
- TpSimpleClientFactory *self,
+tp_client_factory_add_connection_features (
+ TpClientFactory *self,
const GQuark *features)
{
- g_return_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self));
+ g_return_if_fail (TP_IS_CLIENT_FACTORY (self));
_tp_quark_array_merge (self->priv->desired_connection_features, features, -1);
}
/**
- * tp_simple_client_factory_add_connection_features_varargs: (skip)
- * @self: a #TpSimpleClientFactory
+ * tp_client_factory_add_connection_features_varargs: (skip)
+ * @self: a #TpClientFactory
* @feature: the first feature
* @...: the second and subsequent features, if any, ending with 0
*
- * The same as tp_simple_client_factory_add_connection_features(), but with a
+ * The same as tp_client_factory_add_connection_features(), but with a
* more convenient calling convention from C.
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
void
-tp_simple_client_factory_add_connection_features_varargs (
- TpSimpleClientFactory *self,
+tp_client_factory_add_connection_features_varargs (
+ TpClientFactory *self,
GQuark feature,
...)
{
va_list var_args;
- g_return_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self));
+ g_return_if_fail (TP_IS_CLIENT_FACTORY (self));
va_start (var_args, feature);
_tp_quark_array_merge_valist (self->priv->desired_connection_features,
@@ -683,8 +681,8 @@ tp_simple_client_factory_add_connection_features_varargs (
}
/**
- * tp_simple_client_factory_ensure_channel:
- * @self: a #TpSimpleClientFactory object
+ * tp_client_factory_ensure_channel:
+ * @self: a #TpClientFactory object
* @connection: a #TpConnection
* @object_path: the object path of a channel on @connection
* @immutable_properties: (transfer none) (element-type utf8 GObject.Value):
@@ -698,15 +696,15 @@ tp_simple_client_factory_add_connection_features_varargs (
*
* Note that the returned #TpChannel is not guaranteed to be ready; the
* caller is responsible for calling tp_proxy_prepare_async() with the desired
- * features (as given by tp_simple_client_factory_dup_channel_features()).
+ * features (as given by tp_client_factory_dup_channel_features()).
*
* Returns: (transfer full): a reference to a #TpChannel;
* see tp_channel_new_from_properties().
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
TpChannel *
-tp_simple_client_factory_ensure_channel (TpSimpleClientFactory *self,
+tp_client_factory_ensure_channel (TpClientFactory *self,
TpConnection *connection,
const gchar *object_path,
const GHashTable *immutable_properties,
@@ -714,7 +712,7 @@ tp_simple_client_factory_ensure_channel (TpSimpleClientFactory *self,
{
TpChannel *channel;
- g_return_val_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self), NULL);
+ g_return_val_if_fail (TP_IS_CLIENT_FACTORY (self), NULL);
g_return_val_if_fail (TP_IS_CONNECTION (connection), NULL);
g_return_val_if_fail (tp_proxy_get_factory (connection) == self, NULL);
g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
@@ -723,7 +721,7 @@ tp_simple_client_factory_ensure_channel (TpSimpleClientFactory *self,
if (channel != NULL)
return g_object_ref (channel);
- channel = TP_SIMPLE_CLIENT_FACTORY_GET_CLASS (self)->create_channel (self,
+ channel = TP_CLIENT_FACTORY_GET_CLASS (self)->create_channel (self,
connection, object_path, immutable_properties, error);
insert_proxy (self, channel);
@@ -731,8 +729,8 @@ tp_simple_client_factory_ensure_channel (TpSimpleClientFactory *self,
}
/**
- * tp_simple_client_factory_dup_channel_features:
- * @self: a #TpSimpleClientFactory object
+ * tp_client_factory_dup_channel_features:
+ * @self: a #TpClientFactory object
* @channel: a #TpChannel
*
* Return a zero-terminated #GArray containing the #TpChannel features that
@@ -741,30 +739,30 @@ tp_simple_client_factory_ensure_channel (TpSimpleClientFactory *self,
* Returns: (transfer full) (element-type GLib.Quark): a newly allocated
* #GArray
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
GArray *
-tp_simple_client_factory_dup_channel_features (TpSimpleClientFactory *self,
+tp_client_factory_dup_channel_features (TpClientFactory *self,
TpChannel *channel)
{
- g_return_val_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self), NULL);
+ g_return_val_if_fail (TP_IS_CLIENT_FACTORY (self), NULL);
g_return_val_if_fail (TP_IS_CHANNEL (channel), NULL);
g_return_val_if_fail (tp_proxy_get_factory (channel) == self, NULL);
- return TP_SIMPLE_CLIENT_FACTORY_GET_CLASS (self)->dup_channel_features (
+ return TP_CLIENT_FACTORY_GET_CLASS (self)->dup_channel_features (
self, channel);
}
/**
- * tp_simple_client_factory_add_channel_features:
- * @self: a #TpSimpleClientFactory object
+ * tp_client_factory_add_channel_features:
+ * @self: a #TpClientFactory object
* @features: (transfer none) (array zero-terminated=1) (allow-none): an array
* of desired features, ending with 0; %NULL is equivalent to an array
* containing only 0
*
* Add @features to the desired features to be prepared on #TpChannel
* objects. Those features will be added to the features already returned be
- * tp_simple_client_factory_dup_channel_features().
+ * tp_client_factory_dup_channel_features().
*
* It is not necessary to add %TP_CHANNEL_FEATURE_CORE as it is already
* included by default.
@@ -772,38 +770,38 @@ tp_simple_client_factory_dup_channel_features (TpSimpleClientFactory *self,
* Note that these features will not be added to existing #TpChannel
* objects; the user must call tp_proxy_prepare_async() themself.
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
void
-tp_simple_client_factory_add_channel_features (
- TpSimpleClientFactory *self,
+tp_client_factory_add_channel_features (
+ TpClientFactory *self,
const GQuark *features)
{
- g_return_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self));
+ g_return_if_fail (TP_IS_CLIENT_FACTORY (self));
_tp_quark_array_merge (self->priv->desired_channel_features, features, -1);
}
/**
- * tp_simple_client_factory_add_channel_features_varargs: (skip)
- * @self: a #TpSimpleClientFactory
+ * tp_client_factory_add_channel_features_varargs: (skip)
+ * @self: a #TpClientFactory
* @feature: the first feature
* @...: the second and subsequent features, if any, ending with 0
*
- * The same as tp_simple_client_factory_add_channel_features(), but with a
+ * The same as tp_client_factory_add_channel_features(), but with a
* more convenient calling convention from C.
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
void
-tp_simple_client_factory_add_channel_features_varargs (
- TpSimpleClientFactory *self,
+tp_client_factory_add_channel_features_varargs (
+ TpClientFactory *self,
GQuark feature,
...)
{
va_list var_args;
- g_return_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self));
+ g_return_if_fail (TP_IS_CLIENT_FACTORY (self));
va_start (var_args, feature);
_tp_quark_array_merge_valist (self->priv->desired_channel_features,
@@ -812,8 +810,8 @@ tp_simple_client_factory_add_channel_features_varargs (
}
/**
- * tp_simple_client_factory_ensure_contact:
- * @self: a #TpSimpleClientFactory object
+ * tp_client_factory_ensure_contact:
+ * @self: a #TpClientFactory object
* @connection: a #TpConnection
* @handle: a #TpHandle
* @identifier: a string representing the contact's identifier
@@ -825,27 +823,23 @@ tp_simple_client_factory_add_channel_features_varargs (
*
* Note that the returned #TpContact is not guaranteed to be ready; the caller
* is responsible for calling tp_connection_upgrade_contacts() with the desired
- * features (as given by tp_simple_client_factory_dup_contact_features()).
- *
- * For this function to work properly, tp_connection_has_immortal_handles()
- * must return %TRUE for @connection.
+ * features (as given by tp_client_factory_dup_contact_features()).
*
* Returns: (transfer full): a reference to a #TpContact.
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
TpContact *
-tp_simple_client_factory_ensure_contact (TpSimpleClientFactory *self,
+tp_client_factory_ensure_contact (TpClientFactory *self,
TpConnection *connection,
TpHandle handle,
const gchar *identifier)
{
TpContact *contact;
- g_return_val_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self), NULL);
+ g_return_val_if_fail (TP_IS_CLIENT_FACTORY (self), NULL);
g_return_val_if_fail (TP_IS_CONNECTION (connection), NULL);
g_return_val_if_fail (tp_proxy_get_factory (connection) == self, NULL);
- g_return_val_if_fail (tp_connection_has_immortal_handles (connection), NULL);
g_return_val_if_fail (handle != 0, NULL);
g_return_val_if_fail (identifier != NULL, NULL);
@@ -854,7 +848,7 @@ tp_simple_client_factory_ensure_contact (TpSimpleClientFactory *self,
if (contact != NULL)
return contact;
- contact = TP_SIMPLE_CLIENT_FACTORY_GET_CLASS (self)->create_contact (self,
+ contact = TP_CLIENT_FACTORY_GET_CLASS (self)->create_contact (self,
connection, handle, identifier);
_tp_connection_add_contact (connection, handle, contact);
@@ -862,116 +856,84 @@ tp_simple_client_factory_ensure_contact (TpSimpleClientFactory *self,
}
/**
- * tp_simple_client_factory_dup_contact_features:
- * @self: a #TpSimpleClientFactory object
+ * tp_client_factory_dup_contact_features:
+ * @self: a #TpClientFactory object
* @connection: a #TpConnection
*
- * Return a #GArray containing the #TpContactFeature that should be prepared on
- * all contacts of @connection.
+ * Return a #GArray containing the contact feature #GQuark<!-- -->s
+ * that should be prepared on all contacts of @connection.
*
- * Returns: (transfer full) (element-type TelepathyGLib.ContactFeature): a newly
+ * Returns: (transfer full) (element-type GLib.Quark): a newly
* allocated #GArray
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
GArray *
-tp_simple_client_factory_dup_contact_features (TpSimpleClientFactory *self,
+tp_client_factory_dup_contact_features (TpClientFactory *self,
TpConnection *connection)
{
- g_return_val_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self), NULL);
+ g_return_val_if_fail (TP_IS_CLIENT_FACTORY (self), NULL);
g_return_val_if_fail (TP_IS_CONNECTION (connection), NULL);
g_return_val_if_fail (tp_proxy_get_factory (connection) == self, NULL);
- return TP_SIMPLE_CLIENT_FACTORY_GET_CLASS (self)->dup_contact_features (
+ return TP_CLIENT_FACTORY_GET_CLASS (self)->dup_contact_features (
self, connection);
}
/**
- * tp_simple_client_factory_add_contact_features:
- * @self: a #TpSimpleClientFactory object
- * @n_features: The number of features in @features (may be 0)
- * @features: (array length=n_features) (allow-none): an array of desired
- * features (may be %NULL if @n_features is 0)
+ * tp_client_factory_add_contact_features:
+ * @self: a #TpClientFactory object
+ * @features: (transfer none) (array zero-terminated=1) (allow-none):
+ * an array of desired features
*
* Add @features to the desired features to be prepared on #TpContact
* objects. Those features will be added to the features already returned be
- * tp_simple_client_factory_dup_contact_features().
+ * tp_client_factory_dup_contact_features().
*
* Note that these features will not be added to existing #TpContact
* objects; the user must call tp_connection_upgrade_contacts() themself.
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
void
-tp_simple_client_factory_add_contact_features (TpSimpleClientFactory *self,
- guint n_features, const TpContactFeature *features)
+tp_client_factory_add_contact_features (TpClientFactory *self,
+ const GQuark *features)
{
- guint i;
-
- g_return_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self));
+ g_return_if_fail (TP_IS_CLIENT_FACTORY (self));
- /* Add features into desired_contact_features avoiding dups */
- for (i = 0; i < n_features; i++)
- {
- guint j;
- gboolean found = FALSE;
-
- for (j = 0; j < self->priv->desired_contact_features->len; j++)
- {
- if (features[i] == g_array_index (
- self->priv->desired_contact_features, TpContactFeature, j))
- {
- found = TRUE;
- break;
- }
- }
-
- if (!found)
- g_array_append_val (self->priv->desired_contact_features, features[i]);
- }
+ _tp_quark_array_merge (self->priv->desired_contact_features, features, -1);
}
/**
- * tp_simple_client_factory_add_contact_features_varargs: (skip)
- * @self: a #TpSimpleClientFactory
+ * tp_client_factory_add_contact_features_varargs: (skip)
+ * @self: a #TpClientFactory
* @feature: the first feature
- * @...: the second and subsequent features, if any, ending with
- * %TP_CONTACT_FEATURE_INVALID
+ * @...: the second and subsequent features, if any, ending with 0
*
- * The same as tp_simple_client_factory_add_contact_features(), but with a
+ * The same as tp_client_factory_add_contact_features(), but with a
* more convenient calling convention from C.
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
void
-tp_simple_client_factory_add_contact_features_varargs (
- TpSimpleClientFactory *self,
- TpContactFeature feature,
+tp_client_factory_add_contact_features_varargs (
+ TpClientFactory *self,
+ GQuark feature,
...)
{
va_list var_args;
- GArray *features;
- TpContactFeature f;
- g_return_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self));
+ g_return_if_fail (TP_IS_CLIENT_FACTORY (self));
va_start (var_args, feature);
- features = g_array_new (FALSE, FALSE, sizeof (TpContactFeature));
-
- for (f = feature; f != TP_CONTACT_FEATURE_INVALID;
- f = va_arg (var_args, TpContactFeature))
- g_array_append_val (features, f);
-
- tp_simple_client_factory_add_contact_features (self, features->len,
- (TpContactFeature *) features->data);
-
- g_array_unref (features);
+ _tp_quark_array_merge_valist (self->priv->desired_contact_features,
+ feature, var_args);
va_end (var_args);
}
/**
- * tp_simple_client_factory_ensure_channel_request:
- * @self: a #TpSimpleClientFactory object
+ * tp_client_factory_ensure_channel_request:
+ * @self: a #TpClientFactory object
* @object_path: the object path of a channel request
* @immutable_properties: (transfer none) (element-type utf8 GObject.Value):
* the immutable properties of the channel request
@@ -988,17 +950,17 @@ tp_simple_client_factory_add_contact_features_varargs (
* Returns: (transfer full): a reference to a #TpChannelRequest;
* see tp_channel_request_new().
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
TpChannelRequest *
-_tp_simple_client_factory_ensure_channel_request (TpSimpleClientFactory *self,
+_tp_client_factory_ensure_channel_request (TpClientFactory *self,
const gchar *object_path,
GHashTable *immutable_properties,
GError **error)
{
TpChannelRequest *request;
- g_return_val_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self), NULL);
+ g_return_val_if_fail (TP_IS_CLIENT_FACTORY (self), NULL);
g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
request = lookup_proxy (self, object_path);
@@ -1022,8 +984,8 @@ _tp_simple_client_factory_ensure_channel_request (TpSimpleClientFactory *self,
}
/**
- * tp_simple_client_factory_ensure_channel_dispatch_operation:
- * @self: a #TpSimpleClientFactory object
+ * tp_client_factory_ensure_channel_dispatch_operation:
+ * @self: a #TpClientFactory object
* @object_path: the object path of a channel dispatch operation
* @immutable_properties: (transfer none) (element-type utf8 GObject.Value):
* the immutable properties of the channel dispatch operation
@@ -1040,18 +1002,18 @@ _tp_simple_client_factory_ensure_channel_request (TpSimpleClientFactory *self,
* Returns: (transfer full): a reference to a
* #TpChannelDispatchOperation; see tp_channel_dispatch_operation_new().
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
TpChannelDispatchOperation *
-_tp_simple_client_factory_ensure_channel_dispatch_operation (
- TpSimpleClientFactory *self,
+_tp_client_factory_ensure_channel_dispatch_operation (
+ TpClientFactory *self,
const gchar *object_path,
GHashTable *immutable_properties,
GError **error)
{
TpChannelDispatchOperation *dispatch;
- g_return_val_if_fail (TP_IS_SIMPLE_CLIENT_FACTORY (self), NULL);
+ g_return_val_if_fail (TP_IS_CLIENT_FACTORY (self), NULL);
g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
dispatch = lookup_proxy (self, object_path);
diff --git a/telepathy-glib/client-factory.h b/telepathy-glib/client-factory.h
new file mode 100644
index 000000000..58c88d6c6
--- /dev/null
+++ b/telepathy-glib/client-factory.h
@@ -0,0 +1,162 @@
+/*
+ * A factory for TpContacts and plain subclasses of TpProxy
+ *
+ * Copyright © 2011 Collabora Ltd.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef __TP_CLIENT_FACTORY_H__
+#define __TP_CLIENT_FACTORY_H__
+
+#include <telepathy-glib/account.h>
+#include <telepathy-glib/channel.h>
+#include <telepathy-glib/channel-dispatch-operation.h>
+#include <telepathy-glib/channel-request.h>
+#include <telepathy-glib/connection.h>
+#include <telepathy-glib/contact.h>
+#include <telepathy-glib/dbus-daemon.h>
+
+G_BEGIN_DECLS
+
+/* TpClientFactory is typedef'd in proxy.h */
+typedef struct _TpClientFactoryPrivate TpClientFactoryPrivate;
+typedef struct _TpClientFactoryClass TpClientFactoryClass;
+
+struct _TpClientFactoryClass {
+ /*<public>*/
+ GObjectClass parent_class;
+
+ /* TpAccount */
+ TpAccount * (*create_account) (TpClientFactory *self,
+ const gchar *object_path,
+ const GHashTable *immutable_properties,
+ GError **error);
+ GArray * (*dup_account_features) (TpClientFactory *self,
+ TpAccount *account);
+
+ /* TpConnection */
+ TpConnection * (*create_connection) (TpClientFactory *self,
+ const gchar *object_path,
+ const GHashTable *immutable_properties,
+ GError **error);
+ GArray * (*dup_connection_features) (TpClientFactory *self,
+ TpConnection *connection);
+
+ /* TpChannel */
+ TpChannel * (*create_channel) (TpClientFactory *self,
+ TpConnection *conn,
+ const gchar *object_path,
+ const GHashTable *immutable_properties,
+ GError **error);
+ GArray * (*dup_channel_features) (TpClientFactory *self,
+ TpChannel *channel);
+
+ /* TpContact */
+ TpContact * (*create_contact) (TpClientFactory *self,
+ TpConnection *connection,
+ TpHandle handle,
+ const gchar *identifier);
+ GArray * (*dup_contact_features) (TpClientFactory *self,
+ TpConnection *connection);
+
+ /*<private>*/
+ GCallback padding[20];
+};
+
+struct _TpClientFactory {
+ /*<private>*/
+ GObject parent;
+ TpClientFactoryPrivate *priv;
+};
+
+GType tp_client_factory_get_type (void);
+
+#define TP_TYPE_CLIENT_FACTORY \
+ (tp_client_factory_get_type ())
+#define TP_CLIENT_FACTORY(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), TP_TYPE_CLIENT_FACTORY, \
+ TpClientFactory))
+#define TP_CLIENT_FACTORY_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), TP_TYPE_CLIENT_FACTORY, \
+ TpClientFactoryClass))
+#define TP_IS_CLIENT_FACTORY(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TP_TYPE_CLIENT_FACTORY))
+#define TP_IS_CLIENT_FACTORY_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), TP_TYPE_CLIENT_FACTORY))
+#define TP_CLIENT_FACTORY_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_CLIENT_FACTORY, \
+ TpClientFactoryClass))
+
+TpClientFactory * tp_client_factory_new (TpDBusDaemon *dbus);
+
+TpDBusDaemon *tp_client_factory_get_dbus_daemon (TpClientFactory *self);
+
+/* TpAccount */
+TpAccount *tp_client_factory_ensure_account (TpClientFactory *self,
+ const gchar *object_path,
+ const GHashTable *immutable_properties,
+ GError **error);
+GArray *tp_client_factory_dup_account_features (TpClientFactory *self,
+ TpAccount *account);
+void tp_client_factory_add_account_features (TpClientFactory *self,
+ const GQuark *features);
+void tp_client_factory_add_account_features_varargs (TpClientFactory *self,
+ GQuark feature,
+ ...);
+
+/* TpConnection */
+TpConnection *tp_client_factory_ensure_connection (TpClientFactory *self,
+ const gchar *object_path,
+ const GHashTable *immutable_properties,
+ GError **error);
+GArray *tp_client_factory_dup_connection_features (TpClientFactory *self,
+ TpConnection *connection);
+void tp_client_factory_add_connection_features (TpClientFactory *self,
+ const GQuark *features);
+void tp_client_factory_add_connection_features_varargs (TpClientFactory *self,
+ GQuark feature,
+ ...);
+
+/* TpChannel */
+TpChannel *tp_client_factory_ensure_channel (TpClientFactory *self,
+ TpConnection *connection,
+ const gchar *object_path,
+ const GHashTable *immutable_properties,
+ GError **error);
+GArray *tp_client_factory_dup_channel_features (TpClientFactory *self,
+ TpChannel *channel);
+void tp_client_factory_add_channel_features (TpClientFactory *self,
+ const GQuark *features);
+void tp_client_factory_add_channel_features_varargs (TpClientFactory *self,
+ GQuark feature,
+ ...);
+
+/* TpContact */
+TpContact *tp_client_factory_ensure_contact (TpClientFactory *self,
+ TpConnection *connection,
+ TpHandle handle,
+ const gchar *identifier);
+GArray *tp_client_factory_dup_contact_features (TpClientFactory *self,
+ TpConnection *connection);
+void tp_client_factory_add_contact_features (TpClientFactory *self,
+ const GQuark *features);
+void tp_client_factory_add_contact_features_varargs (TpClientFactory *self,
+ GQuark feature,
+ ...);
+
+G_END_DECLS
+
+#endif
diff --git a/telepathy-glib/client.c b/telepathy-glib/client.c
index 0bd5502b7..a0f123135 100644
--- a/telepathy-glib/client.c
+++ b/telepathy-glib/client.c
@@ -23,6 +23,7 @@
#include "telepathy-glib/client.h"
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/errors.h>
@@ -32,8 +33,6 @@
#define DEBUG_FLAG TP_DEBUG_DISPATCHER
#include "telepathy-glib/debug-internal.h"
-#include "telepathy-glib/_gen/tp-cli-client-body.h"
-
/**
* SECTION:client
* @title: TpClient
@@ -54,8 +53,7 @@
* useful in the implementation of the ChannelDispatcher itself.
*
* This proxy is usable but very incomplete: accessors for D-Bus properties
- * will be added in a later version of telepathy-glib, along with a mechanism
- * similar to tp_connection_call_when_ready().
+ * will be added in a later version of telepathy-glib.
*
* Many operations performed on a Client are done via D-Bus properties.
* Until convenience methods for this are implemented, use of the generic
diff --git a/telepathy-glib/client.h b/telepathy-glib/client.h
index fce1220dc..55143bf8b 100644
--- a/telepathy-glib/client.h
+++ b/telepathy-glib/client.h
@@ -68,6 +68,4 @@ void tp_client_init_known_interfaces (void);
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-client.h>
-
#endif
diff --git a/telepathy-glib/cm-message-internal.h b/telepathy-glib/cm-message-internal.h
index 3442145d5..5c13da626 100644
--- a/telepathy-glib/cm-message-internal.h
+++ b/telepathy-glib/cm-message-internal.h
@@ -52,7 +52,6 @@ struct _TpCMMessage {
/* for sending */
DBusGMethodInvocation *outgoing_context;
TpMessageSendingFlags outgoing_flags;
- gboolean outgoing_text_api;
};
TpMessage * _tp_cm_message_new_from_parts (TpBaseConnection *conn,
diff --git a/telepathy-glib/cm-message.c b/telepathy-glib/cm-message.c
index ad42d8083..353ede957 100644
--- a/telepathy-glib/cm-message.c
+++ b/telepathy-glib/cm-message.c
@@ -24,7 +24,7 @@
* @short_description: a message in the Telepathy message interface, CM side
*
* #TpCMMessage is used within connection managers to represent a
- * message sent or received using the Messages interface.
+ * message sent or received.
*
* Since: 0.13.9
*/
@@ -218,12 +218,12 @@ tp_cm_message_take_message (TpMessage *self,
message->parts));
/* Now that @self has stolen @message's parts, replace them with a stub to
- * keep tp_message_destroy happy.
+ * keep the destructor happy.
*/
message->parts = g_ptr_array_sized_new (1);
tp_message_append_part (message);
- tp_message_destroy (message);
+ g_object_unref (message);
}
/**
diff --git a/telepathy-glib/cm-message.h b/telepathy-glib/cm-message.h
index 79b63de93..3906e2382 100644
--- a/telepathy-glib/cm-message.h
+++ b/telepathy-glib/cm-message.h
@@ -64,13 +64,6 @@ TpHandle tp_cm_message_get_sender (TpMessage *self);
void tp_cm_message_set_sender (TpMessage *self,
TpHandle handle);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED
-TpMessage *tp_message_new (TpBaseConnection *connection,
- guint initial_parts,
- guint size_hint) G_GNUC_WARN_UNUSED_RESULT;
-#endif
-
G_END_DECLS
#endif /* __TP_CM_MESSAGE_H__ */
diff --git a/telepathy-glib/codegen.am b/telepathy-glib/codegen.am
index 26caaef0b..4135d16e4 100644
--- a/telepathy-glib/codegen.am
+++ b/telepathy-glib/codegen.am
@@ -22,26 +22,33 @@ codegen_extra_dist = \
generic.xml \
genums.c.template \
genums.h.template \
- media-session-handler.xml \
- media-stream-handler.xml \
protocol.xml \
stable-interfaces.xml \
tls-cert.xml
codegen_sources = \
- $(nodist_libtelepathy_glib_internal_la_SOURCES) \
+ $(nodist_libtelepathy_glib_core_internal_la_SOURCES) \
+ $(nodist_libtelepathy_glib_dbus_internal_la_SOURCES) \
+ $(nodist_libtelepathy_glib_main_internal_la_SOURCES) \
$(nodist_geninclude_HEADERS) \
+ $(nodist_gendbusinclude_HEADERS) \
_gen/stable-spec.xml \
_gen/spec-stamp \
_gen/stable-stamp \
- _gen/reentrant-methods.list
+ $(NULL)
+
+nodist_gendbusinclude_HEADERS = \
+ _gen/gtypes.h \
+ _gen/telepathy-interfaces.h \
+ $(NULL)
nodist_geninclude_HEADERS = \
_gen/error-str.h \
_gen/telepathy-enums.h \
- _gen/telepathy-interfaces.h \
_gen/genums.h \
- _gen/gtypes.h \
+ $(NULL)
+
+nodist_gendbusinclude_HEADERS += \
_gen/tp-cli-account.h \
_gen/tp-cli-account-manager.h \
_gen/tp-cli-call-content.h \
@@ -58,8 +65,6 @@ nodist_geninclude_HEADERS = \
_gen/tp-cli-dbus-daemon.h \
_gen/tp-cli-debug.h \
_gen/tp-cli-generic.h \
- _gen/tp-cli-media-session-handler.h \
- _gen/tp-cli-media-stream-handler.h \
_gen/tp-cli-protocol.h \
_gen/tp-cli-tls-cert.h \
_gen/tp-svc-account.h \
@@ -77,16 +82,24 @@ nodist_geninclude_HEADERS = \
_gen/tp-svc-connection-manager.h \
_gen/tp-svc-debug.h \
_gen/tp-svc-generic.h \
- _gen/tp-svc-media-session-handler.h \
- _gen/tp-svc-media-stream-handler.h \
_gen/tp-svc-protocol.h \
- _gen/tp-svc-tls-cert.h
+ _gen/tp-svc-tls-cert.h \
+ $(NULL)
-nodist_libtelepathy_glib_internal_la_SOURCES = \
- _gen/error-str.c \
- _gen/interfaces-body.h \
+nodist_libtelepathy_glib_core_internal_la_SOURCES = \
_gen/genums.c \
+ $(NULL)
+
+nodist_libtelepathy_glib_dbus_internal_la_SOURCES = \
_gen/gtypes-body.h \
+ _gen/interfaces-body.h \
+ $(NULL)
+
+nodist_libtelepathy_glib_main_internal_la_SOURCES = \
+ _gen/error-str.c \
+ $(NULL)
+
+nodist_libtelepathy_glib_dbus_internal_la_SOURCES += \
_gen/register-dbus-glib-marshallers-body.h \
_gen/tp-cli-account-body.h \
_gen/tp-cli-account-manager-body.h \
@@ -104,8 +117,6 @@ nodist_libtelepathy_glib_internal_la_SOURCES = \
_gen/tp-cli-dbus-daemon-body.h \
_gen/tp-cli-debug-body.h \
_gen/tp-cli-generic-body.h \
- _gen/tp-cli-media-session-handler-body.h \
- _gen/tp-cli-media-stream-handler-body.h \
_gen/tp-cli-protocol-body.h \
_gen/tp-cli-tls-cert-body.h \
_gen/tp-svc-account.c \
@@ -123,10 +134,35 @@ nodist_libtelepathy_glib_internal_la_SOURCES = \
_gen/tp-svc-connection-manager.c \
_gen/tp-svc-debug.c \
_gen/tp-svc-generic.c \
- _gen/tp-svc-media-session-handler.c \
- _gen/tp-svc-media-stream-handler.c \
_gen/tp-svc-protocol.c \
- _gen/tp-svc-tls-cert.c
+ _gen/tp-svc-tls-cert.c \
+ $(NULL)
+
+nodist_libtelepathy_glib_reentrants_la_SOURCES = \
+ _gen/tp-cli-account-reentrant-body.h \
+ _gen/tp-cli-account-manager-reentrant-body.h \
+ _gen/tp-cli-channel-reentrant-body.h \
+ _gen/tp-cli-channel-dispatcher-reentrant-body.h \
+ _gen/tp-cli-channel-dispatch-operation-reentrant-body.h \
+ _gen/tp-cli-channel-request-reentrant-body.h \
+ _gen/tp-cli-client-reentrant-body.h \
+ _gen/tp-cli-connection-reentrant-body.h \
+ _gen/tp-cli-connection-manager-reentrant-body.h \
+ _gen/tp-cli-dbus-daemon-reentrant-body.h \
+ _gen/tp-cli-generic-reentrant-body.h \
+ _gen/tp-cli-protocol-reentrant-body.h \
+ _gen/tp-cli-account-reentrant.h \
+ _gen/tp-cli-account-manager-reentrant.h \
+ _gen/tp-cli-channel-reentrant.h \
+ _gen/tp-cli-channel-dispatcher-reentrant.h \
+ _gen/tp-cli-channel-dispatch-operation-reentrant.h \
+ _gen/tp-cli-channel-request-reentrant.h \
+ _gen/tp-cli-client-reentrant.h \
+ _gen/tp-cli-connection-reentrant.h \
+ _gen/tp-cli-connection-manager-reentrant.h \
+ _gen/tp-cli-dbus-daemon-reentrant.h \
+ _gen/tp-cli-generic-reentrant.h \
+ _gen/tp-cli-protocol-reentrant.h
# Generated stuff
@@ -146,14 +182,6 @@ _gen/stable-spec.xml: stable-interfaces.xml _gen/stable-stamp $(tools_dir)/xincl
$(AM_V_GEN)$(PYTHON) $(tools_dir)/xincludator.py $< > $@.tmp
@mv $@.tmp $@
-# Grab a list of re-entrant tp_cli_*_run_* methods we are committed to
-# generating for backwards compatibility.
-# grep --no-filename is not portable :-(
-_gen/reentrant-methods.list: $(ABI_LISTS) codegen.am
- $(AM_V_GEN)( cd $(srcdir) && cat $(ABI_LISTS) ) | \
- $(GREP) '^tp_cli_.*_run_.*' > $@.tmp
- @mv $@.tmp $@
-
# Things generated from the whole spec at once
# do nothing, output as a side-effect
@@ -184,14 +212,18 @@ _gen/register-dbus-glib-marshallers-body.h: _gen/stable-spec.xml \
$(tools_dir)/glib-client-marshaller-gen.py
$(AM_V_GEN)$(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< _tp > $@
-_gen/genums.c: _gen/spec-stamp genums.c.template $(our_headers) codegen.am
+_gen/genums.c: _gen/spec-stamp genums.c.template \
+ $(tpginclude_HEADERS) codegen.am
$(AM_V_GEN)( cd $(srcdir) && \
- $(GLIB_MKENUMS) --template genums.c.template $(our_headers) \
+ $(GLIB_MKENUMS) --template genums.c.template \
+ $(tpginclude_HEADERS) \
) > $@
-_gen/genums.h: _gen/spec-stamp genums.h.template $(our_headers) codegen.am
+_gen/genums.h: _gen/spec-stamp genums.h.template \
+ $(tpginclude_HEADERS) codegen.am
$(AM_V_GEN)( cd $(srcdir) && \
- $(GLIB_MKENUMS) --template genums.h.template $(our_headers) \
+ $(GLIB_MKENUMS) --template genums.h.template \
+ $(tpginclude_HEADERS) \
) > $@
_gen/error-str.h: _gen/error-str.c
@@ -225,9 +257,12 @@ _gen/tp-svc-%.c: _gen/tp-spec-%.xml \
# do nothing, output as a side-effect
_gen/tp-cli-%.h: _gen/tp-cli-%-body.h
@:
+_gen/tp-cli-%-reentrant.h: _gen/tp-cli-%-body.h
+ @:
+_gen/tp-cli-%-reentrant-body.h: _gen/tp-cli-%-body.h
+ @:
_gen/tp-cli-%-body.h: _gen/tp-spec-%.xml \
- _gen/reentrant-methods.list \
$(tools_dir)/glib-client-gen.py \
codegen.am
$(AM_V_GEN)set -e; \
@@ -246,11 +281,9 @@ _gen/tp-cli-%-body.h: _gen/tp-spec-%.xml \
;; \
call-content) \
subclass=--subclass=TpCallContent; \
- subclass_assert=--subclass-assert=TP_IS_CALL_CONTENT; \
;; \
call-stream) \
subclass=--subclass=TpCallStream; \
- subclass_assert=--subclass-assert=TP_IS_CALL_STREAM; \
;; \
channel) \
subclass=--subclass=TpChannel; \
@@ -280,14 +313,6 @@ _gen/tp-cli-%-body.h: _gen/tp-spec-%.xml \
subclass=--subclass=TpConnection; \
subclass_assert=--subclass-assert=TP_IS_CONNECTION; \
;; \
- media-session-handler) \
- subclass=--subclass=TpMediaSessionHandler; \
- subclass_assert=--subclass-assert=TP_IS_MEDIA_SESSION_HANDLER; \
- ;; \
- media-stream-handler) \
- subclass=--subclass=TpMediaStreamHandler; \
- subclass_assert=--subclass-assert=TP_IS_MEDIA_STREAM_HANDLER; \
- ;; \
dbus-daemon) \
subclass=--subclass=TpDBusDaemon; \
subclass_assert=--subclass-assert=TP_IS_DBUS_DAEMON; \
@@ -309,7 +334,7 @@ _gen/tp-cli-%-body.h: _gen/tp-spec-%.xml \
--tp-proxy-api=0.7.6 \
--deprecation-attribute=_TP_GNUC_DEPRECATED \
--deprecate-reentrant=TP_DISABLE_DEPRECATED \
- --generate-reentrant=_gen/reentrant-methods.list \
+ --split-reentrants=yes \
$< Tp_Cli _gen/tp-cli-$*
# vim:set ft=automake:
diff --git a/telepathy-glib/connection-aliasing.c b/telepathy-glib/connection-aliasing.c
index 5bf7dd795..f5e5f3b8e 100644
--- a/telepathy-glib/connection-aliasing.c
+++ b/telepathy-glib/connection-aliasing.c
@@ -22,6 +22,7 @@
#include "telepathy-glib/connection.h"
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/interfaces.h>
@@ -90,7 +91,7 @@ get_alias_flag_cb (TpConnection *self,
self->priv->alias_flags = flags;
finally:
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
void
diff --git a/telepathy-glib/connection-avatars.c b/telepathy-glib/connection-avatars.c
index e9c3e575d..80b1a5adf 100644
--- a/telepathy-glib/connection-avatars.c
+++ b/telepathy-glib/connection-avatars.c
@@ -23,6 +23,7 @@
#include "telepathy-glib/connection.h"
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/interfaces.h>
@@ -85,7 +86,7 @@ tp_connection_get_avatar_requirements_cb (TpProxy *proxy,
tp_asv_get_uint32 (properties, "MaximumAvatarBytes", NULL));
finally:
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
void
diff --git a/telepathy-glib/connection-contact-info.c b/telepathy-glib/connection-contact-info.c
index 3349c8bdf..7fcbf32f2 100644
--- a/telepathy-glib/connection-contact-info.c
+++ b/telepathy-glib/connection-contact-info.c
@@ -26,6 +26,8 @@
#include <dbus/dbus-protocol.h>
+#include <telepathy-glib/cli-connection.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
@@ -431,7 +433,7 @@ tp_connection_get_contact_info_cb (TpProxy *proxy,
}
finally:
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
void
diff --git a/telepathy-glib/connection-contact-list.c b/telepathy-glib/connection-contact-list.c
index 2e6d597bd..40ab28416 100644
--- a/telepathy-glib/connection-contact-list.c
+++ b/telepathy-glib/connection-contact-list.c
@@ -22,9 +22,11 @@
#include "telepathy-glib/connection-contact-list.h"
+#include <telepathy-glib/cli-connection.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/simple-client-factory.h>
+#include <telepathy-glib/client-factory.h>
#include <telepathy-glib/util.h>
#define DEBUG_FLAG TP_DEBUG_CONNECTION
@@ -175,7 +177,7 @@ process_queued_contacts_changed (TpConnection *self)
if (contact != NULL)
continue;
- contact = tp_simple_client_factory_ensure_contact (
+ contact = tp_client_factory_ensure_contact (
tp_proxy_get_factory (self), self, handle, identifier);
_tp_contact_set_subscription_states (contact, value);
g_ptr_array_add (item->new_contacts, contact);
@@ -187,12 +189,12 @@ process_queued_contacts_changed (TpConnection *self)
return;
}
- features = tp_simple_client_factory_dup_contact_features (
+ features = tp_client_factory_dup_contact_features (
tp_proxy_get_factory (self), self);
tp_connection_upgrade_contacts_async (self,
item->new_contacts->len, (TpContact **) item->new_contacts->pdata,
- features->len, (TpContactFeature *) features->data,
+ (const GQuark *) features->data,
new_contacts_upgraded_cb, NULL);
g_array_unref (features);
@@ -259,10 +261,10 @@ got_contact_list_attributes_cb (TpConnection *self,
TpContact *contact;
GError *e = NULL;
- contact = tp_simple_client_factory_ensure_contact (
+ contact = tp_client_factory_ensure_contact (
tp_proxy_get_factory (self), self, handle, id);
if (!_tp_contact_set_attributes (contact, value,
- features->len, (TpContactFeature *) features->data, &e))
+ (const GQuark *) features->data, &e))
{
DEBUG ("Error setting contact attributes: %s", e->message);
g_clear_error (&e);
@@ -291,7 +293,7 @@ got_contact_list_attributes_cb (TpConnection *self,
OUT:
if (result != NULL)
{
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
}
@@ -319,17 +321,17 @@ prepare_roster (TpConnection *self,
return;
}
- tp_cli_connection_interface_contact_list_connect_to_contacts_changed_with_id (
+ tp_cli_connection_interface_contact_list_connect_to_contacts_changed (
self, contacts_changed_cb, NULL, NULL, NULL, NULL);
- features = tp_simple_client_factory_dup_contact_features (
+ features = tp_client_factory_dup_contact_features (
tp_proxy_get_factory (self), self);
- supported_interfaces = _tp_contacts_bind_to_signals (self, features->len,
- (TpContactFeature *) features->data);
+ supported_interfaces = _tp_contacts_bind_to_signals (self,
+ (const GQuark *) features->data);
tp_cli_connection_interface_contact_list_call_get_contact_list_attributes (
- self, -1, supported_interfaces, TRUE,
+ self, -1, supported_interfaces,
got_contact_list_attributes_cb,
features, (GDestroyNotify) g_array_unref,
result ? g_object_ref (result) : NULL);
@@ -419,7 +421,7 @@ prepare_contact_list_props_cb (TpProxy *proxy,
self->priv->contact_list_state);
OUT:
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
void _tp_connection_prepare_contact_list_async (TpProxy *proxy,
@@ -629,7 +631,7 @@ prepare_contact_groups_cb (TpProxy *proxy,
g_ptr_array_add (self->priv->contact_groups, NULL);
OUT:
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
void
@@ -669,7 +671,7 @@ _tp_connection_prepare_contact_groups_async (TpProxy *proxy,
* %TP_CONTACT_LIST_STATE_SUCCESS, all #TpContact objects will also be created
* and prepared with the desired features. See tp_connection_dup_contact_list()
* to get the list of contacts, and
- * tp_simple_client_factory_add_contact_features() to define which features
+ * tp_client_factory_add_contact_features() to define which features
* needs to be prepared on them.
*
* This feature will fail to prepare when using obsolete Telepathy connection
@@ -766,7 +768,7 @@ tp_connection_get_request_uses_message (TpConnection *self)
* Retrieves the user's contact list. In general, blocked contacts are not
* included in this list. The #TpContact objects returned are guaranteed to
* have all of the features previously passed to
- * tp_simple_client_factory_add_contact_features() prepared.
+ * tp_client_factory_add_contact_features() prepared.
*
* Before calling this method, you must first call tp_proxy_prepare_async() with
* the %TP_CONNECTION_FEATURE_CONTACT_LIST feature, and verify that
@@ -1662,7 +1664,7 @@ blocked_changed_head_ready (TpConnection *self)
_tp_connection_set_contact_blocked (self, contact);
}
- g_simple_async_result_complete_in_idle (item->result);
+ g_simple_async_result_complete (item->result);
}
blocked_changed_item_free (item);
@@ -1764,7 +1766,7 @@ process_queued_blocked_changed (TpConnection *self)
const gchar *identifier = value;
TpContact *contact;
- contact = tp_simple_client_factory_ensure_contact (
+ contact = tp_client_factory_ensure_contact (
tp_proxy_get_factory (self), self, handle, identifier);
g_ptr_array_add (item->added_contacts, contact);
@@ -1780,7 +1782,7 @@ process_queued_blocked_changed (TpConnection *self)
const gchar *identifier = value;
TpContact *contact;
- contact = tp_simple_client_factory_ensure_contact (
+ contact = tp_client_factory_ensure_contact (
tp_proxy_get_factory (self), self, handle, identifier);
g_ptr_array_add (item->removed_contacts, contact);
@@ -1796,12 +1798,12 @@ process_queued_blocked_changed (TpConnection *self)
return;
}
- features = tp_simple_client_factory_dup_contact_features (
+ features = tp_client_factory_dup_contact_features (
tp_proxy_get_factory (self), self);
tp_connection_upgrade_contacts_async (self,
contacts->len, (TpContact **) contacts->pdata,
- features->len, (TpContactFeature *) features->data,
+ (const GQuark *) features->data,
blocked_contacts_upgraded_cb, NULL);
g_array_unref (features);
@@ -1838,7 +1840,7 @@ request_blocked_contacts_cb (TpConnection *self,
{
DEBUG ("Error calling RequestBlockedContacts: %s", error->message);
g_simple_async_result_set_from_error (result, error);
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
return;
}
diff --git a/telepathy-glib/connection-handles.c b/telepathy-glib/connection-handles.c
index 8fadb9a9f..9fa121c8f 100644
--- a/telepathy-glib/connection-handles.c
+++ b/telepathy-glib/connection-handles.c
@@ -1,4 +1,4 @@
-/* Helper to hold Telepathy handles.
+/* Helper to do stuff to Telepathy handles.
*
* Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/>
* Copyright (C) 2008 Nokia Corporation
@@ -22,187 +22,14 @@
#include "telepathy-glib/connection-internal.h"
+#include <telepathy-glib/cli-connection.h>
+
#include <dbus/dbus.h>
#include <dbus/dbus-glib-lowlevel.h>
#define DEBUG_FLAG TP_DEBUG_HANDLES
#include "telepathy-glib/debug-internal.h"
-/**
- * tp_connection_unref_handles:
- * @self: a connection
- * @handle_type: a handle type
- * @n_handles: the number of handles in @handles
- * @handles: (array length=n_handles): an array of @n_handles handles
- *
- * Do nothing. In versions of telepathy-glib prior to 0.13.8,
- * this released a reference to the handles in @handles.
- *
- * Deprecated: This is no-op so can be safely removed.
- */
-void
-tp_connection_unref_handles (TpConnection *self G_GNUC_UNUSED,
- TpHandleType handle_type G_GNUC_UNUSED,
- guint n_handles G_GNUC_UNUSED,
- const TpHandle *handles G_GNUC_UNUSED)
-{
-}
-
-
-typedef struct {
- TpHandleType handle_type;
- GArray *handles;
- gpointer user_data;
- GDestroyNotify destroy;
- TpConnectionHoldHandlesCb callback;
-} HoldHandlesContext;
-
-
-static void
-hold_handles_context_free (gpointer p)
-{
- HoldHandlesContext *context = p;
-
- if (context->destroy != NULL)
- context->destroy (context->user_data);
-
- g_array_unref (context->handles);
-
- g_slice_free (HoldHandlesContext, context);
-}
-
-/**
- * TpConnectionHoldHandlesCb:
- * @connection: the connection
- * @handle_type: the handle type that was passed to
- * tp_connection_hold_handles()
- * @n_handles: the number of handles that were passed to
- * tp_connection_hold_handles() on success, or 0 on failure
- * @handles: a copy of the array of @n_handles handles that was passed to
- * tp_connection_hold_handles() on success, or %NULL on failure
- * @error: %NULL on success, or an error on failure
- * @user_data: the same arbitrary pointer that was passed to
- * tp_connection_hold_handles()
- * @weak_object: the same object that was passed to
- * tp_connection_hold_handles()
- *
- * Signature of the callback called when tp_connection_hold_handles() succeeds
- * or fails.
- *
- * On success, the caller has a reference to each handle in @handles.
- *
- * Since telepathy-glib version 0.13.8,
- * the handles will remain valid until @connection becomes invalid
- * (signalled by #TpProxy::invalidated). In earlier versions, they could be
- * released with tp_connection_unref_handles().
- *
- * For convenience, the handle type and handles requested by the caller are
- * passed through to this callback on success, so the caller does not have to
- * include them in @user_data.
- *
- * Deprecated: See tp_connection_hold_handles().
- */
-
-static void
-connection_held_handles (TpConnection *self,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- HoldHandlesContext *context = user_data;
-
- g_object_ref (self);
-
- if (error == NULL)
- {
- DEBUG ("%u handles of type %u", context->handles->len,
- context->handle_type);
- /* On the Telepathy side, we have held these handles (at least once).
- * That's all we need. */
-
- context->callback (self, context->handle_type, context->handles->len,
- (const TpHandle *) context->handles->data, NULL,
- context->user_data, weak_object);
- }
- else
- {
- DEBUG ("%u handles of type %u failed: %s %u: %s",
- context->handles->len, context->handle_type,
- g_quark_to_string (error->domain), error->code, error->message);
- context->callback (self, context->handle_type, 0, NULL, error,
- context->user_data, weak_object);
- }
-
- g_object_unref (self);
-}
-
-
-/**
- * tp_connection_hold_handles:
- * @self: a connection
- * @timeout_ms: the timeout in milliseconds, or -1 to use the default
- * @handle_type: the handle type
- * @n_handles: the number of handles in @handles (must be at least 1)
- * @handles: (array length=n_handles): an array of handles
- * @callback: called on success or failure (unless @weak_object has become
- * unreferenced)
- * @user_data: arbitrary user-supplied data
- * @destroy: called to destroy @user_data after calling @callback, or when
- * @weak_object becomes unreferenced (whichever occurs sooner)
- * @weak_object: if not %NULL, an object to be weakly referenced: if it is
- * destroyed, @callback will not be called
- *
- * Hold (ensure a reference to) the given handles, if they are valid.
- *
- * If they are valid, the callback will later be called with the given
- * handles; if not all of them are valid, the callback will be called with
- * an error.
- *
- * This function, along with tp_connection_unref_handles(),
- * tp_connection_get_contact_attributes() and #TpContact, keeps a client-side
- * reference count of handles; you should not use the RequestHandles,
- * HoldHandles and GetContactAttributes D-Bus methods directly as well as these
- * functions.
- *
- * Deprecated: Holding handles is not needed with Connection Managers having
- * immortal handles (any Connection Manager using telepathy-glib >= 0.13.8).
- * Other Connection Managers are considered deprecated, clients wanting to
- * still support them should continue using this deprecated function.
- */
-void
-tp_connection_hold_handles (TpConnection *self,
- gint timeout_ms,
- TpHandleType handle_type,
- guint n_handles,
- const TpHandle *handles,
- TpConnectionHoldHandlesCb callback,
- gpointer user_data,
- GDestroyNotify destroy,
- GObject *weak_object)
-{
- HoldHandlesContext *context;
-
- g_return_if_fail (TP_IS_CONNECTION (self));
- g_return_if_fail (handle_type > TP_HANDLE_TYPE_NONE);
- g_return_if_fail (handle_type < TP_NUM_HANDLE_TYPES);
- g_return_if_fail (n_handles >= 1);
- g_return_if_fail (callback != NULL);
-
- context = g_slice_new0 (HoldHandlesContext);
- context->handle_type = handle_type;
- context->user_data = user_data;
- context->destroy = destroy;
- context->handles = g_array_sized_new (FALSE, FALSE, sizeof (guint),
- n_handles);
- g_array_append_vals (context->handles, handles, n_handles);
- context->callback = callback;
-
- tp_cli_connection_call_hold_handles (self, timeout_ms, handle_type,
- context->handles, connection_held_handles,
- context, hold_handles_context_free, weak_object);
-}
-
-
typedef struct {
TpHandleType handle_type;
guint n_ids;
@@ -250,11 +77,6 @@ request_handles_context_free (gpointer p)
*
* On success, the caller has a reference to each handle in @handles.
*
- * Since telepathy-glib version 0.13.8,
- * the handles will remain valid until @connection becomes invalid
- * (signalled by #TpProxy::invalidated). In earlier versions, they could be
- * released with tp_connection_unref_handles().
- *
* For convenience, the handle type and IDs requested by the caller are
* passed through to this callback, so the caller does not have to include
* them in @user_data.
@@ -332,8 +154,8 @@ connection_requested_handles (TpConnection *self,
* @weak_object: if not %NULL, an object to be weakly referenced: if it is
* destroyed, @callback will not be called
*
- * Request the handles corresponding to the given identifiers, and if they
- * are valid, hold (ensure a reference to) the corresponding handles.
+ * Request the handles corresponding to the given identifiers if they
+ * are valid.
*
* If they are valid, the callback will later be called with the given
* handles; if not all of them are valid, the callback will be called with
@@ -381,7 +203,6 @@ tp_connection_request_handles (TpConnection *self,
* @n_handles: the number of handles in @handles (must be at least 1)
* @handles: (array length=n_handles): an array of handles
* @interfaces: a #GStrv of interfaces
- * @hold: if %TRUE, the callback will hold one reference to each valid handle
* @callback: (type GObject.Callback): called on success or
* failure (unless @weak_object has become unreferenced)
* @user_data: arbitrary user-supplied data
@@ -392,30 +213,19 @@ tp_connection_request_handles (TpConnection *self,
*
* Return (via a callback) any number of attributes of the given handles.
*
- * Since telepathy-glib version 0.13.8,
- * the handles will remain valid until @connection becomes invalid
- * (signalled by #TpProxy::invalidated). In earlier versions, if @hold
- * was %TRUE, the callback would hold a reference to them which could be
- * released with tp_connection_unref_handles().
- *
- * This is a thin wrapper around the GetContactAttributes D-Bus method, and
- * should be used in preference to
- * tp_cli_connection_interface_contacts_call_get_contact_attributes(); mixing this
- * function, tp_connection_hold_handles(), tp_connection_unref_handles(), and
- * #TpContact with direct use of the RequestHandles, HoldHandles and
- * GetContactAttributes D-Bus methods is unwise, as #TpConnection and
- * #TpContact perform client-side reference counting of handles.
- * The #TpContact API provides a higher-level abstraction which should
- * usually be used instead.
+ * This is a thin wrapper around the GetContactAttributes D-Bus
+ * method, and should be used in preference to
+ * tp_cli_connection_interface_contacts_call_get_contact_attributes();
+ * mixing this function and #TpContact with direct use of the
+ * RequestHandles, and GetContactAttributes D-Bus methods is
+ * unwise. The #TpContact API provides a higher-level abstraction
+ * which should usually be used instead.
*
* @callback will later be called with the attributes of those of the given
* handles that were valid. Invalid handles are simply omitted from the
* parameter to the callback.
*
- * If @hold is %TRUE, the @callback is given one reference to each handle
- * that appears as a key in the callback's @attributes parameter.
- *
- * Deprecated: Use tp_simple_client_factory_ensure_contact() instead.
+ * Deprecated: Use tp_client_factory_ensure_contact() instead.
*/
void
tp_connection_get_contact_attributes (TpConnection *self,
@@ -423,7 +233,6 @@ tp_connection_get_contact_attributes (TpConnection *self,
guint n_handles,
const TpHandle *handles,
const gchar * const *interfaces,
- gboolean hold,
tp_cli_connection_interface_contacts_callback_for_get_contact_attributes callback,
gpointer user_data,
GDestroyNotify destroy,
@@ -446,9 +255,8 @@ tp_connection_get_contact_attributes (TpConnection *self,
g_array_append_vals (a, handles, n_handles);
- /* We ignore @hold, and always hold the handles anyway */
tp_cli_connection_interface_contacts_call_get_contact_attributes (self, -1,
- a, (const gchar **) interfaces, TRUE, callback,
+ a, (const gchar **) interfaces, callback,
user_data, destroy, weak_object);
g_array_unref (a);
}
@@ -459,8 +267,6 @@ tp_connection_get_contact_attributes (TpConnection *self,
* @timeout_ms: the timeout in milliseconds (using a large timeout is
* recommended)
* @interfaces: a #GStrv of interfaces
- * @hold: if %TRUE, the callback will hold one reference to each handle it
- * receives
* @callback: (type GObject.Callback): called on success or
* failure (unless @weak_object has become unreferenced)
* @user_data: arbitrary user-supplied data
@@ -472,12 +278,6 @@ tp_connection_get_contact_attributes (TpConnection *self,
* Return (via a callback) the contacts on the contact list and any number of
* their attributes.
*
- * Since telepathy-glib version 0.13.8,
- * the handles will remain valid until @connection becomes invalid
- * (signalled by #TpProxy::invalidated). In earlier versions, if @hold
- * was %TRUE, the callback would hold a reference to them which could be
- * released with tp_connection_unref_handles().
- *
* This is a thin wrapper around the RequestContactList D-Bus method,
* and should be used in preference to lower-level functions; it is similar
* to tp_connection_get_contact_attributes().
@@ -485,16 +285,12 @@ tp_connection_get_contact_attributes (TpConnection *self,
* The #TpContact API provides a higher-level abstraction which should
* usually be used instead.
*
- * If @hold is %TRUE, the @callback is given a reference to each handle
- * that appears as a key in the callback's @attributes parameter.
- *
* Deprecated: Use tp_connection_dup_contact_list() instead.
*/
void
tp_connection_get_contact_list_attributes (TpConnection *self,
gint timeout_ms,
const gchar * const *interfaces,
- gboolean hold,
tp_cli_connection_interface_contacts_callback_for_get_contact_attributes callback,
gpointer user_data,
GDestroyNotify destroy,
@@ -503,8 +299,7 @@ tp_connection_get_contact_list_attributes (TpConnection *self,
g_return_if_fail (TP_IS_CONNECTION (self));
g_return_if_fail (callback != NULL);
- /* We ignore @hold, and always hold the handles anyway */
tp_cli_connection_interface_contact_list_call_get_contact_list_attributes (
- self, -1, (const gchar **) interfaces, TRUE,
+ self, -1, (const gchar **) interfaces,
callback, user_data, destroy, weak_object);
}
diff --git a/telepathy-glib/connection-internal.h b/telepathy-glib/connection-internal.h
index a6d6221da..d7f79d792 100644
--- a/telepathy-glib/connection-internal.h
+++ b/telepathy-glib/connection-internal.h
@@ -106,9 +106,7 @@ struct _TpConnectionPrivate {
TpProxyPendingCall *introspection_call;
- unsigned ready:1;
unsigned ready_enough_for_contacts:1;
- unsigned has_immortal_handles:1;
unsigned tracking_aliases_changed:1;
unsigned tracking_avatar_updated:1;
unsigned tracking_avatar_retrieved:1;
diff --git a/telepathy-glib/connection-manager.c b/telepathy-glib/connection-manager.c
index fc09d8ffb..0a41eaee3 100644
--- a/telepathy-glib/connection-manager.c
+++ b/telepathy-glib/connection-manager.c
@@ -25,6 +25,7 @@
#include <string.h>
+#include <telepathy-glib/cli-misc.h>
#include "telepathy-glib/defs.h"
#include "telepathy-glib/enums.h"
#include "telepathy-glib/errors.h"
@@ -39,8 +40,6 @@
#include "telepathy-glib/protocol-internal.h"
#include "telepathy-glib/util-internal.h"
-#include "telepathy-glib/_gen/tp-cli-connection-manager-body.h"
-
/**
* SECTION:connection-manager
* @title: TpConnectionManager
@@ -92,9 +91,6 @@
* this connection manager has, and adds them to #TpProxy:interfaces (where
* they can be queried with tp_proxy_has_interface()).
*
- * (These are the same guarantees offered by the older
- * tp_connection_manager_call_when_ready() mechanism.)
- *
* One can ask for a feature to be prepared using the
* tp_proxy_prepare_async() function, and waiting for it to callback.
*
@@ -258,11 +254,6 @@ struct _TpConnectionManagerPrivate {
* is TRUE */
GPtrArray *protocol_structs;
- /* If we're waiting for a GetParameters, then GPtrArray of g_strdup'd
- * gchar * representing protocols we haven't yet introspected.
- * Otherwise NULL */
- GPtrArray *pending_protocols;
-
/* dup'd name => referenced TpProtocol
*
* If we're waiting for a GetParameters, protocols we found so far for
@@ -422,37 +413,6 @@ G_DEFINE_BOXED_TYPE (TpConnectionManagerProtocol,
tp_connection_manager_protocol,
tp_connection_manager_protocol_copy, tp_connection_manager_protocol_free)
-typedef struct {
- TpConnectionManager *cm;
- TpConnectionManagerWhenReadyCb callback;
- gpointer user_data;
- GDestroyNotify destroy;
- TpWeakRef *weak_ref;
-} WhenReadyContext;
-
-static void
-when_ready_context_free (gpointer d)
-{
- WhenReadyContext *c = d;
-
- if (c->weak_ref != NULL)
- {
- tp_weak_ref_destroy (c->weak_ref);
- c->weak_ref = NULL;
- }
-
- if (c->cm != NULL)
- {
- g_object_unref (c->cm);
- c->cm = NULL;
- }
-
- if (c->destroy != NULL)
- c->destroy (c->user_data);
-
- g_slice_free (WhenReadyContext, c);
-}
-
static void
tp_connection_manager_ready_or_failed (TpConnectionManager *self,
const GError *error)
@@ -478,145 +438,9 @@ tp_connection_manager_ready_or_failed (TpConnectionManager *self,
}
}
-static void
-tp_connection_manager_ready_cb (GObject *source_object,
- GAsyncResult *res,
- gpointer user_data)
-{
- WhenReadyContext *c = user_data;
- GError *error = NULL;
- GObject *weak_object = NULL;
-
- g_return_if_fail (source_object == (GObject *) c->cm);
-
- if (c->weak_ref != NULL)
- {
- weak_object = tp_weak_ref_dup_object (c->weak_ref);
-
- if (weak_object == NULL)
- goto finally;
- }
-
- if (tp_proxy_prepare_finish (source_object, res, &error))
- {
- c->callback (c->cm, NULL, c->user_data, weak_object);
- }
- else
- {
- g_assert (error != NULL);
- c->callback (c->cm, error, c->user_data, weak_object);
- g_error_free (error);
- }
-
-finally:
- if (weak_object != NULL)
- g_object_unref (weak_object);
-
- when_ready_context_free (c);
-}
-
-/**
- * TpConnectionManagerWhenReadyCb:
- * @cm: a connection manager
- * @error: %NULL on success, or the reason why tp_connection_manager_is_ready()
- * would return %FALSE
- * @user_data: the @user_data passed to tp_connection_manager_call_when_ready()
- * @weak_object: the @weak_object passed to
- * tp_connection_manager_call_when_ready()
- *
- * Called as the result of tp_connection_manager_call_when_ready(). If the
- * connection manager's protocol and parameter information could be retrieved,
- * @error is %NULL and @cm is considered to be ready. Otherwise, @error is
- * non-%NULL and @cm is not ready.
- *
- * Deprecated: since 0.17.6, use tp_proxy_prepare_async() instead
- */
-
-/**
- * tp_connection_manager_call_when_ready: (skip)
- * @self: a connection manager
- * @callback: callback to call when information has been retrieved or on
- * error
- * @user_data: arbitrary data to pass to the callback
- * @destroy: called to destroy @user_data
- * @weak_object: object to reference weakly; if it is destroyed, @callback
- * will not be called, but @destroy will still be called
- *
- * Call the @callback from the main loop when information about @cm's
- * supported protocols and parameters has been retrieved.
- *
- * Since: 0.7.26
- * Deprecated: since 0.17.6, use tp_proxy_prepare_async() instead
- */
-void
-tp_connection_manager_call_when_ready (TpConnectionManager *self,
- TpConnectionManagerWhenReadyCb callback,
- gpointer user_data,
- GDestroyNotify destroy,
- GObject *weak_object)
-{
- WhenReadyContext *c;
-
- g_return_if_fail (TP_IS_CONNECTION_MANAGER (self));
- g_return_if_fail (callback != NULL);
-
- c = g_slice_new0 (WhenReadyContext);
-
- c->cm = g_object_ref (self);
- c->callback = callback;
- c->user_data = user_data;
- c->destroy = destroy;
-
- if (weak_object != NULL)
- {
- c->weak_ref = tp_weak_ref_new (weak_object, NULL, NULL);
- }
-
- tp_proxy_prepare_async (self, NULL, tp_connection_manager_ready_cb, c);
-}
-
static void tp_connection_manager_continue_introspection
(TpConnectionManager *self);
-static void
-tp_connection_manager_got_parameters (TpConnectionManager *self,
- const GPtrArray *parameters,
- const GError *error,
- gpointer user_data,
- GObject *user_object)
-{
- gchar *protocol = user_data;
- TpProtocol *proto_object;
- GHashTable *immutables;
-
- g_assert (self->priv->introspection_step == INTROSPECT_GETTING_PARAMETERS);
- g_assert (self->priv->introspection_call != NULL);
- self->priv->introspection_call = NULL;
-
- if (error != NULL)
- {
- DEBUG ("Error getting params for %s, skipping it", protocol);
- goto out;
- }
-
- immutables = tp_asv_new (
- TP_PROP_PROTOCOL_PARAMETERS, TP_ARRAY_TYPE_PARAM_SPEC_LIST, parameters,
- NULL);
- proto_object = tp_protocol_new (tp_proxy_get_dbus_daemon (self),
- self->name, protocol, immutables, NULL);
- g_hash_table_unref (immutables);
-
- /* tp_protocol_new can currently only fail because of malformed names,
- * and we already checked those */
- g_assert (proto_object != NULL);
-
- g_hash_table_insert (self->priv->found_protocols,
- g_strdup (protocol), proto_object);
-
-out:
- tp_connection_manager_continue_introspection (self);
-}
-
static void tp_connection_manager_ready_or_failed (TpConnectionManager *self,
const GError *error);
@@ -624,8 +448,6 @@ static void
tp_connection_manager_end_introspection (TpConnectionManager *self,
const GError *error)
{
- guint i;
-
self->priv->introspection_step = INTROSPECT_IDLE;
if (self->priv->introspection_call != NULL)
@@ -640,15 +462,6 @@ tp_connection_manager_end_introspection (TpConnectionManager *self,
self->priv->found_protocols = NULL;
}
- if (self->priv->pending_protocols != NULL)
- {
- for (i = 0; i < self->priv->pending_protocols->len; i++)
- g_free (self->priv->pending_protocols->pdata[i]);
-
- g_ptr_array_unref (self->priv->pending_protocols);
- self->priv->pending_protocols = NULL;
- }
-
DEBUG ("End of introspection, info source %u", self->info_source);
g_signal_emit (self, signals[SIGNAL_GOT_INFO], 0, self->info_source);
tp_connection_manager_ready_or_failed (self, error);
@@ -743,26 +556,30 @@ tp_connection_manager_get_all_cb (TpProxy *proxy,
}
}
}
+
+ tp_connection_manager_continue_introspection (self);
}
else
{
- DEBUG ("Ignoring error getting ConnectionManager properties: %s %d: %s",
+ DEBUG ("Error getting ConnectionManager properties: %s %d: %s",
g_quark_to_string (error->domain), error->code, error->message);
- }
- tp_connection_manager_continue_introspection (self);
-}
+ if (!self->running)
+ {
+ /* GetAll failed to start it - we assume this is because
+ * activation failed. */
+ g_signal_emit (self, signals[SIGNAL_EXITED], 0);
+ }
-static void tp_connection_manager_got_protocols (TpConnectionManager *self,
- const gchar **protocols,
- const GError *error,
- gpointer user_data,
- GObject *user_object);
+ tp_connection_manager_end_introspection (self, error);
+ }
+}
static void
tp_connection_manager_continue_introspection (TpConnectionManager *self)
{
- gchar *next_protocol;
+ GHashTable *tmp;
+ guint old;
if (self->priv->introspection_step == INTROSPECT_IDLE)
{
@@ -774,111 +591,24 @@ tp_connection_manager_continue_introspection (TpConnectionManager *self)
return;
}
- if (self->priv->introspection_step == INTROSPECT_GETTING_PROPERTIES)
- {
- g_assert (self->priv->pending_protocols == NULL);
-
- if (self->priv->found_protocols == NULL)
- {
- DEBUG ("calling ListProtocols on CM");
- self->priv->introspection_step = INTROSPECT_LISTING_PROTOCOLS;
- self->priv->introspection_call =
- tp_cli_connection_manager_call_list_protocols (self, -1,
- tp_connection_manager_got_protocols, NULL, NULL, NULL);
- return;
- }
- /* else we already found the protocols and their parameters, so behave
- * as though we'd already called GetParameters n times */
- }
-
- if (self->priv->pending_protocols == NULL ||
- self->priv->pending_protocols->len == 0)
- {
- GHashTable *tmp;
- guint old;
-
- /* swap found_protocols and protocol_objects, so we'll free the old
- * protocol_objects as part of end_introspection */
- tmp = self->priv->protocol_objects;
- self->priv->protocol_objects = self->priv->found_protocols;
- self->priv->found_protocols = tmp;
-
- tp_connection_manager_update_protocol_structs (self);
-
- old = self->info_source;
- self->info_source = TP_CM_INFO_SOURCE_LIVE;
-
- if (old != TP_CM_INFO_SOURCE_LIVE)
- g_object_notify ((GObject *) self, "info-source");
-
- tp_connection_manager_end_introspection (self, NULL);
-
- g_assert (self->priv->introspection_step == INTROSPECT_IDLE);
- }
- else
- {
- next_protocol = g_ptr_array_remove_index_fast (
- self->priv->pending_protocols, 0);
- self->priv->introspection_step = INTROSPECT_GETTING_PARAMETERS;
- self->priv->introspection_call =
- tp_cli_connection_manager_call_get_parameters (self, -1,
- next_protocol, tp_connection_manager_got_parameters,
- next_protocol, g_free, NULL);
- }
-}
-
-static void
-tp_connection_manager_got_protocols (TpConnectionManager *self,
- const gchar **protocols,
- const GError *error,
- gpointer user_data,
- GObject *user_object)
-{
- guint i = 0;
- const gchar **iter;
-
- g_assert (self->priv->introspection_call != NULL);
- self->priv->introspection_call = NULL;
-
- if (error != NULL)
- {
- DEBUG ("Failed: %s", error->message);
-
- if (!self->running)
- {
- /* ListProtocols failed to start it - we assume this is because
- * activation failed */
- g_signal_emit (self, signals[SIGNAL_EXITED], 0);
- }
-
- tp_connection_manager_end_introspection (self, error);
- return;
- }
-
- for (iter = protocols; *iter != NULL; iter++)
- i++;
- DEBUG ("Succeeded with %u protocols", i);
+ /* swap found_protocols and protocol_objects, so we'll free the old
+ * protocol_objects as part of end_introspection */
+ tmp = self->priv->protocol_objects;
+ self->priv->protocol_objects = self->priv->found_protocols;
+ self->priv->found_protocols = tmp;
- g_assert (self->priv->found_protocols == NULL);
- self->priv->found_protocols = g_hash_table_new_full (g_str_hash,
- g_str_equal, g_free, g_object_unref);
+ tp_connection_manager_update_protocol_structs (self);
- g_assert (self->priv->pending_protocols == NULL);
- self->priv->pending_protocols = g_ptr_array_sized_new (i);
+ old = self->info_source;
+ self->info_source = TP_CM_INFO_SOURCE_LIVE;
- for (iter = protocols; *iter != NULL; iter++)
- {
- if (!tp_connection_manager_check_valid_protocol_name (*iter, NULL))
- {
- DEBUG ("Protocol %s has an invalid name", *iter);
- continue;
- }
+ if (old != TP_CM_INFO_SOURCE_LIVE)
+ g_object_notify ((GObject *) self, "info-source");
- g_ptr_array_add (self->priv->pending_protocols, g_strdup (*iter));
- }
+ tp_connection_manager_end_introspection (self, NULL);
- tp_connection_manager_continue_introspection (self);
+ g_assert (self->priv->introspection_step == INTROSPECT_IDLE);
}
static gboolean
@@ -1234,7 +964,6 @@ static void
tp_connection_manager_finalize (GObject *object)
{
TpConnectionManager *self = TP_CONNECTION_MANAGER (object);
- guint i;
g_free (self->priv->manager_file);
@@ -1244,14 +973,6 @@ tp_connection_manager_finalize (GObject *object)
if (self->priv->introspect_idle_id != 0)
g_source_remove (self->priv->introspect_idle_id);
- if (self->priv->pending_protocols != NULL)
- {
- for (i = 0; i < self->priv->pending_protocols->len; i++)
- g_free (self->priv->pending_protocols->pdata[i]);
-
- g_ptr_array_unref (self->priv->pending_protocols);
- }
-
G_OBJECT_CLASS (tp_connection_manager_parent_class)->finalize (object);
}
@@ -2068,31 +1789,6 @@ tp_connection_manager_get_name (TpConnectionManager *self)
}
/**
- * tp_connection_manager_is_ready: (skip)
- * @self: a connection manager
- *
- * If protocol and parameter information has been obtained from the connection
- * manager or the cache in the .manager file, return %TRUE. Otherwise,
- * return %FALSE.
- *
- * This may change from %FALSE to %TRUE at any time that the main loop is
- * running; the #GObject::notify signal is emitted for the
- * #TpConnectionManager:info-source property.
- *
- * Returns: %TRUE, unless the #TpConnectionManager:info-source property is
- * %TP_CM_INFO_SOURCE_NONE
- * Since: 0.7.26
- * Deprecated: since 0.17.6, use tp_proxy_is_prepared()
- * with %TP_CONNECTION_MANAGER_FEATURE_CORE instead
- */
-gboolean
-tp_connection_manager_is_ready (TpConnectionManager *self)
-{
- g_return_val_if_fail (TP_IS_CONNECTION_MANAGER (self), FALSE);
- return self->info_source != TP_CM_INFO_SOURCE_NONE;
-}
-
-/**
* tp_connection_manager_is_running:
* @self: a connection manager
*
diff --git a/telepathy-glib/connection-manager.h b/telepathy-glib/connection-manager.h
index 0e48a39fc..ff9dae042 100644
--- a/telepathy-glib/connection-manager.h
+++ b/telepathy-glib/connection-manager.h
@@ -125,19 +125,6 @@ _TP_AVAILABLE_IN_0_18
GList *tp_list_connection_managers_finish (GAsyncResult *result,
GError **error);
-#ifndef TP_DISABLE_DEPRECATED
-typedef void (*TpConnectionManagerWhenReadyCb) (TpConnectionManager *cm,
- const GError *error, gpointer user_data, GObject *weak_object);
-
-_TP_DEPRECATED_IN_0_18_FOR (tp_proxy_prepare_async)
-void tp_connection_manager_call_when_ready (TpConnectionManager *self,
- TpConnectionManagerWhenReadyCb callback,
- gpointer user_data, GDestroyNotify destroy, GObject *weak_object);
-
-_TP_DEPRECATED_IN_0_18_FOR (tp_proxy_is_prepared)
-gboolean tp_connection_manager_is_ready (TpConnectionManager *self);
-#endif
-
const gchar *tp_connection_manager_get_name (TpConnectionManager *self);
gboolean tp_connection_manager_is_running (TpConnectionManager *self);
TpCMInfoSource tp_connection_manager_get_info_source (
@@ -206,6 +193,4 @@ void tp_connection_manager_protocol_free (TpConnectionManagerProtocol *proto);
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-connection-manager.h>
-
#endif
diff --git a/telepathy-glib/connection.c b/telepathy-glib/connection.c
index c53c515c4..1a59d3787 100644
--- a/telepathy-glib/connection.c
+++ b/telepathy-glib/connection.c
@@ -27,6 +27,8 @@
#include <dbus/dbus-protocol.h>
+#include <telepathy-glib/cli-connection.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/connection-manager.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/defs.h>
@@ -45,11 +47,9 @@
#include "telepathy-glib/dbus-internal.h"
#include "telepathy-glib/debug-internal.h"
#include "telepathy-glib/proxy-internal.h"
-#include "telepathy-glib/simple-client-factory-internal.h"
+#include "telepathy-glib/client-factory-internal.h"
#include "telepathy-glib/util-internal.h"
-#include "_gen/tp-cli-connection-body.h"
-
/**
* SECTION:connection
* @title: TpConnection
@@ -94,11 +94,10 @@
*
* <note>
* <title>prepared does not imply connected</title>
- * <para>Unlike the older #TpConnection:connection-ready mechanism, this
+ * <para>This
* feature does not imply that the connection has successfully connected.
* It only implies that an initial status (disconnected, connecting or
- * connected) has been discovered. %TP_CONNECTION_FEATURE_CONNECTED
- * is the closest equivalent of #TpConnection:connection-ready.</para>
+ * connected) has been discovered.</para>
* </note>
*
* One can ask for a feature to be prepared using the
@@ -128,7 +127,6 @@ tp_connection_get_feature_quark_core (void)
* <itemizedlist>
* <listitem>#TpConnection:status is
* %TP_CONNECTION_STATUS_CONNECTED</listitem>
- * <listitem>#TpConnection:self-handle is valid and non-zero</listitem>
* <listitem>#TpConnection:self-contact is non-%NULL</listitem>
* <listitem>all interfaces have been added to the set of
* #TpProxy:interfaces, and that set will not change again</listitem>
@@ -267,9 +265,7 @@ enum
PROP_STATUS_REASON,
PROP_CONNECTION_MANAGER_NAME,
PROP_PROTOCOL_NAME,
- PROP_CONNECTION_READY,
PROP_SELF_CONTACT,
- PROP_SELF_HANDLE,
PROP_CAPABILITIES,
PROP_BALANCE,
PROP_BALANCE_SCALE,
@@ -321,9 +317,6 @@ tp_connection_get_property (GObject *object,
case PROP_PROTOCOL_NAME:
g_value_set_string (value, self->priv->proto_name);
break;
- case PROP_CONNECTION_READY:
- g_value_set_boolean (value, self->priv->ready);
- break;
case PROP_STATUS:
g_value_set_uint (value, self->priv->status);
break;
@@ -333,9 +326,6 @@ tp_connection_get_property (GObject *object,
case PROP_SELF_CONTACT:
g_value_set_object (value, tp_connection_get_self_contact (self));
break;
- case PROP_SELF_HANDLE:
- g_value_set_uint (value, tp_connection_get_self_handle (self));
- break;
case PROP_CAPABILITIES:
g_value_set_object (value, self->priv->capabilities);
break;
@@ -470,7 +460,7 @@ tp_connection_get_balance_cb (TpProxy *proxy,
g_object_thaw_notify ((GObject *) self);
finally:
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
static void
@@ -545,7 +535,7 @@ tp_connection_get_rcc_cb (TpProxy *proxy,
finally:
while ((result = g_queue_pop_head (&self->priv->capabilities_queue)) != NULL)
{
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -628,7 +618,6 @@ signal_connected (TpConnection *self)
tp_proxy_get_object_path (self), self);
self->priv->status = TP_CONNECTION_STATUS_CONNECTED;
self->priv->status_reason = TP_CONNECTION_STATUS_REASON_REQUESTED;
- self->priv->ready = TRUE;
_tp_proxy_set_feature_prepared ((TpProxy *) self,
TP_CONNECTION_FEATURE_CONNECTED, TRUE);
@@ -637,7 +626,6 @@ signal_connected (TpConnection *self)
g_object_notify ((GObject *) self, "status");
g_object_notify ((GObject *) self, "status-reason");
- g_object_notify ((GObject *) self, "connection-ready");
}
static void
@@ -790,7 +778,6 @@ tp_connection_set_self_contact (TpConnection *self,
self->priv->self_contact = g_object_ref (contact);
tp_clear_object (&tmp);
g_object_notify ((GObject *) self, "self-contact");
- g_object_notify ((GObject *) self, "self-handle");
}
if (self->priv->introspecting_self_contact)
@@ -858,20 +845,20 @@ tp_connection_got_self_contact_cb (TpConnection *self,
static void
get_self_contact (TpConnection *self)
{
- TpSimpleClientFactory *factory;
+ TpClientFactory *factory;
GArray *features;
factory = tp_proxy_get_factory (self);
- features = tp_simple_client_factory_dup_contact_features (factory, self);
+ features = tp_client_factory_dup_contact_features (factory, self);
- /* FIXME: We should use tp_simple_client_factory_ensure_contact(), but that would
+ /* FIXME: We should use tp_client_factory_ensure_contact(), but that would
* require immortal-handles and spec change to give the self identifier. */
/* This relies on the special case in tp_connection_get_contacts_by_handle()
* which makes it start working slightly early. */
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
tp_connection_get_contacts_by_handle (self,
1, &self->priv->last_known_self_handle,
- features->len, (TpContactFeature *) features->data,
+ (GQuark *) features->data,
tp_connection_got_self_contact_cb, NULL, NULL, NULL);
G_GNUC_END_IGNORE_DEPRECATIONS
@@ -886,40 +873,9 @@ introspect_self_contact (TpConnection *self)
}
static void
-got_self_handle (TpConnection *self,
- guint self_handle,
- const GError *error,
- gpointer user_data G_GNUC_UNUSED,
- GObject *user_object G_GNUC_UNUSED)
-{
- g_assert (self->priv->introspection_call != NULL);
- self->priv->introspection_call = NULL;
-
- if (error != NULL)
- {
- DEBUG ("%p: GetSelfHandle() failed: %s", self, error->message);
- tp_proxy_invalidate ((TpProxy *) self, error);
- return;
- }
-
- if (self_handle == 0)
- {
- GError e = { TP_DBUS_ERRORS, TP_DBUS_ERROR_INCONSISTENT,
- "GetSelfHandle() returned 0" };
- DEBUG ("%s", e.message);
- tp_proxy_invalidate ((TpProxy *) self, &e);
- return;
- }
-
- self->priv->last_known_self_handle = self_handle;
- self->priv->introspect_needed = g_list_append (self->priv->introspect_needed,
- introspect_self_contact);
- tp_connection_continue_introspection (self);
-}
-
-static void
-on_self_handle_changed (TpConnection *self,
+on_self_contact_changed (TpConnection *self,
guint self_handle,
+ const gchar *self_id,
gpointer user_data G_GNUC_UNUSED,
GObject *user_object G_GNUC_UNUSED)
{
@@ -931,26 +887,9 @@ on_self_handle_changed (TpConnection *self,
DEBUG ("SelfHandleChanged to %u, I wonder what that means?", self_handle);
self->priv->last_known_self_handle = self_handle;
- get_self_contact (self);
-}
-static void
-introspect_self_handle (TpConnection *self)
-{
- if (!self->priv->introspecting_after_connected)
- {
- tp_connection_continue_introspection (self);
- return;
- }
-
- /* this only happens when we introspect after CONNECTED, so there's no need
- * to track whether this is the first time */
- tp_cli_connection_connect_to_self_handle_changed (self,
- on_self_handle_changed, NULL, NULL, NULL, NULL);
-
- g_assert (self->priv->introspection_call == NULL);
- self->priv->introspection_call = tp_cli_connection_call_get_self_handle (
- self, -1, got_self_handle, NULL, NULL, NULL);
+ if (tp_connection_get_status (self, NULL) == TP_CONNECTION_STATUS_CONNECTED)
+ get_self_contact (self);
}
/* Appending callbacks to self->priv->introspect_needed relies on this */
@@ -977,46 +916,6 @@ tp_connection_add_interfaces_from_introspection (TpConnection *self,
}
static void
-tp_connection_got_interfaces_cb (TpConnection *self,
- const gchar **interfaces,
- const GError *error,
- gpointer user_data,
- GObject *user_object)
-{
- g_assert (self->priv->introspection_call != NULL);
- self->priv->introspection_call = NULL;
-
- if (error != NULL)
- {
- DEBUG ("%p: GetInterfaces() failed, assuming no interfaces: %s",
- self, error->message);
- interfaces = NULL;
- }
-
- DEBUG ("%p: Introspected interfaces", self);
-
- if (tp_proxy_get_invalidated (self) != NULL)
- {
- DEBUG ("%p: already invalidated, not trying to become ready: %s",
- self, tp_proxy_get_invalidated (self)->message);
- return;
- }
-
- g_assert (self->priv->introspect_needed == NULL);
-
- if (interfaces != NULL)
- tp_connection_add_interfaces_from_introspection (self, interfaces);
-
- self->priv->introspect_needed = g_list_append (self->priv->introspect_needed,
- introspect_self_handle);
-
- /* FIXME: give subclasses a chance to influence the definition of "ready"
- * now that we have our interfaces? */
-
- tp_connection_continue_introspection (self);
-}
-
-static void
_tp_connection_got_properties (TpProxy *proxy,
GHashTable *asv,
const GError *error,
@@ -1244,41 +1143,6 @@ tp_connection_status_changed_cb (TpConnection *self,
}
static void
-tp_connection_got_status_cb (TpConnection *self,
- guint status,
- const GError *error,
- gpointer unused,
- GObject *user_object)
-{
- DEBUG ("%p", self);
-
- g_assert (self->priv->introspection_call != NULL);
- self->priv->introspection_call = NULL;
-
- if (error == NULL)
- {
- DEBUG ("%p: Initial status is %d", self, status);
- tp_connection_status_changed (self, status,
- TP_CONNECTION_STATUS_REASON_NONE_SPECIFIED);
-
- /* try introspecting before CONNECTED - it might work... */
- if (status != TP_CONNECTION_STATUS_CONNECTED &&
- self->priv->introspection_call == NULL)
- {
- self->priv->introspection_call =
- tp_cli_connection_call_get_interfaces (self, -1,
- tp_connection_got_interfaces_cb, NULL, NULL, NULL);
- }
- }
- else
- {
- DEBUG ("%p: GetStatus() failed with %s %d \"%s\"",
- self, g_quark_to_string (error->domain), error->code,
- error->message);
- }
-}
-
-static void
tp_connection_invalidated (TpConnection *self)
{
if (self->priv->introspection_call != NULL)
@@ -1311,10 +1175,6 @@ _tp_connection_extract_properties (TpConnection *self,
{
gboolean sufficient;
- /* has_immortal_handles is a bitfield, so we can't pass a pointer to it */
- if (tp_asv_get_boolean (asv, "HasImmortalHandles", NULL))
- self->priv->has_immortal_handles = TRUE;
-
*status = tp_asv_get_uint32 (asv, "Status", &sufficient);
if (!sufficient
@@ -1352,6 +1212,7 @@ _tp_connection_got_properties (TpProxy *proxy,
guint32 status;
guint32 self_handle;
const gchar **interfaces;
+ GError *e = NULL;
if (tp_proxy_get_invalidated (self) != NULL)
{
@@ -1360,11 +1221,17 @@ _tp_connection_got_properties (TpProxy *proxy,
return;
}
+ if (error != NULL)
+ {
+ /* Properties are now mandatory */
+ tp_proxy_invalidate (proxy, error);
+ return;
+ }
+
if (self->priv->introspection_call)
self->priv->introspection_call = NULL;
- if (error == NULL &&
- _tp_connection_extract_properties (
+ if (_tp_connection_extract_properties (
self,
asv,
&status,
@@ -1390,33 +1257,13 @@ _tp_connection_got_properties (TpProxy *proxy,
tp_connection_continue_introspection (self);
return;
}
- else if (error != NULL)
- {
- DEBUG ("GetAll failed: %s", error->message);
- }
-
- DEBUG ("Could not extract all required properties from GetAll return, "
- "will use 0.18 API instead");
-
- if (self->priv->introspection_call == NULL)
- {
- if (self->priv->status == TP_UNKNOWN_CONNECTION_STATUS &&
- !self->priv->introspecting_after_connected)
- {
- /* get my initial status */
- DEBUG ("Calling GetStatus");
- self->priv->introspection_call =
- tp_cli_connection_call_get_status (self, -1,
- tp_connection_got_status_cb, NULL, NULL, NULL);
- }
- else
- {
- self->priv->introspection_call =
- tp_cli_connection_call_get_interfaces (self, -1,
- tp_connection_got_interfaces_cb, NULL, NULL, NULL);
- }
- }
+ e = g_error_new_literal (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
+ "Connection does not implement all properties, legacy CMs are not "
+ "supported anymore.");
+ WARNING ("%s", e->message);
+ tp_proxy_invalidate (proxy, e);
+ g_clear_error (&e);
}
static void
@@ -1439,6 +1286,8 @@ tp_connection_constructed (GObject *object)
tp_connection_status_changed_cb, NULL, NULL, NULL, NULL);
tp_cli_connection_connect_to_connection_error (self,
tp_connection_connection_error_cb, NULL, NULL, NULL, NULL);
+ tp_cli_connection_connect_to_self_contact_changed (self,
+ on_self_contact_changed, NULL, NULL, NULL, NULL);
tp_connection_parse_object_path (self, &(self->priv->proto_name),
&(self->priv->cm_name));
@@ -1781,29 +1630,6 @@ tp_connection_class_init (TpConnectionClass *klass)
G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
/**
- * TpConnection:self-handle:
- *
- * The %TP_HANDLE_TYPE_CONTACT handle of the local user on this connection,
- * or 0 if we don't know yet or if the connection has become invalid.
- *
- * This may change if the local user's unique identifier changes (for
- * instance by using /nick on IRC), in which case #GObject::notify will be
- * emitted.
- *
- * To wait for a valid self-handle (and other properties), call
- * tp_proxy_prepare_async() with the feature
- * %TP_CONNECTION_FEATURE_CONNECTED.
- *
- * Deprecated: Use #TpConnection:self-contact instead.
- */
- param_spec = g_param_spec_uint ("self-handle", "Self handle",
- "The local user's Contact handle on this connection", 0, G_MAXUINT32,
- 0,
- G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_SELF_HANDLE,
- param_spec);
-
- /**
* TpConnection:self-contact:
*
* A #TpContact representing the local user on this connection,
@@ -1814,7 +1640,7 @@ tp_connection_class_init (TpConnectionClass *klass)
* representing the new identifier, and #GObject::notify will be emitted.
*
* The #TpContact object is guaranteed to have all of the features previously
- * passed to tp_simple_client_factory_add_contact_features() prepared.
+ * passed to tp_client_factory_add_contact_features() prepared.
*
* To wait for a non-%NULL self-contact (and other properties), call
* tp_proxy_prepare_async() with the feature
@@ -1845,30 +1671,6 @@ tp_connection_class_init (TpConnectionClass *klass)
g_object_class_install_property (object_class, PROP_STATUS_REASON,
param_spec);
- /**
- * TpConnection:connection-ready:
- *
- * Initially %FALSE; changes to %TRUE when the connection has gone to
- * CONNECTED status, introspection has finished and it's ready for use.
- *
- * By the time this property becomes %TRUE, any extra interfaces will
- * have been set up and the #TpProxy:interfaces property will have been
- * populated.
- *
- * This is similar to %TP_CONNECTION_FEATURE_CONNECTED, except that once
- * it has changed to %TRUE, it remains %TRUE even if the connection has
- * been invalidated.
- *
- * Deprecated: 0.17.6: use tp_proxy_is_prepared() with
- * %TP_CHANNEL_FEATURE_CONNECTED for checks, or tp_proxy_prepare_async() for
- * notification
- */
- param_spec = g_param_spec_boolean ("connection-ready", "Connection ready?",
- "Initially FALSE; changes to TRUE when introspection finishes", FALSE,
- G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED);
- g_object_class_install_property (object_class, PROP_CONNECTION_READY,
- param_spec);
-
/**
* TpConnection:capabilities:
*
@@ -2159,7 +1961,7 @@ tp_connection_class_init (TpConnectionClass *klass)
* #TpConnection::blocked-contacts-changed signal.
*
* These TpContact objects have been prepared with the desired features.
- * See tp_simple_client_factory_add_contact_features() to define which
+ * See tp_client_factory_add_contact_features() to define which
* features needs to be prepared on them.
*
* For this property to be valid, you must first call
@@ -2269,7 +2071,7 @@ tp_connection_class_init (TpConnectionClass *klass)
* Notify of changes in the list of contacts as returned by
* tp_connection_dup_contact_list(). It is guaranteed that all contacts have
* desired features prepared. See
- * tp_simple_client_factory_add_contact_features() to define which features
+ * tp_client_factory_add_contact_features() to define which features
* needs to be prepared.
*
* This signal is also emitted for the initial set of contacts once retrieved.
@@ -2298,7 +2100,7 @@ tp_connection_class_init (TpConnectionClass *klass)
*
* Notify of changes in #TpConnection:blocked-contacts.
* It is guaranteed that all contacts have desired features prepared. See
- * tp_simple_client_factory_add_contact_features() to define which features
+ * tp_client_factory_add_contact_features() to define which features
* needs to be prepared.
*
* This signal is also emitted for the initial set of blocked contacts once
@@ -2350,7 +2152,7 @@ tp_connection_new (TpDBusDaemon *dbus,
}
TpConnection *
-_tp_connection_new_with_factory (TpSimpleClientFactory *factory,
+_tp_connection_new_with_factory (TpClientFactory *factory,
TpDBusDaemon *dbus,
const gchar *bus_name,
const gchar *object_path,
@@ -2450,36 +2252,6 @@ _tp_connection_set_account (TpConnection *self,
}
/**
- * tp_connection_get_self_handle:
- * @self: a connection
- *
- * Return the %TP_HANDLE_TYPE_CONTACT handle of the local user on this
- * connection, or 0 if the self-handle is not known yet or the connection
- * has become invalid (the TpProxy::invalidated signal).
- *
- * The returned handle is not necessarily valid forever (the
- * notify::self-handle signal will be emitted if it changes, which can happen
- * on protocols such as IRC). Construct a #TpContact object if you want to
- * track the local user's identifier in the protocol, or other information
- * like their presence status, over time.
- *
- * Returns: the value of the TpConnection:self-handle property
- *
- * Since: 0.7.26
- * Deprecated: Use tp_connection_get_self_handle() instead.
- */
-TpHandle
-tp_connection_get_self_handle (TpConnection *self)
-{
- g_return_val_if_fail (TP_IS_CONNECTION (self), 0);
-
- if (self->priv->self_contact == NULL)
- return 0;
-
- return tp_contact_get_handle (self->priv->self_contact);
-}
-
-/**
* tp_connection_get_status:
* @self: a connection
* @reason: (out): a TpConnectionStatusReason, or %NULL
@@ -2543,136 +2315,6 @@ tp_connection_get_protocol_name (TpConnection *self)
}
/**
- * tp_connection_run_until_ready: (skip)
- * @self: a connection
- * @connect: if %TRUE, call Connect() if it appears to be necessary;
- * if %FALSE, rely on Connect() to be called by another client
- * @error: if not %NULL and %FALSE is returned, used to raise an error
- * @loop: if not %NULL, a #GMainLoop is placed here while it is being run
- * (so calling code can call g_main_loop_quit() to abort), and %NULL is
- * placed here after the loop has been run
- *
- * If @self is connected and ready for use, return immediately. Otherwise,
- * call Connect() (unless @connect is %FALSE) and re-enter the main loop
- * until the connection becomes invalid, the connection connects successfully
- * and is introspected, or the main loop stored via @loop is cancelled.
- *
- * Returns: %TRUE if the connection is now connected and ready for use,
- * %FALSE if the connection has become invalid.
- *
- * Since: 0.7.1
- * Deprecated: 0.11.0: Use tp_proxy_prepare_async() and re-enter the main
- * loop yourself, or restructure your program in such a way as to avoid
- * re-entering the main loop.
- */
-
-typedef struct {
- GMainLoop *loop;
- TpProxyPendingCall *pc;
- GError *connect_error /* gets initialized */;
-} RunUntilReadyData;
-
-static void
-run_until_ready_ret (TpConnection *self,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- RunUntilReadyData *data = user_data;
-
- if (error != NULL)
- {
- g_main_loop_quit (data->loop);
- data->connect_error = g_error_copy (error);
- }
-}
-
-static void
-run_until_ready_destroy (gpointer p)
-{
- RunUntilReadyData *data = p;
-
- data->pc = NULL;
-}
-
-gboolean
-tp_connection_run_until_ready (TpConnection *self,
- gboolean connect,
- GError **error,
- GMainLoop **loop)
-{
- TpProxy *as_proxy = (TpProxy *) self;
- gulong invalidated_id, ready_id;
- RunUntilReadyData data = { NULL, NULL, NULL };
-
- g_return_val_if_fail (TP_IS_CONNECTION (self), FALSE);
-
- if (as_proxy->invalidated)
- goto raise_invalidated;
-
- if (self->priv->ready)
- return TRUE;
-
- data.loop = g_main_loop_new (NULL, FALSE);
-
- invalidated_id = g_signal_connect_swapped (self, "invalidated",
- G_CALLBACK (g_main_loop_quit), data.loop);
- ready_id = g_signal_connect_swapped (self, "notify::connection-ready",
- G_CALLBACK (g_main_loop_quit), data.loop);
-
- if (self->priv->status != TP_CONNECTION_STATUS_CONNECTED &&
- connect)
- {
- data.pc = tp_cli_connection_call_connect (self, -1,
- run_until_ready_ret, &data,
- run_until_ready_destroy, NULL);
- }
-
- if (data.connect_error == NULL)
- {
- if (loop != NULL)
- *loop = data.loop;
-
- g_main_loop_run (data.loop);
-
- if (loop != NULL)
- *loop = NULL;
- }
-
- if (data.pc != NULL)
- tp_proxy_pending_call_cancel (data.pc);
-
- g_signal_handler_disconnect (self, invalidated_id);
- g_signal_handler_disconnect (self, ready_id);
- g_main_loop_unref (data.loop);
-
- if (data.connect_error != NULL)
- {
- g_propagate_error (error, data.connect_error);
- return FALSE;
- }
-
- if (as_proxy->invalidated != NULL)
- goto raise_invalidated;
-
- if (self->priv->ready)
- return TRUE;
-
- g_set_error (error, TP_DBUS_ERRORS, TP_DBUS_ERROR_CANCELLED,
- "tp_connection_run_until_ready() cancelled");
- return FALSE;
-
-raise_invalidated:
- if (error != NULL)
- {
- g_return_val_if_fail (*error == NULL, FALSE);
- *error = g_error_copy (as_proxy->invalidated);
- }
-
- return FALSE;
-}
-
-/**
* TpConnectionNameListCb:
* @names: (array zero-terminated=1): %NULL-terminated array of @n
* connection bus names, or %NULL on error
@@ -2714,8 +2356,8 @@ _tp_connection_parse (const gchar *path_or_bus_name,
g_return_val_if_fail (delimiter == '.' || delimiter == '/', FALSE);
/* If CM respects the spec, object path and bus name should be in the form:
- * /org/freedesktop/Telepathy/Connection/cmname/proto/account
- * org.freedesktop.Telepathy.Connection.cmname.proto.account
+ * /im/telepathy1/Connection/cmname/proto/account
+ * im.telepathy1.Connection.cmname.proto.account
*/
if (delimiter == '.')
prefix = TP_CONN_BUS_NAME_BASE;
@@ -2934,123 +2576,6 @@ tp_connection_init_known_interfaces (void)
g_once (&once, tp_connection_once, NULL);
}
-typedef struct {
- TpConnectionWhenReadyCb callback;
- gpointer user_data;
- gulong invalidated_id;
- gulong ready_id;
-} CallWhenReadyContext;
-
-static void
-cwr_invalidated (TpConnection *self,
- guint domain,
- gint code,
- gchar *message,
- gpointer user_data)
-{
- CallWhenReadyContext *ctx = user_data;
- GError e = { domain, code, message };
-
- DEBUG ("enter");
-
- g_assert (ctx->callback != NULL);
-
- ctx->callback (self, &e, ctx->user_data);
-
- g_signal_handler_disconnect (self, ctx->invalidated_id);
- g_signal_handler_disconnect (self, ctx->ready_id);
-
- ctx->callback = NULL; /* poison it to detect errors */
- g_slice_free (CallWhenReadyContext, ctx);
-}
-
-static void
-cwr_ready (TpConnection *self,
- GParamSpec *unused G_GNUC_UNUSED,
- gpointer user_data)
-{
- CallWhenReadyContext *ctx = user_data;
-
- DEBUG ("enter");
-
- g_assert (ctx->callback != NULL);
-
- ctx->callback (self, NULL, ctx->user_data);
-
- g_signal_handler_disconnect (self, ctx->invalidated_id);
- g_signal_handler_disconnect (self, ctx->ready_id);
-
- ctx->callback = NULL; /* poison it to detect errors */
- g_slice_free (CallWhenReadyContext, ctx);
-}
-
-/**
- * TpConnectionWhenReadyCb:
- * @connection: the connection (which may be in the middle of being disposed,
- * if error is non-%NULL, error->domain is TP_DBUS_ERRORS and error->code is
- * TP_DBUS_ERROR_PROXY_UNREFERENCED)
- * @error: %NULL if the connection is ready for use, or the error with which
- * it was invalidated if it is now invalid
- * @user_data: whatever was passed to tp_connection_call_when_ready()
- *
- * Signature of a callback passed to tp_connection_call_when_ready(), which
- * will be called exactly once, when the connection becomes ready or
- * invalid (whichever happens first)
- *
- * Deprecated: 0.17.6
- */
-
-/**
- * tp_connection_call_when_ready: (skip)
- * @self: a connection
- * @callback: called when the connection becomes ready or invalidated,
- * whichever happens first
- * @user_data: arbitrary user-supplied data passed to the callback
- *
- * If @self is ready for use or has been invalidated, call @callback
- * immediately, then return. Otherwise, arrange
- * for @callback to be called when @self either becomes ready for use
- * or becomes invalid.
- *
- * Note that if the connection is not in state CONNECTED, the callback will
- * not be called until the connection either goes to state CONNECTED
- * or is invalidated (e.g. by going to state DISCONNECTED or by becoming
- * unreferenced). In particular, this method does not call Connect().
- * Call tp_cli_connection_call_connect() too, if you want to do that.
- *
- * Since: 0.7.7
- * Deprecated: 0.17.6: Use tp_proxy_prepare_async()
- */
-void
-tp_connection_call_when_ready (TpConnection *self,
- TpConnectionWhenReadyCb callback,
- gpointer user_data)
-{
- TpProxy *as_proxy = (TpProxy *) self;
-
- g_return_if_fail (TP_IS_CONNECTION (self));
- g_return_if_fail (callback != NULL);
-
- if (self->priv->ready || as_proxy->invalidated != NULL)
- {
- DEBUG ("already ready or invalidated");
- callback (self, as_proxy->invalidated, user_data);
- }
- else
- {
- CallWhenReadyContext *ctx = g_slice_new (CallWhenReadyContext);
-
- DEBUG ("arranging callback later");
-
- ctx->callback = callback;
- ctx->user_data = user_data;
- ctx->invalidated_id = g_signal_connect (self, "invalidated",
- G_CALLBACK (cwr_invalidated), ctx);
- ctx->ready_id = g_signal_connect (self, "notify::connection-ready",
- G_CALLBACK (cwr_ready), ctx);
- }
-}
-
static guint
get_presence_type_availability (TpConnectionPresenceType type)
{
@@ -3195,26 +2720,6 @@ _tp_connection_add_contact (TpConnection *self,
}
}
-
-/**
- * tp_connection_is_ready: (skip)
- * @self: a connection
- *
- * Returns the same thing as the #TpConnection:connection-ready property.
- *
- * Returns: %TRUE if introspection has completed
- * Since: 0.7.17
- * Deprecated: 0.17.6: use tp_proxy_is_prepared() with
- * %TP_CONNECTION_FEATURE_CONNECTED
- */
-gboolean
-tp_connection_is_ready (TpConnection *self)
-{
- g_return_val_if_fail (TP_IS_CONNECTION (self), FALSE);
-
- return self->priv->ready;
-}
-
/**
* tp_connection_get_capabilities:
* @self: a connection
@@ -3406,27 +2911,6 @@ tp_connection_add_client_interest_by_id (TpConnection *self,
}
/**
- * tp_connection_has_immortal_handles:
- * @self: a connection
- *
- * Return %TRUE if this connection is known to not destroy handles
- * (#TpHandle) until it disconnects.
- *
- * On such connections, if you know that a handle maps to a particular
- * identifier now, then you can rely on that handle mapping to that
- * identifier for the whole lifetime of the connection.
- *
- * Returns: %TRUE if handles last as long as the connection itself
- */
-gboolean
-tp_connection_has_immortal_handles (TpConnection *self)
-{
- g_return_val_if_fail (TP_IS_CONNECTION (self), FALSE);
-
- return self->priv->has_immortal_handles;
-}
-
-/**
* tp_connection_get_self_contact:
* @self: a connection
*
diff --git a/telepathy-glib/connection.h b/telepathy-glib/connection.h
index 04506c02e..e5db572ba 100644
--- a/telepathy-glib/connection.h
+++ b/telepathy-glib/connection.h
@@ -141,11 +141,6 @@ const gchar *tp_connection_get_connection_manager_name (TpConnection *self);
const gchar *tp_connection_get_protocol_name (TpConnection *self);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_20_FOR (tp_connection_get_self_contact)
-TpHandle tp_connection_get_self_handle (TpConnection *self);
-#endif
-
TpContact *tp_connection_get_self_contact (TpConnection *self);
TpCapabilities * tp_connection_get_capabilities (TpConnection *self);
@@ -161,24 +156,6 @@ void tp_connection_set_contact_info_async (TpConnection *self,
gboolean tp_connection_set_contact_info_finish (TpConnection *self,
GAsyncResult *result, GError **error);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_18_FOR (tp_proxy_is_prepared)
-gboolean tp_connection_is_ready (TpConnection *self);
-
-_TP_DEPRECATED_IN_0_18
-gboolean tp_connection_run_until_ready (TpConnection *self,
- gboolean connect, GError **error,
- GMainLoop **loop);
-
-typedef void (*TpConnectionWhenReadyCb) (TpConnection *connection,
- const GError *error, gpointer user_data);
-
-_TP_DEPRECATED_IN_0_18_FOR (tp_proxy_prepare_async)
-void tp_connection_call_when_ready (TpConnection *self,
- TpConnectionWhenReadyCb callback,
- gpointer user_data);
-#endif
-
typedef void (*TpConnectionNameListCb) (const gchar * const *names,
gsize n, const gchar * const *cms, const gchar * const *protocols,
const GError *error, gpointer user_data,
@@ -211,8 +188,6 @@ void tp_connection_add_client_interest (TpConnection *self,
void tp_connection_add_client_interest_by_id (TpConnection *self,
GQuark interested_in);
-gboolean tp_connection_has_immortal_handles (TpConnection *self);
-
#define TP_CONNECTION_FEATURE_CORE \
(tp_connection_get_feature_quark_core ())
GQuark tp_connection_get_feature_quark_core (void) G_GNUC_CONST;
@@ -232,16 +207,6 @@ GQuark tp_connection_get_feature_quark_contact_info (void) G_GNUC_CONST;
/* connection-handles.c */
#ifndef TP_DISABLE_DEPRECATED
-typedef void (*TpConnectionHoldHandlesCb) (TpConnection *connection,
- TpHandleType handle_type, guint n_handles, const TpHandle *handles,
- const GError *error, gpointer user_data, GObject *weak_object);
-
-_TP_DEPRECATED_IN_UNRELEASED
-void tp_connection_hold_handles (TpConnection *self, gint timeout_ms,
- TpHandleType handle_type, guint n_handles, const TpHandle *handles,
- TpConnectionHoldHandlesCb callback,
- gpointer user_data, GDestroyNotify destroy, GObject *weak_object);
-
typedef void (*TpConnectionRequestHandlesCb) (TpConnection *connection,
TpHandleType handle_type,
guint n_handles, const TpHandle *handles, const gchar * const *ids,
@@ -252,10 +217,6 @@ void tp_connection_request_handles (TpConnection *self, gint timeout_ms,
TpHandleType handle_type, const gchar * const *ids,
TpConnectionRequestHandlesCb callback,
gpointer user_data, GDestroyNotify destroy, GObject *weak_object);
-
-_TP_DEPRECATED_IN_UNRELEASED
-void tp_connection_unref_handles (TpConnection *self,
- TpHandleType handle_type, guint n_handles, const TpHandle *handles);
#endif
/* connection-avatars.c */
@@ -329,30 +290,6 @@ gboolean tp_connection_disconnect_finish (TpConnection *self,
GAsyncResult *result,
GError **error);
-G_END_DECLS
-
-#include <telepathy-glib/_gen/tp-cli-connection.h>
-
-G_BEGIN_DECLS
-
-/* connection-handles.c again - this has to come after the auto-generated
- * stuff because it uses an auto-generated typedef */
-
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_simple_client_factory_ensure_contact)
-void tp_connection_get_contact_attributes (TpConnection *self,
- gint timeout_ms, guint n_handles, const TpHandle *handles,
- const gchar * const *interfaces, gboolean hold,
- tp_cli_connection_interface_contacts_callback_for_get_contact_attributes callback,
- gpointer user_data, GDestroyNotify destroy, GObject *weak_object);
-
-_TP_DEPRECATED_IN_UNRELEASED_FOR(tp_connection_dup_contact_list)
-void tp_connection_get_contact_list_attributes (TpConnection *self,
- gint timeout_ms, const gchar * const *interfaces, gboolean hold,
- tp_cli_connection_interface_contacts_callback_for_get_contact_attributes callback,
- gpointer user_data, GDestroyNotify destroy, GObject *weak_object);
-#endif
-
GBinding *tp_connection_bind_connection_status_to_property (TpConnection *self,
gpointer target, const char *target_property, gboolean invert);
diff --git a/telepathy-glib/connection.xml b/telepathy-glib/connection.xml
index c72fcb8af..dbecd066f 100644
--- a/telepathy-glib/connection.xml
+++ b/telepathy-glib/connection.xml
@@ -5,27 +5,25 @@
<tp:title>Connection interfaces</tp:title>
<xi:include href="../spec/Connection.xml"/>
-
-<xi:include href="../spec/Connection_Interface_Addressing.xml"/>
-<xi:include href="../spec/Connection_Interface_Aliasing.xml"/>
-<xi:include href="../spec/Connection_Interface_Anonymity.xml"/>
-<xi:include href="../spec/Connection_Interface_Avatars.xml"/>
-<xi:include href="../spec/Connection_Interface_Balance.xml"/>
-<xi:include href="../spec/Connection_Interface_Capabilities.xml"/>
-<xi:include href="../spec/Connection_Interface_Cellular.xml"/>
-<xi:include href="../spec/Connection_Interface_Client_Types.xml"/>
-<xi:include href="../spec/Connection_Interface_Contact_Blocking.xml"/>
-<xi:include href="../spec/Connection_Interface_Contact_Capabilities.xml"/>
-<xi:include href="../spec/Connection_Interface_Contact_Groups.xml"/>
-<xi:include href="../spec/Connection_Interface_Contact_Info.xml"/>
-<xi:include href="../spec/Connection_Interface_Contact_List.xml"/>
-<xi:include href="../spec/Connection_Interface_Simple_Presence.xml"/>
-<xi:include href="../spec/Connection_Interface_Presence.xml"/>
<xi:include href="../spec/Connection_Interface_Contacts.xml"/>
<xi:include href="../spec/Connection_Interface_Requests.xml"/>
-<xi:include href="../spec/Connection_Interface_Location.xml"/>
-<xi:include href="../spec/Connection_Interface_Service_Point.xml"/>
-<xi:include href="../spec/Connection_Interface_Mail_Notification.xml"/>
-<xi:include href="../spec/Connection_Interface_Power_Saving.xml"/>
+
+<xi:include href="../spec/Connection_Interface_Addressing1.xml"/>
+<xi:include href="../spec/Connection_Interface_Aliasing1.xml"/>
+<xi:include href="../spec/Connection_Interface_Anonymity1.xml"/>
+<xi:include href="../spec/Connection_Interface_Avatars1.xml"/>
+<xi:include href="../spec/Connection_Interface_Balance1.xml"/>
+<xi:include href="../spec/Connection_Interface_Cellular1.xml"/>
+<xi:include href="../spec/Connection_Interface_Client_Types1.xml"/>
+<xi:include href="../spec/Connection_Interface_Contact_Blocking1.xml"/>
+<xi:include href="../spec/Connection_Interface_Contact_Capabilities1.xml"/>
+<xi:include href="../spec/Connection_Interface_Contact_Groups1.xml"/>
+<xi:include href="../spec/Connection_Interface_Contact_Info1.xml"/>
+<xi:include href="../spec/Connection_Interface_Contact_List1.xml"/>
+<xi:include href="../spec/Connection_Interface_Presence1.xml"/>
+<xi:include href="../spec/Connection_Interface_Location1.xml"/>
+<xi:include href="../spec/Connection_Interface_Service_Point1.xml"/>
+<xi:include href="../spec/Connection_Interface_Mail_Notification1.xml"/>
+<xi:include href="../spec/Connection_Interface_Power_Saving1.xml"/>
</tp:spec>
diff --git a/telepathy-glib/contact-internal.h b/telepathy-glib/contact-internal.h
index 5bc169636..e77b52cfb 100644
--- a/telepathy-glib/contact-internal.h
+++ b/telepathy-glib/contact-internal.h
@@ -31,13 +31,11 @@ TpContact *_tp_contact_new (TpConnection *connection,
gboolean _tp_contact_set_attributes (TpContact *contact,
GHashTable *asv,
- guint n_features,
- const TpContactFeature *features,
+ const GQuark *features,
GError **error);
const gchar **_tp_contacts_bind_to_signals (TpConnection *connection,
- guint n_features,
- const TpContactFeature *features);
+ const GQuark *features);
void _tp_contact_set_subscription_states (TpContact *self,
GValueArray *value_array);
diff --git a/telepathy-glib/contact-list-channel.c b/telepathy-glib/contact-list-channel.c
deleted file mode 100644
index 6346da8b3..000000000
--- a/telepathy-glib/contact-list-channel.c
+++ /dev/null
@@ -1,498 +0,0 @@
-/* A ContactList channel with handle type LIST or GROUP.
- *
- * Copyright © 2009-2010 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright © 2009 Nokia Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-
-#include <config.h>
-#include <telepathy-glib/contact-list-channel-internal.h>
-
-#include <telepathy-glib/channel-iface.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/exportable-channel.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/svc-channel.h>
-#include <telepathy-glib/svc-generic.h>
-
-#include <telepathy-glib/base-contact-list-internal.h>
-
-static void list_channel_iface_init (TpSvcChannelClass *iface);
-static void group_channel_iface_init (TpSvcChannelClass *iface);
-static void list_group_iface_init (TpSvcChannelInterfaceGroupClass *iface);
-static void group_group_iface_init (TpSvcChannelInterfaceGroupClass *iface);
-
-/* Abstract base class */
-G_DEFINE_ABSTRACT_TYPE_WITH_CODE (TpBaseContactListChannel,
- _tp_base_contact_list_channel,
- TP_TYPE_BASE_CHANNEL,
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_CONTACT_LIST, NULL);
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_GROUP, NULL))
-
-/* Subclass for handle type LIST */
-G_DEFINE_TYPE_WITH_CODE (TpContactListChannel, _tp_contact_list_channel,
- TP_TYPE_BASE_CONTACT_LIST_CHANNEL,
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_GROUP,
- list_group_iface_init);
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL, list_channel_iface_init))
-
-/* Subclass for handle type GROUP */
-G_DEFINE_TYPE_WITH_CODE (TpContactGroupChannel, _tp_contact_group_channel,
- TP_TYPE_BASE_CONTACT_LIST_CHANNEL,
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_GROUP,
- group_group_iface_init);
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL, group_channel_iface_init))
-
-static GPtrArray *
-base_contact_list_get_interfaces (TpBaseChannel *self)
-{
- GPtrArray *interfaces;
-
- interfaces = TP_BASE_CHANNEL_CLASS (
- _tp_base_contact_list_channel_parent_class)->get_interfaces (self);
-
- g_ptr_array_add (interfaces, TP_IFACE_CHANNEL_INTERFACE_GROUP);
- return interfaces;
-};
-
-enum
-{
- PROP_MANAGER = 1,
- N_PROPS
-};
-
-static void
-_tp_base_contact_list_channel_init (TpBaseContactListChannel *self)
-{
-}
-
-static void
-_tp_contact_list_channel_init (TpContactListChannel *self)
-{
-}
-
-static void
-_tp_contact_group_channel_init (TpContactGroupChannel *self)
-{
-}
-
-static void
-tp_base_contact_list_channel_constructed (GObject *object)
-{
- TpBaseContactListChannel *self = TP_BASE_CONTACT_LIST_CHANNEL (object);
- TpBaseChannel *base = (TpBaseChannel *) self;
- TpBaseConnection *conn = tp_base_channel_get_connection (base);
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (conn,
- TP_HANDLE_TYPE_CONTACT);
- void (*chain_up) (GObject *) =
- ((GObjectClass *) _tp_base_contact_list_channel_parent_class)->constructed;
-
- if (chain_up != NULL)
- chain_up (object);
-
- g_assert (TP_IS_BASE_CONTACT_LIST (self->manager));
-
- tp_base_channel_register (base);
-
- tp_group_mixin_init (object, G_STRUCT_OFFSET (TpBaseContactListChannel,
- group), contact_repo, conn->self_handle);
- /* Both the subclasses have full support for telepathy-spec 0.17.6. */
- tp_group_mixin_change_flags (object,
- TP_CHANNEL_GROUP_FLAG_PROPERTIES, 0);
-}
-
-static void
-tp_contact_list_channel_constructed (GObject *object)
-{
- TpBaseContactListChannel *self = TP_BASE_CONTACT_LIST_CHANNEL (object);
- void (*chain_up) (GObject *) =
- ((GObjectClass *) _tp_contact_list_channel_parent_class)->constructed;
-
- if (chain_up != NULL)
- chain_up (object);
-
- tp_group_mixin_change_flags (object,
- _tp_base_contact_list_get_list_flags (self->manager,
- tp_base_channel_get_target_handle ((TpBaseChannel *) self)),
- 0);
-}
-
-static void
-tp_contact_group_channel_constructed (GObject *object)
-{
- TpBaseContactListChannel *self = TP_BASE_CONTACT_LIST_CHANNEL (object);
- void (*chain_up) (GObject *) =
- ((GObjectClass *) _tp_contact_group_channel_parent_class)->constructed;
-
- if (chain_up != NULL)
- chain_up (object);
-
- tp_group_mixin_change_flags (object,
- _tp_base_contact_list_get_group_flags (self->manager), 0);
-}
-
-
-static void
-tp_base_contact_list_channel_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
-{
- TpBaseContactListChannel *self = TP_BASE_CONTACT_LIST_CHANNEL (object);
-
- switch (property_id)
- {
- case PROP_MANAGER:
- g_value_set_object (value, self->manager);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-tp_base_contact_list_channel_set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- TpBaseContactListChannel *self = TP_BASE_CONTACT_LIST_CHANNEL (object);
-
- switch (property_id)
- {
- case PROP_MANAGER:
- g_assert (self->manager == NULL); /* construct-only */
- self->manager = g_value_dup_object (value);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-void
-_tp_base_contact_list_channel_close (TpBaseContactListChannel *self)
-{
- if (self->manager == NULL)
- return;
-
- tp_clear_object (&self->manager);
- tp_group_mixin_finalize ((GObject *) self);
- tp_base_channel_destroyed ((TpBaseChannel *) self);
-}
-
-static void
-tp_base_contact_list_channel_dispose (GObject *object)
-{
- TpBaseContactListChannel *self = TP_BASE_CONTACT_LIST_CHANNEL (object);
- void (*dispose) (GObject *) =
- G_OBJECT_CLASS (_tp_base_contact_list_channel_parent_class)->dispose;
-
- _tp_base_contact_list_channel_close (self);
-
- if (dispose != NULL)
- dispose (object);
-}
-
-static gboolean
-tp_base_contact_list_channel_check_still_usable (
- TpBaseContactListChannel *self,
- DBusGMethodInvocation *context)
-{
- if (self->manager == NULL)
- {
- GError e = { TP_ERROR, TP_ERROR_TERMINATED, "Channel already closed" };
- dbus_g_method_return_error (context, &e);
- return FALSE;
- }
-
- return TRUE;
-}
-
-static gboolean
-group_add_member (GObject *object,
- TpHandle handle,
- const gchar *message,
- GError **error)
-{
- /* We don't use this: it's synchronous */
- g_return_val_if_reached (FALSE);
-}
-
-static gboolean
-group_remove_member (GObject *object,
- TpHandle handle,
- const gchar *message,
- GError **error)
-{
- /* We don't use this: it's synchronous */
- g_return_val_if_reached (FALSE);
-}
-
-static gboolean
-list_add_member (GObject *object,
- TpHandle handle,
- const gchar *message,
- GError **error)
-{
- /* We don't use this: it's synchronous */
- g_return_val_if_reached (FALSE);
-}
-
-static gboolean
-list_remove_member (GObject *object,
- TpHandle handle,
- const gchar *message,
- GError **error)
-{
- /* We don't use this: it's synchronous */
- g_return_val_if_reached (FALSE);
-}
-
-/* We don't use this: #TpBaseChannelClass.close doesn't allow us to fail to
- * close, which is a quirk of the old ContactList design, so subclasses must
- * IMPLEMENT (close) manually. */
-static void
-stub_close (TpBaseChannel *channel G_GNUC_UNUSED)
-{
- g_return_if_reached ();
-}
-
-static void
-_tp_base_contact_list_channel_class_init (TpBaseContactListChannelClass *cls)
-{
- GObjectClass *object_class = (GObjectClass *) cls;
- TpBaseChannelClass *base_class = (TpBaseChannelClass *) cls;
-
- object_class->constructed = tp_base_contact_list_channel_constructed;
- object_class->set_property = tp_base_contact_list_channel_set_property;
- object_class->get_property = tp_base_contact_list_channel_get_property;
- object_class->dispose = tp_base_contact_list_channel_dispose;
-
- base_class->channel_type = TP_IFACE_CHANNEL_TYPE_CONTACT_LIST;
- base_class->target_handle_type = 0; /* placeholder, set in subclass */
- base_class->get_interfaces = base_contact_list_get_interfaces;
- base_class->close = stub_close; /* placeholder, not called */
-
- g_object_class_install_property (object_class, PROP_MANAGER,
- g_param_spec_object ("manager", "TpBaseContactList",
- "TpBaseContactList object that owns this channel",
- TP_TYPE_BASE_CONTACT_LIST,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- /* Group mixin is initialized separately for each subclass - they have
- * different callbacks */
-}
-
-static void
-_tp_contact_list_channel_class_init (TpContactListChannelClass *cls)
-{
- GObjectClass *object_class = (GObjectClass *) cls;
- TpBaseChannelClass *base_class = (TpBaseChannelClass *) cls;
-
- object_class->constructed = tp_contact_list_channel_constructed;
-
- base_class->target_handle_type = TP_HANDLE_TYPE_LIST;
-
- tp_group_mixin_class_init (object_class,
- G_STRUCT_OFFSET (TpBaseContactListChannelClass, group_class),
- list_add_member,
- list_remove_member);
- tp_group_mixin_init_dbus_properties (object_class);
-}
-
-static void
-_tp_contact_group_channel_class_init (TpContactGroupChannelClass *cls)
-{
- GObjectClass *object_class = (GObjectClass *) cls;
- TpBaseChannelClass *base_class = (TpBaseChannelClass *) cls;
-
- object_class->constructed = tp_contact_group_channel_constructed;
-
- base_class->target_handle_type = TP_HANDLE_TYPE_GROUP;
-
- tp_group_mixin_class_init (object_class,
- G_STRUCT_OFFSET (TpBaseContactListChannelClass, group_class),
- group_add_member,
- group_remove_member);
- tp_group_mixin_init_dbus_properties (object_class);
-}
-
-static void
-list_channel_close (TpSvcChannel *iface G_GNUC_UNUSED,
- DBusGMethodInvocation *context)
-{
- GError e = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
- "ContactList channels with handle type LIST may not be closed" };
-
- dbus_g_method_return_error (context, &e);
-}
-
-static void
-group_channel_close (TpSvcChannel *iface,
- DBusGMethodInvocation *context)
-{
- TpBaseContactListChannel *self = TP_BASE_CONTACT_LIST_CHANNEL (iface);
- GError *error = NULL;
-
- if (!tp_base_contact_list_channel_check_still_usable (self, context))
- return;
-
- if (tp_handle_set_size (self->group.members) > 0)
- {
- g_set_error (&error, TP_ERROR, TP_ERROR_NOT_AVAILABLE,
- "Non-empty groups may not be deleted (closed)");
- goto error;
- }
-
- if (!_tp_base_contact_list_delete_group_by_handle (self->manager,
- tp_base_channel_get_target_handle ((TpBaseChannel *) self), &error))
- goto error;
-
- tp_svc_channel_return_from_close (context);
- return;
-
-error:
- dbus_g_method_return_error (context, error);
- g_clear_error (&error);
-}
-
-static void
-list_channel_iface_init (TpSvcChannelClass *iface)
-{
-#define IMPLEMENT(x) tp_svc_channel_implement_##x (iface, list_channel_##x)
- IMPLEMENT (close);
-#undef IMPLEMENT
-}
-
-static void
-group_channel_iface_init (TpSvcChannelClass *iface)
-{
-#define IMPLEMENT(x) tp_svc_channel_implement_##x (iface, group_channel_##x)
- IMPLEMENT (close);
-#undef IMPLEMENT
-}
-
-static void
-list_group_add_members (TpSvcChannelInterfaceGroup *iface,
- const GArray *contacts,
- const gchar *message,
- DBusGMethodInvocation *context)
-{
- TpBaseContactListChannel *self = TP_BASE_CONTACT_LIST_CHANNEL (iface);
-
- if (tp_base_contact_list_channel_check_still_usable (self, context))
- _tp_base_contact_list_add_to_list (self->manager,
- tp_base_channel_get_target_handle ((TpBaseChannel *) self),
- contacts, message, context);
-}
-
-static void
-list_group_remove_members_with_reason (TpSvcChannelInterfaceGroup *iface,
- const GArray *contacts,
- const gchar *message,
- guint reason,
- DBusGMethodInvocation *context)
-{
- TpBaseContactListChannel *self = TP_BASE_CONTACT_LIST_CHANNEL (iface);
-
- if (tp_base_contact_list_channel_check_still_usable (self, context))
- _tp_base_contact_list_remove_from_list (self->manager,
- tp_base_channel_get_target_handle ((TpBaseChannel *) self),
- contacts, message, reason, context);
-}
-
-static void
-list_group_remove_members (TpSvcChannelInterfaceGroup *iface,
- const GArray *contacts,
- const gchar *message,
- DBusGMethodInvocation *context)
-{
- /* also returns void, so this is OK */
- list_group_remove_members_with_reason (iface, contacts, message,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE, context);
-}
-
-static void
-list_group_iface_init (TpSvcChannelInterfaceGroupClass *iface)
-{
- tp_group_mixin_iface_init (iface, NULL);
-
-#define IMPLEMENT(x) tp_svc_channel_interface_group_implement_##x (iface, \
- list_group_##x)
- IMPLEMENT (add_members);
- IMPLEMENT (remove_members);
- IMPLEMENT (remove_members_with_reason);
-#undef IMPLEMENT
-}
-
-static void
-group_group_add_members (TpSvcChannelInterfaceGroup *iface,
- const GArray *contacts,
- const gchar *message,
- DBusGMethodInvocation *context)
-{
- TpBaseContactListChannel *self = TP_BASE_CONTACT_LIST_CHANNEL (iface);
-
- if (tp_base_contact_list_channel_check_still_usable (self, context))
- _tp_base_contact_list_add_to_group (self->manager,
- tp_base_channel_get_target_handle ((TpBaseChannel *) self),
- contacts, message, context);
-}
-
-static void
-group_group_remove_members_with_reason (TpSvcChannelInterfaceGroup *iface,
- const GArray *contacts,
- const gchar *message,
- guint reason,
- DBusGMethodInvocation *context)
-{
- TpBaseContactListChannel *self = TP_BASE_CONTACT_LIST_CHANNEL (iface);
-
- if (tp_base_contact_list_channel_check_still_usable (self, context))
- _tp_base_contact_list_remove_from_group (self->manager,
- tp_base_channel_get_target_handle ((TpBaseChannel *) self),
- contacts, message, reason, context);
-}
-
-static void
-group_group_remove_members (TpSvcChannelInterfaceGroup *iface,
- const GArray *contacts,
- const gchar *message,
- DBusGMethodInvocation *context)
-{
- /* also returns void, so this is OK */
- group_group_remove_members_with_reason (iface, contacts, message,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE, context);
-}
-
-static void
-group_group_iface_init (TpSvcChannelInterfaceGroupClass *iface)
-{
- tp_group_mixin_iface_init (iface, NULL);
-
-#define IMPLEMENT(x) tp_svc_channel_interface_group_implement_##x (iface, \
- group_group_##x)
- IMPLEMENT (add_members);
- IMPLEMENT (remove_members);
- IMPLEMENT (remove_members_with_reason);
-#undef IMPLEMENT
-}
diff --git a/telepathy-glib/contact-operations.c b/telepathy-glib/contact-operations.c
index fb9187aac..70f917f96 100644
--- a/telepathy-glib/contact-operations.c
+++ b/telepathy-glib/contact-operations.c
@@ -21,6 +21,7 @@
#include <telepathy-glib/contact-operations.h>
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection-contact-list.h>
#define DEBUG_FLAG TP_DEBUG_CONTACTS
diff --git a/telepathy-glib/contact-search.c b/telepathy-glib/contact-search.c
index dacea81e6..5ebbec2e8 100644
--- a/telepathy-glib/contact-search.c
+++ b/telepathy-glib/contact-search.c
@@ -22,6 +22,7 @@
#include "telepathy-glib/contact-search.h"
+#include <telepathy-glib/cli-channel.h>
#include <telepathy-glib/contact-search-result.h>
#include <telepathy-glib/contact-search-internal.h>
#include <telepathy-glib/account-channel-request.h>
diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c
index 64690f8bc..0e283f064 100644
--- a/telepathy-glib/contact.c
+++ b/telepathy-glib/contact.c
@@ -26,6 +26,7 @@
#include <string.h>
#include <telepathy-glib/capabilities-internal.h>
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
@@ -56,7 +57,7 @@
* An object representing a contact on a #TpConnection.
*
* Contact objects support tracking a number of attributes of contacts, as
- * described by the #TpContactFeature flags. Features can be specified when
+ * described by the contact feature #GQuark<!-- -->s. Features can be specified when
* instantiating contact objects (with tp_connection_get_contacts_by_id() or
* tp_connection_get_contacts_by_handle()), or added to an existing contact
* object with tp_connection_upgrade_contacts(). For example, a client wishing
@@ -66,11 +67,9 @@
*
* Note that releasing a #TpContact object might release handle references
* held by calling tp_cli_connection_call_request_handles(),
- * tp_cli_connection_run_request_handles(),
- * tp_cli_connection_call_hold_handles(),
- * tp_cli_connection_run_hold_handles(),
- * tp_cli_connection_interface_contacts_call_get_contact_attributes() or
- * tp_cli_connection_interface_contacts_run_get_contact_attributes() directly.
+ * tp_cli_connection_call_hold_handles() or
+ * tp_cli_connection_interface_contacts_call_get_contact_attributes()
+ * directly.
* Those functions should be avoided in favour of using #TpContact,
* tp_connection_hold_handles(), tp_connection_request_handles() and
* tp_connection_get_contact_attributes().
@@ -90,77 +89,226 @@ struct _TpContact {
};
/**
- * TpContactFeature:
- * @TP_CONTACT_FEATURE_ALIAS: #TpContact:alias
- * @TP_CONTACT_FEATURE_AVATAR_TOKEN: #TpContact:avatar-token
- * @TP_CONTACT_FEATURE_PRESENCE: #TpContact:presence-type,
- * #TpContact:presence-status and #TpContact:presence-message
- * @TP_CONTACT_FEATURE_LOCATION: #TpContact:location (available since 0.11.1)
- * @TP_CONTACT_FEATURE_CAPABILITIES: #TpContact:capabilities
- * (available since 0.11.3)
- * @TP_CONTACT_FEATURE_AVATAR_DATA: #TpContact:avatar-file and
- * #TpContact:avatar-mime-type. Implies %TP_CONTACT_FEATURE_AVATAR_TOKEN
- * (available since 0.11.6)
- * @TP_CONTACT_FEATURE_CONTACT_INFO: #TpContact:contact-info
- * (available since 0.11.7)
- * @TP_CONTACT_FEATURE_CLIENT_TYPES: #TpContact:client-types
- * (available since 0.13.1)
- * @TP_CONTACT_FEATURE_SUBSCRIPTION_STATES: #TpContact:subscribe-state,
- * #TpContact:publish-state and #TpContact:publish-request. Require a
- * Connection implementing the %TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST
- * interface. (available since 0.13.12)
- * @TP_CONTACT_FEATURE_CONTACT_GROUPS: #TpContact:contact-groups
- * (available since 0.13.14)
- * @TP_CONTACT_FEATURE_CONTACT_BLOCKING: #TpContact:is-blocked. Require
- * Connection implementing the %TP_IFACE_CONNECTION_INTERFACE_CONTACT_BLOCKING
- * interface. (available since 0.17.0)
- *
- * Enumeration representing the features a #TpContact can optionally support.
- * When requesting a #TpContact, library users specify the desired features;
- * the #TpContact code will only initialize state for those features, to
- * avoid unwanted D-Bus round-trips and signal connections.
- *
- * Since 0.11.5, there is a corresponding #GEnumClass type,
- * %TP_TYPE_CONTACT_FEATURE.
+ * TP_CONTACT_FEATURE_ALIAS:
*
- * Since: 0.7.18
+ * Expands to a call to a function that returns a #GQuark representing the
+ * "alias" feature.
+ *
+ * When this feature is prepared, the contact's alias has been retrieved.
+ * In particular, the #TpContact:alias property has been set.
+ *
+ * Since: 0.UNRELEASED
*/
+GQuark
+tp_contact_get_feature_quark_alias (void)
+{
+ return g_quark_from_static_string ("tp-contact-feature-alias");
+}
+
/**
- * TP_NUM_CONTACT_FEATURES:
+ * TP_CONTACT_FEATURE_AVATAR_TOKEN:
*
- * 1 higher than the highest #TpContactFeature supported by this version of
- * telepathy-glib.
+ * Expands to a call to a function that returns a #GQuark representing the
+ * "avatar token" feature.
+ *
+ * When this feature is prepared, the contact's avatar token has been
+ * retrieved. In particular, the #TpContact:avatar-token property has
+ * been set.
*
* Since: 0.19.0
*/
+GQuark
+tp_contact_get_feature_quark_avatar_token (void)
+{
+ return g_quark_from_static_string ("tp-contact-feature-avatar-token");
+}
+
/**
- * NUM_TP_CONTACT_FEATURES: (skip)
+ * TP_CONTACT_FEATURE_PRESENCE:
*
- * 1 higher than the highest #TpContactFeature supported by this version of
- * telepathy-glib. Use %TP_NUM_CONTACT_FEATURES in new code.
+ * Expands to a call to a function that returns a #GQuark representing the
+ * "presence" feature.
*
- * Since: 0.7.18
+ * When this feature is prepared, the contact's presence has been
+ * retrieved. In particular, the #TpContact:presence-type,
+ * #TpContact:presence-status, and #TpContact:presence-message
+ * properties have been set.
+ *
+ * Since: 0.UNRELEASED
*/
+GQuark
+tp_contact_get_feature_quark_presence (void)
+{
+ return g_quark_from_static_string ("tp-contact-feature-presence");
+}
+
/**
- * TP_CONTACT_FEATURE_INVALID: (skip)
+ * TP_CONTACT_FEATURE_LOCATION:
+ *
+ * Expands to a call to a function that returns a #GQuark representing the
+ * "location" feature.
*
- * An invalid TpContactFeature. Used as list termination. See for example
- * tp_simple_client_factory_add_contact_features_varargs().
+ * When this feature is prepared, the contact's location has been
+ * retrieved. In particular, the #TpContact:location property has
+ * been set.
*
- * Since: 0.15.5
+ * Since: 0.UNRELEASED
*/
+GQuark
+tp_contact_get_feature_quark_location (void)
+{
+ return g_quark_from_static_string ("tp-contact-feature-location");
+}
+
/**
- * TP_TYPE_CONTACT_FEATURE:
+ * TP_CONTACT_FEATURE_CAPABILITIES:
+ *
+ * Expands to a call to a function that returns a #GQuark representing the
+ * "capabilities" feature.
*
- * The #GEnumClass type of a #TpContactFeature.
+ * When this feature is prepared, the contact's capabilities have been
+ * retrieved. In particular, the #TpContact:capabilities property has
+ * been set.
*
- * Since: 0.11.5
+ * Since: 0.UNRELEASED
*/
+GQuark
+tp_contact_get_feature_quark_capabilities (void)
+{
+ return g_quark_from_static_string ("tp-contact-feature-capabilities");
+}
+
+/**
+ * TP_CONTACT_FEATURE_AVATAR_DATA:
+ *
+ * Expands to a call to a function that returns a #GQuark representing
+ * the "avatar data" feature.
+ *
+ * When this feature is prepared, the contact's avatar has been
+ * retrieved. In particular, the #TpContact:avatar-file property has
+ * been set.
+ *
+ * This feature also implies the %TP_CONTACT_FEATURE_AVATAR_TOKEN.
+ *
+ * Since: 0.UNRELEASED
+ */
+
+GQuark
+tp_contact_get_feature_quark_avatar_data (void)
+{
+ return g_quark_from_static_string ("tp-contact-feature-avatar-data");
+}
+
+/**
+ * TP_CONTACT_FEATURE_CONTACT_INFO:
+ *
+ * Expands to a call to a function that returns a #GQuark representing
+ * the "contact info" feature.
+ *
+ * When this feature is prepared, the contact's contact info has been
+ * retrieved. In particular, the #TpContact:contact-info property has
+ * been set.
+ *
+ * Since: 0.UNRELEASED
+ */
+
+GQuark
+tp_contact_get_feature_quark_contact_info (void)
+{
+ return g_quark_from_static_string ("tp-contact-feature-contact-info");
+}
+
+/**
+ * TP_CONTACT_FEATURE_CLIENT_TYPES:
+ *
+ * Expands to a call to a function that returns a #GQuark representing
+ * the "client types" feature.
+ *
+ * When this feature is prepared, the contact's client types have been
+ * retrieved. In particular, the #TpContact:client-types property has
+ * been set.
+ *
+ * Since: 0.UNRELEASED
+ */
+
+GQuark
+tp_contact_get_feature_quark_client_types (void)
+{
+ return g_quark_from_static_string ("tp-contact-feature-client-types");
+}
+
+/**
+ * TP_CONTACT_FEATURE_SUBSCRIPTION_STATES:
+ *
+ * Expands to a call to a function that returns a #GQuark representing
+ * the "subscription states" feature.
+ *
+ * When this feature is prepared, the contact's subscription states
+ * have been retrieved. In particular, the #TpContact:subscribe-state,
+ * #TpContact:publish-request, and #TpContact:publish-state properties
+ * have been set.
+ *
+ * This feature requires a Connection implementing the
+ * %TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST interface.
+ *
+ * Since: 0.UNRELEASED
+ */
+
+GQuark
+tp_contact_get_feature_quark_subscription_states (void)
+{
+ return g_quark_from_static_string ("tp-contact-feature-subscription-states");
+}
+
+/**
+ * TP_CONTACT_FEATURE_CONTACT_GROUPS:
+ *
+ * Expands to a call to a function that returns a #GQuark representing the
+ * "contact groups" feature.
+ *
+ * When this feature is prepared, the contact's contact groups have
+ * been retrieved. In particular, the #TpContact:contact-groups
+ * property has been set.
+ *
+ * This feature requires a Connection implementing the
+ * %TP_IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS interface.
+ *
+ * Since: 0.UNRELEASED
+ */
+
+GQuark
+tp_contact_get_feature_quark_contact_groups (void)
+{
+ return g_quark_from_static_string ("tp-contact-feature-contact-groups");
+}
+
+/**
+ * TP_CONTACT_FEATURE_CONTACT_BLOCKING:
+ *
+ * Expands to a call to a function that returns a #GQuark representing
+ * the "contact blocking" feature.
+ *
+ * When this feature is prepared, the contact's blocking state have
+ * been retrieved. In particular, the #TpContact:is-blocked property
+ * has been set.
+ *
+ * This feature requires a Connection implementing the
+ * %TP_IFACE_CONNECTION_INTERFACE_CONTACT_BLOCKING interface.
+ *
+ * Since: 0.UNRELEASED
+ */
+
+GQuark
+tp_contact_get_feature_quark_contact_blocking (void)
+{
+ return g_quark_from_static_string ("tp-contact-feature-contact-blocking");
+}
+
G_DEFINE_TYPE (TpContact, tp_contact, G_TYPE_OBJECT)
@@ -196,20 +344,22 @@ enum {
static guint signals[N_SIGNALS] = {0};
+static GQuark const no_quarks[] = { 0 };
+
/* The API allows for more than 32 features, but this implementation does
* not. We can easily expand this later. */
typedef enum {
- CONTACT_FEATURE_FLAG_ALIAS = 1 << TP_CONTACT_FEATURE_ALIAS,
- CONTACT_FEATURE_FLAG_AVATAR_TOKEN = 1 << TP_CONTACT_FEATURE_AVATAR_TOKEN,
- CONTACT_FEATURE_FLAG_PRESENCE = 1 << TP_CONTACT_FEATURE_PRESENCE,
- CONTACT_FEATURE_FLAG_LOCATION = 1 << TP_CONTACT_FEATURE_LOCATION,
- CONTACT_FEATURE_FLAG_CAPABILITIES = 1 << TP_CONTACT_FEATURE_CAPABILITIES,
- CONTACT_FEATURE_FLAG_AVATAR_DATA = 1 << TP_CONTACT_FEATURE_AVATAR_DATA,
- CONTACT_FEATURE_FLAG_CONTACT_INFO = 1 << TP_CONTACT_FEATURE_CONTACT_INFO,
- CONTACT_FEATURE_FLAG_CLIENT_TYPES = 1 << TP_CONTACT_FEATURE_CLIENT_TYPES,
- CONTACT_FEATURE_FLAG_STATES = 1 << TP_CONTACT_FEATURE_SUBSCRIPTION_STATES,
- CONTACT_FEATURE_FLAG_CONTACT_GROUPS = 1 << TP_CONTACT_FEATURE_CONTACT_GROUPS,
- CONTACT_FEATURE_FLAG_CONTACT_BLOCKING = 1 << TP_CONTACT_FEATURE_CONTACT_BLOCKING,
+ CONTACT_FEATURE_FLAG_ALIAS = 1 << 1,
+ CONTACT_FEATURE_FLAG_AVATAR_TOKEN = 1 << 2,
+ CONTACT_FEATURE_FLAG_PRESENCE = 1 << 3,
+ CONTACT_FEATURE_FLAG_LOCATION = 1 << 4,
+ CONTACT_FEATURE_FLAG_CAPABILITIES = 1 << 5,
+ CONTACT_FEATURE_FLAG_AVATAR_DATA = 1 << 6,
+ CONTACT_FEATURE_FLAG_CONTACT_INFO = 1 << 7,
+ CONTACT_FEATURE_FLAG_CLIENT_TYPES = 1 << 8,
+ CONTACT_FEATURE_FLAG_STATES = 1 << 9,
+ CONTACT_FEATURE_FLAG_CONTACT_GROUPS = 1 << 10,
+ CONTACT_FEATURE_FLAG_CONTACT_BLOCKING = 1 << 11,
} ContactFeatureFlags;
struct _TpContactPrivate {
@@ -348,6 +498,35 @@ tp_contact_get_identifier (TpContact *self)
return self->priv->identifier;
}
+static guint
+get_feature (GQuark feature)
+{
+ if (feature == TP_CONTACT_FEATURE_ALIAS)
+ return CONTACT_FEATURE_FLAG_ALIAS;
+ else if (feature == TP_CONTACT_FEATURE_AVATAR_TOKEN)
+ return CONTACT_FEATURE_FLAG_AVATAR_TOKEN;
+ else if (feature == TP_CONTACT_FEATURE_PRESENCE)
+ return CONTACT_FEATURE_FLAG_PRESENCE;
+ else if (feature == TP_CONTACT_FEATURE_LOCATION)
+ return CONTACT_FEATURE_FLAG_LOCATION;
+ else if (feature == TP_CONTACT_FEATURE_CAPABILITIES)
+ return CONTACT_FEATURE_FLAG_CAPABILITIES;
+ else if (feature == TP_CONTACT_FEATURE_AVATAR_DATA)
+ return CONTACT_FEATURE_FLAG_AVATAR_DATA;
+ else if (feature == TP_CONTACT_FEATURE_CONTACT_INFO)
+ return CONTACT_FEATURE_FLAG_CONTACT_INFO;
+ else if (feature == TP_CONTACT_FEATURE_CLIENT_TYPES)
+ return CONTACT_FEATURE_FLAG_CLIENT_TYPES;
+ else if (feature == TP_CONTACT_FEATURE_SUBSCRIPTION_STATES)
+ return CONTACT_FEATURE_FLAG_STATES;
+ else if (feature == TP_CONTACT_FEATURE_CONTACT_GROUPS)
+ return CONTACT_FEATURE_FLAG_CONTACT_GROUPS;
+ else if (feature == TP_CONTACT_FEATURE_CONTACT_BLOCKING)
+ return CONTACT_FEATURE_FLAG_CONTACT_BLOCKING;
+
+ return 0;
+}
+
/**
* tp_contact_has_feature:
* @self: a contact
@@ -357,16 +536,22 @@ tp_contact_get_identifier (TpContact *self)
*
* Returns: %TRUE if @self has been set up to track the feature @feature
*
- * Since: 0.7.18
+ * Since: 0.UNRELEASED
*/
gboolean
tp_contact_has_feature (TpContact *self,
- TpContactFeature feature)
+ GQuark feature)
{
+ guint mask;
+
g_return_val_if_fail (self != NULL, FALSE);
- g_return_val_if_fail (feature < TP_NUM_CONTACT_FEATURES, FALSE);
- return ((self->priv->has_features & (1 << feature)) != 0);
+ mask = get_feature (feature);
+
+ if (mask == 0)
+ return FALSE;
+
+ return ((self->priv->has_features & mask) != 0);
}
@@ -464,9 +649,9 @@ tp_contact_get_avatar_mime_type (TpContact *self)
* tp_contact_get_presence_type:
* @self: a contact
*
- * If this object has been set up to track %TP_CONTACT_FEATURE_PRESENCE
- * and the underlying connection supports either the Presence or
- * SimplePresence interfaces, return the type of the contact's presence.
+ * If this object has been set up to track
+ * %TP_CONTACT_FEATURE_PRESENCE and the underlying connection supports
+ * the Presence interface, return the type of the contact's presence.
*
* Otherwise, return %TP_CONNECTION_PRESENCE_TYPE_UNSET.
*
@@ -727,7 +912,7 @@ set_contact_groups_cb (TpConnection *connection,
g_simple_async_result_set_from_error (result, error);
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -1422,7 +1607,7 @@ _tp_contact_new (TpConnection *connection,
/* FIXME: Ideally this should be replaced with
*
- * tp_simple_client_factory_ensure_contact (tp_proxy_get_factory (connection),
+ * tp_client_factory_ensure_contact (tp_proxy_get_factory (connection),
* handle, identifier);
*
* but we cannot assert CM has immortal handles (yet). That means we cannot
@@ -1457,20 +1642,13 @@ tp_contact_ensure (TpConnection *connection,
* Try to return an existing contact object or create a new contact object
* immediately.
*
- * If tp_connection_has_immortal_handles() would return %TRUE and
- * @identifier is non-%NULL, this function always succeeds.
+ * If @identifier is non-%NULL, this function always succeeds.
*
- * On connections without immortal handles, it is not possible to guarantee
- * that @handle remains valid without making asynchronous D-Bus calls, so
- * it might be necessary to delay processing of messages or other events
- * until a #TpContact can be constructed asynchronously, for instance by using
- * tp_connection_get_contacts_by_id().
- *
- * Similarly, if @identifier is %NULL, it might not be possible to find the
+ * If @identifier is %NULL, it might not be possible to find the
* identifier for @handle without making asynchronous D-Bus calls, so
- * it might be necessary to delay processing of messages or other events
- * until a #TpContact can be constructed asynchronously, for instance by using
- * tp_connection_get_contacts_by_handle().
+ * it might be necessary to delay processing of messages or other
+ * events until a #TpContact can be constructed asynchronously, for
+ * instance by using tp_connection_get_contacts_by_handle().
*
* Returns: (transfer full): a contact or %NULL
*
@@ -1492,8 +1670,7 @@ tp_connection_dup_contact_if_possible (TpConnection *connection,
{
g_object_ref (ret);
}
- else if (tp_connection_has_immortal_handles (connection) &&
- identifier != NULL)
+ else if (identifier != NULL)
{
ret = tp_contact_ensure (connection, handle);
@@ -1579,9 +1756,6 @@ struct _ContactsContext {
/* Whether or not our weak object died*/
gboolean no_purpose_in_life;
- /* queue of ContactsProc */
- GQueue todo;
-
/* index into handles or ids, only used when the first HoldHandles call
* failed with InvalidHandle, or the RequestHandles call failed with
* NotAvailable */
@@ -1635,8 +1809,6 @@ contacts_context_new (TpConnection *connection,
if (c->weak_object != NULL)
g_object_weak_ref (c->weak_object, contacts_context_weak_notify, c);
- g_queue_init (&c->todo);
-
return c;
}
@@ -1652,8 +1824,6 @@ contacts_context_unref (gpointer p)
g_assert (c->connection != NULL);
tp_clear_object (&c->connection);
- g_queue_clear (&c->todo);
-
g_assert (c->contacts != NULL);
g_ptr_array_foreach (c->contacts, (GFunc) g_object_unref, NULL);
g_ptr_array_unref (c->contacts);
@@ -1729,6 +1899,76 @@ contacts_context_fail (ContactsContext *c,
}
}
+static void contact_update_avatar_data (TpContact *self);
+
+static void
+contacts_context_last_step (ContactsContext *c)
+{
+ guint i;
+
+ g_assert (c->handles->len == c->contacts->len);
+
+ /* As last step, request avatars if we want AVATAR_DATA feature. This is done
+ * here because there is no contact attribute for that. */
+ if ((c->wanted & CONTACT_FEATURE_FLAG_AVATAR_DATA) == 0)
+ return;
+
+ for (i = 0; i < c->contacts->len; i++)
+ {
+ TpContact *contact = g_ptr_array_index (c->contacts, i);
+
+ if ((contact->priv->has_features & CONTACT_FEATURE_FLAG_AVATAR_DATA) == 0)
+ {
+ contact->priv->has_features |= CONTACT_FEATURE_FLAG_AVATAR_DATA;
+ contact_update_avatar_data (contact);
+ }
+ }
+}
+
+static gboolean
+contacts_context_complete (ContactsContext *c)
+{
+ if (c->no_purpose_in_life)
+ return FALSE;
+
+ contacts_context_last_step (c);
+
+ switch (c->signature)
+ {
+ case CB_BY_HANDLE:
+ c->callback.by_handle (c->connection,
+ c->contacts->len, (TpContact * const *) c->contacts->pdata,
+ c->invalid->len, (const TpHandle *) c->invalid->data,
+ NULL, c->user_data, c->weak_object);
+ break;
+ case CB_BY_ID:
+ c->callback.by_id (c->connection,
+ c->contacts->len, (TpContact * const *) c->contacts->pdata,
+ (const gchar * const *) c->request_ids->pdata,
+ c->request_errors, NULL, c->user_data, c->weak_object);
+ break;
+ case CB_UPGRADE:
+ c->callback.upgrade (c->connection,
+ c->contacts->len, (TpContact * const *) c->contacts->pdata,
+ NULL, c->user_data, c->weak_object);
+ break;
+ default:
+ g_assert_not_reached ();
+ }
+
+ return FALSE;
+}
+
+
+static void
+contacts_context_complete_in_idle (ContactsContext *c)
+{
+ c->refcount++;
+ g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
+ (GSourceFunc) contacts_context_complete,
+ c, contacts_context_unref);
+}
+
/**
* TpConnectionContactsByHandleCb:
@@ -1842,400 +2082,6 @@ contacts_context_fail (ContactsContext *c,
* Since: 0.7.18
*/
-
-static void
-contacts_context_continue (ContactsContext *c)
-{
- if (c->no_purpose_in_life)
- return;
-
- if (g_queue_is_empty (&c->todo))
- {
- /* do some final sanity checking then hand over the contacts to the
- * library user */
- guint i;
-
- g_assert (c->contacts != NULL);
- g_assert (c->invalid != NULL);
-
- for (i = 0; i < c->contacts->len; i++)
- {
- TpContact *contact = TP_CONTACT (g_ptr_array_index (c->contacts, i));
-
- g_assert (contact->priv->identifier != NULL);
- g_assert (contact->priv->handle != 0);
- }
-
- switch (c->signature)
- {
- case CB_BY_HANDLE:
- c->callback.by_handle (c->connection,
- c->contacts->len, (TpContact * const *) c->contacts->pdata,
- c->invalid->len, (const TpHandle *) c->invalid->data,
- NULL, c->user_data, c->weak_object);
- break;
- case CB_BY_ID:
- c->callback.by_id (c->connection,
- c->contacts->len, (TpContact * const *) c->contacts->pdata,
- (const gchar * const *) c->request_ids->pdata,
- c->request_errors, NULL, c->user_data, c->weak_object);
- break;
- case CB_UPGRADE:
- c->callback.upgrade (c->connection,
- c->contacts->len, (TpContact * const *) c->contacts->pdata,
- NULL, c->user_data, c->weak_object);
- break;
- default:
- g_assert_not_reached ();
- }
- }
- else
- {
- /* bah! */
- ContactsProc next = g_queue_pop_head (&c->todo);
-
- if (G_UNLIKELY (tp_proxy_get_invalidated (c->connection) != NULL))
- {
- DEBUG ("failing due to connection having been invalidated: %s",
- tp_proxy_get_invalidated (c->connection)->message);
- contacts_context_fail (c, tp_proxy_get_invalidated (c->connection));
- }
- else
- {
- next (c);
- }
- }
-}
-
-static gboolean
-contacts_context_idle_continue (gpointer data)
-{
- contacts_context_continue (data);
- return FALSE;
-}
-
-static void
-contacts_held_one (TpConnection *connection,
- TpHandleType handle_type,
- guint n_handles,
- const TpHandle *handles,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- ContactsContext *c = user_data;
-
- g_assert (handle_type == TP_HANDLE_TYPE_CONTACT);
- g_assert (c->next_index < c->handles->len);
-
- if (error == NULL)
- {
- /* I have a handle of my very own. Just what I always wanted! */
- TpContact *contact;
-
- g_assert (n_handles == 1);
- g_assert (handles[0] != 0);
- g_debug ("%u vs %u", g_array_index (c->handles, TpHandle, c->next_index),
- handles[0]);
- g_assert (g_array_index (c->handles, TpHandle, c->next_index)
- == handles[0]);
-
- contact = tp_contact_ensure (connection, handles[0]);
- g_ptr_array_add (c->contacts, contact);
- c->next_index++;
- }
- else if (error->domain == TP_ERROR &&
- error->code == TP_ERROR_INVALID_HANDLE)
- {
- g_array_append_val (c->invalid,
- g_array_index (c->handles, TpHandle, c->next_index));
- /* ignore the bad handle - we just won't return a TpContact for it */
- g_array_remove_index_fast (c->handles, c->next_index);
- /* do not increment next_index - another handle has been moved into that
- * position */
- }
- else
- {
- /* the connection fell down a well or something */
- contacts_context_fail (c, error);
- return;
- }
-
- /* Either continue to hold handles, or proceed along the slow path. */
- contacts_context_continue (c);
-}
-
-
-static void
-contacts_hold_one (ContactsContext *c)
-{
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- c->refcount++;
- tp_connection_hold_handles (c->connection, -1,
- TP_HANDLE_TYPE_CONTACT, 1,
- &g_array_index (c->handles, TpHandle, c->next_index),
- contacts_held_one, c, contacts_context_unref, c->weak_object);
- G_GNUC_END_IGNORE_DEPRECATIONS
-}
-
-
-static void
-contacts_held_handles (TpConnection *connection,
- TpHandleType handle_type,
- guint n_handles,
- const TpHandle *handles,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- ContactsContext *c = user_data;
-
- g_assert (handle_type == TP_HANDLE_TYPE_CONTACT);
- g_assert (weak_object == c->weak_object);
-
- if (error == NULL)
- {
- /* I now own all n handles. It's like Christmas morning! */
- guint i;
-
- g_assert (n_handles == c->handles->len);
- g_assert (c->contacts->len == 0);
-
- for (i = 0; i < c->handles->len; i++)
- {
- g_ptr_array_add (c->contacts,
- tp_contact_ensure (connection,
- g_array_index (c->handles, TpHandle, i)));
- }
- }
- else if (error->domain == TP_ERROR &&
- error->code == TP_ERROR_INVALID_HANDLE)
- {
- /* One of the handles is bad. We don't know which one :-( so split
- * the batch into a chain of calls. */
- guint i;
-
- for (i = 0; i < c->handles->len; i++)
- {
- g_queue_push_head (&c->todo, contacts_hold_one);
- }
-
- g_assert (c->next_index == 0);
- }
- else
- {
- /* the connection fell down a well or something */
- contacts_context_fail (c, error);
- return;
- }
-
- /* Either hold the handles individually, or proceed along the slow path. */
- contacts_context_continue (c);
-}
-
-
-static void
-contacts_inspected (TpConnection *connection,
- const gchar **ids,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- ContactsContext *c = user_data;
-
- g_assert (weak_object == c->weak_object);
- g_assert (c->handles->len == c->contacts->len);
-
- if (error != NULL)
- {
- /* the connection fell down a well or something */
- contacts_context_fail (c, error);
- return;
- }
- else if (G_UNLIKELY (g_strv_length ((GStrv) ids) != c->handles->len))
- {
- GError *e = g_error_new (TP_DBUS_ERRORS, TP_DBUS_ERROR_INCONSISTENT,
- "Connection manager %s is broken: we inspected %u "
- "handles but InspectHandles returned %u strings",
- tp_proxy_get_bus_name (connection), c->handles->len,
- g_strv_length ((GStrv) ids));
-
- WARNING ("%s", e->message);
- contacts_context_fail (c, e);
- g_error_free (e);
- return;
- }
- else
- {
- guint i;
-
- for (i = 0; i < c->contacts->len; i++)
- {
- TpContact *contact = g_ptr_array_index (c->contacts, i);
-
- g_assert (ids[i] != NULL);
-
- if (contact->priv->identifier == NULL)
- {
- contact->priv->identifier = g_strdup (ids[i]);
- }
- else if (tp_strdiff (contact->priv->identifier, ids[i]))
- {
- GError *e = g_error_new (TP_DBUS_ERRORS,
- TP_DBUS_ERROR_INCONSISTENT,
- "Connection manager %s is broken: contact handle %u "
- "identifier changed from %s to %s",
- tp_proxy_get_bus_name (connection), contact->priv->handle,
- contact->priv->identifier, ids[i]);
-
- WARNING ("%s", e->message);
- contacts_context_fail (c, e);
- g_error_free (e);
- return;
- }
- }
- }
-
- contacts_context_continue (c);
-}
-
-
-static void
-contacts_inspect (ContactsContext *c)
-{
- guint i;
-
- g_assert (c->handles->len == c->contacts->len);
-
- for (i = 0; i < c->contacts->len; i++)
- {
- TpContact *contact = g_ptr_array_index (c->contacts, i);
-
- if (contact->priv->identifier == NULL)
- {
- c->refcount++;
- tp_cli_connection_call_inspect_handles (c->connection, -1,
- TP_HANDLE_TYPE_CONTACT, c->handles, contacts_inspected,
- c, contacts_context_unref, c->weak_object);
- return;
- }
- }
-
- /* else there's no need to inspect the contacts' handles, because we already
- * know all their identifiers */
- contacts_context_continue (c);
-}
-
-
-static void
-contacts_requested_aliases (TpConnection *connection,
- const gchar **aliases,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- ContactsContext *c = user_data;
-
- g_assert (c->handles->len == c->contacts->len);
-
- if (error == NULL)
- {
- guint i;
-
- if (G_UNLIKELY (g_strv_length ((GStrv) aliases) != c->contacts->len))
- {
- WARNING ("Connection manager %s is broken: we requested %u "
- "handles' aliases but got %u strings back",
- tp_proxy_get_bus_name (connection), c->contacts->len,
- g_strv_length ((GStrv) aliases));
-
- /* give up on the possibility of getting aliases, and just
- * move on */
- contacts_context_continue (c);
- return;
- }
-
- for (i = 0; i < c->contacts->len; i++)
- {
- TpContact *contact = g_ptr_array_index (c->contacts, i);
- const gchar *alias = aliases[i];
-
- contact->priv->has_features |= CONTACT_FEATURE_FLAG_ALIAS;
- g_free (contact->priv->alias);
- contact->priv->alias = g_strdup (alias);
- g_object_notify ((GObject *) contact, "alias");
- }
- }
- else
- {
- /* never mind, we can live without aliases */
- DEBUG ("GetAliases failed with %s %u: %s",
- g_quark_to_string (error->domain), error->code, error->message);
- }
-
- contacts_context_continue (c);
-}
-
-
-static void
-contacts_got_aliases (TpConnection *connection,
- GHashTable *handle_to_alias,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- ContactsContext *c = user_data;
-
- if (error == NULL)
- {
- guint i;
-
- for (i = 0; i < c->contacts->len; i++)
- {
- TpContact *contact = g_ptr_array_index (c->contacts, i);
- const gchar *alias = g_hash_table_lookup (handle_to_alias,
- GUINT_TO_POINTER (contact->priv->handle));
-
- contact->priv->has_features |= CONTACT_FEATURE_FLAG_ALIAS;
- g_free (contact->priv->alias);
- contact->priv->alias = NULL;
-
- if (alias != NULL)
- {
- contact->priv->alias = g_strdup (alias);
- }
- else
- {
- WARNING ("No alias returned for %u, will use ID instead",
- contact->priv->handle);
- }
-
- g_object_notify ((GObject *) contact, "alias");
- }
- }
- else if ((error->domain == TP_ERROR &&
- error->code == TP_ERROR_NOT_IMPLEMENTED) ||
- (error->domain == DBUS_GERROR &&
- error->code == DBUS_GERROR_UNKNOWN_METHOD))
- {
- /* GetAliases not implemented, fall back to (slow?) RequestAliases */
- c->refcount++;
- tp_cli_connection_interface_aliasing_call_request_aliases (connection,
- -1, c->handles, contacts_requested_aliases,
- c, contacts_context_unref, weak_object);
- return;
- }
- else
- {
- /* never mind, we can live without aliases */
- DEBUG ("GetAliases failed with %s %u: %s",
- g_quark_to_string (error->domain), error->code, error->message);
- }
-
- contacts_context_continue (c);
-}
-
-
static void
contacts_aliases_changed (TpConnection *connection,
const GPtrArray *alias_structs,
@@ -2276,39 +2122,9 @@ contacts_bind_to_aliases_changed (TpConnection *connection)
}
}
-
-static void
-contacts_get_aliases (ContactsContext *c)
-{
- guint i;
-
- g_assert (c->handles->len == c->contacts->len);
-
- contacts_bind_to_aliases_changed (c->connection);
-
- for (i = 0; i < c->contacts->len; i++)
- {
- TpContact *contact = g_ptr_array_index (c->contacts, i);
-
- if ((contact->priv->has_features & CONTACT_FEATURE_FLAG_ALIAS) == 0)
- {
- c->refcount++;
- tp_cli_connection_interface_aliasing_call_get_aliases (c->connection,
- -1, c->handles, contacts_got_aliases, c, contacts_context_unref,
- c->weak_object);
- return;
- }
- }
-
- /* else there's no need to get the contacts' aliases, because we already
- * know them all */
- contacts_context_continue (c);
-}
-
-
static void
-contact_maybe_set_simple_presence (TpContact *contact,
- GValueArray *presence)
+contact_maybe_set_presence (TpContact *contact,
+ GValueArray *presence)
{
guint type;
const gchar *status;
@@ -2406,32 +2222,8 @@ contacts_presences_changed (TpConnection *connection,
TpContact *contact = _tp_connection_lookup_contact (connection,
GPOINTER_TO_UINT (key));
- contact_maybe_set_simple_presence (contact, value);
- }
-}
-
-
-static void
-contacts_got_simple_presence (TpConnection *connection,
- GHashTable *presences,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- ContactsContext *c = user_data;
-
- if (error == NULL)
- {
- contacts_presences_changed (connection, presences, NULL, NULL);
+ contact_maybe_set_presence (contact, value);
}
- else
- {
- /* never mind, we can live without presences */
- DEBUG ("GetPresences failed with %s %u: %s",
- g_quark_to_string (error->domain), error->code, error->message);
- }
-
- contacts_context_continue (c);
}
@@ -2442,39 +2234,12 @@ contacts_bind_to_presences_changed (TpConnection *connection)
{
connection->priv->tracking_presences_changed = TRUE;
- tp_cli_connection_interface_simple_presence_connect_to_presences_changed
+ tp_cli_connection_interface_presence_connect_to_presences_changed
(connection, contacts_presences_changed, NULL, NULL, NULL, NULL);
}
}
static void
-contacts_get_simple_presence (ContactsContext *c)
-{
- guint i;
-
- g_assert (c->handles->len == c->contacts->len);
-
- contacts_bind_to_presences_changed (c->connection);
-
- for (i = 0; i < c->contacts->len; i++)
- {
- TpContact *contact = g_ptr_array_index (c->contacts, i);
-
- if ((contact->priv->has_features & CONTACT_FEATURE_FLAG_PRESENCE) == 0)
- {
- c->refcount++;
- tp_cli_connection_interface_simple_presence_call_get_presences (
- c->connection, -1,
- c->handles, contacts_got_simple_presence,
- c, contacts_context_unref, c->weak_object);
- return;
- }
- }
-
- contacts_context_continue (c);
-}
-
-static void
contacts_location_updated (TpConnection *connection,
guint handle,
GHashTable *location,
@@ -2543,59 +2308,6 @@ contacts_bind_to_client_types_updated (TpConnection *connection)
}
static void
-set_conn_capabilities_on_contacts (GPtrArray *contacts,
- TpConnection *connection)
-{
- guint i;
- TpCapabilities *conn_caps = tp_connection_get_capabilities (connection);
- GPtrArray *rcc;
-
- /* If the connection has no capabilities then don't bother setting them on
- * the contact and pretend we just don't know.. In practise this will only
- * happen if there was an error in getting the connections capabilities so
- * claiming ignorance seems the most sensible thing to do */
- if (conn_caps == NULL)
- return;
-
- rcc = tp_capabilities_get_channel_classes (conn_caps);
- if (rcc == NULL || rcc->len == 0)
- return;
-
- for (i = 0; i < contacts->len; i++)
- {
- TpContact *contact = g_ptr_array_index (contacts, i);
-
- contact_set_capabilities (contact, conn_caps);
- }
-}
-
-static void
-connection_capabilities_fetched_cb (GObject *object,
- GAsyncResult *res,
- gpointer user_data)
-{
- ContactsContext *c = user_data;
-
- DEBUG ("Connection capabilities prepared");
-
- set_conn_capabilities_on_contacts (c->contacts, c->connection);
- contacts_context_continue (c);
- contacts_context_unref (c);
-}
-
-static void
-contacts_get_conn_capabilities (ContactsContext *c)
-{
- g_assert (c->handles->len == c->contacts->len);
-
- DEBUG ("Getting connection capabilities");
-
- c->refcount++;
- _tp_connection_get_capabilities_async (c->connection,
- connection_capabilities_fetched_cb, c);
-}
-
-static void
contacts_capabilities_updated (TpConnection *connection,
GHashTable *capabilities,
gpointer user_data G_GNUC_UNUSED,
@@ -2844,28 +2556,6 @@ contacts_bind_to_avatar_retrieved (TpConnection *connection)
}
}
-static void
-contacts_get_avatar_data (ContactsContext *c)
-{
- guint i;
-
- g_assert (c->handles->len == c->contacts->len);
-
- contacts_bind_to_avatar_retrieved (c->connection);
-
- for (i = 0; i < c->contacts->len; i++)
- {
- TpContact *contact = g_ptr_array_index (c->contacts, i);
-
- if ((contact->priv->has_features & CONTACT_FEATURE_FLAG_AVATAR_DATA) == 0)
- {
- contact->priv->has_features |= CONTACT_FEATURE_FLAG_AVATAR_DATA;
- contact_update_avatar_data (contact);
- }
- }
-
- contacts_context_continue (c);
-}
static void
contact_set_avatar_token (TpContact *self, const gchar *new_token,
@@ -2905,42 +2595,6 @@ contacts_avatar_updated (TpConnection *connection,
static void
-contacts_got_known_avatar_tokens (TpConnection *connection,
- GHashTable *handle_to_token,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- ContactsContext *c = user_data;
- GHashTableIter iter;
- gpointer key, value;
-
- if (error == NULL)
- {
- g_hash_table_iter_init (&iter, handle_to_token);
-
- while (g_hash_table_iter_next (&iter, &key, &value))
- {
- contacts_avatar_updated (connection, GPOINTER_TO_UINT (key), value,
- NULL, NULL);
- }
-
- }
- /* FIXME: perhaps we could fall back to GetAvatarTokens (which should have
- * been called RequestAvatarTokens, because it blocks on network traffic)
- * if GetKnownAvatarTokens doesn't work? */
- else
- {
- /* never mind, we can live without avatar tokens */
- DEBUG ("GetKnownAvatarTokens failed with %s %u: %s",
- g_quark_to_string (error->domain), error->code, error->message);
- }
-
- contacts_context_continue (c);
-}
-
-
-static void
contacts_bind_to_avatar_updated (TpConnection *connection)
{
if (!connection->priv->tracking_avatar_updated)
@@ -2952,35 +2606,6 @@ contacts_bind_to_avatar_updated (TpConnection *connection)
}
}
-
-static void
-contacts_get_avatar_tokens (ContactsContext *c)
-{
- guint i;
-
- g_assert (c->handles->len == c->contacts->len);
-
- contacts_bind_to_avatar_updated (c->connection);
-
- for (i = 0; i < c->contacts->len; i++)
- {
- TpContact *contact = g_ptr_array_index (c->contacts, i);
-
- if ((contact->priv->has_features & CONTACT_FEATURE_FLAG_AVATAR_TOKEN)
- == 0)
- {
- c->refcount++;
- tp_cli_connection_interface_avatars_call_get_known_avatar_tokens (
- c->connection, -1,
- c->handles, contacts_got_known_avatar_tokens,
- c, contacts_context_unref, c->weak_object);
- return;
- }
- }
-
- contacts_context_continue (c);
-}
-
static void
contact_maybe_set_info (TpContact *self,
const GPtrArray *contact_info)
@@ -3026,35 +2651,6 @@ contact_info_changed (TpConnection *connection,
contact_maybe_set_info (self, contact_info);
}
-static void
-contacts_got_contact_info (TpConnection *connection,
- GHashTable *info,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- ContactsContext *c = user_data;
-
- if (error != NULL)
- {
- DEBUG ("GetContactInfo failed with %s %u: %s",
- g_quark_to_string (error->domain), error->code, error->message);
- }
- else
- {
- GHashTableIter iter;
- gpointer key, value;
-
- g_hash_table_iter_init (&iter, info);
- while (g_hash_table_iter_next (&iter, &key, &value))
- {
- contact_info_changed (connection, GPOINTER_TO_UINT (key),
- value, NULL, NULL);
- }
- }
-
- contacts_context_continue (c);
-}
static void
contacts_bind_to_contact_info_changed (TpConnection *connection)
@@ -3068,32 +2664,6 @@ contacts_bind_to_contact_info_changed (TpConnection *connection)
}
}
-static void
-contacts_get_contact_info (ContactsContext *c)
-{
- guint i;
-
- g_assert (c->handles->len == c->contacts->len);
-
- contacts_bind_to_contact_info_changed (c->connection);
-
- for (i = 0; i < c->contacts->len; i++)
- {
- TpContact *contact = g_ptr_array_index (c->contacts, i);
-
- if ((contact->priv->has_features & CONTACT_FEATURE_FLAG_CONTACT_INFO) == 0)
- {
- c->refcount++;
- tp_cli_connection_interface_contact_info_call_get_contact_info (
- c->connection, -1, c->handles, contacts_got_contact_info,
- c, contacts_context_unref, c->weak_object);
- return;
- }
- }
-
- contacts_context_continue (c);
-}
-
typedef struct
{
TpContact *contact;
@@ -3367,13 +2937,13 @@ _tp_contact_set_subscription_states (TpContact *self,
static void
contacts_changed_cb (TpConnection *connection,
GHashTable *changes,
- const GArray *removals,
+ GHashTable *identifiers,
+ GHashTable *removals,
gpointer user_data,
GObject *weak_object)
{
GHashTableIter iter;
gpointer key, value;
- guint i;
g_hash_table_iter_init (&iter, changes);
while (g_hash_table_iter_next (&iter, &key, &value))
@@ -3385,16 +2955,17 @@ contacts_changed_cb (TpConnection *connection,
_tp_contact_set_subscription_states (contact, value);
}
- for (i = 0; i < removals->len; i++)
+ g_hash_table_iter_init (&iter, removals);
+ while (g_hash_table_iter_next (&iter, &key, NULL))
{
- TpHandle handle = g_array_index (removals, TpHandle, i);
+ TpHandle handle = GPOINTER_TO_UINT (key);
TpContact *contact = _tp_connection_lookup_contact (connection, handle);
- if (contact == NULL)
- continue;
-
- contact_set_subscription_states (contact, TP_SUBSCRIPTION_STATE_NO,
- TP_SUBSCRIPTION_STATE_NO, NULL);
+ if (contact != NULL)
+ {
+ contact_set_subscription_states (contact, TP_SUBSCRIPTION_STATE_NO,
+ TP_SUBSCRIPTION_STATE_NO, NULL);
+ }
}
}
@@ -3498,125 +3069,6 @@ contacts_bind_to_contact_groups_changed (TpConnection *connection)
}
static gboolean
-contacts_context_supports_iface (ContactsContext *context,
- GQuark iface)
-{
- GArray *contact_attribute_interfaces =
- context->connection->priv->contact_attribute_interfaces;
- guint i;
-
- if (!tp_proxy_has_interface_by_id (context->connection,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACTS))
- return FALSE;
-
- if (contact_attribute_interfaces == NULL)
- return FALSE;
-
- for (i = 0; i < contact_attribute_interfaces->len; i++)
- {
- GQuark q = g_array_index (contact_attribute_interfaces, GQuark, i);
-
- if (q == iface)
- return TRUE;
- }
-
- return FALSE;
-}
-
-static void
-contacts_context_queue_features (ContactsContext *context)
-{
- ContactFeatureFlags feature_flags = context->wanted;
-
- /* Start slow path for requested features that are not in
- * ContactAttributeInterfaces */
-
- if ((feature_flags & CONTACT_FEATURE_FLAG_ALIAS) != 0 &&
- !contacts_context_supports_iface (context,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_ALIASING) &&
- tp_proxy_has_interface_by_id (context->connection,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_ALIASING))
- {
- g_queue_push_tail (&context->todo, contacts_get_aliases);
- }
-
- if ((feature_flags & CONTACT_FEATURE_FLAG_PRESENCE) != 0 &&
- !contacts_context_supports_iface (context,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_SIMPLE_PRESENCE))
- {
- if (tp_proxy_has_interface_by_id (context->connection,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_SIMPLE_PRESENCE))
- {
- g_queue_push_tail (&context->todo, contacts_get_simple_presence);
- }
-#if 0
- /* FIXME: Before doing this for the first time, we'd need to download
- * from the CM the definition of what each status actually *means* */
- else if (tp_proxy_has_interface_by_id (context->connection,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_PRESENCE))
- {
- g_queue_push_tail (&context->todo, contacts_get_complex_presence);
- }
-#endif
- }
-
- if ((feature_flags & CONTACT_FEATURE_FLAG_AVATAR_TOKEN) != 0 &&
- !contacts_context_supports_iface (context,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_AVATARS) &&
- tp_proxy_has_interface_by_id (context->connection,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_AVATARS))
- {
- g_queue_push_tail (&context->todo, contacts_get_avatar_tokens);
- }
-
- /* There is no contact attribute for avatar data, always use slow path */
- if ((feature_flags & CONTACT_FEATURE_FLAG_AVATAR_DATA) != 0 &&
- tp_proxy_has_interface_by_id (context->connection,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_AVATARS))
- {
- g_queue_push_tail (&context->todo, contacts_get_avatar_data);
- }
-
- if ((feature_flags & CONTACT_FEATURE_FLAG_LOCATION) != 0 &&
- !contacts_context_supports_iface (context,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_LOCATION) &&
- tp_proxy_has_interface_by_id (context->connection,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_LOCATION))
- {
- WARNING ("%s supports Location but not Contacts! Where did you find "
- "this CM? TP_CONTACT_FEATURE_LOCATION is not gonna work",
- tp_proxy_get_object_path (context->connection));
- }
-
- /* Don't implement slow path for ContactCapabilities as Contacts is now
- * mandatory so any CM supporting ContactCapabilities will implement
- * Contacts as well.
- *
- * But if ContactCapabilities is NOT supported, we fallback to connection
- * capabilities.
- * */
-
- if ((feature_flags & CONTACT_FEATURE_FLAG_CAPABILITIES) != 0 &&
- !tp_proxy_has_interface_by_id (context->connection,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_CAPABILITIES))
- {
- DEBUG ("Connection doesn't support ContactCapabilities; fallback to "
- "connection capabilities");
-
- g_queue_push_tail (&context->todo, contacts_get_conn_capabilities);
- }
-
- if ((feature_flags & CONTACT_FEATURE_FLAG_CONTACT_INFO) != 0 &&
- !contacts_context_supports_iface (context,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_INFO) &&
- tp_proxy_has_interface_by_id (context->connection,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACT_INFO))
- {
- g_queue_push_tail (&context->todo, contacts_get_contact_info);
- }
-}
-
-static gboolean
tp_contact_set_attributes (TpContact *contact,
GHashTable *asv,
ContactFeatureFlags wanted,
@@ -3684,17 +3136,17 @@ tp_contact_set_attributes (TpContact *contact,
if (wanted & CONTACT_FEATURE_FLAG_PRESENCE)
{
boxed = tp_asv_get_boxed (asv,
- TP_TOKEN_CONNECTION_INTERFACE_SIMPLE_PRESENCE_PRESENCE,
- TP_STRUCT_TYPE_SIMPLE_PRESENCE);
+ TP_TOKEN_CONNECTION_INTERFACE_PRESENCE_PRESENCE,
+ TP_STRUCT_TYPE_PRESENCE);
if (boxed == NULL)
- WARNING ("%s supposedly implements Contacts and SimplePresence, "
+ WARNING ("%s supposedly implements Contacts and Presence, "
"but omitted the mandatory "
- TP_TOKEN_CONNECTION_INTERFACE_SIMPLE_PRESENCE_PRESENCE
+ TP_TOKEN_CONNECTION_INTERFACE_PRESENCE_PRESENCE
" attribute",
tp_proxy_get_object_path (connection));
else
- contact_maybe_set_simple_presence (contact, boxed);
+ contact_maybe_set_presence (contact, boxed);
}
/* Location */
@@ -3778,19 +3230,18 @@ tp_contact_set_attributes (TpContact *contact,
return TRUE;
}
-static gboolean get_feature_flags (guint n_features,
- const TpContactFeature *features, ContactFeatureFlags *flags);
+static gboolean get_feature_flags (const GQuark *features,
+ ContactFeatureFlags *flags);
gboolean
_tp_contact_set_attributes (TpContact *contact,
GHashTable *asv,
- guint n_features,
- const TpContactFeature *features,
+ const GQuark *features,
GError **error)
{
ContactFeatureFlags feature_flags = 0;
- if (!get_feature_flags (n_features, features, &feature_flags))
+ if (!get_feature_flags (features, &feature_flags))
return FALSE;
return tp_contact_set_attributes (contact, asv, feature_flags, error);
@@ -3867,7 +3318,7 @@ contacts_got_attributes (TpConnection *connection,
}
}
- contacts_context_continue (c);
+ contacts_context_complete (c);
}
static const gchar **
@@ -3915,12 +3366,12 @@ contacts_bind_to_signals (TpConnection *connection,
contacts_bind_to_avatar_retrieved (connection);
}
}
- else if (q == TP_IFACE_QUARK_CONNECTION_INTERFACE_SIMPLE_PRESENCE)
+ else if (q == TP_IFACE_QUARK_CONNECTION_INTERFACE_PRESENCE)
{
if ((wanted & CONTACT_FEATURE_FLAG_PRESENCE) != 0)
{
g_ptr_array_add (array,
- TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE);
+ TP_IFACE_CONNECTION_INTERFACE_PRESENCE);
contacts_bind_to_presences_changed (connection);
}
}
@@ -4009,12 +3460,11 @@ contacts_bind_to_signals (TpConnection *connection,
*/
const gchar **
_tp_contacts_bind_to_signals (TpConnection *connection,
- guint n_features,
- const TpContactFeature *features)
+ const GQuark *features)
{
ContactFeatureFlags feature_flags = 0;
- if (!get_feature_flags (n_features, features, &feature_flags))
+ if (!get_feature_flags (features, &feature_flags))
return NULL;
return contacts_bind_to_signals (connection, feature_flags);
@@ -4025,11 +3475,25 @@ contacts_get_attributes (ContactsContext *context)
{
const gchar **supported_interfaces;
+ if (!tp_proxy_has_interface_by_id (context->connection,
+ TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACTS))
+ {
+ GError *error = g_error_new_literal (TP_ERROR,
+ TP_ERROR_SOFTWARE_UPGRADE_REQUIRED,
+ "Connection does not implement CONTACTS interface. Legacy CMs "
+ "are not supported anymore");
+
+ WARNING ("%s", error->message);
+ contacts_context_fail (context, error);
+ g_clear_error (&error);
+ return;
+ }
+
/* tp_connection_get_contact_attributes insists that you have at least one
* handle; skip it if we don't (can only happen if we started from IDs) */
if (context->handles->len == 0)
{
- contacts_context_continue (context);
+ contacts_context_complete_in_idle (context);
return;
}
@@ -4044,7 +3508,7 @@ contacts_get_attributes (ContactsContext *context)
* the handles, and we're not inspecting any extended interfaces
* either. Skip it. */
g_free (supported_interfaces);
- contacts_context_continue (context);
+ contacts_context_complete_in_idle (context);
return;
}
@@ -4053,7 +3517,6 @@ contacts_get_attributes (ContactsContext *context)
context->refcount++;
tp_cli_connection_interface_contacts_call_get_contact_attributes (
context->connection, -1, context->handles, supported_interfaces,
- (context->signature == CB_BY_HANDLE && context->contacts->len == 0),
contacts_got_attributes,
context, contacts_context_unref, context->weak_object);
g_free (supported_interfaces);
@@ -4089,17 +3552,21 @@ lookup_all_contacts (ContactsContext *context)
}
static gboolean
-get_feature_flags (guint n_features,
- const TpContactFeature *features,
+get_feature_flags (const GQuark *features,
ContactFeatureFlags *flags)
{
ContactFeatureFlags feature_flags = 0;
guint i;
- for (i = 0; i < n_features; i++)
+ g_return_val_if_fail (features != NULL, FALSE);
+
+ for (i = 0; features[i] != 0; i++)
{
- g_return_val_if_fail (features[i] < TP_NUM_CONTACT_FEATURES, FALSE);
- feature_flags |= (1 << features[i]);
+ guint f = get_feature (features[i]);
+
+ g_return_val_if_fail (f != 0, FALSE);
+
+ feature_flags |= f;
}
/* Force AVATAR_TOKEN if we have AVATAR_DATA */
@@ -4140,10 +3607,10 @@ contacts_context_remove_common_features (ContactsContext *context)
* @n_handles: The number of handles in @handles (must be at least 1)
* @handles: (array length=n_handles) (element-type uint): An array of handles
* of type %TP_HANDLE_TYPE_CONTACT representing the desired contacts
- * @n_features: The number of features in @features (may be 0)
- * @features: (array length=n_features) (allow-none) (element-type uint): An array of features that
+ * @features: (transfer-none) (array zero-terminated=1) (allow-none)
+ * (element-type GLib.Quark): A zero-terminated array of features that
* must be ready for use (if supported) before the callback is called (may
- * be %NULL if @n_features is 0)
+ * be %NULL)
* @callback: A user callback to call when the contacts are ready
* @user_data: Data to pass to the callback
* @destroy: Called to destroy @user_data either after @callback has been
@@ -4162,14 +3629,13 @@ contacts_context_remove_common_features (ContactsContext *context)
* connection managers.
*
* Since: 0.7.18
- * Deprecated: Use tp_simple_client_factory_ensure_contact() instead.
+ * Deprecated: Use tp_client_factory_ensure_contact() instead.
*/
void
tp_connection_get_contacts_by_handle (TpConnection *self,
guint n_handles,
const TpHandle *handles,
- guint n_features,
- const TpContactFeature *features,
+ const GQuark *features,
TpConnectionContactsByHandleCb callback,
gpointer user_data,
GDestroyNotify destroy,
@@ -4187,10 +3653,12 @@ tp_connection_get_contacts_by_handle (TpConnection *self,
g_return_if_fail (tp_proxy_get_invalidated (self) == NULL);
g_return_if_fail (n_handles >= 1);
g_return_if_fail (handles != NULL);
- g_return_if_fail (n_features == 0 || features != NULL);
g_return_if_fail (callback != NULL);
- if (!get_feature_flags (n_features, features, &feature_flags))
+ if (features == NULL)
+ features = no_quarks;
+
+ if (!get_feature_flags (features, &feature_flags))
return;
context = contacts_context_new (self, n_handles, feature_flags,
@@ -4200,61 +3668,17 @@ tp_connection_get_contacts_by_handle (TpConnection *self,
g_array_append_vals (context->handles, handles, n_handles);
contacts = lookup_all_contacts (context);
-
if (contacts != NULL)
{
- /* We have already held (and possibly inspected) handles, so we can
- * skip that. */
-
g_ptr_array_foreach (contacts, (GFunc) g_object_ref, NULL);
tp_g_ptr_array_extend (context->contacts, contacts);
-
- contacts_context_remove_common_features (context);
-
- /* We do need to retrieve any features that aren't there yet, though. */
- if (tp_proxy_has_interface_by_id (self,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACTS))
- {
- g_queue_push_head (&context->todo, contacts_get_attributes);
- }
-
- contacts_context_queue_features (context);
-
- g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
- contacts_context_idle_continue, context, contacts_context_unref);
-
g_ptr_array_unref (contacts);
- return;
- }
- if (tp_proxy_has_interface_by_id (self,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACTS))
- {
- /* we support the Contacts interface, so we can hold the handles and
- * simultaneously inspect them. After that, we'll fill in any
- * features that are necessary (this becomes a no-op if Contacts
- * will give us everything). */
- g_queue_push_head (&context->todo, contacts_get_attributes);
- contacts_context_queue_features (context);
- g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
- contacts_context_idle_continue, context, contacts_context_unref);
- return;
+ contacts_context_remove_common_features (context);
}
- /* if we haven't already returned, we're on the slow path */
-
- /* Before we return anything we'll want to inspect the handles */
- g_queue_push_head (&context->todo, contacts_inspect);
-
- /* After that we'll get the features */
- contacts_context_queue_features (context);
-
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- /* but first, we need to hold onto them */
- tp_connection_hold_handles (self, -1,
- TP_HANDLE_TYPE_CONTACT, n_handles, handles,
- contacts_held_handles, context, contacts_context_unref, weak_object);
- G_GNUC_END_IGNORE_DEPRECATIONS
+ contacts_get_attributes (context);
+ contacts_context_unref (context);
}
@@ -4265,8 +3689,8 @@ tp_connection_get_contacts_by_handle (TpConnection *self,
* @n_contacts: The number of contacts in @contacts (must be at least 1)
* @contacts: (array length=n_contacts): An array of #TpContact objects
* associated with @self
- * @n_features: The number of features in @features (must be at least 1)
- * @features: (array length=n_features): An array of features that must be
+ * @features: (transfer-none) (array zero-terminated=1)
+ * (element-type GLib.Quark): An array of features that must be
* ready for use (if supported) before the callback is called
* @callback: A user callback to call when the contacts are ready
* @user_data: Data to pass to the callback
@@ -4292,8 +3716,7 @@ void
tp_connection_upgrade_contacts (TpConnection *self,
guint n_contacts,
TpContact * const *contacts,
- guint n_features,
- const TpContactFeature *features,
+ const GQuark *features,
TpConnectionUpgradeContactsCb callback,
gpointer user_data,
GDestroyNotify destroy,
@@ -4307,16 +3730,18 @@ tp_connection_upgrade_contacts (TpConnection *self,
TP_CONNECTION_FEATURE_CONNECTED));
g_return_if_fail (n_contacts >= 1);
g_return_if_fail (contacts != NULL);
- g_return_if_fail (n_features == 0 || features != NULL);
g_return_if_fail (callback != NULL);
+ if (features == NULL)
+ features = no_quarks;
+
for (i = 0; i < n_contacts; i++)
{
g_return_if_fail (contacts[i]->priv->connection == self);
g_return_if_fail (contacts[i]->priv->identifier != NULL);
}
- if (!get_feature_flags (n_features, features, &feature_flags))
+ if (!get_feature_flags (features, &feature_flags))
return;
context = contacts_context_new (self, n_contacts, feature_flags,
@@ -4332,23 +3757,13 @@ tp_connection_upgrade_contacts (TpConnection *self,
g_assert (context->handles->len == n_contacts);
contacts_context_remove_common_features (context);
-
- if (tp_proxy_has_interface_by_id (self,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACTS))
- {
- g_queue_push_head (&context->todo, contacts_get_attributes);
- }
-
- contacts_context_queue_features (context);
-
- /* use an idle to make sure the callback is called after we return,
- * even if all the contacts actually have all the features, just to be
- * consistent */
- g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
- contacts_context_idle_continue, context, contacts_context_unref);
+ contacts_get_attributes (context);
+ contacts_context_unref (context);
}
+static void contacts_request_one_handle (ContactsContext *c);
+
static void
contacts_requested_one_handle (TpConnection *connection,
TpHandleType handle_type,
@@ -4394,7 +3809,13 @@ contacts_requested_one_handle (TpConnection *connection,
return;
}
- contacts_context_continue (c);
+ /* Continue requesting handles one by one until we did them all. The -1 here
+ * is because the array is NULL-terminated. When they are all done, we can
+ * request contact attributes */
+ if (c->next_index < c->request_ids->len -1)
+ contacts_request_one_handle (c);
+ else
+ contacts_get_attributes (c);
}
@@ -4442,6 +3863,7 @@ contacts_requested_handles (TpConnection *connection,
g_array_append_val (c->handles, handles[i]);
g_ptr_array_add (c->contacts, contact);
}
+ contacts_get_attributes (c);
}
else if (error->domain == TP_ERROR &&
(error->code == TP_ERROR_INVALID_HANDLE ||
@@ -4449,28 +3871,18 @@ contacts_requested_handles (TpConnection *connection,
error->code == TP_ERROR_INVALID_ARGUMENT))
{
/* One of the strings is bad. We don't know which, so split them. */
- guint i;
-
DEBUG ("A handle was bad, trying to recover: %s %u: %s",
g_quark_to_string (error->domain), error->code, error->message);
- /* -1 because NULL terminator is explicit */
- for (i = 0; i < c->request_ids->len - 1; i++)
- {
- g_queue_push_head (&c->todo, contacts_request_one_handle);
- }
-
g_assert (c->next_index == 0);
+ contacts_request_one_handle (c);
}
else
{
DEBUG ("RequestHandles failed: %s %u: %s",
g_quark_to_string (error->domain), error->code, error->message);
contacts_context_fail (c, error);
- return;
}
-
- contacts_context_continue (c);
}
@@ -4483,10 +3895,9 @@ contacts_requested_handles (TpConnection *connection,
* the desired contacts by their
* identifiers in the IM protocol (XMPP JIDs, SIP URIs, MSN Passports,
* AOL screen-names etc.)
- * @n_features: The number of features in @features (may be 0)
- * @features: (array length=n_features) (allow-none): An array of features
- * that must be ready for use (if supported)
- * before the callback is called (may be %NULL if @n_features is 0)
+ * @features: (transfer-none) (array zero-terminated=1) (allow-none)
+ * (element-type GLib.Quark): An array of features that must be ready for
+ * use (if supported) before the callback is called (may be %NULL)
* @callback: A user callback to call when the contacts are ready
* @user_data: Data to pass to the callback
* @destroy: Called to destroy @user_data either after @callback has been
@@ -4511,8 +3922,7 @@ void
tp_connection_get_contacts_by_id (TpConnection *self,
guint n_ids,
const gchar * const *ids,
- guint n_features,
- const TpContactFeature *features,
+ const GQuark *features,
TpConnectionContactsByIdCb callback,
gpointer user_data,
GDestroyNotify destroy,
@@ -4527,10 +3937,12 @@ tp_connection_get_contacts_by_id (TpConnection *self,
g_return_if_fail (n_ids >= 1);
g_return_if_fail (ids != NULL);
g_return_if_fail (ids[0] != NULL);
- g_return_if_fail (n_features == 0 || features != NULL);
g_return_if_fail (callback != NULL);
- if (!get_feature_flags (n_features, features, &feature_flags))
+ if (features == NULL)
+ features = no_quarks;
+
+ if (!get_feature_flags (features, &feature_flags))
return;
context = contacts_context_new (self, n_ids, feature_flags,
@@ -4549,20 +3961,6 @@ tp_connection_get_contacts_by_id (TpConnection *self,
g_ptr_array_add (context->request_ids, NULL);
- /* set up the queue of feature introspection */
-
- if (tp_proxy_has_interface_by_id (self,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACTS))
- {
- g_queue_push_head (&context->todo, contacts_get_attributes);
- }
- else
- {
- g_queue_push_head (&context->todo, contacts_inspect);
- }
-
- contacts_context_queue_features (context);
-
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
/* but first, we need to get the handles in the first place */
tp_connection_request_handles (self, -1,
@@ -4618,7 +4016,7 @@ got_contact_by_id_fallback_cb (TpConnection *self,
g_object_ref (contacts[0]), g_object_unref);
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -4629,10 +4027,8 @@ got_contact_by_id_fallback_cb (TpConnection *self,
* @id: A strings representing the desired contact by its
* identifier in the IM protocol (an XMPP JID, SIP URI, MSN Passport,
* AOL screen-name etc.)
- * @n_features: The number of features in @features (may be 0)
- * @features: (array length=n_features) (allow-none): An array of features
- * that must be ready for use (if supported)
- * before the callback is called (may be %NULL if @n_features is 0)
+ * @features: (transfer-none) (array zero-terminated=1) (allow-none)
+ * (element-type GLib.Quark): An array of features that must be ready for
* @callback: A user callback to call when the contact is ready
* @user_data: Data to pass to the callback
*
@@ -4650,8 +4046,7 @@ got_contact_by_id_fallback_cb (TpConnection *self,
void
tp_connection_dup_contact_by_id_async (TpConnection *self,
const gchar *id,
- guint n_features,
- const TpContactFeature *features,
+ const GQuark *features,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -4663,7 +4058,7 @@ tp_connection_dup_contact_by_id_async (TpConnection *self,
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
tp_connection_get_contacts_by_id (self,
1, &id,
- n_features, features,
+ features,
got_contact_by_id_fallback_cb,
g_strdup (id), g_free, G_OBJECT (result));
G_GNUC_END_IGNORE_DEPRECATIONS
@@ -4690,7 +4085,7 @@ tp_connection_dup_contact_by_id_finish (TpConnection *self,
}
static void
-upgrade_contacts_fallback_cb (TpConnection *connection,
+upgrade_contacts_async_fallback_cb (TpConnection *self,
guint n_contacts,
TpContact * const *contacts,
const GError *error,
@@ -4711,7 +4106,7 @@ upgrade_contacts_fallback_cb (TpConnection *connection,
if (error != NULL)
g_simple_async_result_set_from_error (result, error);
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
/**
@@ -4721,9 +4116,8 @@ upgrade_contacts_fallback_cb (TpConnection *connection,
* @n_contacts: The number of contacts in @contacts (must be at least 1)
* @contacts: (array length=n_contacts): An array of #TpContact objects
* associated with @self
- * @n_features: The number of features in @features (must be at least 1)
- * @features: (array length=n_features): An array of features that must be
- * ready for use (if supported) before the callback is called
+ * @features: (transfer-none) (array zero-terminated=1) (allow-none)
+ * (element-type GLib.Quark): An array of features that must be ready for
* @callback: A user callback to call when the contacts are ready
* @user_data: Data to pass to the callback
*
@@ -4742,8 +4136,7 @@ void
tp_connection_upgrade_contacts_async (TpConnection *self,
guint n_contacts,
TpContact * const *contacts,
- guint n_features,
- const TpContactFeature *features,
+ const GQuark *features,
GAsyncReadyCallback callback,
gpointer user_data)
{
@@ -4755,8 +4148,8 @@ tp_connection_upgrade_contacts_async (TpConnection *self,
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
tp_connection_upgrade_contacts (self,
n_contacts, contacts,
- n_features, features,
- upgrade_contacts_fallback_cb,
+ features,
+ upgrade_contacts_async_fallback_cb,
result, g_object_unref, NULL);
G_GNUC_END_IGNORE_DEPRECATIONS
}
diff --git a/telepathy-glib/contact.h b/telepathy-glib/contact.h
index c91b3a376..c089998b3 100644
--- a/telepathy-glib/contact.h
+++ b/telepathy-glib/contact.h
@@ -55,22 +55,49 @@ GType tp_contact_get_type (void) G_GNUC_CONST;
(G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_CONTACT, \
TpContactClass))
-typedef enum {
- TP_CONTACT_FEATURE_ALIAS,
- TP_CONTACT_FEATURE_AVATAR_TOKEN,
- TP_CONTACT_FEATURE_PRESENCE,
- TP_CONTACT_FEATURE_LOCATION,
- TP_CONTACT_FEATURE_CAPABILITIES,
- TP_CONTACT_FEATURE_AVATAR_DATA,
- TP_CONTACT_FEATURE_CONTACT_INFO,
- TP_CONTACT_FEATURE_CLIENT_TYPES,
- TP_CONTACT_FEATURE_SUBSCRIPTION_STATES,
- TP_CONTACT_FEATURE_CONTACT_GROUPS,
- TP_CONTACT_FEATURE_CONTACT_BLOCKING,
-} TpContactFeature;
-#define TP_NUM_CONTACT_FEATURES (TP_CONTACT_FEATURE_CONTACT_BLOCKING + 1)
-#define NUM_TP_CONTACT_FEATURES TP_NUM_CONTACT_FEATURES
-#define TP_CONTACT_FEATURE_INVALID ((TpContactFeature) -1)
+#define TP_CONTACT_FEATURE_ALIAS \
+ (tp_contact_get_feature_quark_alias ())
+GQuark tp_contact_get_feature_quark_alias (void) G_GNUC_CONST;
+
+#define TP_CONTACT_FEATURE_AVATAR_TOKEN \
+ (tp_contact_get_feature_quark_avatar_token ())
+GQuark tp_contact_get_feature_quark_avatar_token (void) G_GNUC_CONST;
+
+#define TP_CONTACT_FEATURE_PRESENCE \
+ (tp_contact_get_feature_quark_presence ())
+GQuark tp_contact_get_feature_quark_presence (void) G_GNUC_CONST;
+
+#define TP_CONTACT_FEATURE_LOCATION \
+ (tp_contact_get_feature_quark_location ())
+GQuark tp_contact_get_feature_quark_location (void) G_GNUC_CONST;
+
+#define TP_CONTACT_FEATURE_CAPABILITIES \
+ (tp_contact_get_feature_quark_capabilities ())
+GQuark tp_contact_get_feature_quark_capabilities (void) G_GNUC_CONST;
+
+#define TP_CONTACT_FEATURE_AVATAR_DATA \
+ (tp_contact_get_feature_quark_avatar_data ())
+GQuark tp_contact_get_feature_quark_avatar_data (void) G_GNUC_CONST;
+
+#define TP_CONTACT_FEATURE_CONTACT_INFO \
+ (tp_contact_get_feature_quark_contact_info ())
+GQuark tp_contact_get_feature_quark_contact_info (void) G_GNUC_CONST;
+
+#define TP_CONTACT_FEATURE_CLIENT_TYPES \
+ (tp_contact_get_feature_quark_client_types ())
+GQuark tp_contact_get_feature_quark_client_types (void) G_GNUC_CONST;
+
+#define TP_CONTACT_FEATURE_SUBSCRIPTION_STATES \
+ (tp_contact_get_feature_quark_subscription_states ())
+GQuark tp_contact_get_feature_quark_subscription_states (void) G_GNUC_CONST;
+
+#define TP_CONTACT_FEATURE_CONTACT_GROUPS \
+ (tp_contact_get_feature_quark_contact_groups ())
+GQuark tp_contact_get_feature_quark_contact_groups (void) G_GNUC_CONST;
+
+#define TP_CONTACT_FEATURE_CONTACT_BLOCKING \
+ (tp_contact_get_feature_quark_contact_blocking ())
+GQuark tp_contact_get_feature_quark_contact_blocking (void) G_GNUC_CONST;
/* Basic functionality, always available */
_TP_AVAILABLE_IN_0_20
@@ -78,7 +105,7 @@ TpAccount *tp_contact_get_account (TpContact *self);
TpConnection *tp_contact_get_connection (TpContact *self);
TpHandle tp_contact_get_handle (TpContact *self);
const gchar *tp_contact_get_identifier (TpContact *self);
-gboolean tp_contact_has_feature (TpContact *self, TpContactFeature feature);
+gboolean tp_contact_has_feature (TpContact *self, GQuark feature);
/* TP_CONTACT_FEATURE_ALIAS */
const gchar *tp_contact_get_alias (TpContact *self);
@@ -143,7 +170,7 @@ typedef void (*TpConnectionContactsByHandleCb) (TpConnection *connection,
_TP_DEPRECATED_IN_0_20
void tp_connection_get_contacts_by_handle (TpConnection *self,
guint n_handles, const TpHandle *handles,
- guint n_features, const TpContactFeature *features,
+ const GQuark *features,
TpConnectionContactsByHandleCb callback,
gpointer user_data, GDestroyNotify destroy, GObject *weak_object);
@@ -154,7 +181,7 @@ typedef void (*TpConnectionUpgradeContactsCb) (TpConnection *connection,
_TP_DEPRECATED_IN_0_20_FOR(tp_connection_upgrade_contacts_async)
void tp_connection_upgrade_contacts (TpConnection *self,
guint n_contacts, TpContact * const *contacts,
- guint n_features, const TpContactFeature *features,
+ const GQuark *features,
TpConnectionUpgradeContactsCb callback,
gpointer user_data, GDestroyNotify destroy, GObject *weak_object);
@@ -166,7 +193,7 @@ typedef void (*TpConnectionContactsByIdCb) (TpConnection *connection,
_TP_DEPRECATED_IN_0_20_FOR(tp_connection_get_contact_by_id_async)
void tp_connection_get_contacts_by_id (TpConnection *self,
guint n_ids, const gchar * const *ids,
- guint n_features, const TpContactFeature *features,
+ const GQuark *features,
TpConnectionContactsByIdCb callback,
gpointer user_data, GDestroyNotify destroy, GObject *weak_object);
#endif
@@ -177,8 +204,7 @@ TpContact *tp_connection_dup_contact_if_possible (TpConnection *connection,
_TP_AVAILABLE_IN_0_20
void tp_connection_dup_contact_by_id_async (TpConnection *self,
const gchar *id,
- guint n_features,
- const TpContactFeature *features,
+ const GQuark *features,
GAsyncReadyCallback callback,
gpointer user_data);
_TP_AVAILABLE_IN_0_20
@@ -190,8 +216,7 @@ _TP_AVAILABLE_IN_0_20
void tp_connection_upgrade_contacts_async (TpConnection *self,
guint n_contacts,
TpContact * const *contacts,
- guint n_features,
- const TpContactFeature *features,
+ const GQuark *features,
GAsyncReadyCallback callback,
gpointer user_data);
_TP_AVAILABLE_IN_0_20
diff --git a/telepathy-glib/contacts-mixin.c b/telepathy-glib/contacts-mixin.c
index 90cadc6d9..c154271c7 100644
--- a/telepathy-glib/contacts-mixin.c
+++ b/telepathy-glib/contacts-mixin.c
@@ -57,10 +57,12 @@
#include <telepathy-glib/base-connection.h>
#include <telepathy-glib/dbus.h>
+#include <telepathy-glib/dbus-properties-mixin.h>
#include <telepathy-glib/enums.h>
#include <telepathy-glib/errors.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/svc-connection.h>
#define DEBUG_FLAG TP_DEBUG_CONNECTION
@@ -280,8 +282,6 @@ tp_contacts_mixin_finalize (GObject *obj)
* like %TP_IFACE_CONNECTION for GetContactAttributes,
* or %TP_IFACE_CONNECTION and %TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST for
* GetContactListAttributes.
- * @sender: The DBus client's unique name. If this is not NULL, the requested handles
- * will be held on behalf of this client.
*
* Get contact attributes for the given contacts. Provide attributes for all requested
* interfaces. If contact attributes are not immediately known, the behaviour is defined
@@ -295,8 +295,7 @@ GHashTable *
tp_contacts_mixin_get_contact_attributes (GObject *obj,
const GArray *handles,
const gchar **interfaces,
- const gchar **assumed_interfaces,
- const gchar *sender)
+ const gchar **assumed_interfaces)
{
GHashTable *result;
guint i;
@@ -362,7 +361,6 @@ tp_contacts_mixin_get_contact_attributes_impl (
TpSvcConnectionInterfaceContacts *iface,
const GArray *handles,
const char **interfaces,
- gboolean hold,
DBusGMethodInvocation *context)
{
TpBaseConnection *conn = TP_BASE_CONNECTION (iface);
@@ -371,7 +369,7 @@ tp_contacts_mixin_get_contact_attributes_impl (
TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (conn, context);
result = tp_contacts_mixin_get_contact_attributes (G_OBJECT (conn),
- handles, interfaces, always_included_interfaces, NULL);
+ handles, interfaces, always_included_interfaces);
tp_svc_connection_interface_contacts_return_from_get_contact_attributes (
context, result);
@@ -409,7 +407,7 @@ tp_contacts_mixin_get_contact_by_id_impl (
g_array_append_val (handles, handle);
attributes = tp_contacts_mixin_get_contact_attributes (G_OBJECT (conn),
- handles, interfaces, always_included_interfaces, NULL);
+ handles, interfaces, always_included_interfaces);
result = g_hash_table_lookup (attributes, GUINT_TO_POINTER (handle));
g_assert (result != NULL);
diff --git a/telepathy-glib/contacts-mixin.h b/telepathy-glib/contacts-mixin.h
index ff72a11e9..021cde68b 100644
--- a/telepathy-glib/contacts-mixin.h
+++ b/telepathy-glib/contacts-mixin.h
@@ -21,7 +21,6 @@
#ifndef __TP_CONTACTS_MIXIN_H__
#define __TP_CONTACTS_MIXIN_H__
-#include <telepathy-glib/svc-connection.h>
#include <telepathy-glib/handle-repo.h>
#include "util.h"
@@ -107,8 +106,7 @@ void tp_contacts_mixin_set_contact_attribute (GHashTable *contact_attributes,
TpHandle handle, const gchar *attribute, GValue *value);
GHashTable *tp_contacts_mixin_get_contact_attributes (GObject *obj,
- const GArray *handles, const gchar **interfaces, const gchar **assumed_interfaces,
- const gchar *sender);
+ const GArray *handles, const gchar **interfaces, const gchar **assumed_interfaces);
G_END_DECLS
diff --git a/telepathy-glib/core-dbus.c b/telepathy-glib/core-dbus.c
new file mode 100644
index 000000000..6e0e33ade
--- /dev/null
+++ b/telepathy-glib/core-dbus.c
@@ -0,0 +1,102 @@
+/*
+ * core-dbus.c - minimal D-Bus utilities for generated code
+ *
+ * Copyright © 2005-2012 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright © 2005-2008 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+
+#include "telepathy-glib/dbus.h"
+#include "telepathy-glib/dbus-properties-mixin-internal.h"
+#include "telepathy-glib/errors.h"
+
+/**
+ * tp_dbus_g_method_return_not_implemented: (skip)
+ * @context: The D-Bus method invocation context
+ *
+ * Return the Telepathy error NotImplemented from the method invocation
+ * given by @context.
+ */
+void
+tp_dbus_g_method_return_not_implemented (DBusGMethodInvocation *context)
+{
+ GError e = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "Not implemented" };
+
+ dbus_g_method_return_error (context, &e);
+}
+
+/* this is the core library, we don't have debug infrastructure yet */
+#define CRITICAL(format, ...) \
+ g_log (G_LOG_DOMAIN "/properties", G_LOG_LEVEL_CRITICAL, "%s: " format, \
+ G_STRFUNC, ##__VA_ARGS__)
+
+/**
+ * tp_svc_interface_set_dbus_properties_info:
+ * @g_interface: The #GType of a service interface
+ * @info: an interface description
+ *
+ * Declare that @g_interface implements the given D-Bus interface, with the
+ * given properties. This may only be called once per GInterface, usually from
+ * a section of its base_init function that only runs once.
+ *
+ * This is typically only used within generated code; there is normally no
+ * reason to call it manually.
+ *
+ * Since: 0.7.3
+ */
+void
+tp_svc_interface_set_dbus_properties_info (GType g_interface,
+ TpDBusPropertiesMixinIfaceInfo *info)
+{
+ GQuark q = g_quark_from_static_string (
+ TP_SVC_INTERFACE_DBUS_PROPERTIES_MIXIN_QUARK_NAME);
+ TpDBusPropertiesMixinPropInfo *prop;
+
+ g_return_if_fail (G_TYPE_IS_INTERFACE (g_interface));
+ g_return_if_fail (g_type_get_qdata (g_interface, q) == NULL);
+ g_return_if_fail (info->dbus_interface != 0);
+ g_return_if_fail (info->props != NULL);
+
+ for (prop = info->props; prop->name != 0; prop++)
+ {
+ g_return_if_fail (prop->flags != 0);
+ g_return_if_fail (
+ (prop->flags & ~( TP_DBUS_PROPERTIES_MIXIN_FLAG_READ
+ | TP_DBUS_PROPERTIES_MIXIN_FLAG_WRITE
+ | TP_DBUS_PROPERTIES_MIXIN_FLAG_EMITS_CHANGED
+ | TP_DBUS_PROPERTIES_MIXIN_FLAG_EMITS_INVALIDATED
+ )) == 0);
+
+ /* Check that at most one change-related flag is set. */
+ if ((prop->flags & TP_DBUS_PROPERTIES_MIXIN_FLAG_EMITS_CHANGED) &&
+ (prop->flags & TP_DBUS_PROPERTIES_MIXIN_FLAG_EMITS_INVALIDATED))
+ {
+ CRITICAL ("at most one of EMITS_CHANGED and EMITS_INVALIDATED may be "
+ "specified for a property, but %s.%s has both",
+ g_quark_to_string (info->dbus_interface),
+ g_quark_to_string (prop->name));
+ g_return_if_reached ();
+ }
+
+ g_return_if_fail (prop->dbus_signature != NULL);
+ g_return_if_fail (prop->dbus_signature[0] != '\0');
+ g_return_if_fail (prop->type != 0);
+ }
+
+ g_type_set_qdata (g_interface, q, info);
+}
diff --git a/telepathy-glib/core-proxy.c b/telepathy-glib/core-proxy.c
new file mode 100644
index 000000000..427785ace
--- /dev/null
+++ b/telepathy-glib/core-proxy.c
@@ -0,0 +1,174 @@
+/*
+ * core-proxy.c - parts of TpProxy needed to link generated code
+ *
+ * Copyright © 2007-2012 Collabora Ltd. <http://www.collabora.co.uk/>
+ * Copyright © 2007-2008 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+
+#include "telepathy-glib/proxy-subclass.h"
+#include "telepathy-glib/proxy-internal.h"
+
+#include <string.h>
+
+#define DEBUG_FLAG TP_DEBUG_PROXY
+#include "debug-internal.h"
+
+/**
+ * tp_proxy_dbus_g_proxy_claim_for_signal_adding:
+ * @proxy: a #DBusGProxy
+ *
+ * Attempt to "claim" a #DBusGProxy for addition of signal signatures.
+ * If this function has not been called on @proxy before, %TRUE is
+ * returned, and the caller may safely call dbus_g_proxy_add_signal()
+ * on @proxy. If this function has already been caled, %FALSE is
+ * returned, and the caller may not safely call dbus_g_proxy_add_signal().
+ *
+ * This is intended for use by auto-generated signal-adding functions,
+ * to allow interfaces provided as local extensions to override those in
+ * telepathy-glib without causing assertion failures.
+ *
+ * Returns: %TRUE if it is safe to call dbus_g_proxy_add_signal()
+ * Since: 0.7.6
+ */
+gboolean
+tp_proxy_dbus_g_proxy_claim_for_signal_adding (DBusGProxy *proxy)
+{
+ static GQuark q = 0;
+
+ g_return_val_if_fail (proxy != NULL, FALSE);
+
+ if (G_UNLIKELY (q == 0))
+ {
+ q = g_quark_from_static_string (
+ "tp_proxy_dbus_g_proxy_claim_for_signal_adding@0.7.6");
+ }
+
+ if (g_object_get_qdata ((GObject *) proxy, q) != NULL)
+ {
+ /* Someone else has already added signal signatures for this interface.
+ * We can't do it again or it'll cause an assertion */
+ return FALSE;
+ }
+
+ /* the proxy is just used as qdata here because it's a convenient
+ * non-NULL pointer */
+ g_object_set_qdata ((GObject *) proxy, q, proxy);
+ return TRUE;
+}
+
+static TpProxyImplementation _tp_proxy_implementation = { NULL };
+
+DBusGProxy *
+tp_proxy_borrow_interface_by_id (TpProxy *proxy,
+ GQuark iface,
+ GError **error)
+{
+ g_assert (_tp_proxy_implementation.version != NULL);
+ return _tp_proxy_implementation.borrow_interface_by_id (proxy, iface, error);
+}
+
+TpProxyPendingCall *
+tp_proxy_pending_call_v0_new (TpProxy *proxy,
+ GQuark iface,
+ const gchar *member,
+ DBusGProxy *iface_proxy,
+ TpProxyInvokeFunc invoke_callback,
+ GCallback callback,
+ gpointer user_data,
+ GDestroyNotify destroy,
+ GObject *weak_object,
+ gboolean cancel_must_raise)
+{
+ g_assert (_tp_proxy_implementation.version != NULL);
+ return _tp_proxy_implementation.pending_call_new (proxy, iface, member,
+ iface_proxy, invoke_callback, callback, user_data, destroy,
+ weak_object, cancel_must_raise);
+}
+
+void
+tp_proxy_pending_call_v0_take_pending_call (TpProxyPendingCall *pc,
+ DBusGProxyCall *pending_call)
+{
+ g_assert (_tp_proxy_implementation.version != NULL);
+ _tp_proxy_implementation.pending_call_take_pending_call (pc, pending_call);
+}
+
+void
+tp_proxy_pending_call_v0_completed (gpointer p)
+{
+ g_assert (_tp_proxy_implementation.version != NULL);
+ _tp_proxy_implementation.pending_call_completed (p);
+}
+
+void
+tp_proxy_pending_call_v0_take_results (TpProxyPendingCall *pc,
+ GError *error,
+ GValueArray *args)
+{
+ g_assert (_tp_proxy_implementation.version != NULL);
+ _tp_proxy_implementation.pending_call_take_results (pc, error, args);
+}
+
+TpProxySignalConnection *
+tp_proxy_signal_connection_v0_new (TpProxy *self,
+ GQuark iface,
+ const gchar *member,
+ const GType *expected_types,
+ GCallback collect_args,
+ TpProxyInvokeFunc invoke_callback,
+ GCallback callback,
+ gpointer user_data,
+ GDestroyNotify destroy,
+ GObject *weak_object,
+ GError **error)
+{
+ g_assert (_tp_proxy_implementation.version != NULL);
+ return _tp_proxy_implementation.signal_connection_new (self, iface, member,
+ expected_types, collect_args, invoke_callback, callback, user_data,
+ destroy, weak_object, error);
+}
+
+void
+tp_proxy_signal_connection_v0_take_results (TpProxySignalConnection *sc,
+ GValueArray *args)
+{
+ g_assert (_tp_proxy_implementation.version != NULL);
+ _tp_proxy_implementation.signal_connection_take_results (sc, args);
+}
+
+void
+tp_private_proxy_set_implementation (TpProxyImplementation *impl)
+{
+ g_assert_cmpstr (impl->version, ==, VERSION);
+ g_assert_cmpuint (impl->size, ==, sizeof (TpProxyImplementation));
+ g_assert_cmpstr (g_type_name (impl->type), ==, "TpProxy");
+ g_assert (_tp_proxy_implementation.version == NULL);
+
+ g_assert (impl->borrow_interface_by_id != NULL);
+ g_assert (impl->pending_call_new != NULL);
+ g_assert (impl->pending_call_take_pending_call != NULL);
+ g_assert (impl->pending_call_take_results != NULL);
+ g_assert (impl->pending_call_completed != NULL);
+ g_assert (impl->signal_connection_new != NULL);
+ g_assert (impl->signal_connection_take_results != NULL);
+
+ memcpy (&_tp_proxy_implementation, impl, sizeof (TpProxyImplementation));
+
+ g_assert_cmpstr (_tp_proxy_implementation.version, ==, VERSION);
+}
diff --git a/telepathy-glib/dbus-daemon.c b/telepathy-glib/dbus-daemon.c
index f98236ffa..0fb29b9ac 100644
--- a/telepathy-glib/dbus-daemon.c
+++ b/telepathy-glib/dbus-daemon.c
@@ -27,13 +27,12 @@
#include <dbus/dbus.h>
#include <dbus/dbus-glib-lowlevel.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/errors.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/proxy-subclass.h>
#include <telepathy-glib/util.h>
-#include "telepathy-glib/_gen/tp-cli-dbus-daemon-body.h"
-
#define DEBUG_FLAG TP_DEBUG_PROXY
#include "debug-internal.h"
@@ -107,7 +106,7 @@ tp_dbus_daemon_dup (GError **error)
if (starter_bus_daemon != NULL)
return g_object_ref (starter_bus_daemon);
- conn = _tp_dbus_starter_bus_conn (error);
+ conn = dbus_g_bus_get (DBUS_BUS_STARTER, error);
if (conn == NULL)
return NULL;
diff --git a/telepathy-glib/dbus-daemon.h b/telepathy-glib/dbus-daemon.h
index 0ec7d9eb3..07aec712c 100644
--- a/telepathy-glib/dbus-daemon.h
+++ b/telepathy-glib/dbus-daemon.h
@@ -93,6 +93,4 @@ void tp_dbus_daemon_unregister_object (TpDBusDaemon *self, gpointer object);
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-dbus-daemon.h>
-
#endif
diff --git a/telepathy-glib/dbus-internal.h b/telepathy-glib/dbus-internal.h
index aade667d8..0d68a44be 100644
--- a/telepathy-glib/dbus-internal.h
+++ b/telepathy-glib/dbus-internal.h
@@ -32,9 +32,6 @@ gboolean _tp_dbus_daemon_get_name_owner (TpDBusDaemon *self, gint timeout_ms,
void _tp_register_dbus_glib_marshallers (void);
-DBusGConnection *_tp_dbus_starter_bus_conn (GError **error)
- G_GNUC_WARN_UNUSED_RESULT;
-
gboolean _tp_dbus_daemon_is_the_shared_one (TpDBusDaemon *self);
GVariant *_tp_asv_to_vardict (const GHashTable *asv);
diff --git a/telepathy-glib/deprecated-internal.h b/telepathy-glib/dbus-properties-mixin-internal.h
index 995e3e8f5..2c9fab1ea 100644
--- a/telepathy-glib/deprecated-internal.h
+++ b/telepathy-glib/dbus-properties-mixin-internal.h
@@ -1,7 +1,8 @@
/*<private_header>*/
-/* Deprecated functions still used internally
- *
- * Copyright (C) 2011 Collabora Ltd. <http://www.collabora.co.uk/>
+/*
+ * dbus-properties-mixin-internal.h - D-Bus core Properties
+ * Copyright © 2008-2012 Collabora Ltd.
+ * Copyright © 2008 Nokia Corporation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -18,25 +19,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef __TP_DEPRECATED_INTERNAL_H__
-#define __TP_DEPRECATED_INTERNAL_H__
+#ifndef TELEPATHY_GLIB_DBUS_PROPERTIES_MIXIN_INTERNAL_H
+#define TELEPATHY_GLIB_DBUS_PROPERTIES_MIXIN_INTERNAL_H
-#include <telepathy-glib/account-channel-request.h>
-#include <telepathy-glib/base-client.h>
-#include <telepathy-glib/channel-request.h>
-#include <telepathy-glib/client-channel-factory.h>
-#include <telepathy-glib/defs.h>
+#include <telepathy-glib/dbus-properties-mixin.h>
G_BEGIN_DECLS
-void _tp_base_client_set_channel_factory (TpBaseClient *self,
- TpClientChannelFactory *factory);
-
-void _tp_account_channel_request_set_channel_factory (
- TpAccountChannelRequest *self, TpClientChannelFactory *factory);
-
-void _tp_channel_request_set_channel_factory (TpChannelRequest *self,
- TpClientChannelFactory *factory);
+#define TP_SVC_INTERFACE_DBUS_PROPERTIES_MIXIN_QUARK_NAME \
+ "tp_svc_interface_get_dbus_properties_info"
G_END_DECLS
diff --git a/telepathy-glib/dbus-properties-mixin.c b/telepathy-glib/dbus-properties-mixin.c
index 5ae17cd08..5e7c6c841 100644
--- a/telepathy-glib/dbus-properties-mixin.c
+++ b/telepathy-glib/dbus-properties-mixin.c
@@ -26,6 +26,8 @@
#include <telepathy-glib/svc-generic.h>
#include <telepathy-glib/util.h>
+#include "telepathy-glib/dbus-properties-mixin-internal.h"
+
#define DEBUG_FLAG TP_DEBUG_PROPERTIES
#include "telepathy-glib/debug-internal.h"
@@ -132,68 +134,13 @@ _iface_prop_info_quark (void)
static GQuark q = 0;
if (G_UNLIKELY (q == 0))
- q = g_quark_from_static_string
- ("tp_svc_interface_get_dbus_properties_info@TELEPATHY_GLIB_0.7.3");
+ q = g_quark_from_static_string (
+ TP_SVC_INTERFACE_DBUS_PROPERTIES_MIXIN_QUARK_NAME);
return q;
}
/**
- * tp_svc_interface_set_dbus_properties_info:
- * @g_interface: The #GType of a service interface
- * @info: an interface description
- *
- * Declare that @g_interface implements the given D-Bus interface, with the
- * given properties. This may only be called once per GInterface, usually from
- * a section of its base_init function that only runs once.
- *
- * This is typically only used within generated code; there is normally no
- * reason to call it manually.
- *
- * Since: 0.7.3
- */
-void
-tp_svc_interface_set_dbus_properties_info (GType g_interface,
- TpDBusPropertiesMixinIfaceInfo *info)
-{
- GQuark q = _iface_prop_info_quark ();
- TpDBusPropertiesMixinPropInfo *prop;
-
- g_return_if_fail (G_TYPE_IS_INTERFACE (g_interface));
- g_return_if_fail (g_type_get_qdata (g_interface, q) == NULL);
- g_return_if_fail (info->dbus_interface != 0);
- g_return_if_fail (info->props != NULL);
-
- for (prop = info->props; prop->name != 0; prop++)
- {
- g_return_if_fail (prop->flags != 0);
- g_return_if_fail (
- (prop->flags & ~( TP_DBUS_PROPERTIES_MIXIN_FLAG_READ
- | TP_DBUS_PROPERTIES_MIXIN_FLAG_WRITE
- | TP_DBUS_PROPERTIES_MIXIN_FLAG_EMITS_CHANGED
- | TP_DBUS_PROPERTIES_MIXIN_FLAG_EMITS_INVALIDATED
- )) == 0);
-
- /* Check that at most one change-related flag is set. */
- if ((prop->flags & TP_DBUS_PROPERTIES_MIXIN_FLAG_EMITS_CHANGED) &&
- (prop->flags & TP_DBUS_PROPERTIES_MIXIN_FLAG_EMITS_INVALIDATED))
- {
- CRITICAL ("at most one of EMITS_CHANGED and EMITS_INVALIDATED may be "
- "specified for a property, but %s.%s has both",
- g_quark_to_string (info->dbus_interface),
- g_quark_to_string (prop->name));
- g_return_if_reached ();
- }
-
- g_return_if_fail (prop->dbus_signature != NULL);
- g_return_if_fail (prop->dbus_signature[0] != '\0');
- g_return_if_fail (prop->type != 0);
- }
-
- g_type_set_qdata (g_interface, q, info);
-}
-
-/**
* tp_svc_interface_get_dbus_properties_info: (skip)
* @g_interface: The #GType of a service interface
*
diff --git a/telepathy-glib/dbus-tube-channel.c b/telepathy-glib/dbus-tube-channel.c
index 8cd552d9e..b2dc9b792 100644
--- a/telepathy-glib/dbus-tube-channel.c
+++ b/telepathy-glib/dbus-tube-channel.c
@@ -83,6 +83,8 @@
#include "telepathy-glib/dbus-tube-channel.h"
+#include <telepathy-glib/cli-channel.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/contact.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/enums.h>
@@ -447,7 +449,7 @@ tp_dbus_tube_channel_init (TpDBusTubeChannel *self)
TpDBusTubeChannel *
_tp_dbus_tube_channel_new_with_factory (
- TpSimpleClientFactory *factory,
+ TpClientFactory *factory,
TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
diff --git a/telepathy-glib/dbus.c b/telepathy-glib/dbus.c
index aaffce260..553ea3e06 100644
--- a/telepathy-glib/dbus.c
+++ b/telepathy-glib/dbus.c
@@ -84,104 +84,6 @@
/* (#define + static inline in dbus.h) */
/**
- * tp_dbus_g_method_return_not_implemented: (skip)
- * @context: The D-Bus method invocation context
- *
- * Return the Telepathy error NotImplemented from the method invocation
- * given by @context.
- */
-void
-tp_dbus_g_method_return_not_implemented (DBusGMethodInvocation *context)
-{
- GError e = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED, "Not implemented" };
-
- dbus_g_method_return_error (context, &e);
-}
-
-DBusGConnection *
-_tp_dbus_starter_bus_conn (GError **error)
-{
- static DBusGConnection *starter_bus = NULL;
-
- if (starter_bus == NULL)
- {
- starter_bus = dbus_g_bus_get (DBUS_BUS_STARTER, error);
- }
-
- return starter_bus;
-}
-
-/**
- * tp_get_bus: (skip)
- *
- * Returns a connection to the D-Bus daemon on which this process was
- * activated if it was launched by D-Bus service activation, or the session
- * bus otherwise.
- *
- * If dbus_g_bus_get() fails, exit with error code 1.
- *
- * Note that this function is not suitable for use in applications which can
- * be useful even in the absence of D-Bus - it is designed for use in
- * connection managers, which are not at all useful without a D-Bus
- * connection. See &lt;https://bugs.freedesktop.org/show_bug.cgi?id=18832&gt;.
- * Most processes should use tp_dbus_daemon_dup() instead.
- *
- * Returns: a connection to the starter or session D-Bus daemon.
- */
-DBusGConnection *
-tp_get_bus (void)
-{
- GError *error = NULL;
- DBusGConnection *bus = _tp_dbus_starter_bus_conn (&error);
-
- if (bus == NULL)
- {
- WARNING ("Failed to connect to starter bus: %s", error->message);
- exit (1);
- }
-
- return bus;
-}
-
-/**
- * tp_get_bus_proxy: (skip)
- *
- * Return a #DBusGProxy for the bus daemon object. The same caveats as for
- * tp_get_bus() apply.
- *
- * Returns: a proxy for the bus daemon object on the starter or session bus.
- *
- * Deprecated: 0.7.26: Use tp_dbus_daemon_dup() in new code.
- */
-DBusGProxy *
-tp_get_bus_proxy (void)
-{
- static DBusGProxy *bus_proxy = NULL;
-
- if (bus_proxy == NULL)
- {
- GError *error = NULL;
- DBusGConnection *bus = _tp_dbus_starter_bus_conn (&error);
-
- if (bus == NULL)
- {
- WARNING ("Failed to connect to starter bus: %s", error->message);
- exit (1);
- }
-
- bus_proxy = dbus_g_proxy_new_for_name (bus,
- "org.freedesktop.DBus",
- "/org/freedesktop/DBus",
- "org.freedesktop.DBus");
-
- if (bus_proxy == NULL)
- ERROR ("Failed to get proxy object for bus.");
- }
-
- return bus_proxy;
-}
-
-/**
* TpDBusNameType:
* @TP_DBUS_NAME_TYPE_UNIQUE: accept unique names like :1.123
* (not including the name of the bus daemon itself)
diff --git a/telepathy-glib/dbus.h b/telepathy-glib/dbus.h
index 53a26069c..06060eaf7 100644
--- a/telepathy-glib/dbus.h
+++ b/telepathy-glib/dbus.h
@@ -130,14 +130,6 @@ tp_asv_get_strv (const GHashTable *asv, const gchar *key);
void tp_asv_set_strv (GHashTable *asv, const gchar *key, gchar **value);
void tp_asv_dump (GHashTable *asv);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED
-DBusGConnection * tp_get_bus (void);
-
-_TP_DEPRECATED
-DBusGProxy * tp_get_bus_proxy (void);
-#endif
-
G_END_DECLS
#undef __TP_IN_DBUS_H__
diff --git a/telepathy-glib/debug-ansi.h b/telepathy-glib/debug-ansi.h
deleted file mode 100644
index 7ad5d500e..000000000
--- a/telepathy-glib/debug-ansi.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/**
- * SECTION:debug-ansi
- * @title: ANSI codes for debug messages
- * @short_description: used to colorize log messages for "clarity"
- *
- * This header provides some ANSI escapes you can use to make debug messages
- * more colourful. Please use sparingly.
- *
- * Deprecated: 0.13.3
- */
-
-#ifndef __TP_DEBUG_ANSI_H__
-#define __TP_DEBUG_ANSI_H__
-
-#ifndef TP_DISABLE_DEPRECATED
-
-/**
- * TP_ANSI_RESET:
- *
- * Reset all attributes.
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_RESET "\x1b[0m"
-/**
- * TP_ANSI_BOLD_ON:
- *
- * Set the bold attribute.
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_BOLD_ON "\x1b[1m"
-/**
- * TP_ANSI_INVERSE_ON:
- *
- * Set the inverse video attribute.
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_INVERSE_ON "\x1b[7m"
-/**
- * TP_ANSI_BOLD_OFF:
- *
- * Clear the bold attribute.
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_BOLD_OFF "\x1b[22m"
-/**
- * TP_ANSI_FG_BLACK:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_FG_BLACK "\x1b[30m"
-/**
- * TP_ANSI_FG_RED:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_FG_RED "\x1b[31m"
-/**
- * TP_ANSI_FG_GREEN:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_FG_GREEN "\x1b[32m"
-/**
- * TP_ANSI_FG_YELLOW:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_FG_YELLOW "\x1b[33m"
-/**
- * TP_ANSI_FG_BLUE:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_FG_BLUE "\x1b[34m"
-/**
- * TP_ANSI_FG_MAGENTA:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_FG_MAGENTA "\x1b[35m"
-/**
- * TP_ANSI_FG_CYAN:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_FG_CYAN "\x1b[36m"
-/**
- * TP_ANSI_FG_WHITE:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_FG_WHITE "\x1b[37m"
-/**
- * TP_ANSI_BG_RED:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_BG_RED "\x1b[41m"
-/**
- * TP_ANSI_BG_GREEN:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_BG_GREEN "\x1b[42m"
-/**
- * TP_ANSI_BG_YELLOW:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_BG_YELLOW "\x1b[43m"
-/**
- * TP_ANSI_BG_BLUE:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_BG_BLUE "\x1b[44m"
-/**
- * TP_ANSI_BG_MAGENTA:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_BG_MAGENTA "\x1b[45m"
-/**
- * TP_ANSI_BG_CYAN:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_BG_CYAN "\x1b[46m"
-/**
- * TP_ANSI_BG_WHITE:
- *
- * <!---->
- *
- * Deprecated: 0.13.3
- */
-#define TP_ANSI_BG_WHITE "\x1b[47m"
-
-#endif
-
-#endif /* __TP_DEBUG_ANSI_H__ */
diff --git a/telepathy-glib/debug-client.c b/telepathy-glib/debug-client.c
index ef6ed2994..b76fc978e 100644
--- a/telepathy-glib/debug-client.c
+++ b/telepathy-glib/debug-client.c
@@ -21,6 +21,8 @@
#include "config.h"
#include <telepathy-glib/debug-client.h>
+
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/debug-message-internal.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/errors.h>
@@ -33,8 +35,6 @@
#include "telepathy-glib/proxy-internal.h"
#include "telepathy-glib/util-internal.h"
-#include "telepathy-glib/_gen/tp-cli-debug-body.h"
-
/**
* SECTION:debug-client
* @title: TpDebugClient
diff --git a/telepathy-glib/debug-client.h b/telepathy-glib/debug-client.h
index d7e69c860..2c28d75cc 100644
--- a/telepathy-glib/debug-client.h
+++ b/telepathy-glib/debug-client.h
@@ -95,6 +95,4 @@ GPtrArray * tp_debug_client_get_messages_finish (TpDebugClient *self,
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-debug.h>
-
#endif
diff --git a/telepathy-glib/debug-sender.c b/telepathy-glib/debug-sender.c
index 599d9672a..a0be6c120 100644
--- a/telepathy-glib/debug-sender.c
+++ b/telepathy-glib/debug-sender.c
@@ -26,6 +26,7 @@
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/util.h>
+#include <telepathy-glib/svc-debug.h>
#include <telepathy-glib/svc-generic.h>
/**
@@ -35,7 +36,7 @@
*
* A #TpDebugSender object is an object exposing the Telepathy debug interface.
* There should be one object per process as it registers the object path
- * /org/freedesktop/Telepathy/debug. Once the object exists and has the object
+ * /im/telepathy1/debug. Once the object exists and has the object
* path, messages can be passed to it using tp_debug_sender_add_message and
* signals will automatically be fired.
*
diff --git a/telepathy-glib/debug-sender.h b/telepathy-glib/debug-sender.h
index de7a0d182..ec4f72c4d 100644
--- a/telepathy-glib/debug-sender.h
+++ b/telepathy-glib/debug-sender.h
@@ -25,7 +25,6 @@
#include <telepathy-glib/dbus-properties-mixin.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/enums.h>
-#include <telepathy-glib/svc-debug.h>
G_BEGIN_DECLS
diff --git a/telepathy-glib/debug.c b/telepathy-glib/debug.c
index b6a89e26a..36a673223 100644
--- a/telepathy-glib/debug.c
+++ b/telepathy-glib/debug.c
@@ -82,22 +82,6 @@ static TpDebugFlags flags = 0;
static gboolean tp_debug_persistent = FALSE;
-/**
- * tp_debug_set_all_flags: (skip)
- *
- * Activate all possible debug modes. This also activates persistent mode,
- * which should have been orthogonal.
- *
- * Deprecated: since 0.6.1. Use tp_debug_set_flags ("all") and
- * tp_debug_set_persistent() instead.
- */
-void
-tp_debug_set_all_flags (void)
-{
- flags = 0xffff;
- tp_debug_persistent = TRUE;
-}
-
static GDebugKey keys[] = {
{ "misc", TP_DEBUG_MISC },
{ "groups", TP_DEBUG_GROUPS },
@@ -158,11 +142,6 @@ static DebugKeyToDomain key_to_domain[] = {
{ 0, NULL }
};
-static GDebugKey persist_keys[] = {
- { "persist", 1 },
- { 0, },
-};
-
/**
* tp_debug_set_flags:
* @flags_string: The flags to set, comma-separated. If %NULL or empty,
@@ -191,53 +170,6 @@ tp_debug_set_flags (const gchar *flags_string)
}
/**
- * tp_debug_set_flags_from_string: (skip)
- * @flags_string: The flags to set, comma-separated. If %NULL or empty,
- * no additional flags are set.
- *
- * Set the debug flags indicated by @flags_string, in addition to any already
- * set. Unlike tp_debug_set_flags(), this enables persistence like
- * tp_debug_set_persistent() if the "persist" flag is present or the string
- * is "all" - this turns out to be unhelpful, as persistence should be
- * orthogonal.
- *
- * The parsing matches that of g_parse_debug_string().
- *
- * Deprecated: since 0.6.1. Use tp_debug_set_flags() and
- * tp_debug_set_persistent() instead
- */
-void
-tp_debug_set_flags_from_string (const gchar *flags_string)
-{
- tp_debug_set_flags (flags_string);
-
- if (flags_string != NULL &&
- g_parse_debug_string (flags_string, persist_keys, 1) != 0)
- tp_debug_set_persistent (TRUE);
-}
-
-/**
- * tp_debug_set_flags_from_env: (skip)
- * @var: The name of the environment variable to parse
- *
- * Equivalent to
- * <literal>tp_debug_set_flags_from_string (g_getenv (var))</literal>,
- * and has the same problem with persistence being included in "all".
- *
- * Deprecated: since 0.6.1. Use tp_debug_set_flags(g_getenv(...)) and
- * tp_debug_set_persistent() instead
- */
-void
-tp_debug_set_flags_from_env (const gchar *var)
-{
- const gchar *val = g_getenv (var);
-
- tp_debug_set_flags (val);
- if (val != NULL && g_parse_debug_string (val, persist_keys, 1) != 0)
- tp_debug_set_persistent (TRUE);
-}
-
-/**
* tp_debug_set_persistent:
* @persistent: TRUE prevents the connection manager mainloop from exiting,
* FALSE enables exiting if there are no connections
diff --git a/telepathy-glib/debug.h b/telepathy-glib/debug.h
index d04e2dbfb..8615dc4aa 100644
--- a/telepathy-glib/debug.h
+++ b/telepathy-glib/debug.h
@@ -15,17 +15,6 @@ void tp_debug_divert_messages (const gchar *filename);
void tp_debug_timestamped_log_handler (const gchar *log_domain,
GLogLevelFlags log_level, const gchar *message, gpointer ignored);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED
-void tp_debug_set_flags_from_string (const gchar *flags_string);
-
-_TP_DEPRECATED
-void tp_debug_set_flags_from_env (const gchar *var);
-
-_TP_DEPRECATED
-void tp_debug_set_all_flags (void);
-#endif
-
G_END_DECLS
#endif
diff --git a/telepathy-glib/debug.xml b/telepathy-glib/debug.xml
index c4312f9ba..4e281879e 100644
--- a/telepathy-glib/debug.xml
+++ b/telepathy-glib/debug.xml
@@ -4,6 +4,6 @@
<tp:title>Debug interfaces</tp:title>
-<xi:include href="../spec/Debug.xml"/>
+<xi:include href="../spec/Debug1.xml"/>
</tp:spec>
diff --git a/telepathy-glib/defs.h b/telepathy-glib/defs.h
index ad243b259..6b497b540 100644
--- a/telepathy-glib/defs.h
+++ b/telepathy-glib/defs.h
@@ -27,129 +27,6 @@
G_BEGIN_DECLS
-/**
- * TP_CM_BUS_NAME_BASE:
- *
- * The prefix for a connection manager's bus name, to which the CM's name
- * (e.g. "gabble") should be appended.
- */
-#define TP_CM_BUS_NAME_BASE "org.freedesktop.Telepathy.ConnectionManager."
-
-/**
- * TP_CM_OBJECT_PATH_BASE:
- *
- * The prefix for a connection manager's object path, to which the CM's name
- * (e.g. "gabble") should be appended.
- */
-#define TP_CM_OBJECT_PATH_BASE "/org/freedesktop/Telepathy/ConnectionManager/"
-
-/**
- * TP_CONN_BUS_NAME_BASE:
- *
- * The prefix for a connection's bus name, to which the CM's name
- * (e.g. "gabble"), the protocol (e.g. "jabber") and an element or sequence
- * of elements representing the account should be appended.
- */
-#define TP_CONN_BUS_NAME_BASE "org.freedesktop.Telepathy.Connection."
-
-/**
- * TP_CONN_OBJECT_PATH_BASE:
- *
- * The prefix for a connection's object path, to which the CM's name
- * (e.g. "gabble"), the protocol (e.g. "jabber") and an element or sequence
- * of elements representing the account should be appended.
- */
-#define TP_CONN_OBJECT_PATH_BASE "/org/freedesktop/Telepathy/Connection/"
-
-/**
- * TP_ACCOUNT_MANAGER_BUS_NAME:
- *
- * The account manager's well-known bus name
- */
-#define TP_ACCOUNT_MANAGER_BUS_NAME "org.freedesktop.Telepathy.AccountManager"
-
-/**
- * TP_ACCOUNT_MANAGER_OBJECT_PATH:
- *
- * The account manager's standard object path
- */
-#define TP_ACCOUNT_MANAGER_OBJECT_PATH "/org/freedesktop/Telepathy/AccountManager"
-
-/**
- * TP_ACCOUNT_OBJECT_PATH_BASE:
- *
- * The common prefix of the object path for all Account objects.
- */
-#define TP_ACCOUNT_OBJECT_PATH_BASE "/org/freedesktop/Telepathy/Account/"
-
-/**
- * TP_CHANNEL_DISPATCHER_BUS_NAME:
- *
- * The channel dispatcher's well-known bus name
- */
-#define TP_CHANNEL_DISPATCHER_BUS_NAME "org.freedesktop.Telepathy.ChannelDispatcher"
-
-/**
- * TP_CHANNEL_DISPATCHER_OBJECT_PATH:
- *
- * The channel dispatcher's standard object path
- */
-#define TP_CHANNEL_DISPATCHER_OBJECT_PATH "/org/freedesktop/Telepathy/ChannelDispatcher"
-
-/**
- * TP_CLIENT_BUS_NAME_BASE:
- *
- * The common prefix of the well-known bus name for any Telepathy Client.
- */
-#define TP_CLIENT_BUS_NAME_BASE "org.freedesktop.Telepathy.Client."
-
-/**
- * TP_CLIENT_OBJECT_PATH_BASE:
- *
- * The common prefix of the well-known object path for any Telepathy Client.
- */
-#define TP_CLIENT_OBJECT_PATH_BASE "/org/freedesktop/Telepathy/Client/"
-
-/**
- * TP_DEBUG_OBJECT_PATH:
- *
- * The standard path for objects implementing the Telepathy Debug interface
- * (#TpSvcDebug).
- */
-#define TP_DEBUG_OBJECT_PATH "/org/freedesktop/Telepathy/debug"
-
-/**
- * TP_USER_ACTION_TIME_NOT_USER_ACTION:
- *
- * The "user action time" used by methods like
- * tp_account_channel_request_new() to represent channel requests that are
- * not a result of user action.
- *
- * See also #TpAccountChannelRequest:user-action-time,
- * tp_user_action_time_from_x11(), tp_user_action_time_should_present() and
- * %TP_USER_ACTION_TIME_CURRENT_TIME.
- *
- * Since: 0.11.13
- */
-#define TP_USER_ACTION_TIME_NOT_USER_ACTION (G_GINT64_CONSTANT (0))
-
-/**
- * TP_USER_ACTION_TIME_CURRENT_TIME:
- *
- * The "user action time" used by methods like
- * tp_account_channel_request_new() to represent channel requests that should
- * be treated as though they happened at the current time. This is the same
- * concept as %GDK_CURRENT_TIME in GDK (but note that the numerical value used
- * in Telepathy is not the same).
- *
- * See also #TpAccountChannelRequest:user-action-time,
- * tp_user_action_time_from_x11(), tp_user_action_time_should_present() and
- * %TP_USER_ACTION_TIME_NOT_USER_ACTION.
- *
- * Since: 0.11.13
- */
-#define TP_USER_ACTION_TIME_CURRENT_TIME (G_MAXINT64)
-
#define _TP_ENCODE_VERSION(major, minor) (((major) << 16) | ((minor) << 8))
#define TP_VERSION_0_16 (_TP_ENCODE_VERSION (0, 16))
diff --git a/telepathy-glib/enums.h b/telepathy-glib/enums.h
index c4c0e2b09..d80997c32 100644
--- a/telepathy-glib/enums.h
+++ b/telepathy-glib/enums.h
@@ -1,7 +1,32 @@
+/*
+ * enums.h - numeric constants
+ *
+ * Copyright © 2007-2012 Collabora Ltd.
+ * Copyright © 2007-2009 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
#ifndef __TP_ENUMS_H__
#define __TP_ENUMS_H__
#include <telepathy-glib/_gen/telepathy-enums.h>
#include <telepathy-glib/_gen/genums.h>
+#define TP_USER_ACTION_TIME_NOT_USER_ACTION (G_GINT64_CONSTANT (0))
+
+#define TP_USER_ACTION_TIME_CURRENT_TIME (G_MAXINT64)
+
#endif
diff --git a/telepathy-glib/errors.c b/telepathy-glib/errors.c
index bc045b5be..23ca70c11 100644
--- a/telepathy-glib/errors.c
+++ b/telepathy-glib/errors.c
@@ -61,193 +61,193 @@
/**
* TpError:
- * @TP_ERROR_NETWORK_ERROR: org.freedesktop.Telepathy.Error.NetworkError:
+ * @TP_ERROR_NETWORK_ERROR: im.telepathy1.Error.NetworkError:
* Raised when there is an error reading from or writing to the network.
- * @TP_ERROR_NOT_IMPLEMENTED: org.freedesktop.Telepathy.Error.NotImplemented:
+ * @TP_ERROR_NOT_IMPLEMENTED: im.telepathy1.Error.NotImplemented:
* Raised when the requested method, channel, etc is not available on this
* connection.
- * @TP_ERROR_INVALID_ARGUMENT: org.freedesktop.Telepathy.Error.InvalidArgument:
+ * @TP_ERROR_INVALID_ARGUMENT: im.telepathy1.Error.InvalidArgument:
* Raised when one of the provided arguments is invalid.
- * @TP_ERROR_NOT_AVAILABLE: org.freedesktop.Telepathy.Error.NotAvailable:
+ * @TP_ERROR_NOT_AVAILABLE: im.telepathy1.Error.NotAvailable:
* Raised when the requested functionality is temporarily unavailable.
- * @TP_ERROR_PERMISSION_DENIED: org.freedesktop.Telepathy.Error.PermissionDenied:
+ * @TP_ERROR_PERMISSION_DENIED: im.telepathy1.Error.PermissionDenied:
* The user is not permitted to perform the requested operation.
- * @TP_ERROR_DISCONNECTED: org.freedesktop.Telepathy.Error.Disconnected:
+ * @TP_ERROR_DISCONNECTED: im.telepathy1.Error.Disconnected:
* The connection is not currently connected and cannot be used.
* This error may also be raised when operations are performed on a
* Connection for which StatusChanged has signalled status Disconnected
* for reason None.
- * @TP_ERROR_INVALID_HANDLE: org.freedesktop.Telepathy.Error.InvalidHandle:
+ * @TP_ERROR_INVALID_HANDLE: im.telepathy1.Error.InvalidHandle:
* An identifier being converted to a handle was syntactically invalid,
* or an invalid handle was used.
- * @TP_ERROR_CHANNEL_BANNED: org.freedesktop.Telepathy.Error.Channel.Banned:
+ * @TP_ERROR_CHANNEL_BANNED: im.telepathy1.Error.Channel.Banned:
* You are banned from the channel.
- * @TP_ERROR_CHANNEL_FULL: org.freedesktop.Telepathy.Error.Channel.Full:
+ * @TP_ERROR_CHANNEL_FULL: im.telepathy1.Error.Channel.Full:
* The channel is full.
- * @TP_ERROR_CHANNEL_INVITE_ONLY: org.freedesktop.Telepathy.Error.Channel.InviteOnly:
+ * @TP_ERROR_CHANNEL_INVITE_ONLY: im.telepathy1.Error.Channel.InviteOnly:
* The requested channel is invite-only.
- * @TP_ERROR_NOT_YOURS: org.freedesktop.Telepathy.Error.NotYours:
+ * @TP_ERROR_NOT_YOURS: im.telepathy1.Error.NotYours:
* The requested channel or other resource already exists, and another
* client is responsible for it
- * @TP_ERROR_CANCELLED: org.freedesktop.Telepathy.Error.Cancelled:
+ * @TP_ERROR_CANCELLED: im.telepathy1.Error.Cancelled:
* Raised by an ongoing request if it is cancelled by user request before
* it has completed, or when operations are performed on an object which
* the user has asked to close (for instance, a Connection where the user
* has called Disconnect, or a Channel where the user has called Close).
- * @TP_ERROR_AUTHENTICATION_FAILED: org.freedesktop.Telepathy.Error.AuthenticationFailed:
+ * @TP_ERROR_AUTHENTICATION_FAILED: im.telepathy1.Error.AuthenticationFailed:
* Raised when authentication with a service was unsuccessful.
- * @TP_ERROR_ENCRYPTION_NOT_AVAILABLE: org.freedesktop.Telepathy.Error.EncryptionNotAvailable:
+ * @TP_ERROR_ENCRYPTION_NOT_AVAILABLE: im.telepathy1.Error.EncryptionNotAvailable:
* Raised if a user request insisted that encryption should be used,
* but encryption was not actually available.
- * @TP_ERROR_ENCRYPTION_ERROR: org.freedesktop.Telepathy.Error.EncryptionError:
+ * @TP_ERROR_ENCRYPTION_ERROR: im.telepathy1.Error.EncryptionError:
* Raised if encryption appears to be available, but could not actually be
* used (for instance if SSL/TLS negotiation fails).
- * @TP_ERROR_CERT_NOT_PROVIDED: org.freedesktop.Telepathy.Error.Cert.NotProvided:
+ * @TP_ERROR_CERT_NOT_PROVIDED: im.telepathy1.Error.Cert.NotProvided:
* Raised if the server did not provide a SSL/TLS certificate.
- * @TP_ERROR_CERT_UNTRUSTED: org.freedesktop.Telepathy.Error.Cert.Untrusted:
+ * @TP_ERROR_CERT_UNTRUSTED: im.telepathy1.Error.Cert.Untrusted:
* Raised if the server provided a SSL/TLS certificate signed by an
* untrusted certifying authority.
- * @TP_ERROR_CERT_EXPIRED: org.freedesktop.Telepathy.Error.Cert.Expired:
+ * @TP_ERROR_CERT_EXPIRED: im.telepathy1.Error.Cert.Expired:
* Raised if the server provided an expired SSL/TLS certificate.
- * @TP_ERROR_CERT_NOT_ACTIVATED: org.freedesktop.Telepathy.Error.Cert.NotActivated:
+ * @TP_ERROR_CERT_NOT_ACTIVATED: im.telepathy1.Error.Cert.NotActivated:
* Raised if the server provided an SSL/TLS certificate that will become
* valid at some point in the future.
- * @TP_ERROR_CERT_FINGERPRINT_MISMATCH: org.freedesktop.Telepathy.Error.Cert.FingerprintMismatch:
+ * @TP_ERROR_CERT_FINGERPRINT_MISMATCH: im.telepathy1.Error.Cert.FingerprintMismatch:
* Raised if the server provided an SSL/TLS certificate that did not have
* the expected fingerprint.
- * @TP_ERROR_CERT_HOSTNAME_MISMATCH: org.freedesktop.Telepathy.Error.Cert.HostnameMismatch:
+ * @TP_ERROR_CERT_HOSTNAME_MISMATCH: im.telepathy1.Error.Cert.HostnameMismatch:
* Raised if the server provided an SSL/TLS certificate that did not
* match its hostname.
- * @TP_ERROR_CERT_SELF_SIGNED: org.freedesktop.Telepathy.Error.Cert.SelfSigned:
+ * @TP_ERROR_CERT_SELF_SIGNED: im.telepathy1.Error.Cert.SelfSigned:
* Raised if the server provided an SSL/TLS certificate that is
* self-signed and untrusted.
- * @TP_ERROR_CERT_INVALID: org.freedesktop.Telepathy.Error.Cert.Invalid:
+ * @TP_ERROR_CERT_INVALID: im.telepathy1.Error.Cert.Invalid:
* Raised if the server provided an SSL/TLS certificate that is
* unacceptable in some way that does not have a more specific error.
- * @TP_ERROR_NOT_CAPABLE: org.freedesktop.Telepathy.Error.NotCapable:
+ * @TP_ERROR_NOT_CAPABLE: im.telepathy1.Error.NotCapable:
* Raised when requested functionality is unavailable due to a contact
* not having the required capabilities.
- * @TP_ERROR_OFFLINE: org.freedesktop.Telepathy.Error.Offline:
+ * @TP_ERROR_OFFLINE: im.telepathy1.Error.Offline:
* Raised when requested functionality is unavailable because a contact is
* offline.
- * @TP_ERROR_CHANNEL_KICKED: org.freedesktop.Telepathy.Error.Channel.Kicked:
+ * @TP_ERROR_CHANNEL_KICKED: im.telepathy1.Error.Channel.Kicked:
* Used to represent a user being ejected from a channel by another user,
* for instance being kicked from a chatroom.
- * @TP_ERROR_BUSY: org.freedesktop.Telepathy.Error.Busy:
+ * @TP_ERROR_BUSY: im.telepathy1.Error.Busy:
* Used to represent a user being removed from a channel because of a
* "busy" indication.
- * @TP_ERROR_NO_ANSWER: org.freedesktop.Telepathy.Error.NoAnswer:
+ * @TP_ERROR_NO_ANSWER: im.telepathy1.Error.NoAnswer:
* Used to represent a user being removed from a channel because they did
* not respond, e.g. to a StreamedMedia call.
- * @TP_ERROR_DOES_NOT_EXIST: org.freedesktop.Telepathy.Error.DoesNotExist:
+ * @TP_ERROR_DOES_NOT_EXIST: im.telepathy1.Error.DoesNotExist:
* Raised when the requested user does not, in fact, exist.
- * @TP_ERROR_TERMINATED: org.freedesktop.Telepathy.Error.Terminated:
+ * @TP_ERROR_TERMINATED: im.telepathy1.Error.Terminated:
* Raised when a channel is terminated for an unspecified reason. In
* particular, this error SHOULD be used whenever normal termination of a
* 1-1 StreamedMedia call by the remote user is represented as a D-Bus
* error name.
- * @TP_ERROR_CONNECTION_REFUSED: org.freedesktop.Telepathy.Error.ConnectionRefused:
+ * @TP_ERROR_CONNECTION_REFUSED: im.telepathy1.Error.ConnectionRefused:
* Raised when a connection is refused.
- * @TP_ERROR_CONNECTION_FAILED: org.freedesktop.Telepathy.Error.ConnectionFailed:
+ * @TP_ERROR_CONNECTION_FAILED: im.telepathy1.Error.ConnectionFailed:
* Raised when a connection can't be established.
- * @TP_ERROR_CONNECTION_LOST: org.freedesktop.Telepathy.Error.ConnectionLost:
+ * @TP_ERROR_CONNECTION_LOST: im.telepathy1.Error.ConnectionLost:
* Raised when a connection is broken.
- * @TP_ERROR_ALREADY_CONNECTED: org.freedesktop.Telepathy.Error.AlreadyConnected:
+ * @TP_ERROR_ALREADY_CONNECTED: im.telepathy1.Error.AlreadyConnected:
* Raised on attempts to connect again to an account that is already
* connected, if the protocol or server does not allow this.
* Since 0.7.34
- * @TP_ERROR_CONNECTION_REPLACED: org.freedesktop.Telepathy.Error.ConnectionReplaced:
+ * @TP_ERROR_CONNECTION_REPLACED: im.telepathy1.Error.ConnectionReplaced:
* Used as disconnection reason for an existing connection if it is
* disconnected because a second connection to the same account is made.
* Since 0.7.34
- * @TP_ERROR_REGISTRATION_EXISTS: org.freedesktop.Telepathy.Error.RegistrationExists:
+ * @TP_ERROR_REGISTRATION_EXISTS: im.telepathy1.Error.RegistrationExists:
* Raised on attempts to register an account on a server when the account
* already exists.
* Since 0.7.34
- * @TP_ERROR_SERVICE_BUSY: org.freedesktop.Telepathy.Error.ServiceBusy:
+ * @TP_ERROR_SERVICE_BUSY: im.telepathy1.Error.ServiceBusy:
* Raised when a server or other infrastructure rejects a request because
* it is too busy.
* Since 0.7.34
- * @TP_ERROR_RESOURCE_UNAVAILABLE: org.freedesktop.Telepathy.Error.ResourceUnavailable:
+ * @TP_ERROR_RESOURCE_UNAVAILABLE: im.telepathy1.Error.ResourceUnavailable:
* Raised when a local process rejects a request because it does not have
* enough of a resource, such as memory.
* Since 0.7.34
- * @TP_ERROR_WOULD_BREAK_ANONYMITY: org.freedesktop.Telepathy.Error.WouldBreakAnonymity:
+ * @TP_ERROR_WOULD_BREAK_ANONYMITY: im.telepathy1.Error.WouldBreakAnonymity:
* Raised when a request cannot be satisfied without violating an
* earlier request for anonymity, and the earlier request specified
* that raising an error is preferable to disclosing the user's
* identity
* Since 0.11.7
- * @TP_ERROR_CERT_REVOKED: org.freedesktop.Telepathy.Error.Cert.Revoked:
+ * @TP_ERROR_CERT_REVOKED: im.telepathy1.Error.Cert.Revoked:
* Raised if the server provided an SSL/TLS certificate that has been
* revoked.
* Since 0.11.12
- * @TP_ERROR_CERT_INSECURE: org.freedesktop.Telepathy.Error.Cert.Insecure:
+ * @TP_ERROR_CERT_INSECURE: im.telepathy1.Error.Cert.Insecure:
* Raised if the server provided an SSL/TLS certificate that uses an
* insecure cipher algorithm or is cryptographically weak.
* Since 0.11.12
- * @TP_ERROR_CERT_LIMIT_EXCEEDED: org.freedesktop.Telepathy.Error.Cert.LimitExceeded:
+ * @TP_ERROR_CERT_LIMIT_EXCEEDED: im.telepathy1.Error.Cert.LimitExceeded:
* Raised if the length in bytes of the server certificate, or the depth
* of the server certificate chain, exceed the limits imposed by the
* crypto library.
* Since 0.11.12
- * @TP_ERROR_NOT_YET: org.freedesktop.Telepathy.Error.NotYet:
+ * @TP_ERROR_NOT_YET: im.telepathy1.Error.NotYet:
* Raised when the requested functionality is not yet available, but is
* likely to become available after some time has passed.
* Since 0.11.15
- * @TP_ERROR_REJECTED: org.freedesktop.Telepathy.Error.Rejected:
+ * @TP_ERROR_REJECTED: im.telepathy1.Error.Rejected:
* Raised when an incoming or outgoing call is rejected by the receiving
* contact.
* Since 0.13.2
- * @TP_ERROR_PICKED_UP_ELSEWHERE: org.freedesktop.Telepathy.Error.PickedUpElsewhere:
+ * @TP_ERROR_PICKED_UP_ELSEWHERE: im.telepathy1.Error.PickedUpElsewhere:
* Raised when a call was terminated as a result of the local user
* picking up the call on a different resource.
* Since 0.13.3
- * @TP_ERROR_CONFUSED: org.freedesktop.Telepathy.Error.Confused:
+ * @TP_ERROR_CONFUSED: im.telepathy1.Error.Confused:
* Raised if a server rejects protocol messages from a connection manager
* claiming that they do not make sense, two local processes fail to
* understand each other, or an apparently impossible situation is
* reached. This has a similar meaning to %TP_DBUS_ERROR_INCONSISTENT but
* can be passed between processes via D-Bus.
* Since 0.13.7
- * @TP_ERROR_SERVICE_CONFUSED: org.freedesktop.Telepathy.Error.ServiceConfused:
+ * @TP_ERROR_SERVICE_CONFUSED: im.telepathy1.Error.ServiceConfused:
* Raised when a server or other piece of infrastructure indicates an
* internal error, or when a message that makes no sense is received from
* a server or other piece of infrastructure.
* Since 0.13.7
* @TP_ERROR_EMERGENCY_CALLS_NOT_SUPPORTED:
- * org.freedesktop.Telepathy.Error.EmergencyCallsNotSupported:
+ * im.telepathy1.Error.EmergencyCallsNotSupported:
* Raised when a client attempts to dial a number that is recognized as an
* emergency number (e.g. '911' in the USA), but the Connection
* Manager or provider does not support dialling emergency numbers.
* @TP_ERROR_SOFTWARE_UPGRADE_REQUIRED:
- * org.freedesktop.Telepathy.Error.SoftwareUpgradeRequired:
+ * im.telepathy1.Error.SoftwareUpgradeRequired:
* Raised when a Connection cannot be established because either the
* Connection Manager or its support library (e.g. wocky, papyon, sofiasip)
* requires upgrading to support a newer protocol version.
* @TP_ERROR_INSUFFICIENT_BALANCE:
- * <code>org.freedesktop.Telepathy.Error.InsufficientBalance</code>:
+ * <code>im.telepathy1.Error.InsufficientBalance</code>:
* Raised if the user has insufficient balance to place a call. The key
* 'balance-required' MAY be included in CallStateDetails on a Call channel
* (with the same units and scale as AccountBalance) to indicate how much
* credit is required to make this call.
* @TP_ERROR_MEDIA_CODECS_INCOMPATIBLE:
- * <code>org.freedesktop.Telepathy.Error.Media.CodecsIncompatible</code>:
+ * <code>im.telepathy1.Error.Media.CodecsIncompatible</code>:
* Raised when the local streaming implementation has no codecs in common
* with the remote side.
* Since 0.15.6
* @TP_ERROR_MEDIA_UNSUPPORTED_TYPE:
- * <code>org.freedesktop.Telepathy.Error.Media.UnsupportedType</code>:
+ * <code>im.telepathy1.Error.Media.UnsupportedType</code>:
* The media stream type requested is not supported by either the local or
* remote side.
* Since 0.15.6
* @TP_ERROR_MEDIA_STREAMING_ERROR:
- * <code>org.freedesktop.Telepathy.Error.Media.StreamingError</code>:
+ * <code>im.telepathy1.Error.Media.StreamingError</code>:
* Raised when the call's streaming implementation has some kind of internal
* error.
* Since 0.15.6
* @TP_ERROR_CAPTCHA_NOT_SUPPORTED:
- * <code>org.freedesktop.Telepathy.Error.Media.CaptchaNotSupported</code>:
+ * <code>im.telepathy1.Error.Media.CaptchaNotSupported</code>:
* Raised if no UI is available to present captchas, or if one is
* available but it is unable to answer any of the captchas given.
*
@@ -305,19 +305,6 @@ tp_g_set_error_unsupported_handle_type (guint type, GError **error)
*/
/**
- * tp_errors_quark: (skip)
- *
- * <!-- -->
- *
- * Deprecated: Use tp_error_quark() instead.
- */
-GQuark
-tp_errors_quark (void)
-{
- return tp_error_quark ();
-}
-
-/**
* tp_error_quark:
*
* Return the error domain quark for #TpError.
@@ -331,9 +318,7 @@ tp_error_quark (void)
if (g_once_init_enter (&quark))
{
- /* FIXME: When we next break API, this should be changed to
- * "tp-error-quark" */
- GQuark domain = g_quark_from_static_string ("tp_errors");
+ GQuark domain = g_quark_from_static_string ("tp-error-quark");
g_type_init ();
dbus_g_error_domain_register (domain, TP_ERROR_PREFIX,
@@ -344,5 +329,5 @@ tp_error_quark (void)
return (GQuark) quark;
}
-/* tp_errors_quark assumes this */
+/* tp_error_quark assumes this */
G_STATIC_ASSERT (sizeof (GQuark) <= sizeof (gsize));
diff --git a/telepathy-glib/errors.h b/telepathy-glib/errors.h
index c0cc14198..126c81b39 100644
--- a/telepathy-glib/errors.h
+++ b/telepathy-glib/errors.h
@@ -30,18 +30,9 @@
G_BEGIN_DECLS
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_FOR (TP_ERROR)
-GQuark tp_errors_quark (void);
-
-/* this is deliberately the old one, so that it expands to a call to a
- * deprecated function, so that gcc will warn */
-#define TP_ERRORS (tp_errors_quark ())
-#endif
-
GQuark tp_error_quark (void);
-#define TP_ERROR_PREFIX "org.freedesktop.Telepathy.Error"
+#define TP_ERROR_PREFIX "im.telepathy1.Error"
#define TP_ERROR (tp_error_quark ())
diff --git a/telepathy-glib/extra-gtkdoc.h b/telepathy-glib/extra-gtkdoc.h
index 6492ecdfa..cad2cd874 100644
--- a/telepathy-glib/extra-gtkdoc.h
+++ b/telepathy-glib/extra-gtkdoc.h
@@ -1,8 +1,8 @@
/* This file contains no code - it's just here for gtkdoc to pick up
* documentation for otherwise undocumented generated files.
*
- * Copyright (C) 2007 Collabora Ltd.
- * Copyright (C) 2007 Nokia Corporation
+ * Copyright © 2007-2012 Collabora Ltd.
+ * Copyright © 2007-2009 Nokia Corporation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -20,6 +20,36 @@
*/
/**
+ * TP_USER_ACTION_TIME_NOT_USER_ACTION:
+ *
+ * The "user action time" used by methods like
+ * tp_account_channel_request_new() to represent channel requests that are
+ * not a result of user action.
+ *
+ * See also #TpAccountChannelRequest:user-action-time,
+ * tp_user_action_time_from_x11(), tp_user_action_time_should_present() and
+ * %TP_USER_ACTION_TIME_CURRENT_TIME.
+ *
+ * Since: 0.11.13
+ */
+
+/**
+ * TP_USER_ACTION_TIME_CURRENT_TIME:
+ *
+ * The "user action time" used by methods like
+ * tp_account_channel_request_new() to represent channel requests that should
+ * be treated as though they happened at the current time. This is the same
+ * concept as %GDK_CURRENT_TIME in GDK (but note that the numerical value used
+ * in Telepathy is not the same).
+ *
+ * See also #TpAccountChannelRequest:user-action-time,
+ * tp_user_action_time_from_x11(), tp_user_action_time_should_present() and
+ * %TP_USER_ACTION_TIME_NOT_USER_ACTION.
+ *
+ * Since: 0.11.13
+ */
+
+/**
* SECTION:svc-generic
* @title: Generic service-side interfaces
* @short_description: GInterfaces for D-Bus objects exporting Telepathy
@@ -153,45 +183,6 @@
*/
/**
- * SECTION:svc-channel-media
- * @title: Media channels
- * @short_description: service-side interfaces for the Streamed Media channel
- * type, and the Call State, DTMF and Media Signalling interfaces
- *
- * This section documents the auto-generated C wrappers for the Streamed Media
- * channel type, and some interfaces which are optionally supported by
- * channels of this type.
- *
- * Streamed Media channels represent real-time audio or video streaming,
- * including voice over IP, webcams, and telephony.
- *
- * Channels of type Streamed Media may support the Media Signalling interface.
- * If not, the connection manager is assumed to be presenting the media
- * streams to the user automatically (for instance, in a connection manager
- * like gnome-phone-manager or telepathy-snom that remotely controls a
- * telephone, the phone's own speaker and microphone will probably be
- * used directly).
- *
- * If Media Signalling is supported, the Telepathy client is responsible for
- * actually streaming the media, using the Media Signalling interface to
- * provide signalling (connection managers might implement this interface in
- * terms of Jingle or SDP, for instance).
- *
- * Channels of type Streamed Media may also support the DTMF and
- * CallState interfaces.
- */
-
-/**
- * SECTION:svc-channel-tubes
- * @title: Tubes channels
- * @short_description: service-side interface for the Tubes channel type
- *
- * A "tube" is a mechanism for arbitrary data transfer.
- * This section documents the auto-generated C wrappers for the Tubes
- * channel type.
- */
-
-/**
* SECTION:svc-channel-tube
* @title: Tube channels
* @short_description: service-side interface for the Tube channel interface,
@@ -203,19 +194,6 @@
*/
/**
- * SECTION:svc-channel-contactlist
- * @title: Contact List channels
- * @short_description: service-side interface for the Contact List channel type
- *
- * Many instant messaging protocols have the a concept of a contact list,
- * roster or buddy list. Some protocols also have user-defined groups or tags
- * which can be represented as subsets of the roster.
- *
- * This section documents the auto-generated C wrappers for the Contact List
- * channel type.
- */
-
-/**
* SECTION:svc-channel-roomlist
* @title: Room List channels
* @short_description: service-side interface for the Room List channel type
@@ -340,18 +318,6 @@
*/
/**
- * SECTION:svc-media-interfaces
- * @title: Service-side media streaming helper interfaces
- * @short_description: media session and media stream
- * @see_also: #TpSvcChannelTypeStreamedMedia
- *
- * These interfaces (auto-generated from the telepathy spec) make it easier
- * to export the objects used to implement #TpSvcChannelTypeStreamedMedia,
- * with the correct method and signal signatures, and emit signals from those
- * objects.
- */
-
-/**
* SECTION:svc-client
* @title: Service-side Client interfaces
* @short_description: interfaces used to be an Observer, Approver and Handler
@@ -415,14 +381,14 @@
/**
* TP_MAJOR_VERSION:
*
- * The major version of telepathy-glib (e.g. the 0 in 0.18.1) at the time your
+ * The major version of telepathy-glib (e.g. the 1 in 1.2.3) at the time your
* code was compiled.
*/
/**
* TP_MINOR_VERSION:
*
- * The minor version of telepathy-glib (e.g. the 18 in 0.18.1) at the time your
+ * The minor version of telepathy-glib (e.g. the 2 in 1.2.3) at the time your
* code was compiled.
*
* Odd minor versions indicate a development branch; even minor versions
@@ -432,7 +398,7 @@
/**
* TP_MICRO_VERSION:
*
- * The micro version of telepathy-glib (e.g. the 1 in 0.18.1) at the time your
+ * The micro version of telepathy-glib (e.g. the 3 in 1.2.3) at the time your
* code was compiled.
*
* Within a stable branch (even minor version), micro versions fix bugs
@@ -473,9 +439,9 @@
/**
* TP_VERSION_MIN_REQUIRED: (skip)
*
- * A version-number constant like %TP_VERSION_0_18.
+ * A version-number constant like %TP_VERSION_1_0.
*
- * This may be defined to a value like %TP_VERSION_0_18 by users of
+ * This may be defined to a value like %TP_VERSION_1_0 by users of
* telepathy-glib, to set the minimum version they wish to
* require. Warnings will be issued for functions deprecated in or
* before that version.
@@ -486,9 +452,9 @@
/**
* TP_VERSION_MAX_ALLOWED: (skip)
*
- * A version-number constant like %TP_VERSION_0_18.
+ * A version-number constant like %TP_VERSION_1_0.
*
- * This may be defined to a value like %TP_VERSION_0_18 by users of
+ * This may be defined to a value like %TP_VERSION_1_0 by users of
* telepathy-glib, to set the maximum version they wish to
* depend on. Warnings will be issued for functions deprecated in or
* before that version.
@@ -511,41 +477,10 @@
* TP_ prefix, e.g. TP_CONNECTION_STATUS_CONNECTED.
*
* Each enum also has a constant for the number of members, named like
- * TP_NUM_CONNECTION_STATUSES. The pluralization is currently hard-coded
- * in the conversion scripts, but should move into the specification
- * in future.
+ * TP_NUM_CONNECTION_STATUSES.
*
- * Constants LAST_TP_CONNECTION_STATUS, etc. are also provided. These are
- * deprecated and will be removed in a future release.
- */
-
-/**
- * SECTION:interfaces
- * @title: Telepathy protocol interface and property names
- * @short_description: D-Bus interface and property names from the
- * Telepathy spec
- *
- * This header exposes the interface names from the Telepathy specification
- * as cpp defines for strings, such as %TP_IFACE_PROPERTIES_INTERFACE.
- * It is automatically generated from the specification.
- *
- * Since 0.7.0 it also provides cpp defines like
- * %TP_IFACE_QUARK_PROPERTIES_INTERFACE, which expand to function calls that
- * return GQuarks for the same strings.
- *
- * Since 0.9.2 it also provides cpp defines like
- * %TP_PROP_CHANNEL_INTERFACE_GROUP_GROUP_FLAGS, which expand to string
- * constants representing fully-qualified D-Bus property names, like
- * <literal>org.freedesktop.Telepathy.Channel.Interface.Group.GroupFlags</literal>.
- *
- * Since 0.11.5 it also provides cpp defines like
- * %TP_TOKEN_CONNECTION_INTERFACE_ALIASING_ALIAS for contact attributes like
- * "org.freedesktop.Telepathy.Connection.Interface.Aliasing/alias",
- * and defines like
- * %TP_TOKEN_CHANNEL_INTERFACE_MEDIA_SIGNALLING_ICE_UDP
- * for handler capability tokens like
- * "org.freedesktop.Telepathy.Channel.Interface.MediaSignalling/gtalk-p2p".
- * (These were present in an incorrect form since 0.11.3.)
+ * The numeric constants %TP_USER_ACTION_TIME_NOT_USER_ACTION and
+ * %TP_USER_ACTION_TIME_CURRENT_TIME are also provided.
*/
/**
@@ -571,6 +506,17 @@
*/
/**
+ * SECTION:cli-channel
+ * @title: Channel interface
+ * @short_description: client-side wrappers for Channel core functionality
+ * @see_also: #TpChannel
+ *
+ * This section documents the auto-generated C wrappers for the
+ * Channel D-Bus interface. These are not generally useful
+ * (the #TpChannel object provides a more convenient API for them).
+ */
+
+/**
* SECTION:channel-group
* @title: Group and Conference interfaces on Channels
* @short_description: client-side wrappers for Group and Conference
@@ -690,17 +636,6 @@
*/
/**
- * SECTION:channel-tubes
- * @title: Tubes channels
- * @short_description: client-side wrappers for the Tubes channel type
- * @see_also: channel-group
- *
- * A "tube" is a mechanism for arbitrary data transfer.
- * This section documents the auto-generated C wrappers for the Tubes
- * channel type.
- */
-
-/**
* SECTION:channel-tube
* @title: Tube channels
* @short_description: client-side wrappers for the Tube channel interface,
@@ -724,6 +659,17 @@
*/
/**
+ * SECTION:cli-connection
+ * @title: Connection interface
+ * @short_description: client-side wrappers for Connection core functionality
+ * @see_also: #TpConnection
+ *
+ * This section documents the auto-generated C wrappers for the
+ * Connection D-Bus interface. These are not generally useful
+ * (the #TpConnection object provides a more convenient API for them).
+ */
+
+/**
* SECTION:connection-avatars
* @title: Connection Avatars interface
* @short_description: client-side wrappers for the Avatars interface
@@ -807,18 +753,18 @@
*/
/**
- * SECTION:connection-simple-presence
- * @title: Connection SimplePresence interface
- * @short_description: client-side wrappers for the SimplePresence interface
+ * SECTION:connection-presence
+ * @title: Connection Presence interface
+ * @short_description: client-side wrappers for the Presence interface
* @see_also: #TpConnection
*
* Most instant messaging protocols allow users to advertise their presence
- * status. In Telepathy, this is represented by the SimplePresence
+ * status. In Telepathy, this is represented by the Presence
* interface, which lets applications advertise the presence status of the
* local user, and query the presence status of their contacts.
*
* This section documents the auto-generated C wrappers for the
- * SimplePresence interface, used with #TpConnection objects.
+ * Presence interface, used with #TpConnection objects.
*/
/**
@@ -1184,3 +1130,47 @@
*
* Since: 0.17.5
*/
+
+/**
+ * SECTION:cli-connection-manager
+ * @title: ConnectionManager interface
+ * @short_description: client-side wrappers for ConnectionManager core
+ * functionality
+ * @see_also: #TpConnectionManager
+ *
+ * This section documents the auto-generated C wrappers for the
+ * ConnectionManager D-Bus interface.
+ */
+
+/**
+ * SECTION:cli-channel-dispatcher
+ * @title: ChannelDispatcher interface
+ * @short_description: client-side wrappers for ChannelDispatcher core
+ * functionality
+ * @see_also: #TpChannelDispatcher
+ *
+ * This section documents the auto-generated C wrappers for the
+ * ChannelDispatcher D-Bus interface.
+ */
+
+/**
+ * SECTION:cli-client
+ * @title: Client interface
+ * @short_description: client-side wrappers for Client functionality
+ * @see_also: #TpClient
+ *
+ * This section documents the auto-generated C wrappers for the
+ * Client, Handler, Approver, Observer and other related D-Bus interfaces.
+ * These should normally only be used by the Channel Dispatcher implementation.
+ */
+
+/**
+ * SECTION:cli-account-manager
+ * @title: AccountManager interface
+ * @short_description: client-side wrappers for AccountManager functionality
+ * @see_also: #TpAccountManager
+ *
+ * This section documents the auto-generated C wrappers for the
+ * AccountManager. These are not usually useful, since #TpAccountManager
+ * provides a high-level API.
+ */
diff --git a/telepathy-glib/file-transfer-channel.c b/telepathy-glib/file-transfer-channel.c
index db39bff5d..e3995c0d5 100644
--- a/telepathy-glib/file-transfer-channel.c
+++ b/telepathy-glib/file-transfer-channel.c
@@ -98,6 +98,8 @@
#include "telepathy-glib/file-transfer-channel.h"
+#include <telepathy-glib/cli-channel.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/gnio-util.h>
#include <telepathy-glib/gtypes.h>
@@ -184,7 +186,7 @@ operation_failed (TpFileTransferChannel *self,
GError *error)
{
g_simple_async_result_take_error (self->priv->result, error);
- g_simple_async_result_complete_in_idle (self->priv->result);
+ g_simple_async_result_complete (self->priv->result);
tp_clear_object (&self->priv->result);
}
@@ -441,7 +443,7 @@ tp_file_transfer_channel_prepare_core_cb (TpProxy *proxy,
self->priv->file = g_file_new_for_uri (uri);
out:
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
static void
@@ -1071,7 +1073,7 @@ tp_file_transfer_channel_new (TpConnection *conn,
TpFileTransferChannel *
_tp_file_transfer_channel_new_with_factory (
- TpSimpleClientFactory *factory,
+ TpClientFactory *factory,
TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
@@ -1168,7 +1170,7 @@ accept_or_provide_file_cb (TpChannel *proxy,
start_transfer (self);
}
- g_simple_async_result_complete_in_idle (self->priv->result);
+ g_simple_async_result_complete (self->priv->result);
}
static gboolean
diff --git a/telepathy-glib/generic.xml b/telepathy-glib/generic.xml
index 5e50972fc..4fc42b4f0 100644
--- a/telepathy-glib/generic.xml
+++ b/telepathy-glib/generic.xml
@@ -8,6 +8,4 @@
<xi:include href="dbus-introspectable.xml"/>
<xi:include href="dbus-properties.xml"/>
-<xi:include href="../spec/Properties_Interface.xml"/>
-
</tp:spec>
diff --git a/telepathy-glib/group-mixin.c b/telepathy-glib/group-mixin.c
index 56873420b..7c856155e 100644
--- a/telepathy-glib/group-mixin.c
+++ b/telepathy-glib/group-mixin.c
@@ -44,7 +44,7 @@
*
* Since 0.5.13 you can also implement the group interface by forwarding all
* group operations to the group mixin of an associated object (mainly useful
- * for Tubes channels). To do this, call tp_external_group_mixin_init()
+ * for old Tubes channels). To do this, call tp_external_group_mixin_init()
* in the constructor after the associated object has been set,
* tp_external_group_mixin_finalize() in the dispose or finalize function, and
* <literal>G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_GROUP,
@@ -65,10 +65,10 @@
#include <string.h>
#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/debug-ansi.h>
#include <telepathy-glib/errors.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/svc-channel.h>
#define DEBUG_FLAG TP_DEBUG_GROUPS
@@ -330,8 +330,6 @@ tp_group_mixin_init (GObject *obj,
if (self_handle != 0)
mixin->self_handle = self_handle;
- mixin->group_flags = TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED;
-
mixin->members = tp_handle_set_new (handle_repo);
mixin->local_pending = tp_handle_set_new (handle_repo);
mixin->remote_pending = tp_handle_set_new (handle_repo);
@@ -442,32 +440,11 @@ tp_group_mixin_change_self_handle (GObject *obj,
mixin->self_handle = new_self_handle;
- tp_svc_channel_interface_group_emit_self_handle_changed (obj,
- new_self_handle);
tp_svc_channel_interface_group_emit_self_contact_changed (obj,
new_self_handle, new_self_id);
}
-static void
-tp_group_mixin_get_self_handle_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- guint ret;
- GError *error = NULL;
-
- if (tp_group_mixin_get_self_handle ((GObject *) obj, &ret, &error))
- {
- tp_svc_channel_interface_group_return_from_get_self_handle (
- context, ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
/**
* tp_group_mixin_get_group_flags: (skip)
* @obj: An object implementing the group mixin using this interface
@@ -491,25 +468,6 @@ tp_group_mixin_get_group_flags (GObject *obj,
return TRUE;
}
-static void
-tp_group_mixin_get_group_flags_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- guint ret;
- GError *error = NULL;
-
- if (tp_group_mixin_get_group_flags ((GObject *) obj, &ret, &error))
- {
- tp_svc_channel_interface_group_return_from_get_group_flags (
- context, ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
/**
* tp_group_mixin_add_members: (skip)
* @obj: An object implementing the group interface using this mixin
@@ -611,32 +569,6 @@ tp_group_mixin_add_members_async (TpSvcChannelInterfaceGroup *obj,
* @obj: An object implementing the group interface using this mixin
* @contacts: A GArray of guint representing contacts
* @message: A message to be sent to those contacts, if supported
- * @error: Used to return an error if %FALSE is returned
- *
- * Request that the given contacts be removed from the group as if in response
- * to user action. If the group's flags prohibit this, raise
- * PermissionDenied. If any of the handles is invalid, raise InvalidHandle.
- * If any of the handles is absent from the group, raise NotAvailable.
- * Otherwise attempt to remove the contacts by calling the callbacks provided
- * by the channel implementation.
- *
- * Returns: %TRUE on success
- */
-gboolean
-tp_group_mixin_remove_members (GObject *obj,
- const GArray *contacts,
- const gchar *message,
- GError **error)
-{
- return tp_group_mixin_remove_members_with_reason (obj, contacts, message,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE, error);
-}
-
-/**
- * tp_group_mixin_remove_members_with_reason: (skip)
- * @obj: An object implementing the group interface using this mixin
- * @contacts: A GArray of guint representing contacts
- * @message: A message to be sent to those contacts, if supported
* @reason: A #TpChannelGroupChangeReason
* @error: Used to return an error if %FALSE is returned
*
@@ -650,7 +582,7 @@ tp_group_mixin_remove_members (GObject *obj,
* Returns: %TRUE on success
*/
gboolean
-tp_group_mixin_remove_members_with_reason (GObject *obj,
+tp_group_mixin_remove_members (GObject *obj,
const GArray *contacts,
const gchar *message,
guint reason,
@@ -752,7 +684,7 @@ tp_group_mixin_remove_members_with_reason (GObject *obj,
}
static void
-tp_group_mixin_remove_members_with_reason_async
+tp_group_mixin_remove_members_async
(TpSvcChannelInterfaceGroup *obj,
const GArray *contacts,
const gchar *message,
@@ -761,10 +693,10 @@ tp_group_mixin_remove_members_with_reason_async
{
GError *error = NULL;
- if (tp_group_mixin_remove_members_with_reason ((GObject *) obj, contacts,
+ if (tp_group_mixin_remove_members ((GObject *) obj, contacts,
message, reason, &error))
{
- tp_svc_channel_interface_group_return_from_remove_members_with_reason
+ tp_svc_channel_interface_group_return_from_remove_members
(context);
}
else
@@ -774,26 +706,6 @@ tp_group_mixin_remove_members_with_reason_async
}
}
-static void
-tp_group_mixin_remove_members_async (TpSvcChannelInterfaceGroup *obj,
- const GArray *contacts,
- const gchar *message,
- DBusGMethodInvocation *context)
-{
- GError *error = NULL;
-
- if (tp_group_mixin_remove_members_with_reason ((GObject *) obj, contacts,
- message, TP_CHANNEL_GROUP_CHANGE_REASON_NONE, &error))
- {
- tp_svc_channel_interface_group_return_from_remove_members (context);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
/**
* tp_group_mixin_get_members: (skip)
* @obj: An object implementing the group interface using this mixin
@@ -816,26 +728,6 @@ tp_group_mixin_get_members (GObject *obj,
return TRUE;
}
-static void
-tp_group_mixin_get_members_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- GArray *ret;
- GError *error = NULL;
-
- if (tp_group_mixin_get_members ((GObject *) obj, &ret, &error))
- {
- tp_svc_channel_interface_group_return_from_get_members (
- context, ret);
- g_array_unref (ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
/**
* tp_group_mixin_get_local_pending_members: (skip)
* @obj: An object implementing the group interface using this mixin
@@ -858,26 +750,6 @@ tp_group_mixin_get_local_pending_members (GObject *obj,
return TRUE;
}
-static void
-tp_group_mixin_get_local_pending_members_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- GArray *ret;
- GError *error = NULL;
-
- if (tp_group_mixin_get_local_pending_members ((GObject *) obj, &ret, &error))
- {
- tp_svc_channel_interface_group_return_from_get_local_pending_members (
- context, ret);
- g_array_unref (ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
typedef struct {
TpGroupMixin *mixin;
GPtrArray *array;
@@ -941,32 +813,6 @@ tp_group_mixin_get_local_pending_members_with_info (
return TRUE;
}
-static void
-tp_group_mixin_get_local_pending_members_with_info_async (
- TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- GPtrArray *ret;
- GError *error = NULL;
-
- if (tp_group_mixin_get_local_pending_members_with_info ((GObject *) obj,
- &ret, &error))
- {
- guint i;
- tp_svc_channel_interface_group_return_from_get_local_pending_members_with_info (
- context, ret);
- for (i = 0 ; i < ret->len; i++) {
- g_value_array_free (g_ptr_array_index (ret,i));
- }
- g_ptr_array_unref (ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
/**
* tp_group_mixin_get_remote_pending_members: (skip)
* @obj: An object implementing the group interface using this mixin
@@ -990,27 +836,6 @@ tp_group_mixin_get_remote_pending_members (GObject *obj,
return TRUE;
}
-static void
-tp_group_mixin_get_remote_pending_members_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- GArray *ret;
- GError *error = NULL;
-
- if (tp_group_mixin_get_remote_pending_members ((GObject *) obj,
- &ret, &error))
- {
- tp_svc_channel_interface_group_return_from_get_remote_pending_members (
- context, ret);
- g_array_unref (ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
/**
* tp_group_mixin_get_all_members: (skip)
* @obj: An object implementing the group interface using this mixin
@@ -1042,29 +867,6 @@ tp_group_mixin_get_all_members (GObject *obj,
return TRUE;
}
-static void
-tp_group_mixin_get_all_members_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- GArray *mem, *local, *remote;
- GError *error = NULL;
-
- if (tp_group_mixin_get_all_members ((GObject *) obj, &mem, &local, &remote,
- &error))
- {
- tp_svc_channel_interface_group_return_from_get_all_members (
- context, mem, local, remote);
- g_array_unref (mem);
- g_array_unref (local);
- g_array_unref (remote);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
/**
* tp_group_mixin_get_handle_owners: (skip)
* @obj: An object implementing the group interface with this mixin
@@ -1132,28 +934,6 @@ tp_group_mixin_get_handle_owners (GObject *obj,
return TRUE;
}
-static void
-tp_group_mixin_get_handle_owners_async (TpSvcChannelInterfaceGroup *obj,
- const GArray *handles,
- DBusGMethodInvocation *context)
-{
- GArray *ret;
- GError *error = NULL;
-
- if (tp_group_mixin_get_handle_owners ((GObject *) obj, handles,
- &ret, &error))
- {
- tp_svc_channel_interface_group_return_from_get_handle_owners (
- context, ret);
- g_array_unref (ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
#define GFTS_APPEND_FLAG_IF_SET(flag) \
if (flags & flag) \
{ \
@@ -1182,8 +962,6 @@ group_flags_to_string (TpChannelGroupFlags flags)
GFTS_APPEND_FLAG_IF_SET (TP_CHANNEL_GROUP_FLAG_CHANNEL_SPECIFIC_HANDLES);
GFTS_APPEND_FLAG_IF_SET (TP_CHANNEL_GROUP_FLAG_ONLY_ONE_GROUP);
GFTS_APPEND_FLAG_IF_SET (TP_CHANNEL_GROUP_FLAG_HANDLE_OWNERS_NOT_AVAILABLE);
- GFTS_APPEND_FLAG_IF_SET (TP_CHANNEL_GROUP_FLAG_PROPERTIES);
- GFTS_APPEND_FLAG_IF_SET (TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED);
/* Print out any remaining flags that weren't removed in the above cases
* numerically.
@@ -1476,9 +1254,7 @@ emit_members_changed_signals (GObject *channel,
added_contact_ids = maybe_add_contact_ids (mixin, add, local_pending,
remote_pending, actor, details_);
- tp_svc_channel_interface_group_emit_members_changed (channel, message,
- add, del, local_pending, remote_pending, actor, reason);
- tp_svc_channel_interface_group_emit_members_changed_detailed (channel,
+ tp_svc_channel_interface_group_emit_members_changed (channel,
add, del, local_pending, remote_pending, details_);
if (mixin->priv->externals != NULL)
@@ -1489,9 +1265,7 @@ emit_members_changed_signals (GObject *channel,
{
GObject *external = g_ptr_array_index (mixin->priv->externals, i);
- tp_svc_channel_interface_group_emit_members_changed (external,
- message, add, del, local_pending, remote_pending, actor, reason);
- tp_svc_channel_interface_group_emit_members_changed_detailed (
+ tp_svc_channel_interface_group_emit_members_changed (
external, add, del, local_pending, remote_pending, details_);
}
}
@@ -1626,9 +1400,7 @@ change_members (GObject *obj,
{
GHashTable *empty_hash_table = g_hash_table_new (NULL, NULL);
- tp_svc_channel_interface_group_emit_handle_owners_changed (obj,
- empty_hash_table, arr_owners_removed);
- tp_svc_channel_interface_group_emit_handle_owners_changed_detailed (
+ tp_svc_channel_interface_group_emit_handle_owners_changed (
obj, empty_hash_table, arr_owners_removed, empty_hash_table);
if (mixin->priv->externals != NULL)
@@ -1639,9 +1411,6 @@ change_members (GObject *obj,
{
tp_svc_channel_interface_group_emit_handle_owners_changed (
g_ptr_array_index (mixin->priv->externals, i),
- empty_hash_table, arr_owners_removed);
- tp_svc_channel_interface_group_emit_handle_owners_changed_detailed (
- g_ptr_array_index (mixin->priv->externals, i),
empty_hash_table, arr_owners_removed, empty_hash_table);
}
}
@@ -1679,80 +1448,6 @@ change_members (GObject *obj,
/**
* tp_group_mixin_change_members: (skip)
* @obj: An object implementing the group interface using this mixin
- * @message: A message to be sent to the affected contacts if possible;
- * %NULL is allowed, and is mapped to an empty string
- * @add: A set of contact handles to be added to the members (if not
- * already present) and removed from local pending and remote pending
- * (if present)
- * @del: A set of contact handles to be removed from members,
- * local pending or remote pending, wherever they are present
- * @add_local_pending: A set of contact handles to be added to local pending,
- * and removed from members and remote pending
- * @add_remote_pending: A set of contact handles to be added to remote pending,
- * and removed from members and local pending
- * @actor: The handle of the contact responsible for this change
- * @reason: The reason for this change
- *
- * Change the sets of members as given by the arguments, and emit the
- * MembersChanged and MembersChangedDetailed signals if the changes were not a
- * no-op.
- *
- * This function must be called in response to events on the underlying
- * IM protocol, and must not be called in direct response to user input;
- * it does not respect the permissions flags, but changes the group directly.
- *
- * If any two of add, del, add_local_pending and add_remote_pending have
- * a non-empty intersection, the result is undefined. Don't do that.
- *
- * Each of the TpIntset arguments may be %NULL, which is treated as
- * equivalent to an empty set.
- *
- * Returns: %TRUE if the group was changed and the MembersChanged(Detailed)
- * signals were emitted; %FALSE if nothing actually changed and the signals
- * were suppressed.
- */
-gboolean
-tp_group_mixin_change_members (GObject *obj,
- const gchar *message,
- const TpIntset *add,
- const TpIntset *del,
- const TpIntset *add_local_pending,
- const TpIntset *add_remote_pending,
- TpHandle actor,
- TpChannelGroupChangeReason reason)
-{
- GHashTable *details = g_hash_table_new_full (g_str_hash, g_str_equal,
- NULL, (GDestroyNotify) tp_g_value_slice_free);
- gboolean ret;
-
- if (actor != 0)
- {
- g_hash_table_insert (details, "actor",
- tp_g_value_slice_new_uint (actor));
- }
-
- if (reason != TP_CHANNEL_GROUP_CHANGE_REASON_NONE)
- {
- g_hash_table_insert (details, "change-reason",
- tp_g_value_slice_new_uint (reason));
- }
-
- if (message != NULL && message[0] != '\0')
- {
- g_hash_table_insert (details, "message",
- tp_g_value_slice_new_string (message));
- }
-
- ret = change_members (obj, message, add, del, add_local_pending,
- add_remote_pending, actor, reason, details);
-
- g_hash_table_unref (details);
- return ret;
-}
-
-/**
- * tp_group_mixin_change_members_detailed: (skip)
- * @obj: An object implementing the group interface using this mixin
* @add: A set of contact handles to be added to the members (if not
* already present) and removed from local pending and remote pending
* (if present)
@@ -1765,8 +1460,7 @@ tp_group_mixin_change_members (GObject *obj,
* @details: a map from strings to GValues detailing the change
*
* Change the sets of members as given by the arguments, and emit the
- * MembersChanged and MembersChangedDetailed signals if the changes were not a
- * no-op.
+ * MembersChanged signal if the changes were not a no-op.
*
* This function must be called in response to events on the underlying
* IM protocol, and must not be called in direct response to user input;
@@ -1780,32 +1474,24 @@ tp_group_mixin_change_members (GObject *obj,
*
* details may contain, among other entries, the well-known
* keys (and corresponding type, wrapped in a GValue) defined by the
- * Group.MembersChangedDetailed signal's specification; these include "actor"
+ * Group.MembersChanged signal's specification; these include "actor"
* (a handle as G_TYPE_UINT), "change-reason" (an element of
* #TpChannelGroupChangeReason as G_TYPE_UINT), "message" (G_TYPE_STRING),
* "error" (G_TYPE_STRING), "debug-message" (G_TYPE_STRING).
*
- * If all of the information in details could be passed to
- * tp_group_mixin_change_members() then calling this function instead provides
- * no benefit. Calling this function without setting
- * #TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED with
- * tp_group_mixin_change_members() first is not very useful, as clients will
- * not know to listen for MembersChangedDetailed and thus will miss the
- * details.
- *
- * Returns: %TRUE if the group was changed and the MembersChanged(Detailed)
+ * Returns: %TRUE if the group was changed and the MembersChanged
* signals were emitted; %FALSE if nothing actually changed and the signals
* were suppressed.
*
* Since: 0.7.21
*/
gboolean
-tp_group_mixin_change_members_detailed (GObject *obj,
- const TpIntset *add,
- const TpIntset *del,
- const TpIntset *add_local_pending,
- const TpIntset *add_remote_pending,
- const GHashTable *details)
+tp_group_mixin_change_members (GObject *obj,
+ const TpIntset *add,
+ const TpIntset *del,
+ const TpIntset *add_local_pending,
+ const TpIntset *add_remote_pending,
+ const GHashTable *details)
{
const gchar *message;
TpHandle actor;
@@ -1954,11 +1640,8 @@ tp_group_mixin_add_handle_owners (GObject *obj,
g_hash_table_foreach (local_to_owner_handle, add_handle_owners_helper,
mixin);
- tp_svc_channel_interface_group_emit_handle_owners_changed (obj,
- local_to_owner_handle, empty_array);
-
add_us_mapping_for_owners_map (ids, mixin->handle_repo, local_to_owner_handle);
- tp_svc_channel_interface_group_emit_handle_owners_changed_detailed (obj,
+ tp_svc_channel_interface_group_emit_handle_owners_changed (obj,
local_to_owner_handle, empty_array, ids);
g_array_unref (empty_array);
@@ -2035,16 +1718,7 @@ tp_group_mixin_iface_init (gpointer g_iface, gpointer iface_data)
#define IMPLEMENT(x) tp_svc_channel_interface_group_implement_##x (klass,\
tp_group_mixin_##x##_async)
IMPLEMENT(add_members);
- IMPLEMENT(get_all_members);
- IMPLEMENT(get_group_flags);
- IMPLEMENT(get_handle_owners);
- IMPLEMENT(get_local_pending_members);
- IMPLEMENT(get_local_pending_members_with_info);
- IMPLEMENT(get_members);
- IMPLEMENT(get_remote_pending_members);
- IMPLEMENT(get_self_handle);
IMPLEMENT(remove_members);
- IMPLEMENT(remove_members_with_reason);
#undef IMPLEMENT
}
@@ -2351,94 +2025,7 @@ tp_external_group_mixin_add_members_async (TpSvcChannelInterfaceGroup *obj,
}
static void
-tp_external_group_mixin_get_self_handle_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_self_handle_async ((TpSvcChannelInterfaceGroup *) group,
- context);
-}
-
-static void
-tp_external_group_mixin_get_group_flags_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_group_flags_async ((TpSvcChannelInterfaceGroup *) group,
- context);
-}
-
-static void
-tp_external_group_mixin_get_members_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_members_async ((TpSvcChannelInterfaceGroup *) group,
- context);
-}
-
-static void
-tp_external_group_mixin_get_local_pending_members_async
- (TpSvcChannelInterfaceGroup *obj, DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_local_pending_members_async
- ((TpSvcChannelInterfaceGroup *) group, context);
-}
-
-static void
-tp_external_group_mixin_get_local_pending_members_with_info_async
- (TpSvcChannelInterfaceGroup *obj, DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_local_pending_members_with_info_async
- ((TpSvcChannelInterfaceGroup *) group, context);
-}
-
-static void
-tp_external_group_mixin_get_remote_pending_members_async
- (TpSvcChannelInterfaceGroup *obj, DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_remote_pending_members_async
- ((TpSvcChannelInterfaceGroup *) group, context);
-}
-
-static void
-tp_external_group_mixin_get_all_members_async (TpSvcChannelInterfaceGroup *obj,
- DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_all_members_async ((TpSvcChannelInterfaceGroup *) group,
- context);
-}
-
-static void
-tp_external_group_mixin_get_handle_owners_async
- (TpSvcChannelInterfaceGroup *obj,
- const GArray *handles,
- DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_get_handle_owners_async ((TpSvcChannelInterfaceGroup *) group,
- handles, context);
-}
-
-static void
-tp_external_group_mixin_remove_members_async (TpSvcChannelInterfaceGroup *obj,
- const GArray *contacts,
- const gchar *message,
- DBusGMethodInvocation *context)
-{
- EXTERNAL_OR_DIE (group)
- tp_group_mixin_remove_members_with_reason_async
- ((TpSvcChannelInterfaceGroup *) group, contacts, message,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE, context);
-}
-
-
-static void
-tp_external_group_mixin_remove_members_with_reason_async
+tp_external_group_mixin_remove_members_async
(TpSvcChannelInterfaceGroup *obj,
const GArray *contacts,
const gchar *message,
@@ -2446,7 +2033,7 @@ tp_external_group_mixin_remove_members_with_reason_async
DBusGMethodInvocation *context)
{
EXTERNAL_OR_DIE (group)
- tp_group_mixin_remove_members_with_reason_async
+ tp_group_mixin_remove_members_async
((TpSvcChannelInterfaceGroup *) group, contacts, message, reason,
context);
}
@@ -2470,15 +2057,6 @@ tp_external_group_mixin_iface_init (gpointer g_iface,
#define IMPLEMENT(x) tp_svc_channel_interface_group_implement_##x (klass,\
tp_external_group_mixin_##x##_async)
IMPLEMENT(add_members);
- IMPLEMENT(get_all_members);
- IMPLEMENT(get_group_flags);
- IMPLEMENT(get_handle_owners);
- IMPLEMENT(get_local_pending_members);
- IMPLEMENT(get_local_pending_members_with_info);
- IMPLEMENT(get_members);
- IMPLEMENT(get_remote_pending_members);
- IMPLEMENT(get_self_handle);
IMPLEMENT(remove_members);
- IMPLEMENT(remove_members_with_reason);
#undef IMPLEMENT
}
diff --git a/telepathy-glib/group-mixin.h b/telepathy-glib/group-mixin.h
index caf8ce31e..d10f115e6 100644
--- a/telepathy-glib/group-mixin.h
+++ b/telepathy-glib/group-mixin.h
@@ -25,7 +25,6 @@
#include <telepathy-glib/dbus-properties-mixin.h>
#include <telepathy-glib/handle-repo.h>
-#include <telepathy-glib/svc-channel.h>
#include <telepathy-glib/util.h>
G_BEGIN_DECLS
@@ -181,8 +180,6 @@ gboolean tp_group_mixin_get_group_flags (GObject *obj,
gboolean tp_group_mixin_add_members (GObject *obj,
const GArray *contacts, const gchar *message, GError **error);
gboolean tp_group_mixin_remove_members (GObject *obj,
- const GArray *contacts, const gchar *message, GError **error);
-gboolean tp_group_mixin_remove_members_with_reason (GObject *obj,
const GArray *contacts, const gchar *message, guint reason,
GError **error);
@@ -204,10 +201,6 @@ gboolean tp_group_mixin_get_handle_owners (GObject *obj,
void tp_group_mixin_change_flags (GObject *obj,
TpChannelGroupFlags add, TpChannelGroupFlags del);
gboolean tp_group_mixin_change_members (GObject *obj,
- const gchar *message, const TpIntset *add, const TpIntset *del,
- const TpIntset *add_local_pending, const TpIntset *add_remote_pending,
- TpHandle actor, TpChannelGroupChangeReason reason);
-gboolean tp_group_mixin_change_members_detailed (GObject *obj,
const TpIntset *add, const TpIntset *del,
const TpIntset *add_local_pending, const TpIntset *add_remote_pending,
const GHashTable *details);
diff --git a/telepathy-glib/gtypes.c b/telepathy-glib/gtypes.c
index 7c26a4dd9..ca5e1b2fb 100644
--- a/telepathy-glib/gtypes.c
+++ b/telepathy-glib/gtypes.c
@@ -74,8 +74,10 @@ tp_type_dbus_array_of_o (void)
GValue *
tp_dbus_specialized_value_slice_new (GType type)
{
- GValue *value = tp_g_value_slice_new (type);
+ /* inlining tp_g_value_slice_new here to reduce inter-library calls */
+ GValue *value = g_slice_new0 (GValue);
+ g_value_init (value, type);
g_value_take_boxed (value, dbus_g_type_specialized_construct (type));
return value;
}
diff --git a/telepathy-glib/handle.c b/telepathy-glib/handle.c
index f49d6afaf..4b0150cfe 100644
--- a/telepathy-glib/handle.c
+++ b/telepathy-glib/handle.c
@@ -44,10 +44,6 @@ tp_handle_type_to_string (TpHandleType type)
return "contact";
case TP_HANDLE_TYPE_ROOM:
return "room";
- case TP_HANDLE_TYPE_LIST:
- return "contact list";
- case TP_HANDLE_TYPE_GROUP:
- return "group";
}
return "(invalid handle type)";
diff --git a/telepathy-glib/interfaces.c b/telepathy-glib/interfaces.c
index 598cc7ce5..be5d8aaa9 100644
--- a/telepathy-glib/interfaces.c
+++ b/telepathy-glib/interfaces.c
@@ -1,4 +1,136 @@
+/*
+ * telepathy-glib D-Bus interface names and related definitions
+ *
+ * Copyright © 2007-2012 Collabora Ltd.
+ * Copyright © 2007-2009 Nokia Corporation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
#include <telepathy-glib/interfaces.h>
/* auto-generated implementation stubs */
#include "_gen/interfaces-body.h"
+
+/**
+ * SECTION:interfaces
+ * @title: Telepathy protocol interface and property names
+ * @short_description: D-Bus interface and property names from the
+ * Telepathy spec
+ *
+ * This header exposes the interface names from the Telepathy specification
+ * as cpp defines for strings, such as %TP_IFACE_PROPERTIES_INTERFACE.
+ * These are automatically generated from the specification.
+ *
+ * It also provides related constants such as the common prefix of
+ * all connection managers' bus names and object paths.
+ *
+ * Since 0.7.0 it also provides cpp defines like
+ * %TP_IFACE_QUARK_PROPERTIES_INTERFACE, which expand to function calls that
+ * return GQuarks for the same strings.
+ *
+ * Since 0.9.2 it also provides cpp defines like
+ * %TP_PROP_CHANNEL_INTERFACE_GROUP_GROUP_FLAGS, which expand to string
+ * constants representing fully-qualified D-Bus property names, like
+ * <literal>im.telepathy1.Channel.Interface.Group.GroupFlags</literal>.
+ *
+ * Since 0.11.5 it also provides cpp defines like
+ * %TP_TOKEN_CONNECTION_INTERFACE_ALIASING_ALIAS for contact attributes like
+ * "im.telepathy1.Connection.Interface.Aliasing/alias",
+ * and defines like
+ * %TP_TOKEN_CHANNEL_INTERFACE_MEDIA_SIGNALLING_ICE_UDP
+ * for handler capability tokens like
+ * "im.telepathy1.Channel.Interface.MediaSignalling/gtalk-p2p".
+ * (These were present in an incorrect form since 0.11.3.)
+ */
+
+/**
+ * TP_CM_BUS_NAME_BASE:
+ *
+ * The prefix for a connection manager's bus name, to which the CM's name
+ * (e.g. "gabble") should be appended.
+ */
+
+/**
+ * TP_CM_OBJECT_PATH_BASE:
+ *
+ * The prefix for a connection manager's object path, to which the CM's name
+ * (e.g. "gabble") should be appended.
+ */
+
+/**
+ * TP_CONN_BUS_NAME_BASE:
+ *
+ * The prefix for a connection's bus name, to which the CM's name
+ * (e.g. "gabble"), the protocol (e.g. "jabber") and an element or sequence
+ * of elements representing the account should be appended.
+ */
+
+/**
+ * TP_CONN_OBJECT_PATH_BASE:
+ *
+ * The prefix for a connection's object path, to which the CM's name
+ * (e.g. "gabble"), the protocol (e.g. "jabber") and an element or sequence
+ * of elements representing the account should be appended.
+ */
+
+/**
+ * TP_ACCOUNT_MANAGER_BUS_NAME:
+ *
+ * The account manager's well-known bus name
+ */
+
+/**
+ * TP_ACCOUNT_MANAGER_OBJECT_PATH:
+ *
+ * The account manager's standard object path
+ */
+
+/**
+ * TP_ACCOUNT_OBJECT_PATH_BASE:
+ *
+ * The common prefix of the object path for all Account objects.
+ */
+
+/**
+ * TP_CHANNEL_DISPATCHER_BUS_NAME:
+ *
+ * The channel dispatcher's well-known bus name
+ */
+
+/**
+ * TP_CHANNEL_DISPATCHER_OBJECT_PATH:
+ *
+ * The channel dispatcher's standard object path
+ */
+
+/**
+ * TP_CLIENT_BUS_NAME_BASE:
+ *
+ * The common prefix of the well-known bus name for any Telepathy Client.
+ */
+
+/**
+ * TP_CLIENT_OBJECT_PATH_BASE:
+ *
+ * The common prefix of the well-known object path for any Telepathy Client.
+ */
+
+/**
+ * TP_DEBUG_OBJECT_PATH:
+ *
+ * The standard path for objects implementing the Telepathy Debug interface
+ * (#TpSvcDebug).
+ */
diff --git a/telepathy-glib/interfaces.h b/telepathy-glib/interfaces.h
index 202d38976..3bb12cdcf 100644
--- a/telepathy-glib/interfaces.h
+++ b/telepathy-glib/interfaces.h
@@ -5,6 +5,19 @@
G_BEGIN_DECLS
+#define TP_CM_BUS_NAME_BASE "im.telepathy1.ConnectionManager."
+#define TP_CM_OBJECT_PATH_BASE "/im/telepathy1/ConnectionManager/"
+#define TP_CONN_BUS_NAME_BASE "im.telepathy1.Connection."
+#define TP_CONN_OBJECT_PATH_BASE "/im/telepathy1/Connection/"
+#define TP_ACCOUNT_MANAGER_BUS_NAME "im.telepathy1.AccountManager"
+#define TP_ACCOUNT_MANAGER_OBJECT_PATH "/im/telepathy1/AccountManager"
+#define TP_ACCOUNT_OBJECT_PATH_BASE "/im/telepathy1/Account/"
+#define TP_CHANNEL_DISPATCHER_BUS_NAME "im.telepathy1.ChannelDispatcher"
+#define TP_CHANNEL_DISPATCHER_OBJECT_PATH "/im/telepathy1/ChannelDispatcher"
+#define TP_CLIENT_BUS_NAME_BASE "im.telepathy1.Client."
+#define TP_CLIENT_OBJECT_PATH_BASE "/im/telepathy1/Client/"
+#define TP_DEBUG_OBJECT_PATH "/im/telepathy1/debug"
+
#include <telepathy-glib/_gen/telepathy-interfaces.h>
G_END_DECLS
diff --git a/telepathy-glib/introspection.am b/telepathy-glib/introspection.am
index 168b95c1d..c67f72c3c 100644
--- a/telepathy-glib/introspection.am
+++ b/telepathy-glib/introspection.am
@@ -1,26 +1,29 @@
# To be included by Makefile.am.
introspection_extra_dist = \
- TelepathyGLib-0.12.metadata \
+ TelepathyGLib-1.metadata \
+ TelepathyGLibDBus-1.metadata \
$(NULL)
if HAVE_INTROSPECTION
include $(INTROSPECTION_MAKEFILE)
-INTROSPECTION_GIRS = TelepathyGLib-0.12.gir
+INTROSPECTION_GIRS = TelepathyGLib-1.gir TelepathyGLibDBus-1.gir
-TelepathyGLib-0.12.gir: libtelepathy-glib.la
+# Set PKG_CONFIG_PATH so we can find our own -uninstalled.pc for
+# telepathy-glib-1-dbus
+INTROSPECTION_SCANNER_ENV = PKG_CONFIG_PATH=$(builddir):$${PKG_CONFIG_PATH}
+
+TelepathyGLib-1.gir: libtelepathy-glib-1.la libtelepathy-glib-1-core.la
# /!\ Order matters, see https://bugzilla.gnome.org/show_bug.cgi?id=660629
-TelepathyGLib_0_12_gir_FILES = \
+TelepathyGLib_1_gir_FILES = \
+ $(srcdir)/core-dbus.c \
$(srcdir)/proxy.c _gen/proxy-introspectable.h \
$(srcdir)/account.c $(srcdir)/account.h \
$(srcdir)/account-channel-request.c $(srcdir)/account-channel-request.h \
$(srcdir)/account-manager.c $(srcdir)/account-manager.h \
$(srcdir)/automatic-client-factory.c $(srcdir)/automatic-client-factory.h \
- $(srcdir)/automatic-proxy-factory.c $(srcdir)/automatic-proxy-factory.h \
- $(srcdir)/basic-proxy-factory.c $(srcdir)/basic-proxy-factory.h \
- $(srcdir)/client-channel-factory.c $(srcdir)/client-channel-factory.h \
$(srcdir)/connection.c $(srcdir)/connection.h \
$(srcdir)/connection-contact-list.c $(srcdir)/connection-contact-list.h \
$(srcdir)/connection-handles.c $(srcdir)/connection-contact-info.c \
@@ -29,7 +32,6 @@ TelepathyGLib_0_12_gir_FILES = \
$(srcdir)/connection-manager.c $(srcdir)/connection-manager.h \
$(srcdir)/channel.c $(srcdir)/channel.h \
$(srcdir)/channel-group.c \
- $(srcdir)/channel-contacts.c \
$(srcdir)/handle.c $(srcdir)/handle.h \
$(srcdir)/handle-channels-context.c $(srcdir)/handle-channels-context.h \
$(srcdir)/dbus-daemon.c $(srcdir)/dbus-daemon.h \
@@ -45,7 +47,7 @@ TelepathyGLib_0_12_gir_FILES = \
$(srcdir)/debug.c $(srcdir)/debug.h \
$(srcdir)/base-client.c $(srcdir)/base-client.h \
$(srcdir)/simple-approver.c $(srcdir)/simple-approver.h \
- $(srcdir)/simple-client-factory.c $(srcdir)/simple-client-factory.h \
+ $(srcdir)/client-factory.c $(srcdir)/client-factory.h \
$(srcdir)/simple-handler.c $(srcdir)/simple-handler.h \
$(srcdir)/simple-observer.c $(srcdir)/simple-observer.h \
$(srcdir)/dbus-properties-mixin.c $(srcdir)/dbus-properties-mixin.h \
@@ -80,15 +82,22 @@ TelepathyGLib_0_12_gir_FILES = \
$(srcdir)/room-info.c $(srcdir)/room-info.h \
$(srcdir)/account-request.c $(srcdir)/account-request.h \
_gen/telepathy-enums.h _gen/telepathy-enums-gtk-doc.h \
+ $(NULL)
+
+TelepathyGLibDBus-1.gir: libtelepathy-glib-1-dbus.la TelepathyGLib-1.gir
+TelepathyGLibDBus_1_gir_FILES = \
_gen/telepathy-interfaces.h \
$(NULL)
-TelepathyGLib_0_12_gir_NAMESPACE = TelepathyGLib
-TelepathyGLib_0_12_gir_VERSION = 0.12
-TelepathyGLib_0_12_gir_LIBS = libtelepathy-glib.la
-TelepathyGLib_0_12_gir_EXPORT_PACKAGES = telepathy-glib
+TelepathyGLib_1_gir_NAMESPACE = TelepathyGLib
+TelepathyGLib_1_gir_VERSION = 1
+TelepathyGLib_1_gir_LIBS = \
+ libtelepathy-glib-1.la \
+ libtelepathy-glib-1-core.la \
+ $(NULL)
+TelepathyGLib_1_gir_EXPORT_PACKAGES = telepathy-glib-1
-TelepathyGLib_0_12_gir_SCANNERFLAGS = \
+TelepathyGLib_1_gir_SCANNERFLAGS = \
--identifier-prefix=Tp \
-I$(top_builddir) \
-I$(top_srcdir) \
@@ -97,12 +106,37 @@ TelepathyGLib_0_12_gir_SCANNERFLAGS = \
$(ERROR_SCANNERFLAGS) \
$(NULL)
-TelepathyGLib_0_12_gir_INCLUDES = \
+TelepathyGLib_1_gir_INCLUDES = \
GLib-2.0 \
Gio-2.0 \
$(NULL)
-TelepathyGLib_0_12_gir_PACKAGES = \
+TelepathyGLib_1_gir_PACKAGES = \
+ gio-2.0 \
+ dbus-glib-1 \
+ telepathy-glib-1-dbus \
+ $(NULL)
+
+TelepathyGLibDBus_1_gir_NAMESPACE = TelepathyGLibDBus
+TelepathyGLibDBus_1_gir_VERSION = 1
+TelepathyGLibDBus_1_gir_LIBS = \
+ libtelepathy-glib-1-dbus.la \
+ $(NULL)
+TelepathyGLibDBus_1_gir_EXPORT_PACKAGES = telepathy-glib-1-dbus
+TelepathyGLibDBus_1_gir_SCANNERFLAGS = \
+ --identifier-prefix=Tp \
+ -I$(top_builddir) \
+ -I$(top_srcdir) \
+ --c-include="telepathy-glib/telepathy-glib.h" \
+ --warn-all \
+ $(ERROR_SCANNERFLAGS) \
+ --include-uninstalled=TelepathyGLib-1.gir \
+ $(NULL)
+TelepathyGLibDBus_1_gir_INCLUDES = \
+ GLib-2.0 \
+ Gio-2.0 \
+ $(NULL)
+TelepathyGLibDBus_1_gir_PACKAGES = \
gio-2.0 \
dbus-glib-1 \
$(NULL)
@@ -112,7 +146,7 @@ _gen/proxy-introspectable.h: proxy.h introspection.am
$(AM_V_GEN)sed -e 's/gpointer self/TpProxy *self/' < $< > $@
girdir = $(datadir)/gir-1.0
-dist_gir_DATA = TelepathyGLib-0.12.gir
+dist_gir_DATA = TelepathyGLib-1.gir TelepathyGLibDBus-1.gir
typelibsdir = $(libdir)/girepository-1.0/
typelibs_DATA = $(dist_gir_DATA:.gir=.typelib)
diff --git a/telepathy-glib/intset.c b/telepathy-glib/intset.c
index ae7936263..363cc0ee0 100644
--- a/telepathy-glib/intset.c
+++ b/telepathy-glib/intset.c
@@ -66,25 +66,7 @@ G_STATIC_ASSERT (sizeof (gpointer) >= sizeof (gsize));
* Since: 0.11.3
*/
-GType
-tp_intset_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- /* The "TpIntSet" type has to be registered for backwards compatibility.
- * The canonical name of the type is now "TpIntset"; see fdo#30134. */
- g_boxed_type_register_static (g_intern_static_string ("TpIntSet"),
- (GBoxedCopyFunc) tp_intset_copy,
- (GBoxedFreeFunc) tp_intset_destroy);
- type = g_boxed_type_register_static (g_intern_static_string ("TpIntset"),
- (GBoxedCopyFunc) tp_intset_copy,
- (GBoxedFreeFunc) tp_intset_destroy);
- }
-
- return type;
-}
+G_DEFINE_BOXED_TYPE (TpIntset, tp_intset, tp_intset_copy, tp_intset_destroy)
/**
* TpIntFunc:
@@ -96,96 +78,9 @@ tp_intset_get_type (void)
/* (typedef, see header) */
/**
- * TpIntSetIter: (skip)
- *
- * Before 0.11.16, this was the name for <type>TpIntsetIter</type>, but
- * it's now just a backwards compatibility typedef.
- *
- * Deprecated: since 0.19.0. Use #TpIntsetFastIter instead
- */
-
-/**
- * TpIntsetIter:
- * @set: The set iterated over.
- * @element: Must be (guint)(-1) before iteration starts. Set to the next
- * element in the set by tp_intset_iter_next(); undefined after
- * tp_intset_iter_next() returns %FALSE.
- *
- * A structure representing iteration over a set of integers. Must be
- * initialized with either TP_INTSET_ITER_INIT() or tp_intset_iter_init().
- *
- * Since 0.11.6, consider using #TpIntsetFastIter if iteration in
- * numerical order is not required.
- *
- * Before 0.11.16, this type was called <type>TpIntSetIter</type>,
- * which is now a backwards compatibility typedef.
- *
- * Deprecated: since 0.19.0. Use #TpIntsetFastIter instead
- */
-/* (public, see header) */
-
-/**
- * TP_INTSET_ITER_INIT:
- * @set: A set of integers
- *
- * A suitable static initializer for a #TpIntsetIter, to be used as follows:
- *
- * <informalexample><programlisting>
- * void
- * do_something (const TpIntset *intset)
- * {
- * TpIntsetIter iter = TP_INTSET_ITER_INIT (intset);
- * /<!-- -->* ... do something with iter ... *<!-- -->/
- * }
- * </programlisting></informalexample>
- *
- * Deprecated: since 0.19.0. Use #TpIntsetFastIter instead
- */
-/* (macro, see header) */
-
-/**
- * tp_intset_iter_init:
- * @iter: An integer set iterator to be initialized.
- * @set: An integer set to be used by that iterator
- *
- * Reset the iterator @iter to the beginning and make it iterate over @set.
- *
- * Deprecated: since 0.19.0. Use #TpIntsetFastIter instead
- */
-void
-tp_intset_iter_init (
- TpIntsetIter *iter,
- const TpIntset *set)
-{
- g_return_if_fail (iter != NULL);
- iter->set = set;
- iter->element = (guint)(-1);
-}
-
-/**
- * tp_intset_iter_reset:
- * @iter: An integer set iterator to be reset.
- *
- * Reset the iterator @iter to the beginning. It must already be associated
- * with a set.
- *
- * Deprecated: since 0.19.0. Use #TpIntsetFastIter instead
- */
-void
-tp_intset_iter_reset (TpIntsetIter *iter)
-{
- g_return_if_fail (iter != NULL);
- g_return_if_fail (iter->set != NULL);
- iter->element = (guint)(-1);
-}
-
-/**
* TpIntset:
*
* Opaque type representing a set of unsigned integers.
- *
- * Before 0.11.16, this type was called <type>TpIntSet</type>, which is
- * now a backwards compatibility typedef.
*/
struct _TpIntset
@@ -836,73 +731,11 @@ tp_intset_dump (const TpIntset *set)
}
/**
- * tp_intset_iter_next:
- * @iter: An iterator originally initialized with TP_INTSET_INIT(set)
- *
- * If there are integers in (@iter->set) higher than (@iter->element), set
- * (iter->element) to the next one and return %TRUE. Otherwise return %FALSE.
- *
- * Usage:
- *
- * <informalexample><programlisting>
- * TpIntsetIter iter = TP_INTSET_INIT (intset);
- * while (tp_intset_iter_next (&amp;iter))
- * {
- * printf ("%u is in the intset\n", iter.element);
- * }
- * </programlisting></informalexample>
- *
- * Since 0.11.6, consider using #TpIntsetFastIter if iteration in
- * numerical order is not required.
- *
- * Returns: %TRUE if (@iter->element) has been advanced
- */
-gboolean
-tp_intset_iter_next (TpIntsetIter *iter)
-{
- g_return_val_if_fail (iter != NULL, FALSE);
- g_return_val_if_fail (iter->set != NULL, FALSE);
-
- do
- {
- if (iter->element == (guint)(-1))
- {
- /* only just started */
- iter->element = 0;
- }
- else
- {
- ++iter->element;
- }
-
- if (_tp_intset_is_member (iter->set, iter->element))
- {
- return TRUE;
- }
- }
- while (iter->element < iter->set->largest_ever &&
- iter->element != (guint)(-1));
- return FALSE;
-}
-
-/**
- * TpIntSetFastIter: (skip)
- *
- * Before 0.11.16, this was the name for <type>TpIntsetFastIter</type>,
- * but it's now just a backwards compatibility typedef.
- *
- * Deprecated: since 0.19.0. Use #TpIntsetFastIter instead
- */
-
-/**
* TpIntsetFastIter:
*
* An opaque structure representing iteration in undefined order over a set of
* integers. Must be initialized with tp_intset_fast_iter_init().
*
- * Before 0.11.16, this type was called <type>TpIntSetFastIter</type>,
- * which is now a backwards compatibility typedef.
- *
* Usage is similar to #GHashTableIter:
*
* <informalexample><programlisting>
diff --git a/telepathy-glib/intset.h b/telepathy-glib/intset.h
index e1ac2e824..4fcb77f12 100644
--- a/telepathy-glib/intset.h
+++ b/telepathy-glib/intset.h
@@ -34,18 +34,6 @@ GType tp_intset_get_type (void);
typedef struct _TpIntset TpIntset;
-#ifndef TP_DISABLE_DEPRECATED
-/* See fdo#30134 for the reasoning behind the rename of TpIntSet to TpIntset */
-
-/**
- * TpIntSet: (skip)
- *
- * Before 0.11.16, this was the name for <type>TpIntset</type>, but it's
- * now just a backwards compatibility typedef.
- */
-typedef TpIntset TpIntSet;
-#endif
-
typedef void (*TpIntFunc) (guint i, gpointer userdata);
TpIntset *tp_intset_new (void) G_GNUC_WARN_UNUSED_RESULT;
@@ -82,35 +70,11 @@ TpIntset *tp_intset_symmetric_difference (const TpIntset *left,
gchar *tp_intset_dump (const TpIntset *set) G_GNUC_WARN_UNUSED_RESULT;
-#ifndef TP_DISABLE_DEPRECATED
-typedef struct {
- const TpIntset *set;
- guint element;
-} TpIntsetIter;
-
-typedef TpIntsetIter TpIntSetIter;
-
-#define TP_INTSET_ITER_INIT(set) { (set), (guint)(-1) }
-
-_TP_DEPRECATED_IN_0_20_FOR (tp_intset_fast_iter_init)
-void tp_intset_iter_init (TpIntsetIter *iter, const TpIntset *set);
-
-_TP_DEPRECATED_IN_0_20_FOR (tp_intset_fast_iter_init)
-void tp_intset_iter_reset (TpIntsetIter *iter);
-
-_TP_DEPRECATED_IN_0_20_FOR (tp_intset_fast_iter_next)
-gboolean tp_intset_iter_next (TpIntsetIter *iter);
-#endif
-
typedef struct {
/*<private>*/
gpointer _dummy[16];
} TpIntsetFastIter;
-#ifndef TP_DISABLE_DEPRECATED
-typedef TpIntsetFastIter TpIntSetFastIter;
-#endif
-
void tp_intset_fast_iter_init (TpIntsetFastIter *iter,
const TpIntset *set);
diff --git a/telepathy-glib/media-interfaces.c b/telepathy-glib/media-interfaces.c
deleted file mode 100644
index 8f046baed..000000000
--- a/telepathy-glib/media-interfaces.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * media-interfaces.c - proxies for Telepathy media session/stream handlers
- *
- * Copyright (C) 2007 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright (C) 2007 Nokia Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include "config.h"
-
-#include "telepathy-glib/media-interfaces.h"
-
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/proxy-subclass.h>
-
-#include "telepathy-glib/_gen/tp-cli-media-session-handler-body.h"
-#include "telepathy-glib/_gen/tp-cli-media-stream-handler-body.h"
-
-/**
- * SECTION:media-interfaces
- * @title: TpMediaSessionHandler, TpMediaStreamHandler
- * @short_description: proxy objects for Telepathy media streaming
- * @see_also: #TpChannel, #TpProxy
- *
- * This module provides access to the auxiliary objects used to
- * implement #TpSvcChannelTypeStreamedMedia.
- *
- * Since: 0.7.1
- */
-
-/**
- * TpMediaStreamHandlerClass:
- *
- * The class of a #TpMediaStreamHandler.
- *
- * Since: 0.7.1
- */
-struct _TpMediaStreamHandlerClass {
- TpProxyClass parent_class;
- /*<private>*/
- gpointer priv;
-};
-
-/**
- * TpMediaStreamHandler:
- *
- * A proxy object for a Telepathy connection manager.
- *
- * Since: 0.7.1
- */
-struct _TpMediaStreamHandler {
- TpProxy parent;
- /*<private>*/
- TpMediaStreamHandlerPrivate *priv;
-};
-
-G_DEFINE_TYPE (TpMediaStreamHandler,
- tp_media_stream_handler,
- TP_TYPE_PROXY)
-
-static void
-tp_media_stream_handler_init (TpMediaStreamHandler *self)
-{
-}
-
-static void
-tp_media_stream_handler_class_init (TpMediaStreamHandlerClass *klass)
-{
- TpProxyClass *proxy_class = (TpProxyClass *) klass;
-
- proxy_class->must_have_unique_name = TRUE;
- proxy_class->interface = TP_IFACE_QUARK_MEDIA_STREAM_HANDLER;
- tp_media_stream_handler_init_known_interfaces ();
-}
-
-/**
- * tp_media_stream_handler_new:
- * @dbus: a D-Bus daemon; may not be %NULL
- * @unique_name: the unique name of the connection process; may not be %NULL
- * or a well-known name
- * @object_path: the object path of the media stream handler; may not be %NULL
- * @error: used to indicate the error if %NULL is returned
- *
- * <!-- -->
- *
- * Returns: a new media stream handler proxy, or %NULL on invalid arguments
- *
- * Since: 0.7.1
- */
-TpMediaStreamHandler *
-tp_media_stream_handler_new (TpDBusDaemon *dbus,
- const gchar *unique_name,
- const gchar *object_path,
- GError **error)
-{
- TpMediaStreamHandler *ret = NULL;
-
- if (!tp_dbus_check_valid_bus_name (unique_name,
- TP_DBUS_NAME_TYPE_UNIQUE, error))
- goto finally;
-
- if (!tp_dbus_check_valid_object_path (object_path, error))
- goto finally;
-
- ret = TP_MEDIA_STREAM_HANDLER (g_object_new (TP_TYPE_MEDIA_STREAM_HANDLER,
- "dbus-daemon", dbus,
- "bus-name", unique_name,
- "object-path", object_path,
- NULL));
-
-finally:
- return ret;
-}
-
-/**
- * TpMediaSessionHandlerClass:
- *
- * The class of a #TpMediaSessionHandler.
- *
- * Since: 0.7.1
- */
-struct _TpMediaSessionHandlerClass {
- TpProxyClass parent_class;
- /*<private>*/
- gpointer priv;
-};
-
-/**
- * TpMediaSessionHandler:
- *
- * A proxy object for a Telepathy connection manager.
- *
- * Since: 0.7.1
- */
-struct _TpMediaSessionHandler {
- TpProxy parent;
- /*<private>*/
- TpMediaSessionHandlerPrivate *priv;
-};
-
-G_DEFINE_TYPE (TpMediaSessionHandler,
- tp_media_session_handler,
- TP_TYPE_PROXY)
-
-static void
-tp_media_session_handler_init (TpMediaSessionHandler *self)
-{
-}
-
-static void
-tp_media_session_handler_class_init (TpMediaSessionHandlerClass *klass)
-{
- TpProxyClass *proxy_class = (TpProxyClass *) klass;
-
- proxy_class->must_have_unique_name = TRUE;
- proxy_class->interface = TP_IFACE_QUARK_MEDIA_SESSION_HANDLER;
- tp_media_session_handler_init_known_interfaces ();
-}
-
-/**
- * tp_media_session_handler_new:
- * @dbus: a D-Bus daemon; may not be %NULL
- * @unique_name: the unique name of the connection process; may not be %NULL
- * or a well-known name
- * @object_path: the object path of the media session handler; may not be %NULL
- * @error: used to indicate the error if %NULL is returned
- *
- * <!-- -->
- *
- * Returns: a new media session handler proxy, or %NULL on invalid arguments
- *
- * Since: 0.7.1
- */
-TpMediaSessionHandler *
-tp_media_session_handler_new (TpDBusDaemon *dbus,
- const gchar *unique_name,
- const gchar *object_path,
- GError **error)
-{
- TpMediaSessionHandler *ret = NULL;
-
- if (!tp_dbus_check_valid_bus_name (unique_name,
- TP_DBUS_NAME_TYPE_UNIQUE, error))
- goto finally;
-
- if (!tp_dbus_check_valid_object_path (object_path, error))
- goto finally;
-
- ret = TP_MEDIA_SESSION_HANDLER (g_object_new (TP_TYPE_MEDIA_SESSION_HANDLER,
- "dbus-daemon", dbus,
- "bus-name", unique_name,
- "object-path", object_path,
- NULL));
-
-finally:
- return ret;
-}
-
-/**
- * tp_media_stream_handler_init_known_interfaces:
- *
- * Ensure that the known interfaces for TpMediaStreamHandler have been set up.
- * This is done automatically when necessary, but for correct
- * overriding of library interfaces by local extensions, you should
- * call this function before calling
- * tp_proxy_or_subclass_hook_on_interface_add() with first argument
- * %TP_TYPE_MEDIA_STREAM_HANDLER.
- *
- * Since: 0.7.32
- */
-void
-tp_media_stream_handler_init_known_interfaces (void)
-{
- static gsize once = 0;
-
- if (g_once_init_enter (&once))
- {
- GType tp_type = TP_TYPE_MEDIA_STREAM_HANDLER;
-
- tp_proxy_init_known_interfaces ();
- tp_proxy_or_subclass_hook_on_interface_add (tp_type,
- tp_cli_media_stream_handler_add_signals);
- tp_proxy_subclass_add_error_mapping (tp_type,
- TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
-
- g_once_init_leave (&once, 1);
- }
-}
-
-/**
- * tp_media_session_handler_init_known_interfaces:
- *
- * Ensure that the known interfaces for TpMediaSessionHandler have been set up.
- * This is done automatically when necessary, but for correct
- * overriding of library interfaces by local extensions, you should
- * call this function before calling
- * tp_proxy_or_subclass_hook_on_interface_add() with first argument
- * %TP_TYPE_MEDIA_SESSION_HANDLER.
- *
- * Since: 0.7.32
- */
-void
-tp_media_session_handler_init_known_interfaces (void)
-{
- static gsize once = 0;
-
- if (g_once_init_enter (&once))
- {
- GType tp_type = TP_TYPE_MEDIA_SESSION_HANDLER;
-
- tp_proxy_init_known_interfaces ();
- tp_proxy_or_subclass_hook_on_interface_add (tp_type,
- tp_cli_media_session_handler_add_signals);
- tp_proxy_subclass_add_error_mapping (tp_type,
- TP_ERROR_PREFIX, TP_ERROR, TP_TYPE_ERROR);
-
- g_once_init_leave (&once, 1);
- }
-}
diff --git a/telepathy-glib/media-interfaces.h b/telepathy-glib/media-interfaces.h
deleted file mode 100644
index 6dc601505..000000000
--- a/telepathy-glib/media-interfaces.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * media-interfaces.h - proxies for Telepathy media session/stream handlers
- *
- * Copyright (C) 2007 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright (C) 2007 Nokia Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __TP_MEDIA_INTERFACES_H__
-#define __TP_MEDIA_INTERFACES_H__
-
-#include <telepathy-glib/defs.h>
-#include <telepathy-glib/proxy.h>
-
-G_BEGIN_DECLS
-
-typedef struct _TpMediaStreamHandler TpMediaStreamHandler;
-typedef struct _TpMediaStreamHandlerPrivate TpMediaStreamHandlerPrivate;
-typedef struct _TpMediaStreamHandlerClass TpMediaStreamHandlerClass;
-
-GType tp_media_stream_handler_get_type (void);
-
-typedef struct _TpMediaSessionHandler TpMediaSessionHandler;
-typedef struct _TpMediaSessionHandlerPrivate TpMediaSessionHandlerPrivate;
-typedef struct _TpMediaSessionHandlerClass TpMediaSessionHandlerClass;
-
-GType tp_media_session_handler_get_type (void);
-
-/* TYPE MACROS */
-#define TP_TYPE_MEDIA_STREAM_HANDLER \
- (tp_media_stream_handler_get_type ())
-#define TP_MEDIA_STREAM_HANDLER(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TP_TYPE_MEDIA_STREAM_HANDLER, \
- TpMediaStreamHandler))
-#define TP_MEDIA_STREAM_HANDLER_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TP_TYPE_MEDIA_STREAM_HANDLER, \
- TpMediaStreamHandlerClass))
-#define TP_IS_MEDIA_STREAM_HANDLER(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj), TP_TYPE_MEDIA_STREAM_HANDLER))
-#define TP_IS_MEDIA_STREAM_HANDLER_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE((klass), TP_TYPE_MEDIA_STREAM_HANDLER))
-#define TP_MEDIA_STREAM_HANDLER_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_MEDIA_STREAM_HANDLER, \
- TpMediaStreamHandlerClass))
-
-#define TP_TYPE_MEDIA_SESSION_HANDLER \
- (tp_media_session_handler_get_type ())
-#define TP_MEDIA_SESSION_HANDLER(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TP_TYPE_MEDIA_SESSION_HANDLER, \
- TpMediaSessionHandler))
-#define TP_MEDIA_SESSION_HANDLER_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TP_TYPE_MEDIA_SESSION_HANDLER, \
- TpMediaSessionHandlerClass))
-#define TP_IS_MEDIA_SESSION_HANDLER(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj), TP_TYPE_MEDIA_SESSION_HANDLER))
-#define TP_IS_MEDIA_SESSION_HANDLER_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE((klass), TP_TYPE_MEDIA_SESSION_HANDLER))
-#define TP_MEDIA_SESSION_HANDLER_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_MEDIA_SESSION_HANDLER, \
- TpMediaSessionHandlerClass))
-
-TpMediaSessionHandler *tp_media_session_handler_new (TpDBusDaemon *dbus,
- const gchar *unique_name, const gchar *object_path, GError **error)
- G_GNUC_WARN_UNUSED_RESULT;
-
-TpMediaStreamHandler *tp_media_stream_handler_new (TpDBusDaemon *dbus,
- const gchar *unique_name, const gchar *object_path, GError **error)
- G_GNUC_WARN_UNUSED_RESULT;
-
-void tp_media_session_handler_init_known_interfaces (void);
-void tp_media_stream_handler_init_known_interfaces (void);
-
-G_END_DECLS
-
-#include <telepathy-glib/_gen/tp-cli-media-session-handler.h>
-#include <telepathy-glib/_gen/tp-cli-media-stream-handler.h>
-
-#endif
diff --git a/telepathy-glib/media-session-handler.xml b/telepathy-glib/media-session-handler.xml
deleted file mode 100644
index 8b051cd26..000000000
--- a/telepathy-glib/media-session-handler.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<tp:spec
- xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-
-<tp:title>Media session handler</tp:title>
-
-<xi:include href="../spec/Media_Session_Handler.xml"/>
-
-</tp:spec>
diff --git a/telepathy-glib/media-stream-handler.xml b/telepathy-glib/media-stream-handler.xml
deleted file mode 100644
index 348d5a686..000000000
--- a/telepathy-glib/media-stream-handler.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<tp:spec
- xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
- xmlns:xi="http://www.w3.org/2001/XInclude">
-
-<tp:title>Media stream handler</tp:title>
-
-<xi:include href="../spec/Media_Stream_Handler.xml"/>
-
-</tp:spec>
diff --git a/telepathy-glib/message-mixin.c b/telepathy-glib/message-mixin.c
index ac4683b37..64ada9169 100644
--- a/telepathy-glib/message-mixin.c
+++ b/telepathy-glib/message-mixin.c
@@ -21,14 +21,13 @@
/**
* SECTION:message-mixin
* @title: TpMessageMixin
- * @short_description: a mixin implementation of the text channel type and the
- * Messages interface
- * @see_also: #TpSvcChannelTypeText, #TpSvcChannelInterfaceMessages,
+ * @short_description: a mixin implementation of the text channel type
+ * @see_also: #TpSvcChannelTypeText
* <link linkend="telepathy-glib-dbus-properties-mixin">TpDBusPropertiesMixin</link>
*
* This mixin can be added to a channel GObject class to implement the
- * text channel type (with the Messages interface) in a general way.
- * The channel class should also have a #TpDBusPropertiesMixinClass.
+ * text channel type in a general way. The channel class should also
+ * have a #TpDBusPropertiesMixinClass.
*
* To use the messages mixin, include a #TpMessageMixin somewhere in your
* instance structure, and call tp_message_mixin_init() from your
@@ -40,9 +39,7 @@
*
* <informalexample><programlisting>
* G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TEXT,
- * tp_message_mixin_text_iface_init);
- * G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_MESSAGES,
- * tp_message_mixin_messages_iface_init);
+ * tp_message_mixin_iface_init);
* </programlisting></informalexample>
*
* To support sending messages, you must call
@@ -78,6 +75,7 @@
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/message-internal.h>
+#include <telepathy-glib/svc-channel.h>
#define DEBUG_FLAG TP_DEBUG_IM
@@ -132,7 +130,6 @@ static const char * const forbidden_keys[] = {
static const char * const body_only[] = {
"alternative",
"content-type",
- "type", /* deprecated in 0.17.14 */
"content",
"identifier",
"needs-retrieval",
@@ -212,46 +209,6 @@ pending_item_id_equals_data (gconstpointer item,
return (self->incoming_id != id);
}
-static gchar *
-parts_to_text (TpMessage *msg,
- TpChannelTextMessageFlags *out_flags,
- TpChannelTextMessageType *out_type,
- TpHandle *out_sender,
- guint *out_timestamp)
-{
- GHashTable *header = g_ptr_array_index (msg->parts, 0);
-
- if (out_type != NULL)
- {
- /* The fallback behaviour of tp_asv_get_uint32 is OK here, because
- * message type NORMAL is zero */
- *out_type = tp_asv_get_uint32 (header, "message-type", NULL);
- }
-
- if (out_sender != NULL)
- {
- /* The fallback behaviour of tp_asv_get_uint32 is OK here - if there's
- * no good sender, then 0 is the least bad */
- *out_sender = tp_asv_get_uint32 (header, "message-sender", NULL);
- }
-
- if (out_timestamp != NULL)
- {
- /* The fallback behaviour of tp_asv_get_uint32 is OK here - we assume
- * that we won't legitimately receive messages from 1970-01-01 :-) */
- *out_timestamp = tp_asv_get_uint32 (header, "message-sent", NULL);
-
- if (*out_timestamp == 0)
- *out_timestamp = tp_asv_get_uint32 (header, "message-received", NULL);
-
- if (*out_timestamp == 0)
- *out_timestamp = time (NULL);
- }
-
- return tp_message_to_text (msg, out_flags);
-}
-
-
/**
* TpMessageMixinSendImpl:
* @object: An instance of the implementation that uses this mixin
@@ -556,7 +513,7 @@ tp_message_mixin_clear (GObject *obj)
while ((item = g_queue_pop_head (mixin->priv->pending)) != NULL)
{
- tp_message_destroy (item);
+ g_object_unref (item);
}
}
@@ -636,7 +593,7 @@ tp_message_mixin_acknowledge_pending_messages_async (
g_ptr_array_add (links, link_);
}
- tp_svc_channel_interface_messages_emit_pending_messages_removed (iface,
+ tp_svc_channel_type_text_emit_pending_messages_removed (iface,
ids);
for (i = 0; i < links->len; i++)
@@ -648,7 +605,7 @@ tp_message_mixin_acknowledge_pending_messages_async (
DEBUG ("acknowledging message id %u", cm_msg->incoming_id);
g_queue_delete_link (mixin->priv->pending, link_);
- tp_message_destroy (item);
+ g_object_unref (item);
}
g_ptr_array_unref (links);
@@ -657,254 +614,14 @@ tp_message_mixin_acknowledge_pending_messages_async (
}
static void
-tp_message_mixin_list_pending_messages_async (TpSvcChannelTypeText *iface,
- gboolean clear,
- DBusGMethodInvocation *context)
-{
- TpMessageMixin *mixin = TP_MESSAGE_MIXIN (iface);
- GType pending_type = TP_STRUCT_TYPE_PENDING_TEXT_MESSAGE;
- guint count;
- GPtrArray *messages;
- GList *cur;
- guint i;
-
- count = g_queue_get_length (mixin->priv->pending);
- messages = g_ptr_array_sized_new (count);
-
- for (cur = g_queue_peek_head_link (mixin->priv->pending);
- cur != NULL;
- cur = cur->next)
- {
- TpMessage *msg = cur->data;
- TpCMMessage *cm_msg = cur->data;
- GValue val = { 0, };
- gchar *text;
- TpChannelTextMessageFlags flags;
- TpChannelTextMessageType type;
- TpHandle sender;
- guint timestamp;
-
- text = parts_to_text (msg, &flags, &type, &sender, &timestamp);
-
- g_value_init (&val, pending_type);
- g_value_take_boxed (&val,
- dbus_g_type_specialized_construct (pending_type));
- dbus_g_type_struct_set (&val,
- 0, cm_msg->incoming_id,
- 1, timestamp,
- 2, sender,
- 3, type,
- 4, flags,
- 5, text,
- G_MAXUINT);
-
- g_free (text);
-
- g_ptr_array_add (messages, g_value_get_boxed (&val));
- }
-
- if (clear)
- {
- GArray *ids;
-
- DEBUG ("WARNING: ListPendingMessages(clear=TRUE) is deprecated");
- cur = g_queue_peek_head_link (mixin->priv->pending);
-
- ids = g_array_sized_new (FALSE, FALSE, sizeof (guint), count);
-
- while (cur != NULL)
- {
- TpMessage *msg = cur->data;
- TpCMMessage *cm_msg = cur->data;
- GList *next = cur->next;
-
- i = cm_msg->incoming_id;
- g_array_append_val (ids, i);
- g_queue_delete_link (mixin->priv->pending, cur);
- tp_message_destroy (msg);
-
- cur = next;
- }
-
- tp_svc_channel_interface_messages_emit_pending_messages_removed (iface,
- ids);
- g_array_unref (ids);
- }
-
- tp_svc_channel_type_text_return_from_list_pending_messages (context,
- messages);
-
- for (i = 0; i < messages->len; i++)
- g_value_array_free (g_ptr_array_index (messages, i));
-
- g_ptr_array_unref (messages);
-}
-
-static void
-tp_message_mixin_get_pending_message_content_async (
- TpSvcChannelInterfaceMessages *iface,
- guint message_id,
- const GArray *part_numbers,
- DBusGMethodInvocation *context)
-{
- TpMessageMixin *mixin = TP_MESSAGE_MIXIN (iface);
- GList *node;
- TpMessage *item;
- GHashTable *ret;
- guint i;
-
- node = g_queue_find_custom (mixin->priv->pending,
- GUINT_TO_POINTER (message_id), pending_item_id_equals_data);
-
- if (node == NULL)
- {
- GError *error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
- "invalid message id %u", message_id);
-
- DEBUG ("%s", error->message);
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- item = node->data;
-
- for (i = 0; i < part_numbers->len; i++)
- {
- guint part = g_array_index (part_numbers, guint, i);
-
- if (part == 0 || part >= item->parts->len)
- {
- GError *error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
- "part number %u out of range", part);
-
- DEBUG ("%s", error->message);
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
- }
-
- /* no free callbacks set - we borrow the content from the message */
- ret = g_hash_table_new (g_direct_hash, g_direct_equal);
-
- /* FIXME: later, need a way to support streaming content */
-
- for (i = 0; i < part_numbers->len; i++)
- {
- guint part = g_array_index (part_numbers, guint, i);
- GHashTable *part_data;
- GValue *value;
-
- g_assert (part != 0 && part < item->parts->len);
- part_data = g_ptr_array_index (item->parts, part);
-
- /* skip parts with no type (reserved) */
- if (tp_asv_get_string (part_data, "content-type") == NULL &&
- /* Renamed to "content-type" in spec 0.17.14 */
- tp_asv_get_string (part_data, "type") == NULL)
- continue;
-
- value = g_hash_table_lookup (part_data, "content");
-
- /* skip parts with no content */
- if (value == NULL)
- continue;
-
- g_hash_table_insert (ret, GUINT_TO_POINTER (part), value);
- }
-
- tp_svc_channel_interface_messages_return_from_get_pending_message_content (
- context, ret);
-
- g_hash_table_unref (ret);
-}
-
-static void
-tp_message_mixin_get_message_types_async (TpSvcChannelTypeText *iface,
- DBusGMethodInvocation *context)
-{
- TpMessageMixin *mixin = TP_MESSAGE_MIXIN (iface);
-
- tp_svc_channel_type_text_return_from_get_message_types (context,
- mixin->priv->msg_types);
-}
-
-
-static void
queue_pending (GObject *object, TpMessage *pending)
{
TpMessageMixin *mixin = TP_MESSAGE_MIXIN (object);
- TpChannelTextMessageFlags flags;
- TpChannelTextMessageType type;
- TpHandle sender;
- guint timestamp;
- gchar *text;
- const GHashTable *header;
- TpDeliveryStatus delivery_status;
- TpCMMessage *cm_message = (TpCMMessage *) pending;
g_queue_push_tail (mixin->priv->pending, pending);
- text = parts_to_text (pending, &flags, &type, &sender, &timestamp);
- tp_svc_channel_type_text_emit_received (object, cm_message->incoming_id,
- timestamp, sender, type, flags, text);
- g_free (text);
-
- tp_svc_channel_interface_messages_emit_message_received (object,
+ tp_svc_channel_type_text_emit_message_received (object,
pending->parts);
-
-
- /* Check if it's a failed delivery report; if so, emit SendError too. */
- header = tp_message_peek (pending, 0);
- delivery_status = tp_asv_get_uint32 (header, "delivery-status", NULL);
-
- if (delivery_status == TP_DELIVERY_STATUS_TEMPORARILY_FAILED ||
- delivery_status == TP_DELIVERY_STATUS_PERMANENTLY_FAILED)
- {
- /* Fallback behaviour here is okay: 0 is Send_Error_Unknown */
- TpChannelTextSendError send_error = tp_asv_get_uint32 (header,
- "delivery-error", NULL);
- GPtrArray *echo = tp_asv_get_boxed (header, "delivery-echo",
- TP_ARRAY_TYPE_MESSAGE_PART_LIST);
-
- type = TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL;
-
- text = NULL;
- timestamp = 0;
-
- if (echo != NULL && echo->len < 1)
- {
- WARNING ("delivery-echo should contain at least 1 part");
- }
- else if (echo != NULL)
- {
- const GHashTable *echo_header = g_ptr_array_index (echo, 0);
- TpMessage *echo_msg;
-
- echo_msg = _tp_cm_message_new_from_parts (mixin->priv->connection,
- echo);
-
- /* The specification says that the timestamp in SendError should be the
- * time at which the original message was sent. parts_to_text falls
- * back to setting timestamp to time (NULL) if it can't find out when
- * the message was sent, but we want to use 0 in that case. Hence,
- * we look up timestamp here rather than delegating to parts_to_text.
- * The fallback behaviour of tp_asv_get_uint32 is correct: we want
- * timestamp to be 0 if we can't determine when the original message
- * was sent.
- */
- text = parts_to_text (echo_msg, NULL, &type, NULL, NULL);
- timestamp = tp_asv_get_uint32 (echo_header, "message-sent", NULL);
-
- g_object_unref (echo_msg);
- }
-
- tp_svc_channel_type_text_emit_send_error (object, send_error, timestamp,
- type, text != NULL ? text : "");
-
- g_free (text);
- }
}
@@ -1049,8 +766,7 @@ struct _TpMessageMixinOutgoingMessagePrivate {
/**
* tp_message_mixin_sent:
- * @object: An object implementing the Text and Messages interfaces with this
- * mixin
+ * @object: An object implementing the Text interface with this mixin
* @message: The outgoing message
* @flags: The flags used when sending the message, which may be a subset of
* those passed to the #TpMessageMixinSendImpl implementation if not all are
@@ -1079,7 +795,6 @@ tp_message_mixin_sent (GObject *object,
{
TpMessageMixin *mixin = TP_MESSAGE_MIXIN (object);
TpCMMessage *cm_msg = (TpCMMessage *) message;
- time_t now = time (NULL);
g_return_if_fail (mixin != NULL);
g_return_if_fail (G_IS_OBJECT (object));
@@ -1098,8 +813,6 @@ tp_message_mixin_sent (GObject *object,
}
else
{
- TpChannelTextMessageType message_type;
- gchar *string;
GHashTable *header = g_ptr_array_index (message->parts, 0);
mixin->priv->send_gone = TRUE;
@@ -1111,67 +824,21 @@ tp_message_mixin_sent (GObject *object,
/* emit Sent and MessageSent */
- tp_svc_channel_interface_messages_emit_message_sent (object,
+ tp_svc_channel_type_text_emit_message_sent (object,
message->parts, flags, token);
- string = parts_to_text (message, NULL, &message_type, NULL, NULL);
- tp_svc_channel_type_text_emit_sent (object, now, message_type,
- string);
- g_free (string);
/* return successfully */
- if (cm_msg->outgoing_text_api)
- {
- tp_svc_channel_type_text_return_from_send (
- cm_msg->outgoing_context);
- }
- else
- {
- tp_svc_channel_interface_messages_return_from_send_message (
- cm_msg->outgoing_context, token);
- }
+ tp_svc_channel_type_text_return_from_send_message (
+ cm_msg->outgoing_context, token);
}
cm_msg->outgoing_context = NULL;
- tp_message_destroy (message);
+ g_object_unref (message);
}
-
static void
-tp_message_mixin_send_async (TpSvcChannelTypeText *iface,
- guint message_type,
- const gchar *text,
- DBusGMethodInvocation *context)
-{
- TpMessageMixin *mixin = TP_MESSAGE_MIXIN (iface);
- TpMessage *message;
- TpCMMessage *cm_msg;
-
- if (mixin->priv->send_message == NULL)
- {
- tp_dbus_g_method_return_not_implemented (context);
- return;
- }
-
- message = tp_cm_message_new (mixin->priv->connection, 2);
- cm_msg = (TpCMMessage *) message;
-
- if (message_type != 0)
- tp_message_set_uint32 (message, 0, "message-type", message_type);
-
- tp_message_set_string (message, 1, "content-type", "text/plain");
- tp_message_set_string (message, 1, "type", "text/plain"); /* Removed in 0.17.14 */
- tp_message_set_string (message, 1, "content", text);
-
- cm_msg->outgoing_context = context;
- cm_msg->outgoing_text_api = TRUE;
-
- mixin->priv->send_message ((GObject *) iface, message, 0);
-}
-
-
-static void
-tp_message_mixin_send_message_async (TpSvcChannelInterfaceMessages *iface,
+tp_message_mixin_send_message_async (TpSvcChannelTypeText *iface,
const GPtrArray *parts,
guint flags,
DBusGMethodInvocation *context)
@@ -1272,7 +939,6 @@ tp_message_mixin_send_message_async (TpSvcChannelInterfaceMessages *iface,
}
cm_msg->outgoing_context = context;
- cm_msg->outgoing_text_api = FALSE;
mixin->priv->send_message ((GObject *) iface, message, flags);
}
@@ -1283,7 +949,7 @@ tp_message_mixin_send_message_async (TpSvcChannelInterfaceMessages *iface,
* @cls: The class of an object with this mixin
*
* Set up a #TpDBusPropertiesMixinClass to use this mixin's implementation
- * of the Messages interface's properties.
+ * of the text channel interface's properties.
*
* This uses tp_message_mixin_get_dbus_property() as the property getter
* and sets a list of the supported properties for it.
@@ -1306,11 +972,9 @@ tp_message_mixin_init_dbus_properties (GObjectClass *cls)
GType type = G_OBJECT_CLASS_TYPE (cls);
g_return_if_fail (g_type_is_a (type, TP_TYPE_SVC_CHANNEL_TYPE_TEXT));
- g_return_if_fail (g_type_is_a (type,
- TP_TYPE_SVC_CHANNEL_INTERFACE_MESSAGES));
tp_dbus_properties_mixin_implement_interface (cls,
- TP_IFACE_QUARK_CHANNEL_INTERFACE_MESSAGES,
+ TP_IFACE_QUARK_CHANNEL_TYPE_TEXT,
tp_message_mixin_get_dbus_property, NULL, props);
if (g_type_is_a (type, TP_TYPE_SVC_CHANNEL_INTERFACE_CHAT_STATE))
@@ -1325,16 +989,16 @@ tp_message_mixin_init_dbus_properties (GObjectClass *cls)
/**
* tp_message_mixin_get_dbus_property:
* @object: An object with this mixin
- * @interface: Must be %TP_IFACE_QUARK_CHANNEL_INTERFACE_MESSAGES
+ * @interface: Must be %TP_IFACE_QUARK_CHANNEL_TYPE_TEXT
* @name: A quark representing the D-Bus property name, either
* "PendingMessages", "SupportedContentTypes" or "MessagePartSupportFlags"
* @value: A GValue pre-initialized to the right type, into which to put
* the value
* @unused: Ignored
*
- * An implementation of #TpDBusPropertiesMixinGetter which assumes that
- * the @object has the messages mixin. It can only be used for the Messages
- * interface.
+ * An implementation of #TpDBusPropertiesMixinGetter which assumes
+ * that the @object has the messages mixin. It can only be used for
+ * the Text channel type interface.
*/
void
tp_message_mixin_get_dbus_property (GObject *object,
@@ -1368,7 +1032,7 @@ tp_message_mixin_get_dbus_property (GObject *object,
mixin = TP_MESSAGE_MIXIN (object);
- g_return_if_fail (interface == TP_IFACE_QUARK_CHANNEL_INTERFACE_MESSAGES ||
+ g_return_if_fail (interface == TP_IFACE_QUARK_CHANNEL_TYPE_TEXT ||
interface == TP_IFACE_QUARK_CHANNEL_INTERFACE_CHAT_STATE);
g_return_if_fail (object != NULL);
g_return_if_fail (name != 0);
@@ -1418,7 +1082,7 @@ tp_message_mixin_get_dbus_property (GObject *object,
/**
- * tp_message_mixin_text_iface_init:
+ * tp_message_mixin_iface_init:
* @g_iface: A pointer to the #TpSvcChannelTypeTextClass in an object class
* @iface_data: Ignored
*
@@ -1428,41 +1092,15 @@ tp_message_mixin_get_dbus_property (GObject *object,
* Since: 0.7.21
*/
void
-tp_message_mixin_text_iface_init (gpointer g_iface,
- gpointer iface_data)
+tp_message_mixin_iface_init (gpointer g_iface,
+ gpointer iface_data)
{
TpSvcChannelTypeTextClass *klass = g_iface;
#define IMPLEMENT(x) tp_svc_channel_type_text_implement_##x (klass,\
tp_message_mixin_##x##_async)
IMPLEMENT (acknowledge_pending_messages);
- IMPLEMENT (get_message_types);
- IMPLEMENT (list_pending_messages);
- IMPLEMENT (send);
-#undef IMPLEMENT
-}
-
-/**
- * tp_message_mixin_messages_iface_init:
- * @g_iface: A pointer to the #TpSvcChannelInterfaceMessagesClass in an object
- * class
- * @iface_data: Ignored
- *
- * Fill in this mixin's Messages method implementations in the given interface
- * vtable.
- *
- * Since: 0.7.21
- */
-void
-tp_message_mixin_messages_iface_init (gpointer g_iface,
- gpointer iface_data)
-{
- TpSvcChannelInterfaceMessagesClass *klass = g_iface;
-
-#define IMPLEMENT(x) tp_svc_channel_interface_messages_implement_##x (\
- klass, tp_message_mixin_##x##_async)
IMPLEMENT (send_message);
- IMPLEMENT (get_pending_message_content);
#undef IMPLEMENT
}
diff --git a/telepathy-glib/message-mixin.h b/telepathy-glib/message-mixin.h
index 2293733d7..4696f4feb 100644
--- a/telepathy-glib/message-mixin.h
+++ b/telepathy-glib/message-mixin.h
@@ -25,7 +25,6 @@
#include <telepathy-glib/cm-message.h>
#include <telepathy-glib/handle-repo.h>
#include <telepathy-glib/message.h>
-#include <telepathy-glib/svc-channel.h>
#include <telepathy-glib/util.h>
G_BEGIN_DECLS
@@ -87,9 +86,7 @@ _TP_AVAILABLE_IN_0_20
void tp_message_mixin_maybe_send_gone (GObject *object);
/* Initialization */
-void tp_message_mixin_text_iface_init (gpointer g_iface, gpointer iface_data);
-void tp_message_mixin_messages_iface_init (gpointer g_iface,
- gpointer iface_data);
+void tp_message_mixin_iface_init (gpointer g_iface, gpointer iface_data);
void tp_message_mixin_chat_state_iface_init (gpointer g_iface,
gpointer iface_data);
diff --git a/telepathy-glib/message.c b/telepathy-glib/message.c
index 2cc79a6b9..01fae42a0 100644
--- a/telepathy-glib/message.c
+++ b/telepathy-glib/message.c
@@ -117,47 +117,6 @@ tp_message_init (TpMessage *self)
tp_message_append_part (self);
}
-
-/**
- * tp_message_new:
- * @connection: a connection on which to reference handles
- * @initial_parts: number of parts to create (at least 1)
- * @size_hint: preallocate space for this many parts (at least @initial_parts)
- *
- * <!-- nothing more to say -->
- *
- * Returns: a newly allocated message suitable to be passed to
- * tp_message_mixin_take_received()
- *
- * Since: 0.7.21
- * Deprecated: since 0.13.9. Use tp_cm_message_new()
- */
-TpMessage *
-tp_message_new (TpBaseConnection *connection,
- guint initial_parts,
- guint size_hint)
-{
- g_return_val_if_fail (size_hint >= initial_parts, NULL);
-
- return tp_cm_message_new (connection, initial_parts);
-}
-
-
-/**
- * tp_message_destroy:
- * @self: a message
- *
- * Since 0.13.9 this function is a simple wrapper around
- * g_object_unref()
- *
- * Since: 0.7.21
- */
-void
-tp_message_destroy (TpMessage *self)
-{
- g_object_unref (self);
-}
-
/**
* tp_message_count_parts:
* @self: a message
@@ -242,32 +201,6 @@ tp_message_delete_part (TpMessage *self,
}
/**
- * tp_message_ref_handle:
- * @self: a message
- * @handle_type: a handle type, greater than %TP_HANDLE_TYPE_NONE and less than
- * %TP_NUM_HANDLE_TYPES
- * @handle: a handle of the given type
- *
- * Reference the given handle until this message is destroyed.
- *
- * Since: 0.7.21
- * Deprecated: since 0.13.9. Handles are now immortal so there is
- * no point to ref them. Furthermore, the only handle that should be stored
- * in a TpMessage is message-sender which should be set using
- * tp_cm_message_set_sender().
- */
-void
-tp_message_ref_handle (TpMessage *self,
- TpHandleType handle_type,
- TpHandle handle)
-{
- g_return_if_fail (TP_IS_CM_MESSAGE (self));
- g_return_if_fail (self->priv->mutable);
-
- /* Handles are now immortal so we don't have to anything */
-}
-
-/**
* tp_message_delete_key:
* @self: a message
* @part: a part number, which must be strictly less than the number
@@ -291,42 +224,6 @@ tp_message_delete_key (TpMessage *self,
return g_hash_table_remove (g_ptr_array_index (self->parts, part), key);
}
-
-/**
- * tp_message_set_handle:
- * @self: a #TpCMMessage
- * @part: a part number, which must be strictly less than the number
- * returned by tp_message_count_parts()
- * @key: a key in the mapping representing the part
- * @handle_type: a handle type
- * @handle_or_0: a handle of that type, or 0
- *
- * If @handle_or_0 is not zero, reference it with tp_message_ref_handle().
- *
- * Set @key in part @part of @self to have @handle_or_0 as an unsigned integer
- * value.
- *
- * Since 0.13.9 this function has been deprecated in favor or
- * tp_cm_message_set_sender() as 'message-sender' is the only handle
- * you can put in a #TpCMMessage.
- *
- * Since: 0.7.21
- * Deprecated: since 0.13.9. Use tp_cm_message_set_sender()
- */
-void
-tp_message_set_handle (TpMessage *self,
- guint part,
- const gchar *key,
- TpHandleType handle_type,
- TpHandle handle_or_0)
-{
- g_return_if_fail (TP_IS_CM_MESSAGE (self));
- g_return_if_fail (self->priv->mutable);
-
- tp_message_set_uint32 (self, part, key, handle_or_0);
-}
-
-
/**
* tp_message_set_boolean:
* @self: a message
@@ -594,9 +491,6 @@ tp_message_set_bytes (TpMessage *self,
*
* Set @key in part @part of @self to have a copy of @source as its value.
*
- * If @source represents a data structure containing handles, they should
- * all be referenced with tp_message_ref_handle() first.
- *
* Since: 0.7.21
*/
void
@@ -614,34 +508,6 @@ tp_message_set (TpMessage *self,
g_strdup (key), tp_g_value_slice_dup (source));
}
-/**
- * tp_message_take_message:
- * @self: a #TpCMMessage
- * @part: a part number, which must be strictly less than the number
- * returned by tp_message_count_parts()
- * @key: a key in the mapping representing the part
- * @message: another (distinct) message created for the same #TpBaseConnection
- *
- * Set @key in part @part of @self to have @message as an aa{sv} value (that
- * is, an array of Message_Part), and take ownership of @message. The caller
- * should not use @message after passing it to this function. All handle
- * references owned by @message will subsequently belong to and be released
- * with @self.
- *
- * Since: 0.7.21
- * Deprecated: since 0.13.9. Use tp_cm_message_take_message()
- */
-void
-tp_message_take_message (TpMessage *self,
- guint part,
- const gchar *key,
- TpMessage *message)
-{
- g_return_if_fail (TP_IS_CM_MESSAGE (self));
-
- tp_cm_message_take_message (self, part, key, message);
-}
-
static void
subtract_from_hash (gpointer key,
gpointer value,
@@ -654,7 +520,6 @@ subtract_from_hash (gpointer key,
/**
* tp_message_to_text:
* @message: a #TpMessage
- * @out_flags: (out) : if not %NULL, the #TpChannelTextMessageFlags of @message
*
* Concatene all the text parts contained in @message.
*
@@ -664,11 +529,9 @@ subtract_from_hash (gpointer key,
* Since: 0.13.9
*/
gchar *
-tp_message_to_text (TpMessage *message,
- TpChannelTextMessageFlags *out_flags)
+tp_message_to_text (TpMessage *message)
{
guint i;
- GHashTable *header = g_ptr_array_index (message->parts, 0);
/* Lazily created hash tables, used as a sets: keys are borrowed
* "alternative" string values from @parts, value == key. */
/* Alternative IDs for which we have already extracted an alternative */
@@ -679,21 +542,6 @@ tp_message_to_text (TpMessage *message,
* Channel_Text_Message_Flag_Non_Text_Content must be set. */
GHashTable *alternatives_needed = NULL;
GString *buffer = g_string_new ("");
- TpChannelTextMessageFlags flags = 0;
-
- if (tp_asv_get_boolean (header, "scrollback", NULL))
- flags |= TP_CHANNEL_TEXT_MESSAGE_FLAG_SCROLLBACK;
-
- if (tp_asv_get_boolean (header, "rescued", NULL))
- flags |= TP_CHANNEL_TEXT_MESSAGE_FLAG_RESCUED;
-
- /* If the message is on an extended interface or only contains headers,
- * definitely set the "your client is too old" flag. */
- if (message->parts->len <= 1 ||
- g_hash_table_lookup (header, "interface") != NULL)
- {
- flags |= TP_CHANNEL_TEXT_MESSAGE_FLAG_NON_TEXT_CONTENT;
- }
for (i = 1; i < message->parts->len; i++)
{
@@ -741,26 +589,16 @@ tp_message_to_text (TpMessage *message,
{
DEBUG ("... using its text");
g_string_append (buffer, g_value_get_string (value));
-
- value = g_hash_table_lookup (part, "truncated");
-
- if (value != NULL && (!G_VALUE_HOLDS_BOOLEAN (value) ||
- g_value_get_boolean (value)))
- {
- DEBUG ("... appears to have been truncated");
- flags |= TP_CHANNEL_TEXT_MESSAGE_FLAG_TRUNCATED;
- }
}
else
{
/* There was a text/plain part we couldn't parse:
* that counts as "non-text content" I think */
- DEBUG ("... didn't understand it, setting NON_TEXT_CONTENT");
- flags |= TP_CHANNEL_TEXT_MESSAGE_FLAG_NON_TEXT_CONTENT;
+ DEBUG ("... didn't understand it");
tp_clear_pointer (&alternatives_needed, g_hash_table_unref);
}
}
- else if ((flags & TP_CHANNEL_TEXT_MESSAGE_FLAG_NON_TEXT_CONTENT) == 0)
+ else
{
DEBUG ("... wondering whether this is NON_TEXT_CONTENT?");
@@ -770,7 +608,6 @@ tp_message_to_text (TpMessage *message,
* isn't part of a multipart/alternative group
* (attached image or something, perhaps) */
DEBUG ("... ... yes, no possibility of a text alternative");
- flags |= TP_CHANNEL_TEXT_MESSAGE_FLAG_NON_TEXT_CONTENT;
tp_clear_pointer (&alternatives_needed, g_hash_table_unref);
}
else if (alternatives_used != NULL &&
@@ -794,15 +631,11 @@ tp_message_to_text (TpMessage *message,
}
}
- if ((flags & TP_CHANNEL_TEXT_MESSAGE_FLAG_NON_TEXT_CONTENT) == 0 &&
- alternatives_needed != NULL)
+ if (alternatives_needed != NULL)
{
if (alternatives_used != NULL)
g_hash_table_foreach (alternatives_used, subtract_from_hash,
alternatives_needed);
-
- if (g_hash_table_size (alternatives_needed) > 0)
- flags |= TP_CHANNEL_TEXT_MESSAGE_FLAG_NON_TEXT_CONTENT;
}
if (alternatives_needed != NULL)
@@ -811,11 +644,6 @@ tp_message_to_text (TpMessage *message,
if (alternatives_used != NULL)
g_hash_table_unref (alternatives_used);
- if (out_flags != NULL)
- {
- *out_flags = flags;
- }
-
return g_string_free (buffer, FALSE);
}
diff --git a/telepathy-glib/message.h b/telepathy-glib/message.h
index 1e35384d0..99c0c28c5 100644
--- a/telepathy-glib/message.h
+++ b/telepathy-glib/message.h
@@ -39,7 +39,6 @@ typedef struct _TpMessageClass TpMessageClass;
GType tp_message_get_type (void);
-void tp_message_destroy (TpMessage *self);
guint tp_message_count_parts (TpMessage *self);
const GHashTable *tp_message_peek (TpMessage *self, guint part);
guint tp_message_append_part (TpMessage *self);
@@ -69,23 +68,7 @@ void tp_message_set_bytes (TpMessage *self, guint part, const gchar *key,
void tp_message_set (TpMessage *self, guint part, const gchar *key,
const GValue *source);
-gchar * tp_message_to_text (TpMessage *message,
- TpChannelTextMessageFlags *out_flags) G_GNUC_WARN_UNUSED_RESULT;
-
-#ifndef TP_DISABLE_DEPRECATED
-/* Takes a TpCMMessage */
-_TP_DEPRECATED_FOR (tp_cm_message_set_sender)
-void tp_message_set_handle (TpMessage *self, guint part, const gchar *key,
- TpHandleType handle_type, TpHandle handle_or_0);
-
-_TP_DEPRECATED_FOR (tp_cm_message_take_message)
-void tp_message_take_message (TpMessage *self, guint part, const gchar *key,
- TpMessage *message);
-
-_TP_DEPRECATED_FOR (tp_cm_message_set_sender)
-void tp_message_ref_handle (TpMessage *self, TpHandleType handle_type,
- TpHandle handle);
-#endif
+gchar * tp_message_to_text (TpMessage *message) G_GNUC_WARN_UNUSED_RESULT;
gboolean tp_message_is_mutable (TpMessage *self);
diff --git a/telepathy-glib/presence-mixin.c b/telepathy-glib/presence-mixin.c
index 7a4e8dcfe..1408e9879 100644
--- a/telepathy-glib/presence-mixin.c
+++ b/telepathy-glib/presence-mixin.c
@@ -23,13 +23,9 @@
* @title: TpPresenceMixin
* @short_description: a mixin implementation of the Presence connection
* interface
- * @see_also: #TpSvcConnectionInterfacePresence
*
* This mixin can be added to a #TpBaseConnection subclass to implement the
- * SimplePresence and/or Presence interfaces. Implementing both interfaces
- * (as described below) is recommended. In particular, you must implement the
- * old-style Presence interface if compatibility with telepathy-glib
- * versions older than 0.11.13 is required.
+ * Presence interface.
*
* To use the presence mixin, include a #TpPresenceMixinClass somewhere in your
* class structure and a #TpPresenceMixin somewhere in your instance structure,
@@ -38,75 +34,44 @@
* tp_presence_mixin_finalize() from your dispose or finalize function.
*
* <section>
- * <title>Implementing SimplePresence</title>
+ * <title>Implementing Presence</title>
* <para>
- * Since 0.7.13 this mixin supports the entire SimplePresence interface.
- * You can implement #TpSvcConnectionInterfaceSimplePresence as follows:
+ * Since 0.7.13 this mixin supports the entire Presence interface.
+ * You can implement #TpSvcConnectionInterfacePresence as follows:
* <itemizedlist>
* <listitem>
* <para>use the #TpContactsMixin and
* <link linkend="telepathy-glib-dbus-properties-mixin">TpDBusPropertiesMixin</link>;</para>
* </listitem>
* <listitem>
- * <para>pass tp_presence_mixin_simple_presence_iface_init() as an
+ * <para>pass tp_presence_mixin_iface_init() as an
* argument to G_IMPLEMENT_INTERFACE(), like so:
* </para>
* |[
* G_DEFINE_TYPE_WITH_CODE (MyConnection, my_connection,
* TP_TYPE_BASE_CONNECTION,
* // ...
- * G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
- * tp_presence_mixin_simple_presence_iface_init);
+ * G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE,
+ * tp_presence_mixin_iface_init);
* // ...
* )
* ]|
* </listitem>
* <listitem>
* <para>
- * call tp_presence_mixin_simple_presence_init_dbus_properties() in the
+ * call tp_presence_mixin_init_dbus_properties() in the
* #GTypeInfo class_init function;
* </para>
* </listitem>
* <listitem>
* <para>
- * call tp_presence_mixin_simple_presence_register_with_contacts_mixin()
+ * call tp_presence_mixin_register_with_contacts_mixin()
* in the #GObjectClass constructed function.
* </para>
* </listitem>
* </itemizedlist>
* </para>
- * </section> <!-- Simple Presence -->
- * <section>
- * <title>Implementing old-style Presence</title>
- * <para>
- * This mixin also supports a large subset of the deprecated Presence
- * interface. It does not support protocols where it is possible to set
- * multiple statuses on yourself at once (all presence statuses will have the
- * exclusive flag set), or last-activity-time information.
- * </para>
- * <para>
- * To use the presence mixin as the implementation of
- * #TpSvcConnectionInterfacePresence, use tp_presence_mixin_iface_init() as
- * the function you pass to G_IMPLEMENT_INTERFACE(), as in the following
- * example. The presence mixin implements all of the D-Bus methods in the
- * Presence interface.
- * </para>
- * |[
- * G_DEFINE_TYPE_WITH_CODE (MyConnection, my_connection,
- * TP_TYPE_BASE_CONNECTION,
- * // ...
- * G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE,
- * tp_presence_mixin_iface_init);
- * // ...
- * )
- * ]|
- * <para>
- * In telepathy-glib versions older than 0.11.13, every connection
- * that used the #TpPresenceMixin was required to implement
- * #TpSvcConnectionInterfacePresence; failing to do so would lead to an
- * assertion failure. Since 0.11.13, this is no longer required.
- * </para>
- * </section> <!-- complex Presence -->
+ * </section>
*
* Since: 0.5.13
*/
@@ -293,13 +258,14 @@
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/contacts-mixin.h>
+#include <telepathy-glib/svc-connection.h>
#define DEBUG_FLAG TP_DEBUG_PRESENCE
#include "debug-internal.h"
-static GHashTable *construct_simple_presence_hash (
+static GHashTable *construct_presence_hash (
const TpPresenceStatusSpec *supported_statuses,
GHashTable *contact_statuses);
@@ -519,64 +485,6 @@ tp_presence_mixin_finalize (GObject *obj)
/* free any data held directly by the object here */
}
-static void
-construct_presence_hash_foreach (
- GHashTable *presence_hash,
- const TpPresenceStatusSpec *supported_statuses,
- TpHandle handle,
- TpPresenceStatus *status)
-{
- GHashTable *parameters;
- GHashTable *contact_status;
- GValueArray *vals;
-
- contact_status = g_hash_table_new_full (g_str_hash, g_str_equal, NULL,
- (GDestroyNotify) g_hash_table_unref);
-
- parameters = deep_copy_hashtable (status->optional_arguments);
-
- if (!parameters)
- parameters = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, NULL);
-
- g_hash_table_insert (contact_status,
- (gpointer) supported_statuses[status->index].name, parameters);
-
- vals = g_value_array_new (2);
-
- /* last-activity sucks and will probably be removed soon */
- g_value_array_append (vals, NULL);
- g_value_init (g_value_array_get_nth (vals, 0), G_TYPE_UINT);
- g_value_set_uint (g_value_array_get_nth (vals, 0), 0);
-
- g_value_array_append (vals, NULL);
- g_value_init (g_value_array_get_nth (vals, 1),
- TP_HASH_TYPE_MULTIPLE_STATUS_MAP);
- g_value_take_boxed (g_value_array_get_nth (vals, 1), contact_status);
-
- g_hash_table_insert (presence_hash, GUINT_TO_POINTER (handle), vals);
-}
-
-
-static GHashTable *
-construct_presence_hash (const TpPresenceStatusSpec *supported_statuses,
- GHashTable *contact_statuses)
-{
- GHashTable *presence_hash = g_hash_table_new_full (NULL, NULL, NULL,
- (GDestroyNotify) g_value_array_free);
- GHashTableIter iter;
- gpointer key, value;
-
- DEBUG ("called.");
-
- g_hash_table_iter_init (&iter, contact_statuses);
- while (g_hash_table_iter_next (&iter, &key, &value))
- construct_presence_hash_foreach (presence_hash, supported_statuses,
- GPOINTER_TO_UINT (key), value);
-
- return presence_hash;
-}
-
-
/**
* tp_presence_mixin_emit_presence_update: (skip)
* @obj: A connection object with this mixin
@@ -597,27 +505,12 @@ tp_presence_mixin_emit_presence_update (GObject *obj,
DEBUG ("called.");
- if (g_type_interface_peek (G_OBJECT_GET_CLASS (obj),
- TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE) != NULL)
- {
- presence_hash = construct_presence_hash (mixin_cls->statuses,
- contact_statuses);
- tp_svc_connection_interface_presence_emit_presence_update (obj,
- presence_hash);
-
- g_hash_table_unref (presence_hash);
- }
-
- if (g_type_interface_peek (G_OBJECT_GET_CLASS (obj),
- TP_TYPE_SVC_CONNECTION_INTERFACE_SIMPLE_PRESENCE) != NULL)
- {
- presence_hash = construct_simple_presence_hash (mixin_cls->statuses,
- contact_statuses);
- tp_svc_connection_interface_simple_presence_emit_presences_changed (obj,
- presence_hash);
+ presence_hash = construct_presence_hash (mixin_cls->statuses,
+ contact_statuses);
+ tp_svc_connection_interface_presence_emit_presences_changed (obj,
+ presence_hash);
- g_hash_table_unref (presence_hash);
- }
+ g_hash_table_unref (presence_hash);
}
@@ -627,8 +520,9 @@ tp_presence_mixin_emit_presence_update (GObject *obj,
* @handle: The handle of the contact to emit the signal for
* @status: The new status to emit
*
- * Emit the PresenceUpdate signal for a single contact. This method is just a
- * convenience wrapper around #tp_presence_mixin_emit_presence_update.
+ * Emit a presence update signal for a single contact. This method is
+ * just a convenience wrapper around
+ * #tp_presence_mixin_emit_presence_update.
*/
void
tp_presence_mixin_emit_one_presence_update (GObject *obj,
@@ -647,134 +541,6 @@ tp_presence_mixin_emit_one_presence_update (GObject *obj,
g_hash_table_unref (contact_statuses);
}
-
-/*
- * tp_presence_mixin_add_status:
- *
- * Implements D-Bus method AddStatus
- * on interface org.freedesktop.Telepathy.Connection.Interface.Presence
- */
-static void
-tp_presence_mixin_add_status (TpSvcConnectionInterfacePresence *iface,
- const gchar *status,
- GHashTable *parms,
- DBusGMethodInvocation *context)
-{
- TpBaseConnection *conn = TP_BASE_CONNECTION (iface);
- GError error = { TP_ERROR, TP_ERROR_NOT_IMPLEMENTED,
- "Only one status is possible at a time with this protocol!" };
-
- DEBUG ("called.");
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (conn, context);
-
- dbus_g_method_return_error (context, &error);
-}
-
-
-/*
- * tp_presence_mixin_clear_status:
- *
- * Implements D-Bus method ClearStatus
- * on interface org.freedesktop.Telepathy.Connection.Interface.Presence
- */
-static void
-tp_presence_mixin_clear_status (TpSvcConnectionInterfacePresence *iface,
- DBusGMethodInvocation *context)
-{
- GObject *obj = (GObject *) iface;
- TpBaseConnection *conn = TP_BASE_CONNECTION (iface);
- TpPresenceMixinClass *mixin_cls =
- TP_PRESENCE_MIXIN_CLASS (G_OBJECT_GET_CLASS (obj));
- GError *error = NULL;
-
- DEBUG ("called.");
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (conn, context);
-
- if (!mixin_cls->set_own_status (obj, NULL, &error))
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- tp_svc_connection_interface_presence_return_from_clear_status (context);
-}
-
-
-/*
- * tp_presence_mixin_get_presence:
- *
- * Implements D-Bus method GetPresence
- * on interface org.freedesktop.Telepathy.Connection.Interface.Presence
- */
-static void
-tp_presence_mixin_get_presence (TpSvcConnectionInterfacePresence *iface,
- const GArray *contacts,
- DBusGMethodInvocation *context)
-{
- GObject *obj = (GObject *) iface;
- TpBaseConnection *conn = TP_BASE_CONNECTION (obj);
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (conn,
- TP_HANDLE_TYPE_CONTACT);
- TpPresenceMixinClass *mixin_cls =
- TP_PRESENCE_MIXIN_CLASS (G_OBJECT_GET_CLASS (obj));
- GHashTable *contact_statuses;
- GHashTable *presence_hash;
- GError *error = NULL;
-
- DEBUG ("called.");
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (conn, context);
-
- if (contacts->len == 0)
- {
- presence_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
- tp_svc_connection_interface_presence_return_from_get_presence (context,
- presence_hash);
- g_hash_table_unref (presence_hash);
- return;
- }
-
- if (!tp_handles_are_valid (contact_repo, contacts, FALSE, &error))
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- contact_statuses = mixin_cls->get_contact_statuses (obj, contacts, &error);
-
- if (!contact_statuses)
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- presence_hash = construct_presence_hash (mixin_cls->statuses,
- contact_statuses);
- tp_svc_connection_interface_presence_return_from_get_presence (context,
- presence_hash);
- g_hash_table_unref (presence_hash);
- g_hash_table_unref (contact_statuses);
-}
-
-
-static GHashTable *
-get_statuses_arguments (const TpPresenceStatusOptionalArgumentSpec *specs)
-{
- GHashTable *arguments = g_hash_table_new (g_str_hash, g_str_equal);
- int i;
-
- for (i=0; specs != NULL && specs[i].name != NULL; i++)
- g_hash_table_insert (arguments, (gchar *) specs[i].name,
- (gchar *) specs[i].dtype);
-
- return arguments;
-}
-
static gboolean
check_status_available (GObject *object,
TpPresenceMixinClass *mixin_cls,
@@ -823,216 +589,6 @@ check_status_available (GObject *object,
return TRUE;
}
-/*
- * tp_presence_mixin_get_statuses:
- *
- * Implements D-Bus method GetStatuses
- * on interface org.freedesktop.Telepathy.Connection.Interface.Presence
- */
-static void
-tp_presence_mixin_get_statuses (TpSvcConnectionInterfacePresence *iface,
- DBusGMethodInvocation *context)
-{
- TpBaseConnection *conn = TP_BASE_CONNECTION (iface);
- GObject *obj = (GObject *) conn;
- TpPresenceMixinClass *mixin_cls =
- TP_PRESENCE_MIXIN_CLASS (G_OBJECT_GET_CLASS (obj));
- GHashTable *ret;
- GValueArray *status;
- int i;
-
- DEBUG ("called.");
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (conn, context);
-
- ret = g_hash_table_new_full (g_str_hash, g_str_equal,
- NULL, (GDestroyNotify) g_value_array_free);
-
- for (i=0; mixin_cls->statuses[i].name != NULL; i++)
- {
- /* the spec says we include statuses here even if they're not available
- * to set on yourself */
- if (!check_status_available (obj, mixin_cls, i, NULL, FALSE))
- continue;
-
- status = g_value_array_new (5);
-
- g_value_array_append (status, NULL);
- g_value_init (g_value_array_get_nth (status, 0), G_TYPE_UINT);
- g_value_set_uint (g_value_array_get_nth (status, 0),
- mixin_cls->statuses[i].presence_type);
-
- g_value_array_append (status, NULL);
- g_value_init (g_value_array_get_nth (status, 1), G_TYPE_BOOLEAN);
- g_value_set_boolean (g_value_array_get_nth (status, 1),
- mixin_cls->statuses[i].self);
-
- /* everything is exclusive */
- g_value_array_append (status, NULL);
- g_value_init (g_value_array_get_nth (status, 2), G_TYPE_BOOLEAN);
- g_value_set_boolean (g_value_array_get_nth (status, 2),
- TRUE);
-
- g_value_array_append (status, NULL);
- g_value_init (g_value_array_get_nth (status, 3),
- DBUS_TYPE_G_STRING_STRING_HASHTABLE);
- g_value_take_boxed (g_value_array_get_nth (status, 3),
- get_statuses_arguments (mixin_cls->statuses[i].optional_arguments));
-
- g_hash_table_insert (ret, (gchar *) mixin_cls->statuses[i].name,
- status);
- }
-
- tp_svc_connection_interface_presence_return_from_get_statuses (context, ret);
- g_hash_table_unref (ret);
-}
-
-
-/*
- * tp_presence_mixin_set_last_activity_time:
- *
- * Implements D-Bus method SetLastActivityTime
- * on interface org.freedesktop.Telepathy.Connection.Interface.Presence
- */
-static void
-tp_presence_mixin_set_last_activity_time (TpSvcConnectionInterfacePresence *iface,
- guint timestamp,
- DBusGMethodInvocation *context)
-{
- TpBaseConnection *conn = TP_BASE_CONNECTION (iface);
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (conn, context);
-
- tp_svc_connection_interface_presence_return_from_set_last_activity_time (
- context);
-}
-
-
-/*
- * tp_presence_mixin_remove_status:
- *
- * Implements D-Bus method RemoveStatus
- * on interface org.freedesktop.Telepathy.Connection.Interface.Presence
- */
-static void
-tp_presence_mixin_remove_status (TpSvcConnectionInterfacePresence *iface,
- const gchar *status,
- DBusGMethodInvocation *context)
-{
- GObject *obj = (GObject *) iface;
- TpBaseConnection *conn = TP_BASE_CONNECTION (iface);
- TpPresenceMixinClass *mixin_cls =
- TP_PRESENCE_MIXIN_CLASS (G_OBJECT_GET_CLASS (obj));
- GArray *self_contacts;
- GError *error = NULL;
- GHashTable *self_contact_statuses;
- TpPresenceStatus *self_status;
-
- DEBUG ("called.");
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (conn, context);
-
- self_contacts = g_array_sized_new (TRUE, TRUE, sizeof (TpHandle), 1);
- g_array_append_val (self_contacts, conn->self_handle);
- self_contact_statuses = mixin_cls->get_contact_statuses (obj, self_contacts,
- &error);
-
- if (!self_contact_statuses)
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- g_array_unref (self_contacts);
- return;
- }
-
- self_status = (TpPresenceStatus *) g_hash_table_lookup (self_contact_statuses,
- GUINT_TO_POINTER (conn->self_handle));
-
- if (!self_status)
- {
- DEBUG ("Got no self status, assuming we already have default status");
- g_array_unref (self_contacts);
- g_hash_table_unref (self_contact_statuses);
- tp_svc_connection_interface_presence_return_from_remove_status (context);
- return;
- }
-
- if (!tp_strdiff (status, mixin_cls->statuses[self_status->index].name))
- {
- if (mixin_cls->set_own_status (obj, NULL, &error))
- {
- tp_svc_connection_interface_presence_return_from_remove_status (context);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
- }
- else
- {
- GError nonexistent = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
- "Attempting to remove non-existent presence." };
- dbus_g_method_return_error (context, &nonexistent);
- }
-
- g_array_unref (self_contacts);
- g_hash_table_unref (self_contact_statuses);
-}
-
-
-/*
- * tp_presence_mixin_request_presence:
- *
- * Implements D-Bus method RequestPresence
- * on interface org.freedesktop.Telepathy.Connection.Interface.Presence
- */
-static void
-tp_presence_mixin_request_presence (TpSvcConnectionInterfacePresence *iface,
- const GArray *contacts,
- DBusGMethodInvocation *context)
-{
- GObject *obj = (GObject *) iface;
- TpPresenceMixinClass *mixin_cls =
- TP_PRESENCE_MIXIN_CLASS (G_OBJECT_GET_CLASS (obj));
- TpBaseConnection *conn = TP_BASE_CONNECTION (iface);
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (conn,
- TP_HANDLE_TYPE_CONTACT);
- GHashTable *contact_statuses;
- GError *error = NULL;
-
- DEBUG ("called.");
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (conn, context);
-
- if (contacts->len == 0)
- {
- tp_svc_connection_interface_presence_return_from_request_presence (context);
- return;
- }
-
- if (!tp_handles_are_valid (contact_repo, contacts, FALSE, &error))
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- contact_statuses = mixin_cls->get_contact_statuses (obj, contacts, &error);
-
- if (!contact_statuses)
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- tp_presence_mixin_emit_presence_update (obj, contact_statuses);
- tp_svc_connection_interface_presence_return_from_request_presence (context);
-
- g_hash_table_unref (contact_statuses);
-}
-
static int
check_for_status (GObject *object, const gchar *status, GError **error)
{
@@ -1065,191 +621,41 @@ check_for_status (GObject *object, const gchar *status, GError **error)
return i;
}
-static gboolean
-set_status (
- GObject *obj,
- const gchar *status_name,
- GHashTable *provided_arguments,
- GError **error)
-{
- TpPresenceMixinClass *mixin_cls =
- TP_PRESENCE_MIXIN_CLASS (G_OBJECT_GET_CLASS (obj));
- TpPresenceStatus status_to_set = { 0, };
- int status;
- GHashTable *optional_arguments = NULL;
- gboolean ret = TRUE;
-
- DEBUG ("called.");
-
- /* This function will actually only be invoked once for one SetStatus request,
- * since we check that the hash table has size 1 in
- * tp_presence_mixin_set_status(). Therefore there are no problems with
- * sharing the foreach data like this.
- */
- status = check_for_status (obj, status_name, error);
-
- if (status == -1)
- return FALSE;
-
- DEBUG ("The status is available.");
-
- if (provided_arguments != NULL)
- {
- int j;
- const TpPresenceStatusOptionalArgumentSpec *specs =
- mixin_cls->statuses[status].optional_arguments;
-
- for (j=0; specs != NULL && specs[j].name != NULL; j++)
- {
- GValue *provided_value =
- g_hash_table_lookup (provided_arguments, specs[j].name);
- GValue *new_value;
-
- if (!provided_value)
- continue;
- new_value = tp_g_value_slice_dup (provided_value);
-
- if (!optional_arguments)
- optional_arguments =
- g_hash_table_new_full (g_str_hash, g_str_equal, NULL,
- (GDestroyNotify) tp_g_value_slice_free);
-
- if (DEBUGGING)
- {
- gchar *value_contents = g_strdup_value_contents (new_value);
- DEBUG ("Got optional argument (\"%s\", %s)", specs[j].name,
- value_contents);
- g_free (value_contents);
- }
-
- g_hash_table_insert (optional_arguments,
- (gpointer) specs[j].name, new_value);
- }
- }
-
- status_to_set.index = status;
- status_to_set.optional_arguments = optional_arguments;
-
- DEBUG ("About to try setting status \"%s\"",
- mixin_cls->statuses[status].name);
-
- ret = mixin_cls->set_own_status (obj, &status_to_set, error);
-
- if (optional_arguments)
- g_hash_table_unref (optional_arguments);
-
- return ret;
-}
-
-
-/*
- * tp_presence_mixin_set_status:
- *
- * Implements D-Bus method SetStatus
- * on interface org.freedesktop.Telepathy.Connection.Interface.Presence
- */
-static void
-tp_presence_mixin_set_status (TpSvcConnectionInterfacePresence *iface,
- GHashTable *statuses,
- DBusGMethodInvocation *context)
-{
- GObject *obj = (GObject *) iface;
- TpBaseConnection *conn = TP_BASE_CONNECTION (iface);
- GHashTableIter iter;
- gpointer key, value;
- GError *error = NULL;
-
- DEBUG ("called.");
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (conn, context);
-
- g_hash_table_iter_init (&iter, statuses);
- if (!g_hash_table_iter_next (&iter, &key, &value) ||
- g_hash_table_iter_next (&iter, NULL, NULL))
- {
- GError invalid = { TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
- "Only one status may be set at a time in this protocol" };
- DEBUG ("got more than one status");
- dbus_g_method_return_error (context, &invalid);
- return;
- }
-
- if (set_status (obj, key, value, &error))
- {
- tp_svc_connection_interface_presence_return_from_set_status (context);
- }
- else
- {
- DEBUG ("failed: %s", error->message);
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
-
-/**
- * tp_presence_mixin_iface_init: (skip)
- * @g_iface: A pointer to the #TpSvcConnectionInterfacePresenceClass in an
- * object class
- * @iface_data: Ignored
- *
- * Fill in the vtable entries needed to implement the presence interface using
- * this mixin. This function should usually be called via G_IMPLEMENT_INTERFACE.
- */
-void
-tp_presence_mixin_iface_init (gpointer g_iface, gpointer iface_data)
-{
- TpSvcConnectionInterfacePresenceClass *klass = g_iface;
-
-#define IMPLEMENT(x) tp_svc_connection_interface_presence_implement_##x (klass,\
- tp_presence_mixin_##x)
- IMPLEMENT(add_status);
- IMPLEMENT(clear_status);
- IMPLEMENT(get_presence);
- IMPLEMENT(get_statuses);
- IMPLEMENT(remove_status);
- IMPLEMENT(request_presence);
- IMPLEMENT(set_last_activity_time);
- IMPLEMENT(set_status);
-#undef IMPLEMENT
-}
-
enum {
- MIXIN_DP_SIMPLE_STATUSES,
- MIXIN_DP_SIMPLE_MAX_STATUS_MESSAGE_LENGTH,
- NUM_MIXIN_SIMPLE_DBUS_PROPERTIES
+ MIXIN_DP_STATUSES,
+ MIXIN_DP_MAX_STATUS_MESSAGE_LENGTH,
+ NUM_MIXIN_DBUS_PROPERTIES
};
-static TpDBusPropertiesMixinPropImpl known_simple_presence_props[] = {
+static TpDBusPropertiesMixinPropImpl known_presence_props[] = {
{ "Statuses", NULL, NULL },
{ "MaximumStatusMessageLength", NULL, NULL },
{ NULL }
};
static void
-tp_presence_mixin_get_simple_presence_dbus_property (GObject *object,
- GQuark interface,
- GQuark name,
- GValue *value,
- gpointer unused
- G_GNUC_UNUSED)
+tp_presence_mixin_get_dbus_property (GObject *object,
+ GQuark interface,
+ GQuark name,
+ GValue *value,
+ gpointer unused G_GNUC_UNUSED)
{
TpPresenceMixinClass *mixin_cls =
TP_PRESENCE_MIXIN_CLASS (G_OBJECT_GET_CLASS (object));
- static GQuark q[NUM_MIXIN_SIMPLE_DBUS_PROPERTIES] = { 0, };
+ static GQuark q[NUM_MIXIN_DBUS_PROPERTIES] = { 0, };
DEBUG ("called.");
if (G_UNLIKELY (q[0] == 0))
{
- q[MIXIN_DP_SIMPLE_STATUSES] = g_quark_from_static_string ("Statuses");
- q[MIXIN_DP_SIMPLE_MAX_STATUS_MESSAGE_LENGTH] =
+ q[MIXIN_DP_STATUSES] = g_quark_from_static_string ("Statuses");
+ q[MIXIN_DP_MAX_STATUS_MESSAGE_LENGTH] =
g_quark_from_static_string ("MaximumStatusMessageLength");
}
g_return_if_fail (object != NULL);
- if (name == q[MIXIN_DP_SIMPLE_STATUSES])
+ if (name == q[MIXIN_DP_STATUSES])
{
GHashTable *ret;
GValueArray *status;
@@ -1303,7 +709,7 @@ tp_presence_mixin_get_simple_presence_dbus_property (GObject *object,
}
g_value_take_boxed (value, ret);
}
- else if (name == q[MIXIN_DP_SIMPLE_MAX_STATUS_MESSAGE_LENGTH])
+ else if (name == q[MIXIN_DP_MAX_STATUS_MESSAGE_LENGTH])
{
guint max_status_message_length = 0;
@@ -1323,36 +729,38 @@ tp_presence_mixin_get_simple_presence_dbus_property (GObject *object,
}
/**
- * tp_presence_mixin_simple_presence_init_dbus_properties: (skip)
+ * tp_presence_mixin_init_dbus_properties: (skip)
* @cls: The class of an object with this mixin
*
* Set up #TpDBusPropertiesMixinClass to use this mixin's implementation of
- * the SimplePresence interface's properties.
+ * the Presence interface's properties.
*
* This automatically sets up a list of the supported properties for the
- * SimplePresence interface.
+ * Presence interface.
*
* Since: 0.7.13
*/
void
-tp_presence_mixin_simple_presence_init_dbus_properties (GObjectClass *cls)
+tp_presence_mixin_init_dbus_properties (GObjectClass *cls)
{
-
tp_dbus_properties_mixin_implement_interface (cls,
- TP_IFACE_QUARK_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
- tp_presence_mixin_get_simple_presence_dbus_property,
- NULL, known_simple_presence_props);
+ TP_IFACE_QUARK_CONNECTION_INTERFACE_PRESENCE,
+ tp_presence_mixin_get_dbus_property,
+ NULL, known_presence_props);
}
/*
- * tp_presence_mixin_simple_presence_set_presence:
+ * tp_presence_mixin_set_presence:
*
* Implements D-Bus method SetPresence
- * on interface org.freedesktop.Telepathy.Connection.Interface.SimplePresence
+ * on interface im.telepathy1.Connection.Interface.Presence
+ *
+ * @context: The D-Bus invocation context to use to return values
+ * or throw an error.
*/
static void
-tp_presence_mixin_simple_presence_set_presence (
- TpSvcConnectionInterfaceSimplePresence *iface,
+tp_presence_mixin_set_presence (
+ TpSvcConnectionInterfacePresence *iface,
const gchar *status,
const gchar *message,
DBusGMethodInvocation *context)
@@ -1387,7 +795,7 @@ tp_presence_mixin_simple_presence_set_presence (
out:
if (error == NULL)
{
- tp_svc_connection_interface_simple_presence_return_from_set_presence (
+ tp_svc_connection_interface_presence_return_from_set_presence (
context);
}
else
@@ -1401,7 +809,7 @@ out:
}
static GValueArray *
-construct_simple_presence_value_array (TpPresenceStatus *status,
+construct_presence_value_array (TpPresenceStatus *status,
const TpPresenceStatusSpec *supported_statuses)
{
TpConnectionPresenceType status_type;
@@ -1441,7 +849,7 @@ construct_simple_presence_value_array (TpPresenceStatus *status,
}
static void
-construct_simple_presence_hash_foreach (
+construct_presence_hash_foreach (
GHashTable *presence_hash,
const TpPresenceStatusSpec *supported_statuses,
TpHandle handle,
@@ -1449,12 +857,12 @@ construct_simple_presence_hash_foreach (
{
GValueArray *presence;
- presence = construct_simple_presence_value_array (status, supported_statuses);
+ presence = construct_presence_value_array (status, supported_statuses);
g_hash_table_insert (presence_hash, GUINT_TO_POINTER (handle), presence);
}
static GHashTable *
-construct_simple_presence_hash (const TpPresenceStatusSpec *supported_statuses,
+construct_presence_hash (const TpPresenceStatusSpec *supported_statuses,
GHashTable *contact_statuses)
{
GHashTable *presence_hash = g_hash_table_new_full (NULL, NULL, NULL,
@@ -1466,21 +874,24 @@ construct_simple_presence_hash (const TpPresenceStatusSpec *supported_statuses,
g_hash_table_iter_init (&iter, contact_statuses);
while (g_hash_table_iter_next (&iter, &key, &value))
- construct_simple_presence_hash_foreach (presence_hash, supported_statuses,
+ construct_presence_hash_foreach (presence_hash, supported_statuses,
GPOINTER_TO_UINT (key), value);
return presence_hash;
}
/*
- * tp_presence_mixin_get_simple_presence:
+ * tp_presence_mixin_get_presence:
*
* Implements D-Bus method GetPresence
- * on interface org.freedesktop.Telepathy.Connection.Interface.SimplePresence
+ * on interface im.telepathy1.Connection.Interface.Presence
+ *
+ * @context: The D-Bus invocation context to use to return values
+ * or throw an error.
*/
static void
-tp_presence_mixin_simple_presence_get_presences (
- TpSvcConnectionInterfaceSimplePresence *iface,
+tp_presence_mixin_get_presences (
+ TpSvcConnectionInterfacePresence *iface,
const GArray *contacts,
DBusGMethodInvocation *context)
{
@@ -1501,7 +912,7 @@ tp_presence_mixin_simple_presence_get_presences (
if (contacts->len == 0)
{
presence_hash = g_hash_table_new (g_direct_hash, g_direct_equal);
- tp_svc_connection_interface_simple_presence_return_from_get_presences (
+ tp_svc_connection_interface_presence_return_from_get_presences (
context, presence_hash);
g_hash_table_unref (presence_hash);
return;
@@ -1523,41 +934,41 @@ tp_presence_mixin_simple_presence_get_presences (
return;
}
- presence_hash = construct_simple_presence_hash (mixin_cls->statuses,
+ presence_hash = construct_presence_hash (mixin_cls->statuses,
contact_statuses);
- tp_svc_connection_interface_simple_presence_return_from_get_presences (
+ tp_svc_connection_interface_presence_return_from_get_presences (
context, presence_hash);
g_hash_table_unref (presence_hash);
g_hash_table_unref (contact_statuses);
}
/**
- * tp_presence_mixin_simple_presence_iface_init: (skip)
- * @g_iface: A pointer to the #TpSvcConnectionInterfaceSimplePresenceClass in
+ * tp_presence_mixin_iface_init: (skip)
+ * @g_iface: A pointer to the #TpSvcConnectionInterfacePresenceClass in
* an object class
* @iface_data: Ignored
*
- * Fill in the vtable entries needed to implement the simple presence interface
+ * Fill in the vtable entries needed to implement the presence interface
* using this mixin. This function should usually be called via
* G_IMPLEMENT_INTERFACE.
*
* Since: 0.7.13
*/
void
-tp_presence_mixin_simple_presence_iface_init (gpointer g_iface,
- gpointer iface_data)
+tp_presence_mixin_iface_init (gpointer g_iface,
+ gpointer iface_data)
{
- TpSvcConnectionInterfaceSimplePresenceClass *klass = g_iface;
+ TpSvcConnectionInterfacePresenceClass *klass = g_iface;
-#define IMPLEMENT(x) tp_svc_connection_interface_simple_presence_implement_##x\
- (klass, tp_presence_mixin_simple_presence_##x)
+#define IMPLEMENT(x) tp_svc_connection_interface_presence_implement_##x\
+ (klass, tp_presence_mixin_##x)
IMPLEMENT(set_presence);
IMPLEMENT(get_presences);
#undef IMPLEMENT
}
static void
-tp_presence_mixin_simple_presence_fill_contact_attributes (GObject *obj,
+tp_presence_mixin_fill_contact_attributes (GObject *obj,
const GArray *contacts, GHashTable *attributes_hash)
{
TpPresenceMixinClass *mixin_cls =
@@ -1582,11 +993,11 @@ tp_presence_mixin_simple_presence_fill_contact_attributes (GObject *obj,
{
TpHandle handle = GPOINTER_TO_UINT (key);
TpPresenceStatus *status = value;
- GValueArray *presence = construct_simple_presence_value_array (
+ GValueArray *presence = construct_presence_value_array (
status, mixin_cls->statuses);
tp_contacts_mixin_set_contact_attribute (attributes_hash, handle,
- TP_TOKEN_CONNECTION_INTERFACE_SIMPLE_PRESENCE_PRESENCE,
+ TP_TOKEN_CONNECTION_INTERFACE_PRESENCE_PRESENCE,
tp_g_value_slice_new_take_boxed (G_TYPE_VALUE_ARRAY, presence));
}
@@ -1595,19 +1006,19 @@ tp_presence_mixin_simple_presence_fill_contact_attributes (GObject *obj,
}
/**
- * tp_presence_mixin_simple_presence_register_with_contacts_mixin: (skip)
+ * tp_presence_mixin_register_with_contacts_mixin: (skip)
* @obj: An instance that of the implementation that uses both the Contacts
* mixin and this mixin
*
- * Register the SimplePresence interface with the Contacts interface to make it
+ * Register the Presence interface with the Contacts interface to make it
* inspectable. The Contacts mixin should be initialized before this function
* is called
*/
void
-tp_presence_mixin_simple_presence_register_with_contacts_mixin (GObject *obj)
+tp_presence_mixin_register_with_contacts_mixin (GObject *obj)
{
tp_contacts_mixin_add_contact_attributes_iface (obj,
- TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
- tp_presence_mixin_simple_presence_fill_contact_attributes);
+ TP_IFACE_CONNECTION_INTERFACE_PRESENCE,
+ tp_presence_mixin_fill_contact_attributes);
}
diff --git a/telepathy-glib/presence-mixin.h b/telepathy-glib/presence-mixin.h
index 48cef758e..18c6ae802 100644
--- a/telepathy-glib/presence-mixin.h
+++ b/telepathy-glib/presence-mixin.h
@@ -23,7 +23,6 @@
#include <telepathy-glib/enums.h>
#include <telepathy-glib/handle.h>
-#include <telepathy-glib/svc-connection.h>
#include "util.h"
G_BEGIN_DECLS
@@ -141,10 +140,9 @@ void tp_presence_mixin_emit_one_presence_update (GObject *obj,
TpHandle handle, const TpPresenceStatus *status);
void tp_presence_mixin_iface_init (gpointer g_iface, gpointer iface_data);
-void tp_presence_mixin_simple_presence_iface_init (gpointer g_iface, gpointer iface_data);
-void tp_presence_mixin_simple_presence_init_dbus_properties (GObjectClass *cls);
+void tp_presence_mixin_init_dbus_properties (GObjectClass *cls);
-void tp_presence_mixin_simple_presence_register_with_contacts_mixin (
+void tp_presence_mixin_register_with_contacts_mixin (
GObject *obj);
G_END_DECLS
diff --git a/telepathy-glib/properties-mixin.c b/telepathy-glib/properties-mixin.c
deleted file mode 100644
index 16160067b..000000000
--- a/telepathy-glib/properties-mixin.c
+++ /dev/null
@@ -1,1164 +0,0 @@
-/*
- * properties-mixin.c - Source for TpPropertiesMixin
- * Copyright (C) 2006-2007 Collabora Ltd.
- * Copyright (C) 2006-2007 Nokia Corporation
- * @author Ole Andre Vadla Ravnaas <ole.andre.ravnaas@collabora.co.uk>
- * @author Robert McQueen <robert.mcqueen@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * SECTION:properties-mixin
- * @title: TpPropertiesMixin
- * @short_description: a mixin implementation of the Telepathy.Properties
- * interface
- * @see_also: #TpSvcPropertiesInterface
- *
- * This mixin can be added to any GObject class to implement the properties
- * interface in a general way.
- *
- * To use the properties mixin, include a #TpPropertiesMixinClass somewhere
- * in your class structure and a #TpPropertiesMixin somewhere in your
- * instance structure, and call tp_properties_mixin_class_init() from your
- * class_init function, tp_properties_mixin_init() from your init function
- * or constructor, and tp_properties_mixin_finalize() from your dispose
- * or finalize function.
- *
- * To use the properties mixin as the implementation of
- * #TpSvcPropertiesInterface, call
- * <literal>G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_PROPERTIES_INTERFACE,
- * tp_properties_mixin_iface_init)</literal> in the fourth argument to
- * <literal>G_DEFINE_TYPE_WITH_CODE</literal>.
- */
-
-#include "config.h"
-
-#include <telepathy-glib/properties-mixin.h>
-
-#include <dbus/dbus-glib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <telepathy-glib/debug-ansi.h>
-#include <telepathy-glib/errors.h>
-#include <telepathy-glib/intset.h>
-#include <telepathy-glib/util.h>
-
-#define DEBUG_FLAG TP_DEBUG_PROPERTIES
-
-#include "debug-internal.h"
-
-struct _TpPropertiesContext {
- TpPropertiesMixinClass *mixin_cls;
- TpPropertiesMixin *mixin;
-
- DBusGMethodInvocation *dbus_ctx;
- TpIntset *remaining;
- GValue **values;
-};
-
-struct _TpPropertiesMixinPrivate {
- GObject *object;
- TpPropertiesContext context;
-};
-
-/*
- * tp_properties_mixin_class_get_offset_quark:
- *
- * Returns: the quark used for storing mixin offset on a GObjectClass
- */
-GQuark
-tp_properties_mixin_class_get_offset_quark ()
-{
- static GQuark offset_quark = 0;
- if (!offset_quark)
- offset_quark = g_quark_from_static_string (
- "TpPropertiesMixinClassOffsetQuark");
- return offset_quark;
-}
-
-/*
- * tp_properties_mixin_get_offset_quark:
- *
- * Returns: the quark used for storing mixin offset on a GObject
- */
-GQuark
-tp_properties_mixin_get_offset_quark ()
-{
- static GQuark offset_quark = 0;
- if (!offset_quark)
- offset_quark = g_quark_from_static_string (
- "TpPropertiesMixinOffsetQuark");
- return offset_quark;
-}
-
-
-/**
- * tp_properties_mixin_class_init:
- * @obj_cls: The class of an object that has this mixin
- * @offset: The offset of the TpPropertiesMixinClass structure in the class
- * structure
- * @signatures: An array of property signatures
- * @num_properties: The number of entries in @signatures
- * @set_func: Callback used to set the properties
- *
- * Initialize the mixin. Should be called from the implementation's
- * class_init function like so:
- *
- * <informalexample><programlisting>
- * tp_properties_mixin_class_init ((GObjectClass *) klass,
- * G_STRUCT_OFFSET (SomeObjectClass,
- * properties_mixin));
- * </programlisting></informalexample>
- */
-
-void
-tp_properties_mixin_class_init (GObjectClass *obj_cls,
- glong offset,
- const TpPropertySignature *signatures,
- guint num_properties,
- TpPropertiesSetFunc set_func)
-{
- TpPropertiesMixinClass *mixin_cls;
-
- g_assert (G_IS_OBJECT_CLASS (obj_cls));
-
- g_type_set_qdata (G_OBJECT_CLASS_TYPE (obj_cls),
- TP_PROPERTIES_MIXIN_CLASS_OFFSET_QUARK,
- GINT_TO_POINTER (offset));
-
- mixin_cls = TP_PROPERTIES_MIXIN_CLASS (obj_cls);
-
- mixin_cls->signatures = signatures;
- mixin_cls->num_props = num_properties;
-
- mixin_cls->set_properties = set_func;
-}
-
-
-/**
- * tp_properties_mixin_init:
- * @obj: An object that has this mixin
- * @offset: The offset of the TpPropertiesMixin structure in the object
- * structure
- *
- * Initialize the mixin. Should be called from the implementation's
- * instance init function like so:
- *
- * <informalexample><programlisting>
- * tp_properties_mixin_init ((GObject *) self,
- * G_STRUCT_OFFSET (SomeObject, properties_mixin),
- * self->contact_repo);
- * </programlisting></informalexample>
- */
-
-void tp_properties_mixin_init (GObject *obj, glong offset)
-{
- TpPropertiesMixinClass *mixin_cls;
- TpPropertiesMixin *mixin;
- TpPropertiesContext *ctx;
-
- g_assert (G_IS_OBJECT (obj));
-
- g_assert (TP_IS_SVC_PROPERTIES_INTERFACE (obj));
-
- g_type_set_qdata (G_OBJECT_TYPE (obj),
- TP_PROPERTIES_MIXIN_OFFSET_QUARK,
- GINT_TO_POINTER (offset));
-
- mixin = TP_PROPERTIES_MIXIN (obj);
- mixin_cls = TP_PROPERTIES_MIXIN_CLASS (G_OBJECT_GET_CLASS (obj));
-
- mixin->properties = g_new0 (TpProperty, mixin_cls->num_props);
-
- mixin->priv = g_slice_new0 (TpPropertiesMixinPrivate);
- mixin->priv->object = obj;
-
- ctx = &mixin->priv->context;
- ctx->mixin_cls = mixin_cls;
- ctx->mixin = mixin;
- ctx->values = g_new0 (GValue *, mixin_cls->num_props);
-}
-
-/**
- * tp_properties_mixin_finalize:
- * @obj: An object that has this mixin
- *
- * Free memory used by the TpPropertiesMixin.
- */
-
-void tp_properties_mixin_finalize (GObject *obj)
-{
- TpPropertiesMixin *mixin = TP_PROPERTIES_MIXIN (obj);
- TpPropertiesMixinClass *mixin_cls = TP_PROPERTIES_MIXIN_CLASS (
- G_OBJECT_GET_CLASS (obj));
- TpPropertiesContext *ctx = &mixin->priv->context;
- guint i;
-
- for (i = 0; i < mixin_cls->num_props; i++)
- {
- TpProperty *prop = &mixin->properties[i];
-
- if (prop->value)
- {
- g_value_unset (prop->value);
- g_slice_free (GValue, prop->value);
- }
-
- if (ctx->values[i])
- {
- g_value_unset (ctx->values[i]);
- }
- }
-
- g_free (ctx->values);
-
- g_slice_free (TpPropertiesMixinPrivate, mixin->priv);
-
- g_free (mixin->properties);
-}
-
-
-/**
- * tp_properties_mixin_list_properties:
- * @obj: An object with this mixin
- * @ret: Output parameter which will be set to a GPtrArray of D-Bus structures
- * if %TRUE is returned
- * @error: Set to the error if %FALSE is returned
- *
- * List all available properties and their flags, as in the ListProperties
- * D-Bus method.
- *
- * Returns: %TRUE on success
- */
-gboolean
-tp_properties_mixin_list_properties (GObject *obj,
- GPtrArray **ret,
- GError **error)
-{
- TpPropertiesMixin *mixin = TP_PROPERTIES_MIXIN (obj);
- TpPropertiesMixinClass *mixin_cls = TP_PROPERTIES_MIXIN_CLASS (
- G_OBJECT_GET_CLASS (obj));
- GType spec_type = TP_STRUCT_TYPE_PROPERTY_SPEC;
- guint i;
-
- *ret = g_ptr_array_sized_new (mixin_cls->num_props);
-
- for (i = 0; i < mixin_cls->num_props; i++)
- {
- const TpPropertySignature *sig = &mixin_cls->signatures[i];
- TpProperty *prop = &mixin->properties[i];
- const gchar *dbus_sig;
- GValue val = { 0, };
-
- switch (sig->type) {
- case G_TYPE_BOOLEAN:
- dbus_sig = "b";
- break;
- case G_TYPE_INT:
- dbus_sig = "i";
- break;
- case G_TYPE_UINT:
- dbus_sig = "u";
- break;
- case G_TYPE_STRING:
- dbus_sig = "s";
- break;
- default:
- g_assert_not_reached ();
- continue;
- };
-
- g_value_init (&val, spec_type);
- g_value_take_boxed (&val, dbus_g_type_specialized_construct (spec_type));
-
- dbus_g_type_struct_set (&val,
- 0, i,
- 1, sig->name,
- 2, dbus_sig,
- 3, prop->flags,
- G_MAXUINT);
-
- g_ptr_array_add (*ret, g_value_get_boxed (&val));
- }
-
- return TRUE;
-}
-
-
-/**
- * tp_properties_mixin_get_properties:
- * @obj: An object with this mixin
- * @properties: an array of integer property IDs
- * @ret: set to an array of D-Bus structures if %TRUE is returned
- * @error: Set to the error if %FALSE is returned
- *
- * Retrieve the values of the given properties, as in the GetProperties
- * D-Bus method.
- *
- * Returns: %TRUE on success
- */
-gboolean
-tp_properties_mixin_get_properties (GObject *obj,
- const GArray *properties,
- GPtrArray **ret,
- GError **error)
-{
- TpPropertiesMixin *mixin = TP_PROPERTIES_MIXIN (obj);
- TpPropertiesMixinClass *mixin_cls = TP_PROPERTIES_MIXIN_CLASS (
- G_OBJECT_GET_CLASS (obj));
- GType value_type = TP_STRUCT_TYPE_PROPERTY_VALUE;
- guint i;
-
- /* Check input property identifiers */
- for (i = 0; i < properties->len; i++)
- {
- guint prop_id = g_array_index (properties, guint, i);
-
- /* Valid? */
- if (prop_id >= mixin_cls->num_props)
- {
- g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
- "invalid property identifier %d", prop_id);
-
- return FALSE;
- }
-
- /* Permitted? */
- if (!tp_properties_mixin_is_readable (obj, prop_id))
- {
- g_set_error (error, TP_ERROR, TP_ERROR_PERMISSION_DENIED,
- "permission denied for property identifier %d", prop_id);
-
- return FALSE;
- }
- }
-
- /* If we got this far, return the actual values */
- *ret = g_ptr_array_sized_new (properties->len);
-
- for (i = 0; i < properties->len; i++)
- {
- guint prop_id = g_array_index (properties, guint, i);
- GValue val_struct = { 0, };
-
- /* id/value struct */
- g_value_init (&val_struct, value_type);
- g_value_take_boxed (&val_struct,
- dbus_g_type_specialized_construct (value_type));
-
- dbus_g_type_struct_set (&val_struct,
- 0, prop_id,
- 1, mixin->properties[prop_id].value,
- G_MAXUINT);
-
- g_ptr_array_add (*ret, g_value_get_boxed (&val_struct));
- }
-
- return TRUE;
-}
-
-
-/**
- * tp_properties_mixin_set_properties:
- * @obj: An object with this mixin
- * @properties: An array of D-Bus structures containing property ID and value
- * @context: A D-Bus method invocation context for the SetProperties method
- *
- * Start to change properties in response to user request via D-Bus.
- */
-void
-tp_properties_mixin_set_properties (GObject *obj,
- const GPtrArray *properties,
- DBusGMethodInvocation *context)
-{
- TpPropertiesMixin *mixin = TP_PROPERTIES_MIXIN (obj);
- TpPropertiesMixinClass *mixin_cls = TP_PROPERTIES_MIXIN_CLASS (
- G_OBJECT_GET_CLASS (obj));
- TpPropertiesContext *ctx = &mixin->priv->context;
- GError *error = NULL;
- GType value_type = TP_STRUCT_TYPE_PROPERTY_VALUE;
- guint i;
-
- /* Is another SetProperties request already in progress? */
- if (ctx->dbus_ctx)
- {
- error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
- "A SetProperties request is already in progress");
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- ctx->dbus_ctx = context;
- ctx->remaining = tp_intset_new ();
- error = NULL;
-
- if (properties->len == 0)
- {
- DEBUG ("immediately returning from SetProperties with 0 properties");
- tp_properties_context_return (ctx, NULL);
- return;
- }
-
- /* Check input property identifiers */
- for (i = 0; i < properties->len; i++)
- {
- GValue val_struct = { 0, };
- guint prop_id;
- GValue *prop_val;
-
- g_value_init (&val_struct, value_type);
- g_value_set_static_boxed (&val_struct,
- g_ptr_array_index (properties, i));
-
- dbus_g_type_struct_get (&val_struct,
- 0, &prop_id,
- 1, &prop_val,
- G_MAXUINT);
-
- /* Valid? */
- if (prop_id >= mixin_cls->num_props)
- {
- g_boxed_free (G_TYPE_VALUE, prop_val);
- error = g_error_new (TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
- "invalid property identifier %d", prop_id);
- goto ERROR;
- }
-
- /* Permitted? */
- if (!tp_properties_mixin_is_writable (obj, prop_id))
- {
- g_boxed_free (G_TYPE_VALUE, prop_val);
- error = g_error_new (TP_ERROR, TP_ERROR_PERMISSION_DENIED,
- "permission denied for property identifier %d",
- prop_id);
- goto ERROR;
- }
-
- /* Compatible type? */
- if (!g_value_type_compatible (G_VALUE_TYPE (prop_val),
- mixin_cls->signatures[prop_id].type))
- {
- g_boxed_free (G_TYPE_VALUE, prop_val);
- error = g_error_new (TP_ERROR, TP_ERROR_NOT_AVAILABLE,
- "incompatible value type for property "
- "identifier %d", prop_id);
- goto ERROR;
- }
-
- /* Store the value in the context */
- tp_intset_add (ctx->remaining, prop_id);
- ctx->values[prop_id] = prop_val;
- }
-
- if (mixin_cls->set_properties)
- {
- if (mixin_cls->set_properties (obj, ctx, &error))
- return;
- }
- else
- {
- tp_properties_context_return (ctx, NULL);
- return;
- }
-
-ERROR:
- tp_properties_context_return (ctx, error);
-}
-
-/**
- * tp_properties_mixin_has_property:
- * @obj: an object with a properties mixin
- * @name: the string name of the property
- * @property: either %NULL, or a pointer to a location to receive the property
- * index
- *
- * <!--Returns: says it all; this comment is to keep gtkdoc happy-->
- *
- * Returns: %TRUE, setting @property, if @obj has a property of that name
- */
-gboolean
-tp_properties_mixin_has_property (GObject *obj, const gchar *name,
- guint *property)
-{
- TpPropertiesMixinClass *mixin_cls = TP_PROPERTIES_MIXIN_CLASS (
- G_OBJECT_GET_CLASS (obj));
- guint i;
-
- for (i = 0; i < mixin_cls->num_props; i++)
- {
- if (!tp_strdiff (mixin_cls->signatures[i].name, name))
- {
- if (property)
- *property = i;
-
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-
-/**
- * tp_properties_context_has:
- * @ctx: the properties context representing a SetProperties call
- * @property: the property ID
- *
- * <!--Returns: says it all; this comment is to keep gtkdoc happy-->
- *
- * Returns: %TRUE if @ctx indicates that @property still needs to be set on
- * the server.
- */
-gboolean
-tp_properties_context_has (TpPropertiesContext *ctx, guint property)
-{
- g_assert (property < ctx->mixin_cls->num_props);
-
- return (tp_intset_is_member (ctx->remaining, property));
-}
-
-
-/**
- * tp_properties_context_has_other_than:
- * @ctx: the properties context representing a SetProperties call
- * @property: the property ID
- *
- * <!--Returns: says it all; this comment is to keep gtkdoc happy-->
- *
- * Returns: %TRUE if @ctx has properties other than @property that still
- * need to be set on the server
- */
-gboolean
-tp_properties_context_has_other_than (TpPropertiesContext *ctx, guint property)
-{
- gboolean has = tp_intset_is_member (ctx->remaining, property);
-
- g_assert (property < ctx->mixin_cls->num_props);
-
- return (tp_intset_size (ctx->remaining) > (has ? 1 : 0));
-}
-
-
-/**
- * tp_properties_context_get:
- * @ctx: the properties context representing a SetProperties call
- * @property: a property ID
- *
- * <!--Returns: says it all; this comment is to keep gtkdoc happy-->
- *
- * Returns: the value to be set on the server for the property @property
- * in @ctx (whether it has been set already or not)
- */
-const GValue *
-tp_properties_context_get (TpPropertiesContext *ctx, guint property)
-{
- g_assert (property < ctx->mixin_cls->num_props);
-
- return ctx->values[property];
-}
-
-
-/**
- * tp_properties_context_get_value_count:
- * @ctx: the properties context representing a SetProperties call
- *
- * <!--Returns: says it all; this comment is to keep gtkdoc happy-->
- *
- * Returns: the number of properties in @ctx which still need to be set on
- * the server, or have already been set
- */
-guint
-tp_properties_context_get_value_count (TpPropertiesContext *ctx)
-{
- guint i, n;
-
- n = 0;
- for (i = 0; i < ctx->mixin_cls->num_props; i++)
- {
- if (ctx->values[i])
- n++;
- }
-
- return n;
-}
-
-
-/**
- * tp_properties_context_remove:
- * @ctx: the properties context representing a SetProperties call
- * @property: a property ID
- *
- * Mark the given property as having been set successfully.
- */
-void
-tp_properties_context_remove (TpPropertiesContext *ctx, guint property)
-{
- g_assert (property < ctx->mixin_cls->num_props);
-
- tp_intset_remove (ctx->remaining, property);
-}
-
-
-/**
- * tp_properties_context_return:
- * @ctx: the properties context representing a SetProperties call
- * @error: If %NULL, return successfully; otherwise return this error
- *
- * Commit the property changes and return from the pending D-Bus call.
- */
-void
-tp_properties_context_return (TpPropertiesContext *ctx, GError *error)
-{
- GObject *obj = ctx->mixin->priv->object;
- TpIntset *changed_props_val, *changed_props_flags;
- guint i;
-
- DEBUG ("%s", (error) ? "failure" : "success");
-
- changed_props_val = tp_intset_sized_new (ctx->mixin_cls->num_props);
- changed_props_flags = tp_intset_sized_new (ctx->mixin_cls->num_props);
-
- for (i = 0; i < ctx->mixin_cls->num_props; i++)
- {
- if (ctx->values[i])
- {
- if (!error)
- {
- tp_properties_mixin_change_value (obj, i, ctx->values[i],
- changed_props_val);
-
- tp_properties_mixin_change_flags (obj, i,
- TP_PROPERTY_FLAG_READ, 0, changed_props_flags);
- }
-
- g_value_unset (ctx->values[i]);
- ctx->values[i] = NULL;
- }
- }
-
- if (!error)
- {
- tp_properties_mixin_emit_changed (obj, changed_props_val);
- tp_properties_mixin_emit_flags (obj, changed_props_flags);
- tp_intset_destroy (changed_props_val);
- tp_intset_destroy (changed_props_flags);
-
- dbus_g_method_return (ctx->dbus_ctx);
- }
- else
- {
- dbus_g_method_return_error (ctx->dbus_ctx, error);
- g_error_free (error);
- }
-
- ctx->dbus_ctx = NULL;
- tp_intset_destroy (ctx->remaining);
- ctx->remaining = NULL;
- /* The context itself is not freed - it's a static part of the mixin */
-}
-
-
-/**
- * tp_properties_context_return_if_done:
- * @ctx: the properties context representing a SetProperties call
- *
- * Return from the pending D-Bus call if there are no more properties to be
- * dealt with.
- *
- * Returns: %TRUE if we returned from the D-Bus call.
- */
-gboolean
-tp_properties_context_return_if_done (TpPropertiesContext *ctx)
-{
- if (tp_intset_size (ctx->remaining) == 0)
- {
- tp_properties_context_return (ctx, NULL);
- return TRUE;
- }
-
- return FALSE;
-}
-
-#define RPTS_APPEND_FLAG_IF_SET(flag) \
- if (flags & flag) \
- { \
- if (i++ > 0) \
- g_string_append (str, "|"); \
- g_string_append (str, #flag + 17); \
- }
-
-static gchar *
-property_flags_to_string (TpPropertyFlags flags)
-{
- gint i = 0;
- GString *str;
-
- str = g_string_new ("[");
-
- RPTS_APPEND_FLAG_IF_SET (TP_PROPERTY_FLAG_READ);
- RPTS_APPEND_FLAG_IF_SET (TP_PROPERTY_FLAG_WRITE);
-
- g_string_append (str, "]");
-
- return g_string_free (str, FALSE);
-}
-
-static gboolean
-values_are_equal (const GValue *v1, const GValue *v2)
-{
- GType type = G_VALUE_TYPE (v1);
-
- switch (type) {
- case G_TYPE_BOOLEAN:
- return (g_value_get_boolean (v1) == g_value_get_boolean (v2));
-
- case G_TYPE_STRING:
- return !tp_strdiff (g_value_get_string (v1), g_value_get_string (v2));
-
- case G_TYPE_UINT:
- return (g_value_get_uint (v1) == g_value_get_uint (v2));
-
- case G_TYPE_INT:
- return (g_value_get_int (v1) == g_value_get_int (v2));
- }
-
- return FALSE;
-}
-
-
-/**
- * tp_properties_mixin_change_value:
- * @obj: An object with the properties mixin
- * @prop_id: A property ID on which to act
- * @new_value: Property value
- * @props: either %NULL, or a pointer to a TpIntset
- *
- * Change the value of the given property ID in response to a server state
- * change.
- *
- * If the old and new values match, nothing happens; no signal is emitted and
- * @props is ignored. Otherwise, the following applies:
- *
- * If @props is %NULL the PropertiesChanged signal is emitted for this one
- * property.
- *
- * Otherwise, the property ID is added to the set; the caller is responsible
- * for passing the set to tp_properties_mixin_emit_changed() once a batch of
- * properties have been changed.
- */
-void
-tp_properties_mixin_change_value (GObject *obj,
- guint prop_id,
- const GValue *new_value,
- TpIntset *props)
-{
- TpPropertiesMixin *mixin = TP_PROPERTIES_MIXIN (obj);
- TpPropertiesMixinClass *mixin_cls = TP_PROPERTIES_MIXIN_CLASS (
- G_OBJECT_GET_CLASS (obj));
- TpProperty *prop;
-
- g_assert (prop_id < mixin_cls->num_props);
-
- prop = &mixin->properties[prop_id];
-
- if (prop->value)
- {
- if (values_are_equal (prop->value, new_value))
- return;
- }
- else
- {
- prop->value = tp_g_value_slice_new (mixin_cls->signatures[prop_id].type);
- }
-
- g_value_copy (new_value, prop->value);
-
- if (props)
- {
- tp_intset_add (props, prop_id);
- }
- else
- {
- TpIntset *changed_props = tp_intset_sized_new (prop_id + 1);
-
- tp_intset_add (changed_props, prop_id);
- tp_properties_mixin_emit_changed (obj, changed_props);
- tp_intset_destroy (changed_props);
- }
-}
-
-
-/**
- * tp_properties_mixin_change_flags:
- * @obj: An object with the properties mixin
- * @prop_id: A property ID on which to act
- * @add: Property flags to be added via bitwise OR
- * @del: Property flags to be removed via bitwise AND
- * @props: either %NULL, or a pointer to a TpIntset
- *
- * Change the flags for the given property ID in response to a server state
- * change.
- *
- * Flags removed by @del override flags added by @add. This should not be
- * relied upon.
- *
- * If @props is %NULL the PropertyFlagsChanged signal is emitted for this
- * single property.
- *
- * Otherwise, the property ID is added to the set; the caller is responsible
- * for passing the set to tp_properties_mixin_emit_flags() once a batch of
- * properties have been changed.
- */
-void
-tp_properties_mixin_change_flags (GObject *obj,
- guint prop_id,
- TpPropertyFlags add,
- TpPropertyFlags del,
- TpIntset *props)
-{
- TpPropertiesMixin *mixin = TP_PROPERTIES_MIXIN (obj);
- TpPropertiesMixinClass *mixin_cls = TP_PROPERTIES_MIXIN_CLASS (
- G_OBJECT_GET_CLASS (obj));
- TpProperty *prop;
- guint prev_flags;
-
- g_assert (prop_id < mixin_cls->num_props);
-
- prop = &mixin->properties[prop_id];
-
- prev_flags = prop->flags;
-
- prop->flags |= add;
- prop->flags &= ~del;
-
- if (prop->flags == prev_flags)
- return;
-
- if (props)
- {
- tp_intset_add (props, prop_id);
- }
- else
- {
- TpIntset *changed_props = tp_intset_sized_new (prop_id + 1);
-
- tp_intset_add (changed_props, prop_id);
- tp_properties_mixin_emit_flags (obj, changed_props);
- tp_intset_destroy (changed_props);
- }
-}
-
-/**
- * tp_properties_mixin_emit_changed:
- * @obj: an object with the properties mixin
- * @props: a set of property IDs
- *
- * Emit the PropertiesChanged signal to indicate that the values of the
- * given property IDs have changed; the actual values are automatically
- * added using their stored values.
- */
-void
-tp_properties_mixin_emit_changed (GObject *obj, const TpIntset *props)
-{
- TpPropertiesMixin *mixin = TP_PROPERTIES_MIXIN (obj);
- TpPropertiesMixinClass *mixin_cls = TP_PROPERTIES_MIXIN_CLASS (
- G_OBJECT_GET_CLASS (obj));
- GPtrArray *prop_arr;
- GValue prop_list = { 0, };
- TpIntsetFastIter iter;
- guint len = tp_intset_size (props);
- guint prop_id;
-
- if (len == 0)
- {
- return;
- }
-
- prop_arr = g_ptr_array_sized_new (len);
-
- if (DEBUGGING)
- printf ("%s: emitting properties changed for propert%s:\n",
- G_STRFUNC, (len > 1) ? "ies" : "y");
-
- tp_intset_fast_iter_init (&iter, props);
-
- while (tp_intset_fast_iter_next (&iter, &prop_id))
- {
- GValue prop_val = { 0, };
-
- g_value_init (&prop_val, TP_STRUCT_TYPE_PROPERTY_VALUE);
- g_value_take_boxed (&prop_val,
- dbus_g_type_specialized_construct (TP_STRUCT_TYPE_PROPERTY_VALUE));
-
- dbus_g_type_struct_set (&prop_val,
- 0, prop_id,
- 1, mixin->properties[prop_id].value,
- G_MAXUINT);
-
- g_ptr_array_add (prop_arr, g_value_get_boxed (&prop_val));
-
- if (DEBUGGING)
- printf (" %s\n", mixin_cls->signatures[prop_id].name);
- }
-
- if (DEBUGGING)
- {
- fflush (stdout);
- }
-
- tp_svc_properties_interface_emit_properties_changed (
- (TpSvcPropertiesInterface *) obj, prop_arr);
-
- g_value_init (&prop_list, TP_ARRAY_TYPE_PROPERTY_VALUE_LIST);
- g_value_take_boxed (&prop_list, prop_arr);
- g_value_unset (&prop_list);
-}
-
-
-/**
- * tp_properties_mixin_emit_flags:
- * @obj: an object with the properties mixin
- * @props: a set of property IDs
- *
- * Emit the PropertyFlagsChanged signal to indicate that the flags of the
- * given property IDs have changed; the actual flags are automatically
- * added using their stored values.
- */
-void
-tp_properties_mixin_emit_flags (GObject *obj, const TpIntset *props)
-{
- TpPropertiesMixin *mixin = TP_PROPERTIES_MIXIN (obj);
- TpPropertiesMixinClass *mixin_cls = TP_PROPERTIES_MIXIN_CLASS (
- G_OBJECT_GET_CLASS (obj));
- GPtrArray *prop_arr;
- GValue prop_list = { 0, };
- TpIntsetFastIter iter;
- guint len = tp_intset_size (props);
- guint prop_id;
-
- if (len == 0)
- {
- return;
- }
-
- prop_arr = g_ptr_array_sized_new (len);
-
- if (DEBUGGING)
- printf ("%s: emitting properties flags changed for propert%s:\n",
- G_STRFUNC, (len > 1) ? "ies" : "y");
-
- tp_intset_fast_iter_init (&iter, props);
-
- while (tp_intset_fast_iter_next (&iter, &prop_id))
- {
- GValue prop_val = { 0, };
- guint prop_flags;
-
- prop_flags = mixin->properties[prop_id].flags;
-
- g_value_init (&prop_val, TP_STRUCT_TYPE_PROPERTY_FLAGS_CHANGE);
- g_value_take_boxed (&prop_val,
- dbus_g_type_specialized_construct
- (TP_STRUCT_TYPE_PROPERTY_FLAGS_CHANGE));
-
- dbus_g_type_struct_set (&prop_val,
- 0, prop_id,
- 1, prop_flags,
- G_MAXUINT);
-
- g_ptr_array_add (prop_arr, g_value_get_boxed (&prop_val));
-
- if (DEBUGGING)
- {
- gchar *str_flags = property_flags_to_string (prop_flags);
-
- printf (" %s's flags now: %s\n",
- mixin_cls->signatures[prop_id].name, str_flags);
-
- g_free (str_flags);
- }
- }
-
- if (DEBUGGING)
- {
- fflush (stdout);
- }
-
- tp_svc_properties_interface_emit_property_flags_changed (
- (TpSvcPropertiesInterface *) obj, prop_arr);
-
- g_value_init (&prop_list, TP_ARRAY_TYPE_PROPERTY_FLAGS_CHANGE_LIST);
- g_value_take_boxed (&prop_list, prop_arr);
- g_value_unset (&prop_list);
-}
-
-
-/**
- * tp_properties_mixin_is_readable:
- * @obj: an object with this mixin
- * @prop_id: an integer property ID
- *
- * <!--Returns: says it all; this comment is to keep gtkdoc happy-->
- *
- * Returns: %TRUE if the given property has the READ flag
- */
-gboolean
-tp_properties_mixin_is_readable (GObject *obj, guint prop_id)
-{
- TpPropertiesMixin *mixin = TP_PROPERTIES_MIXIN (obj);
- TpPropertiesMixinClass *mixin_cls = TP_PROPERTIES_MIXIN_CLASS (
- G_OBJECT_GET_CLASS (obj));
-
- if (prop_id >= mixin_cls->num_props)
- return FALSE;
-
- return ((mixin->properties[prop_id].flags & TP_PROPERTY_FLAG_READ) != 0);
-}
-
-
-/**
- * tp_properties_mixin_is_writable:
- * @obj: an object with this mixin
- * @prop_id: an integer property ID
- *
- * <!--Returns: says it all; this comment is to keep gtkdoc happy-->
- *
- * Returns: %TRUE if the given property has the WRITE flag
- */
-gboolean
-tp_properties_mixin_is_writable (GObject *obj, guint prop_id)
-{
- TpPropertiesMixin *mixin = TP_PROPERTIES_MIXIN (obj);
- TpPropertiesMixinClass *mixin_cls = TP_PROPERTIES_MIXIN_CLASS (
- G_OBJECT_GET_CLASS (obj));
-
- if (prop_id >= mixin_cls->num_props)
- return FALSE;
-
- return ((mixin->properties[prop_id].flags & TP_PROPERTY_FLAG_WRITE) != 0);
-}
-
-
-/*
- * get_properties
- *
- * Implements D-Bus method GetProperties
- * on interface org.freedesktop.Telepathy.Properties
- *
- * @error: Used to return a pointer to a GError detailing any error
- * that occurred, D-Bus will throw the error only if this
- * function returns FALSE.
- *
- * Returns: TRUE if successful, FALSE if an error was thrown.
- */
-static void
-get_properties (TpSvcPropertiesInterface *iface,
- const GArray *properties,
- DBusGMethodInvocation *context)
-{
- GPtrArray *ret;
- GError *error = NULL;
- gboolean ok = tp_properties_mixin_get_properties (G_OBJECT (iface),
- properties, &ret, &error);
- if (!ok)
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
- tp_svc_properties_interface_return_from_get_properties (
- context, ret);
- g_ptr_array_unref (ret);
-}
-
-
-/*
- * list_properties
- *
- * Implements D-Bus method ListProperties
- * on interface org.freedesktop.Telepathy.Properties
- *
- * @error: Used to return a pointer to a GError detailing any error
- * that occurred, D-Bus will throw the error only if this
- * function returns false.
- *
- * Returns: TRUE if successful, FALSE if an error was thrown.
- */
-static void
-list_properties (TpSvcPropertiesInterface *iface,
- DBusGMethodInvocation *context)
-{
- GPtrArray *ret;
- GError *error = NULL;
- gboolean ok = tp_properties_mixin_list_properties (G_OBJECT (iface), &ret,
- &error);
- guint i;
-
- if (!ok)
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
- tp_svc_properties_interface_return_from_list_properties (
- context, ret);
-
- for (i = 0; i < ret->len; i++)
- g_boxed_free (TP_STRUCT_TYPE_PROPERTY_SPEC, ret->pdata[i]);
-
- g_ptr_array_unref (ret);
-}
-
-
-/*
- * set_properties
- *
- * Implements D-Bus method SetProperties
- * on interface org.freedesktop.Telepathy.Properties
- *
- * @context: The D-Bus invocation context to use to return values
- * or throw an error.
- */
-static void
-set_properties (TpSvcPropertiesInterface *iface,
- const GPtrArray *properties,
- DBusGMethodInvocation *context)
-{
- tp_properties_mixin_set_properties (G_OBJECT (iface), properties, context);
-}
-
-
-/**
- * tp_properties_mixin_iface_init:
- * @g_iface: A pointer to the #TpSvcPropertiesInterfaceClass in an object class
- * @iface_data: Ignored
- *
- * Fill in this mixin's method implementations in the given interface vtable.
- * This function should usually be called via G_IMPLEMENT_INTERFACE
- * inside the G_DEFINE_TYPE_WITH_CODE macro.
- */
-void
-tp_properties_mixin_iface_init (gpointer g_iface, gpointer iface_data)
-{
- TpSvcPropertiesInterfaceClass *klass = g_iface;
-
-#define IMPLEMENT(x) tp_svc_properties_interface_implement_##x (klass, x)
- IMPLEMENT(get_properties);
- IMPLEMENT(list_properties);
- IMPLEMENT(set_properties);
-#undef IMPLEMENT
-}
diff --git a/telepathy-glib/properties-mixin.h b/telepathy-glib/properties-mixin.h
deleted file mode 100644
index e98442b92..000000000
--- a/telepathy-glib/properties-mixin.h
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- * properties-mixin.h - Header for TpPropertiesMixin
- * Copyright (C) 2006 Collabora Ltd.
- * Copyright (C) 2006 Nokia Corporation
- * @author Ole Andre Vadla Ravnaas <ole.andre.ravnaas@collabora.co.uk>
- * @author Robert McQueen <robert.mcqueen@collabora.co.uk>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __TP_PROPERTIES_MIXIN_H__
-#define __TP_PROPERTIES_MIXIN_H__
-
-#include <glib-object.h>
-#include <dbus/dbus-glib.h>
-
-#include <telepathy-glib/enums.h>
-#include <telepathy-glib/gtypes.h>
-#include <telepathy-glib/intset.h>
-#include <telepathy-glib/svc-properties-interface.h>
-#include <telepathy-glib/util.h>
-
-G_BEGIN_DECLS
-
-/**
- * TpPropertySignature:
- * @name: Name of the property as seen in the Telepathy D-Bus protocol
- * @type: GType which the variant value must have. We currently support
- * only %G_TYPE_UINT, %G_TYPE_INT, %G_TYPE_STRING, %G_TYPE_BOOLEAN,
- * corresponding to D-Bus signatures 'u', 'i', 's', 'b'.
- *
- * Signature of a property in the Telepathy properties interface.
- */
-struct _TpPropertySignature {
- gchar *name;
- GType type;
-};
-
-typedef struct _TpPropertySignature TpPropertySignature;
-
-/**
- * TpProperty:
- * @value: The value of the property
- * @flags: #TpPropertyFlags indicating the property's permissions
- *
- * Structure representing the current state of a property.
- */
-struct _TpProperty {
- /* FIXME: if we ever break ABI, make this a (GValue) rather than a
- * (GValue *) */
- GValue *value;
- guint flags;
-};
-
-typedef struct _TpProperty TpProperty;
-
-/**
- * TpPropertiesContext:
- *
- * Opaque pointer representing an incomplete property-setting operation, used
- * in the implementation of SetProperties.
- */
-typedef struct _TpPropertiesContext TpPropertiesContext;
-
-/**
- * TpPropertiesSetFunc:
- * @obj: An object with the properties mixin
- * @ctx: A properties context
- * @error: Set to the error if %FALSE is returned
- *
- * A callback used to implement the SetProperties D-Bus method by setting
- * properties in the underlying IM protocol.
- *
- * The callback must either:
- *
- * * return %FALSE to indicate immediate failure
- * * call tp_properties_context_return() with an error to indicate failure
- * * call tp_properties_context_remove() to remove each property from the set
- * of pending properties, then call tp_properties_context_return_if_done()
- * or tp_properties_context_return() when all were set
- *
- * Returns: %FALSE on immediate failure, %TRUE otherwise
- */
-typedef gboolean (*TpPropertiesSetFunc) (GObject *obj,
- TpPropertiesContext *ctx, GError **error);
-
-typedef struct _TpPropertiesMixinClass TpPropertiesMixinClass;
-typedef struct _TpPropertiesMixinPrivate TpPropertiesMixinPrivate;
-typedef struct _TpPropertiesMixin TpPropertiesMixin;
-/* Doesn't yet exist. For future expansion. */
-typedef struct _TpPropertiesMixinClassPrivate TpPropertiesMixinClassPrivate;
-
-/**
- * TpPropertiesMixin:
- * @properties: Array of property values, of length klass->num_props.
- * Should be considered read-only.
- * @priv: Pointer to opaque private data.
- *
- * Structure to be placed in a GObject-derived structure containing
- * instance data for the properties mixin (i.e. the properties). Initialize
- * it using tp_properties_mixin_init().
- */
-struct _TpPropertiesMixin {
- TpProperty *properties;
-
- TpPropertiesMixinPrivate *priv;
-};
-
-/**
- * TpPropertiesMixinClass:
- * @signatures: Array of property signatures, as provided via
- * tp_properties_mixin_class_init(), of length @num_props.
- * @num_props: Number of properties supported.
- * @set_properties: Properties setting function, as supplied to
- * tp_properties_mixin_class_init().
- * @priv: Pointer to opaque private data.
- *
- * Structure to be placed in a GObjectClass-derived structure containing
- * settings for the properties mixin. Initialize it using
- * tp_properties_mixin_class_init().
- *
- * All fields should be considered read-only.
- */
-struct _TpPropertiesMixinClass {
- const TpPropertySignature *signatures;
- guint num_props;
-
- TpPropertiesSetFunc set_properties;
-
- TpPropertiesMixinClassPrivate *priv;
-};
-
-/* TYPE MACROS */
-#define TP_PROPERTIES_MIXIN_CLASS_OFFSET_QUARK \
- (tp_properties_mixin_class_get_offset_quark ())
-#define TP_PROPERTIES_MIXIN_CLASS_OFFSET(o) \
- tp_mixin_class_get_offset (o, TP_PROPERTIES_MIXIN_CLASS_OFFSET_QUARK)
-#define TP_PROPERTIES_MIXIN_CLASS(o) \
- ((TpPropertiesMixinClass *) tp_mixin_offset_cast (o,\
- TP_PROPERTIES_MIXIN_CLASS_OFFSET (o)))
-
-#define TP_PROPERTIES_MIXIN_OFFSET_QUARK \
- (tp_properties_mixin_get_offset_quark ())
-#define TP_PROPERTIES_MIXIN_OFFSET(o) \
- tp_mixin_instance_get_offset (o, TP_PROPERTIES_MIXIN_OFFSET_QUARK)
-#define TP_PROPERTIES_MIXIN(o) \
- ((TpPropertiesMixin *) tp_mixin_offset_cast (o, \
- TP_PROPERTIES_MIXIN_OFFSET (o)))
-
-/**
- * TP_TYPE_PROPERTY_INFO_STRUCT:
- *
- * The GType of the structures with D-Bus signature '(ussu)' returned by
- * ListProperties.
- *
- * @Deprecated: Since 0.7.0. Use TP_STRUCT_TYPE_PROPERTY_SPEC instead.
- */
-#define TP_TYPE_PROPERTY_INFO_STRUCT TP_STRUCT_TYPE_PROPERTY_SPEC
-
-/**
- * TP_TYPE_PROPERTY_INFO_LIST:
- *
- * The GType of the return from ListProperties (i.e. a GPtrArray
- * of structures of type TP_TYPE_PROPERTY_INFO_STRUCT), corresponding to
- * D-Bus signature 'a(ussu)'.
- *
- * @Deprecated: Since 0.7.0. Use TP_ARRAY_TYPE_PROPERTY_SPEC_LIST instead.
- */
-#define TP_TYPE_PROPERTY_INFO_LIST TP_ARRAY_TYPE_PROPERTY_SPEC_LIST
-
-/**
- * TP_TYPE_PROPERTY_VALUE_STRUCT:
- *
- * The GType of the structures with signature '(uv)' returned by
- * GetProperties and emitted in PropertiesChanged.
- *
- * @Deprecated: Since 0.7.0. Use TP_STRUCT_TYPE_PROPERTY_VALUE instead.
- */
-#define TP_TYPE_PROPERTY_VALUE_STRUCT TP_STRUCT_TYPE_PROPERTY_VALUE
-
-/**
- * TP_TYPE_PROPERTY_VALUE_LIST
- *
- * The GType of the return from GetProperties and the parameter to
- * PropertiesChanged (i.e. a GPtrArray of structures of type
- * TP_TYPE_PROPERTY_VALUE_STRUCT), corresponding to D-Bus signature 'a(uv)'.
- *
- * @Deprecated: Since 0.7.0. Use TP_ARRAY_TYPE_PROPERTY_VALUE_LIST instead.
- */
-#define TP_TYPE_PROPERTY_VALUE_LIST TP_ARRAY_TYPE_PROPERTY_VALUE_LIST
-
-/**
- * TP_TYPE_PROPERTY_FLAGS_STRUCT:
- *
- * The GType of the structures with D-Bus signature '(uu)' emitted in
- * PropertyFlagsChanged.
- *
- * @Deprecated: Since 0.7.0. Use TP_STRUCT_TYPE_PROPERTY_FLAGS_CHANGE instead.
- */
-#define TP_TYPE_PROPERTY_FLAGS_STRUCT TP_STRUCT_TYPE_PROPERTY_FLAGS_CHANGE
-
-/**
- * TP_TYPE_PROPERTY_FLAGS_LIST
- *
- * The GType of the parameter to PropertyFlagsChanged (i.e. a GPtrArray of
- * structures of type TP_TYPE_PROPERTY_FLAGS_STRUCT), corresponding to
- * D-Bus signature 'a(uu)'.
- *
- * @Deprecated: Since 0.7.0. Use TP_ARRAY_TYPE_PROPERTY_FLAGS_CHANGE_LIST
- * instead.
- */
-#define TP_TYPE_PROPERTY_FLAGS_LIST TP_ARRAY_TYPE_PROPERTY_FLAGS_CHANGE_LIST
-
-GQuark tp_properties_mixin_class_get_offset_quark (void);
-GQuark tp_properties_mixin_get_offset_quark (void);
-
-void tp_properties_mixin_class_init (GObjectClass *obj_cls, glong offset,
- const TpPropertySignature *signatures, guint num_properties,
- TpPropertiesSetFunc set_func);
-
-void tp_properties_mixin_init (GObject *obj, glong offset);
-void tp_properties_mixin_finalize (GObject *obj);
-
-gboolean tp_properties_mixin_list_properties (GObject *obj, GPtrArray **ret,
- GError **error);
-gboolean tp_properties_mixin_get_properties (GObject *obj,
- const GArray *properties, GPtrArray **ret, GError **error);
-void tp_properties_mixin_set_properties (GObject *obj,
- const GPtrArray *properties, DBusGMethodInvocation *context);
-
-gboolean tp_properties_mixin_has_property (GObject *obj, const gchar *name,
- guint *property);
-
-gboolean tp_properties_context_has (TpPropertiesContext *ctx, guint property);
-gboolean tp_properties_context_has_other_than (TpPropertiesContext *ctx,
- guint property);
-const GValue *tp_properties_context_get (TpPropertiesContext *ctx,
- guint property);
-guint tp_properties_context_get_value_count (TpPropertiesContext *ctx);
-void tp_properties_context_remove (TpPropertiesContext *ctx, guint property);
-void tp_properties_context_return (TpPropertiesContext *ctx, GError *error);
-gboolean tp_properties_context_return_if_done (TpPropertiesContext *ctx);
-
-void tp_properties_mixin_change_value (GObject *obj, guint prop_id,
- const GValue *new_value, TpIntset *props);
-void tp_properties_mixin_change_flags (GObject *obj, guint prop_id,
- TpPropertyFlags add, TpPropertyFlags del, TpIntset *props);
-void tp_properties_mixin_emit_changed (GObject *obj, const TpIntset *props);
-void tp_properties_mixin_emit_flags (GObject *obj, const TpIntset *props);
-
-gboolean tp_properties_mixin_is_readable (GObject *obj, guint prop_id);
-gboolean tp_properties_mixin_is_writable (GObject *obj, guint prop_id);
-
-void tp_properties_mixin_iface_init (gpointer g_iface, gpointer iface_data);
-
-G_END_DECLS
-
-#endif /* #ifndef __TP_PROPERTIES_MIXIN_H__ */
diff --git a/telepathy-glib/protocol.c b/telepathy-glib/protocol.c
index 98167a196..80ecd998e 100644
--- a/telepathy-glib/protocol.c
+++ b/telepathy-glib/protocol.c
@@ -37,16 +37,17 @@
#include <telepathy-glib/protocol.h>
#include <telepathy-glib/protocol-internal.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/proxy-subclass.h>
#include <telepathy-glib/telepathy-glib.h>
#define DEBUG_FLAG TP_DEBUG_PARAMS
#include "telepathy-glib/capabilities-internal.h"
+#include "telepathy-glib/cli-misc.h"
#include "telepathy-glib/debug-internal.h"
#include "telepathy-glib/proxy-internal.h"
-#include "telepathy-glib/_gen/tp-cli-protocol-body.h"
-
#include <string.h>
struct _TpProtocolClass
@@ -1418,7 +1419,7 @@ parse_default_value (GValue *value,
#define PROTOCOL_PREFIX "Protocol "
#define PROTOCOL_PREFIX_LEN 9
-tp_verify (sizeof (PROTOCOL_PREFIX) == PROTOCOL_PREFIX_LEN + 1);
+G_STATIC_ASSERT (sizeof (PROTOCOL_PREFIX) == PROTOCOL_PREFIX_LEN + 1);
static gchar *
replace_null_with_empty (gchar *in)
diff --git a/telepathy-glib/protocol.h b/telepathy-glib/protocol.h
index 31c4a4605..32bdc5b5c 100644
--- a/telepathy-glib/protocol.h
+++ b/telepathy-glib/protocol.h
@@ -120,6 +120,4 @@ TpAvatarRequirements * tp_protocol_get_avatar_requirements (TpProtocol *self);
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-protocol.h>
-
#endif
diff --git a/telepathy-glib/protocol.xml b/telepathy-glib/protocol.xml
index 82edad614..a242025a7 100644
--- a/telepathy-glib/protocol.xml
+++ b/telepathy-glib/protocol.xml
@@ -5,8 +5,8 @@
<tp:title>Protocol interfaces</tp:title>
<xi:include href="../spec/Protocol.xml"/>
-<xi:include href="../spec/Protocol_Interface_Addressing.xml"/>
-<xi:include href="../spec/Protocol_Interface_Avatars.xml"/>
-<xi:include href="../spec/Protocol_Interface_Presence.xml"/>
+<xi:include href="../spec/Protocol_Interface_Addressing1.xml"/>
+<xi:include href="../spec/Protocol_Interface_Avatars1.xml"/>
+<xi:include href="../spec/Protocol_Interface_Presence1.xml"/>
</tp:spec>
diff --git a/telepathy-glib/proxy-internal.h b/telepathy-glib/proxy-internal.h
index b53a82c0e..7acb97acb 100644
--- a/telepathy-glib/proxy-internal.h
+++ b/telepathy-glib/proxy-internal.h
@@ -22,6 +22,97 @@
#define __TP_PROXY_INTERNAL_H__
#include <telepathy-glib/proxy.h>
+#include <telepathy-glib/proxy-subclass.h>
+
+typedef struct {
+ const gchar *version;
+ gsize size;
+
+ DBusGProxy *(*borrow_interface_by_id) (TpProxy *,
+ GQuark,
+ GError **);
+
+ TpProxyPendingCall *(*pending_call_new) (TpProxy *,
+ GQuark,
+ const gchar *,
+ DBusGProxy *,
+ TpProxyInvokeFunc,
+ GCallback,
+ gpointer,
+ GDestroyNotify,
+ GObject *,
+ gboolean);
+ void (*pending_call_take_pending_call) (TpProxyPendingCall *,
+ DBusGProxyCall *);
+ void (*pending_call_take_results) (TpProxyPendingCall *,
+ GError *,
+ GValueArray *);
+ GDestroyNotify pending_call_completed;
+
+ TpProxySignalConnection *(*signal_connection_new) (TpProxy *,
+ GQuark,
+ const gchar *,
+ const GType *,
+ GCallback,
+ TpProxyInvokeFunc,
+ GCallback,
+ gpointer,
+ GDestroyNotify,
+ GObject *,
+ GError **);
+ void (*signal_connection_take_results) (TpProxySignalConnection *,
+ GValueArray *);
+
+ GType type;
+} TpProxyImplementation;
+
+DBusGProxy *_tp_proxy_borrow_interface_by_id (TpProxy *self,
+ GQuark iface,
+ GError **error);
+
+TpProxyPendingCall *_tp_proxy_pending_call_new (TpProxy *self,
+ GQuark iface,
+ const gchar *member,
+ DBusGProxy *iface_proxy,
+ TpProxyInvokeFunc invoke_callback,
+ GCallback callback,
+ gpointer user_data,
+ GDestroyNotify destroy,
+ GObject *weak_object,
+ gboolean cancel_must_raise);
+
+void _tp_proxy_pending_call_take_pending_call (TpProxyPendingCall *pc,
+ DBusGProxyCall *pending_call);
+
+void _tp_proxy_pending_call_take_results (TpProxyPendingCall *pc,
+ GError *error,
+ GValueArray *args);
+
+void _tp_proxy_pending_call_completed (gpointer p);
+
+TpProxySignalConnection *_tp_proxy_signal_connection_new (TpProxy *self,
+ GQuark iface,
+ const gchar *member,
+ const GType *expected_types,
+ GCallback collect_args,
+ TpProxyInvokeFunc invoke_callback,
+ GCallback callback,
+ gpointer user_data,
+ GDestroyNotify destroy,
+ GObject *weak_object,
+ GError **error);
+
+void _tp_proxy_signal_connection_take_results (TpProxySignalConnection *sc,
+ GValueArray *args);
+
+/*
+ * Implemented in the -core library, and called by the -main library.
+ *
+ * This is only extern so that the -main part can call into the
+ * -core part across a shared-library boundary. If you are not
+ * TpProxy early initialization, don't.
+ */
+void tp_private_proxy_set_implementation (TpProxyImplementation *impl);
GError *_tp_proxy_take_and_remap_error (TpProxy *self, GError *error)
G_GNUC_WARN_UNUSED_RESULT;
@@ -45,6 +136,6 @@ gboolean _tp_proxy_will_announce_connected_finish (TpProxy *self,
GError **error);
void _tp_proxy_ensure_factory (gpointer self,
- TpSimpleClientFactory *factory);
+ TpClientFactory *factory);
#endif
diff --git a/telepathy-glib/proxy-methods.c b/telepathy-glib/proxy-methods.c
index a7472bd10..de0f7964d 100644
--- a/telepathy-glib/proxy-methods.c
+++ b/telepathy-glib/proxy-methods.c
@@ -202,7 +202,8 @@ _tp_proxy_pending_call_dgproxy_destroy (DBusGProxy *iface_proxy,
* @self: a proxy
* @iface: a quark whose string value is the D-Bus interface
* @member: the name of the method being called
- * @iface_proxy: the interface-specific #DBusGProxy for @iface
+ * @iface_proxy: the interface-specific #DBusGProxy for @iface,
+ * or %NULL if the call will immediately fail
* @invoke_callback: an implementation of #TpProxyInvokeFunc which will
* invoke @callback with appropriate arguments
* @callback: a callback to be called when the call completes
@@ -241,17 +242,20 @@ _tp_proxy_pending_call_dgproxy_destroy (DBusGProxy *iface_proxy,
*
* Since: 0.7.1
*/
+
+/* that's implemented in the core library, but it calls this: */
+
TpProxyPendingCall *
-tp_proxy_pending_call_v0_new (TpProxy *self,
- GQuark iface,
- const gchar *member,
- DBusGProxy *iface_proxy,
- TpProxyInvokeFunc invoke_callback,
- GCallback callback,
- gpointer user_data,
- GDestroyNotify destroy,
- GObject *weak_object,
- gboolean cancel_must_raise)
+_tp_proxy_pending_call_new (TpProxy *self,
+ GQuark iface,
+ const gchar *member,
+ DBusGProxy *iface_proxy,
+ TpProxyInvokeFunc invoke_callback,
+ GCallback callback,
+ gpointer user_data,
+ GDestroyNotify destroy,
+ GObject *weak_object,
+ gboolean cancel_must_raise)
{
TpProxyPendingCall *pc;
@@ -270,7 +274,7 @@ tp_proxy_pending_call_v0_new (TpProxy *self,
pc->user_data = user_data;
pc->destroy = destroy;
pc->weak_object = weak_object;
- pc->iface_proxy = g_object_ref (iface_proxy);
+ pc->iface_proxy = NULL;
pc->pending_call = NULL;
pc->priv = pending_call_magic;
pc->cancel_must_raise = cancel_must_raise;
@@ -278,8 +282,13 @@ tp_proxy_pending_call_v0_new (TpProxy *self,
if (weak_object != NULL)
g_object_weak_ref (weak_object, tp_proxy_pending_call_lost_weak_ref, pc);
- g_signal_connect (iface_proxy, "destroy",
- G_CALLBACK (_tp_proxy_pending_call_dgproxy_destroy), pc);
+ if (iface_proxy != NULL)
+ {
+ pc->iface_proxy = g_object_ref (iface_proxy);
+
+ g_signal_connect (iface_proxy, "destroy",
+ G_CALLBACK (_tp_proxy_pending_call_dgproxy_destroy), pc);
+ }
return pc;
}
@@ -402,8 +411,11 @@ tp_proxy_pending_call_free (TpProxyPendingCall *pc)
*
* Since: 0.7.1
*/
+
+/* that's implemented in the core library, but it calls this: */
+
void
-tp_proxy_pending_call_v0_completed (gpointer p)
+_tp_proxy_pending_call_completed (gpointer p)
{
TpProxyPendingCall *pc = p;
@@ -444,15 +456,22 @@ tp_proxy_pending_call_v0_completed (gpointer p)
* should usually only be called from code generated by
* tools/glib-client-gen.py.
*
+ * This function may not be called if @pc was constructed with a %NULL
+ * #DBusGProxy.
+ *
* Since: 0.7.1
*/
+
+/* that's implemented in the core library, but it calls this: */
+
void
-tp_proxy_pending_call_v0_take_pending_call (TpProxyPendingCall *pc,
- DBusGProxyCall *pending_call)
+_tp_proxy_pending_call_take_pending_call (TpProxyPendingCall *pc,
+ DBusGProxyCall *pending_call)
{
g_return_if_fail (pc->priv == pending_call_magic);
g_return_if_fail (pc->pending_call == NULL);
g_return_if_fail (pc->proxy != NULL);
+ g_return_if_fail (pc->iface_proxy != NULL);
pc->pending_call = pending_call;
}
@@ -489,10 +508,13 @@ _tp_proxy_pending_call_idle_completed (gpointer p)
*
* Since: 0.7.1
*/
+
+/* that's implemented in the core library, but it calls this: */
+
void
-tp_proxy_pending_call_v0_take_results (TpProxyPendingCall *pc,
- GError *error,
- GValueArray *args)
+_tp_proxy_pending_call_take_results (TpProxyPendingCall *pc,
+ GError *error,
+ GValueArray *args)
{
g_return_if_fail (pc->proxy != NULL);
g_return_if_fail (pc->priv == pending_call_magic);
diff --git a/telepathy-glib/proxy-signals.c b/telepathy-glib/proxy-signals.c
index 013faf410..e5629f148 100644
--- a/telepathy-glib/proxy-signals.c
+++ b/telepathy-glib/proxy-signals.c
@@ -20,6 +20,7 @@
#include "config.h"
#include "telepathy-glib/proxy-subclass.h"
+#include "telepathy-glib/proxy-internal.h"
#define DEBUG_FLAG TP_DEBUG_PROXY
#include "telepathy-glib/debug-internal.h"
@@ -314,7 +315,7 @@ _tp_proxy_signal_connection_dgproxy_destroy (DBusGProxy *iface_proxy,
static void
collect_none (DBusGProxy *dgproxy, TpProxySignalConnection *sc)
{
- tp_proxy_signal_connection_v0_take_results (sc, NULL);
+ _tp_proxy_signal_connection_take_results (sc, NULL);
}
/**
@@ -356,18 +357,21 @@ collect_none (DBusGProxy *dgproxy, TpProxySignalConnection *sc)
*
* Since: 0.7.1
*/
+
+/* that's implemented in the core library, but it calls this: */
+
TpProxySignalConnection *
-tp_proxy_signal_connection_v0_new (TpProxy *self,
- GQuark iface,
- const gchar *member,
- const GType *expected_types,
- GCallback collect_args,
- TpProxyInvokeFunc invoke_callback,
- GCallback callback,
- gpointer user_data,
- GDestroyNotify destroy,
- GObject *weak_object,
- GError **error)
+_tp_proxy_signal_connection_new (TpProxy *self,
+ GQuark iface,
+ const gchar *member,
+ const GType *expected_types,
+ GCallback collect_args,
+ TpProxyInvokeFunc invoke_callback,
+ GCallback callback,
+ gpointer user_data,
+ GDestroyNotify destroy,
+ GObject *weak_object,
+ GError **error)
{
TpProxySignalConnection *sc;
DBusGProxy *iface_proxy = tp_proxy_borrow_interface_by_id (self,
@@ -437,9 +441,12 @@ tp_proxy_signal_connection_v0_new (TpProxy *self,
*
* Since: 0.7.1
*/
+
+/* that's implemented in the core library, but it calls this: */
+
void
-tp_proxy_signal_connection_v0_take_results (TpProxySignalConnection *sc,
- GValueArray *args)
+_tp_proxy_signal_connection_take_results (TpProxySignalConnection *sc,
+ GValueArray *args)
{
TpProxySignalInvocation *invocation = g_slice_new0 (TpProxySignalInvocation);
/* FIXME: assert that the GValueArray is the right length, or
diff --git a/telepathy-glib/proxy-subclass.h b/telepathy-glib/proxy-subclass.h
index 739995453..50ee18841 100644
--- a/telepathy-glib/proxy-subclass.h
+++ b/telepathy-glib/proxy-subclass.h
@@ -64,7 +64,7 @@ void tp_proxy_or_subclass_hook_on_interface_add (GType proxy_or_subclass,
DBusGProxy *tp_proxy_borrow_interface_by_id (TpProxy *self, GQuark iface,
GError **error);
-DBusGProxy *tp_proxy_add_interface_by_id (TpProxy *self, GQuark iface);
+void tp_proxy_add_interface_by_id (TpProxy *self, GQuark iface);
void tp_proxy_add_interfaces (TpProxy *self, const gchar * const *interfaces);
void tp_proxy_invalidate (TpProxy *self, const GError *error);
diff --git a/telepathy-glib/proxy.c b/telepathy-glib/proxy.c
index 27f634087..739790638 100644
--- a/telepathy-glib/proxy.c
+++ b/telepathy-glib/proxy.c
@@ -26,6 +26,7 @@
#include <string.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/automatic-client-factory.h>
#include <telepathy-glib/util.h>
@@ -33,11 +34,9 @@
#include "dbus-internal.h"
#define DEBUG_FLAG TP_DEBUG_PROXY
#include "debug-internal.h"
-#include "simple-client-factory-internal.h"
+#include "client-factory-internal.h"
#include "util-internal.h"
-#include "_gen/tp-cli-generic-body.h"
-
#if 0
#define MORE_DEBUG DEBUG
#else
@@ -105,15 +104,6 @@ tp_dbus_errors_quark (void)
*/
/**
- * NUM_TP_DBUS_ERRORS: (skip)
- *
- * 1 more than the highest valid #TpDBusError at the time of compilation.
- * In new code, use %TP_NUM_DBUS_ERRORS instead.
- *
- * Since: 0.7.1
- */
-
-/**
* TP_NUM_DBUS_ERRORS:
*
* 1 more than the highest valid #TpDBusError at the time of compilation
@@ -154,22 +144,6 @@ tp_dbus_errors_quark (void)
*/
/**
- * SECTION:proxy-tp-properties
- * @title: TpProxy Telepathy Properties
- * @short_description: The Telepathy Properties interface
- * @see_also: #TpProxy
- *
- * As well as #TpProxy, proxy.h includes auto-generated client wrappers for the
- * Telepathy Properties interface, which can be implemented by any type of
- * object.
- *
- * The Telepathy Properties interface should not be confused with the D-Bus
- * core Properties interface.
- *
- * Since: 0.7.1
- */
-
-/**
* SECTION:proxy-subclass
* @title: TpProxy subclasses and mixins
* @short_description: Providing extra functionality for a #TpProxy or
@@ -404,7 +378,7 @@ struct _TpProxyPrivate {
gboolean dispose_has_run;
- TpSimpleClientFactory *factory;
+ TpClientFactory *factory;
};
G_DEFINE_TYPE (TpProxy, tp_proxy, G_TYPE_OBJECT)
@@ -447,13 +421,18 @@ static void tp_proxy_iface_destroyed_cb (DBusGProxy *dgproxy, TpProxy *self);
*
* Since: 0.7.1
*/
+
+/* that's implemented in the core library, but it calls this: */
+
DBusGProxy *
-tp_proxy_borrow_interface_by_id (TpProxy *self,
- GQuark iface,
- GError **error)
+_tp_proxy_borrow_interface_by_id (TpProxy *self,
+ GQuark iface,
+ GError **error)
{
gpointer dgproxy;
+ g_return_val_if_fail (TP_IS_PROXY (self), NULL);
+
if (self->invalidated != NULL)
{
g_set_error (error, self->invalidated->domain, self->invalidated->code,
@@ -669,26 +648,20 @@ tp_proxy_iface_destroyed_cb (DBusGProxy *dgproxy,
* If the interface is the proxy's "main interface", or has already been
* added, then do nothing.
*
- * Returns: either %NULL or a borrowed #DBusGProxy corresponding to @iface,
- * depending on implementation details. To reliably borrow the #DBusGProxy, use
- * tp_proxy_borrow_interface_by_id(). (This method should probably have
- * returned void; sorry.)
- *
* Since: 0.7.1
*/
-DBusGProxy *
+void
tp_proxy_add_interface_by_id (TpProxy *self,
GQuark iface)
{
DBusGProxy *iface_proxy = g_datalist_id_get_data (&self->priv->interfaces,
iface);
- g_return_val_if_fail
+ g_return_if_fail
(tp_dbus_check_valid_interface_name (g_quark_to_string (iface),
- NULL),
- NULL);
+ NULL));
- g_return_val_if_fail (tp_proxy_get_invalidated (self) == NULL, NULL);
+ g_return_if_fail (tp_proxy_get_invalidated (self) == NULL);
if (iface_proxy == NULL)
{
@@ -699,8 +672,6 @@ tp_proxy_add_interface_by_id (TpProxy *self,
g_datalist_id_set_data_full (&self->priv->interfaces, iface,
self, NULL);
}
-
- return iface_proxy;
}
/**
@@ -763,7 +734,7 @@ error_mapping_quark (void)
* Convert a D-Bus error name into a GError as if it was returned by a method
* on this proxy. This method is useful when D-Bus error names are emitted in
* signals, such as Connection.ConnectionError and
- * Group.MembersChangedDetailed.
+ * Group.MembersChanged.
*
* Since: 0.7.24
*/
@@ -1349,12 +1320,12 @@ tp_proxy_class_init (TpProxyClass *klass)
/**
* TpProxy:factory:
*
- * The #TpSimpleClientFactory used to create this proxy,
+ * The #TpClientFactory used to create this proxy,
* or %NULL if this proxy was not created through a factory.
*/
param_spec = g_param_spec_object ("factory", "Simple Client Factory",
- "The TpSimpleClientFactory used to create this proxy",
- TP_TYPE_SIMPLE_CLIENT_FACTORY,
+ "The TpClientFactory used to create this proxy",
+ TP_TYPE_CLIENT_FACTORY,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_FACTORY,
param_spec);
@@ -1417,7 +1388,7 @@ tp_proxy_class_init (TpProxyClass *klass)
*
* Since: 0.15.5
*/
-TpSimpleClientFactory *
+TpClientFactory *
tp_proxy_get_factory (gpointer self)
{
TpProxy *proxy = self;
@@ -1429,7 +1400,7 @@ tp_proxy_get_factory (gpointer self)
void
_tp_proxy_ensure_factory (gpointer proxy,
- TpSimpleClientFactory *factory)
+ TpClientFactory *factory)
{
TpProxy *self = TP_PROXY (proxy);
@@ -1442,11 +1413,10 @@ _tp_proxy_ensure_factory (gpointer proxy,
}
else
{
- self->priv->factory = (TpSimpleClientFactory *)
- tp_automatic_client_factory_new (self->dbus_daemon);
+ self->priv->factory = tp_automatic_client_factory_new (self->dbus_daemon);
}
- _tp_simple_client_factory_insert_proxy (self->priv->factory, self);
+ _tp_client_factory_insert_proxy (self->priv->factory, self);
}
/**
@@ -1548,55 +1518,26 @@ tp_proxy_get_invalidated (gpointer self)
return proxy->invalidated;
}
-/**
- * tp_proxy_dbus_g_proxy_claim_for_signal_adding:
- * @proxy: a #DBusGProxy
- *
- * Attempt to "claim" a #DBusGProxy for addition of signal signatures.
- * If this function has not been called on @proxy before, %TRUE is
- * returned, and the caller may safely call dbus_g_proxy_add_signal()
- * on @proxy. If this function has already been caled, %FALSE is
- * returned, and the caller may not safely call dbus_g_proxy_add_signal().
- *
- * This is intended for use by auto-generated signal-adding functions,
- * to allow interfaces provided as local extensions to override those in
- * telepathy-glib without causing assertion failures.
- *
- * Returns: %TRUE if it is safe to call dbus_g_proxy_add_signal()
- * Since: 0.7.6
- */
-gboolean
-tp_proxy_dbus_g_proxy_claim_for_signal_adding (DBusGProxy *proxy)
-{
- static GQuark q = 0;
-
- g_return_val_if_fail (proxy != NULL, FALSE);
-
- if (G_UNLIKELY (q == 0))
- {
- q = g_quark_from_static_string (
- "tp_proxy_dbus_g_proxy_claim_for_signal_adding@0.7.6");
- }
-
- if (g_object_get_qdata ((GObject *) proxy, q) != NULL)
- {
- /* Someone else has already added signal signatures for this interface.
- * We can't do it again or it'll cause an assertion */
- return FALSE;
- }
-
- /* the proxy is just used as qdata here because it's a convenient
- * non-NULL pointer */
- g_object_set_qdata ((GObject *) proxy, q, proxy);
- return TRUE;
-}
-
static gpointer
tp_proxy_once (gpointer data G_GNUC_UNUSED)
{
- GType type = TP_TYPE_PROXY;
-
- tp_proxy_or_subclass_hook_on_interface_add (type,
+ TpProxyImplementation impl = {
+ VERSION,
+ sizeof (TpProxyImplementation),
+ _tp_proxy_borrow_interface_by_id,
+ _tp_proxy_pending_call_new,
+ _tp_proxy_pending_call_take_pending_call,
+ _tp_proxy_pending_call_take_results,
+ _tp_proxy_pending_call_completed,
+ _tp_proxy_signal_connection_new,
+ _tp_proxy_signal_connection_take_results,
+ /* keep this at the end as a final sanity-check of the size */
+ TP_TYPE_PROXY
+ };
+
+ tp_private_proxy_set_implementation (&impl);
+
+ tp_proxy_or_subclass_hook_on_interface_add (impl.type,
tp_cli_generic_add_signals);
return NULL;
diff --git a/telepathy-glib/proxy.h b/telepathy-glib/proxy.h
index cd2c83850..0b6b71b55 100644
--- a/telepathy-glib/proxy.h
+++ b/telepathy-glib/proxy.h
@@ -32,8 +32,8 @@ G_BEGIN_DECLS
/* Forward declaration of a subclass - from dbus.h */
typedef struct _TpDBusDaemon TpDBusDaemon;
-/* Forward declaration - from simple-client-factory.h */
-typedef struct _TpSimpleClientFactory TpSimpleClientFactory;
+/* Forward declaration - from client-factory.h */
+typedef struct _TpClientFactory TpClientFactory;
typedef struct _TpProxyPrivate TpProxyPrivate;
@@ -56,7 +56,6 @@ typedef enum {
TP_DBUS_ERROR_INCONSISTENT = 10,
} TpDBusError;
#define TP_NUM_DBUS_ERRORS (TP_DBUS_ERROR_INCONSISTENT + 1)
-#define NUM_TP_DBUS_ERRORS TP_NUM_DBUS_ERRORS
struct _TpProxy {
/*<private>*/
@@ -158,7 +157,7 @@ gboolean tp_proxy_has_interface_by_id (gpointer self, GQuark iface);
gboolean tp_proxy_has_interface (gpointer self, const gchar *iface);
_TP_AVAILABLE_IN_0_16
-TpSimpleClientFactory *tp_proxy_get_factory (gpointer self);
+TpClientFactory *tp_proxy_get_factory (gpointer self);
TpDBusDaemon *tp_proxy_get_dbus_daemon (gpointer self);
@@ -184,6 +183,4 @@ gboolean tp_proxy_prepare_finish (gpointer self,
G_END_DECLS
-#include <telepathy-glib/_gen/tp-cli-generic.h>
-
#endif /* #ifndef __TP_PROXY_H__*/
diff --git a/telepathy-glib/reentrants.c b/telepathy-glib/reentrants.c
new file mode 100644
index 000000000..f6f9b9cf7
--- /dev/null
+++ b/telepathy-glib/reentrants.c
@@ -0,0 +1,15 @@
+#include "telepathy-glib/interfaces.h"
+#include "telepathy-glib/reentrants.h"
+
+#include <telepathy-glib/_gen/tp-cli-account-reentrant-body.h>
+#include <telepathy-glib/_gen/tp-cli-account-manager-reentrant-body.h>
+#include <telepathy-glib/_gen/tp-cli-channel-reentrant-body.h>
+#include <telepathy-glib/_gen/tp-cli-channel-dispatcher-reentrant-body.h>
+#include <telepathy-glib/_gen/tp-cli-channel-dispatch-operation-reentrant-body.h>
+#include <telepathy-glib/_gen/tp-cli-channel-request-reentrant-body.h>
+#include <telepathy-glib/_gen/tp-cli-client-reentrant-body.h>
+#include <telepathy-glib/_gen/tp-cli-connection-reentrant-body.h>
+#include <telepathy-glib/_gen/tp-cli-connection-manager-reentrant-body.h>
+#include <telepathy-glib/_gen/tp-cli-dbus-daemon-reentrant-body.h>
+#include <telepathy-glib/_gen/tp-cli-generic-reentrant-body.h>
+#include <telepathy-glib/_gen/tp-cli-protocol-reentrant-body.h>
diff --git a/telepathy-glib/reentrants.h b/telepathy-glib/reentrants.h
new file mode 100644
index 000000000..e1ff7180f
--- /dev/null
+++ b/telepathy-glib/reentrants.h
@@ -0,0 +1,19 @@
+/*<private_header>*/
+
+#include <telepathy-glib/telepathy-glib.h>
+
+#include <telepathy-glib/client.h>
+#include <telepathy-glib/proxy-subclass.h>
+
+#include <telepathy-glib/_gen/tp-cli-account-reentrant.h>
+#include <telepathy-glib/_gen/tp-cli-account-manager-reentrant.h>
+#include <telepathy-glib/_gen/tp-cli-channel-reentrant.h>
+#include <telepathy-glib/_gen/tp-cli-channel-dispatcher-reentrant.h>
+#include <telepathy-glib/_gen/tp-cli-channel-dispatch-operation-reentrant.h>
+#include <telepathy-glib/_gen/tp-cli-channel-request-reentrant.h>
+#include <telepathy-glib/_gen/tp-cli-client-reentrant.h>
+#include <telepathy-glib/_gen/tp-cli-connection-reentrant.h>
+#include <telepathy-glib/_gen/tp-cli-connection-manager-reentrant.h>
+#include <telepathy-glib/_gen/tp-cli-dbus-daemon-reentrant.h>
+#include <telepathy-glib/_gen/tp-cli-generic-reentrant.h>
+#include <telepathy-glib/_gen/tp-cli-protocol-reentrant.h>
diff --git a/telepathy-glib/room-list.c b/telepathy-glib/room-list.c
index 5c1574a6b..98fd7e0e0 100644
--- a/telepathy-glib/room-list.c
+++ b/telepathy-glib/room-list.c
@@ -47,6 +47,8 @@
#include "telepathy-glib/room-list.h"
#include <telepathy-glib/room-info-internal.h>
+#include <telepathy-glib/cli-channel.h>
+#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/telepathy-glib.h>
#include <telepathy-glib/util-internal.h>
diff --git a/telepathy-glib/simple-approver.c b/telepathy-glib/simple-approver.c
index da9666d11..3b24c01d2 100644
--- a/telepathy-glib/simple-approver.c
+++ b/telepathy-glib/simple-approver.c
@@ -44,10 +44,8 @@
* tp_add_dispatch_operation_context_accept (context);
* }
*
- * factory = tp_automatic_client_factory_new (dbus);
- * client = tp_simple_approver_new_with_factory (factory, "MyApprover", FALSE,
+ * client = tp_simple_approver_new (NULL, "MyApprover", FALSE,
* my_add_dispatch_operation, user_data);
- * g_object_unref (factory);
*
* tp_base_client_take_approver_filter (client, tp_asv_new (
* TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_TEXT,
@@ -264,7 +262,7 @@ tp_simple_approver_class_init (TpSimpleApproverClass *cls)
/**
* tp_simple_approver_new:
- * @dbus: a #TpDBusDaemon object, may not be %NULL
+ * @factory: a #TpClientFactory, or %NULL
* @name: the name of the Approver (see #TpBaseClient:name for details)
* @uniquify: the value of the #TpBaseClient:uniquify-name property
* @callback: the function called when AddDispatchOperation is called
@@ -274,17 +272,14 @@ tp_simple_approver_class_init (TpSimpleApproverClass *cls)
*
* Convenient function to create a new #TpSimpleApprover instance.
*
- * If @dbus is not the result of tp_dbus_daemon_dup(), you should call
- * tp_simple_approver_new_with_am() instead, so that #TpAccount,
- * #TpConnection and #TpContact instances can be shared between modules.
+ * If @factory is %NULL a new #TpAutomaticClientFactory will be used.
*
* Returns: (type TelepathyGLib.SimpleApprover): a new #TpSimpleApprover
*
- * Since: 0.11.5
- * Deprecated: New code should use tp_simple_approver_new_with_am() instead.
+ * Since: 0.UNRELEASED
*/
TpBaseClient *
-tp_simple_approver_new (TpDBusDaemon *dbus,
+tp_simple_approver_new (TpClientFactory *factory,
const gchar *name,
gboolean uniquify,
TpSimpleApproverAddDispatchOperationImpl callback,
@@ -292,7 +287,7 @@ tp_simple_approver_new (TpDBusDaemon *dbus,
GDestroyNotify destroy)
{
return g_object_new (TP_TYPE_SIMPLE_APPROVER,
- "dbus-daemon", dbus,
+ "factory", factory,
"name", name,
"uniquify-name", uniquify,
"callback", callback,
@@ -329,47 +324,6 @@ tp_simple_approver_new_with_am (TpAccountManager *account_manager,
gpointer user_data,
GDestroyNotify destroy)
{
- return g_object_new (TP_TYPE_SIMPLE_APPROVER,
- "account-manager", account_manager,
- "name", name,
- "uniquify-name", uniquify,
- "callback", callback,
- "user-data", user_data,
- "destroy", destroy,
- NULL);
-}
-
-/**
- * tp_simple_approver_new_with_factory:
- * @factory: an #TpSimpleClientFactory, which may not be %NULL
- * @name: the name of the Approver (see #TpBaseClient:name for details)
- * @uniquify: the value of the #TpBaseClient:uniquify-name property
- * @callback: the function called when AddDispatchOperation is called
- * @user_data: arbitrary user-supplied data passed to @callback
- * @destroy: called with @user_data as its argument when the #TpSimpleApprover
- * is destroyed
- *
- * Convenient function to create a new #TpSimpleApprover instance with a
- * specified #TpSimpleClientFactory.
- *
- * Returns: (type TelepathyGLib.SimpleApprover): a new #TpSimpleApprover
- *
- * Since: 0.15.5
- */
-TpBaseClient *
-tp_simple_approver_new_with_factory (TpSimpleClientFactory *factory,
- const gchar *name,
- gboolean uniquify,
- TpSimpleApproverAddDispatchOperationImpl callback,
- gpointer user_data,
- GDestroyNotify destroy)
-{
- return g_object_new (TP_TYPE_SIMPLE_APPROVER,
- "factory", factory,
- "name", name,
- "uniquify-name", uniquify,
- "callback", callback,
- "user-data", user_data,
- "destroy", destroy,
- NULL);
+ return tp_simple_approver_new (tp_proxy_get_factory (account_manager),
+ name, uniquify, callback, user_data, destroy);
}
diff --git a/telepathy-glib/simple-approver.h b/telepathy-glib/simple-approver.h
index 0925b7e06..a584a9b2f 100644
--- a/telepathy-glib/simple-approver.h
+++ b/telepathy-glib/simple-approver.h
@@ -24,6 +24,7 @@
#include <dbus/dbus-glib.h>
#include <glib-object.h>
+#include <telepathy-glib/account-manager.h>
#include <telepathy-glib/base-client.h>
#include <telepathy-glib/defs.h>
@@ -72,15 +73,12 @@ typedef void (*TpSimpleApproverAddDispatchOperationImpl) (
TpAddDispatchOperationContext *context,
gpointer user_data);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_16_FOR (tp_simple_approver_new_with_factory)
-TpBaseClient * tp_simple_approver_new (TpDBusDaemon *dbus,
+TpBaseClient * tp_simple_approver_new (TpClientFactory *factory,
const gchar *name,
gboolean uniquify,
TpSimpleApproverAddDispatchOperationImpl callback,
gpointer user_data,
GDestroyNotify destroy);
-#endif
TpBaseClient *tp_simple_approver_new_with_am (
TpAccountManager *account_manager,
@@ -90,15 +88,6 @@ TpBaseClient *tp_simple_approver_new_with_am (
gpointer user_data,
GDestroyNotify destroy);
-_TP_AVAILABLE_IN_0_16
-TpBaseClient *tp_simple_approver_new_with_factory (
- TpSimpleClientFactory *factory,
- const gchar *name,
- gboolean uniquify,
- TpSimpleApproverAddDispatchOperationImpl callback,
- gpointer user_data,
- GDestroyNotify destroy);
-
G_END_DECLS
#endif
diff --git a/telepathy-glib/simple-client-factory.h b/telepathy-glib/simple-client-factory.h
deleted file mode 100644
index 006daaa2f..000000000
--- a/telepathy-glib/simple-client-factory.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * A factory for TpContacts and plain subclasses of TpProxy
- *
- * Copyright © 2011 Collabora Ltd.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __TP_SIMPLE_CLIENT_FACTORY_H__
-#define __TP_SIMPLE_CLIENT_FACTORY_H__
-
-#include <telepathy-glib/account.h>
-#include <telepathy-glib/channel.h>
-#include <telepathy-glib/channel-dispatch-operation.h>
-#include <telepathy-glib/channel-request.h>
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/contact.h>
-#include <telepathy-glib/dbus-daemon.h>
-#include <telepathy-glib/defs.h>
-
-G_BEGIN_DECLS
-
-/* TpSimpleClientFactory is typedef'd in proxy.h */
-typedef struct _TpSimpleClientFactoryPrivate TpSimpleClientFactoryPrivate;
-typedef struct _TpSimpleClientFactoryClass TpSimpleClientFactoryClass;
-
-struct _TpSimpleClientFactoryClass {
- /*<public>*/
- GObjectClass parent_class;
-
- /* TpAccount */
- TpAccount * (*create_account) (TpSimpleClientFactory *self,
- const gchar *object_path,
- const GHashTable *immutable_properties,
- GError **error);
- GArray * (*dup_account_features) (TpSimpleClientFactory *self,
- TpAccount *account);
-
- /* TpConnection */
- TpConnection * (*create_connection) (TpSimpleClientFactory *self,
- const gchar *object_path,
- const GHashTable *immutable_properties,
- GError **error);
- GArray * (*dup_connection_features) (TpSimpleClientFactory *self,
- TpConnection *connection);
-
- /* TpChannel */
- TpChannel * (*create_channel) (TpSimpleClientFactory *self,
- TpConnection *conn,
- const gchar *object_path,
- const GHashTable *immutable_properties,
- GError **error);
- GArray * (*dup_channel_features) (TpSimpleClientFactory *self,
- TpChannel *channel);
-
- /* TpContact */
- TpContact * (*create_contact) (TpSimpleClientFactory *self,
- TpConnection *connection,
- TpHandle handle,
- const gchar *identifier);
- GArray * (*dup_contact_features) (TpSimpleClientFactory *self,
- TpConnection *connection);
-
- /*<private>*/
- GCallback padding[20];
-};
-
-struct _TpSimpleClientFactory {
- /*<private>*/
- GObject parent;
- TpSimpleClientFactoryPrivate *priv;
-};
-
-_TP_AVAILABLE_IN_0_16
-GType tp_simple_client_factory_get_type (void);
-
-#define TP_TYPE_SIMPLE_CLIENT_FACTORY \
- (tp_simple_client_factory_get_type ())
-#define TP_SIMPLE_CLIENT_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), TP_TYPE_SIMPLE_CLIENT_FACTORY, \
- TpSimpleClientFactory))
-#define TP_SIMPLE_CLIENT_FACTORY_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST ((klass), TP_TYPE_SIMPLE_CLIENT_FACTORY, \
- TpSimpleClientFactoryClass))
-#define TP_IS_SIMPLE_CLIENT_FACTORY(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TP_TYPE_SIMPLE_CLIENT_FACTORY))
-#define TP_IS_SIMPLE_CLIENT_FACTORY_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE ((klass), TP_TYPE_SIMPLE_CLIENT_FACTORY))
-#define TP_SIMPLE_CLIENT_FACTORY_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TYPE_SIMPLE_CLIENT_FACTORY, \
- TpSimpleClientFactoryClass))
-
-_TP_AVAILABLE_IN_0_16
-TpSimpleClientFactory * tp_simple_client_factory_new (TpDBusDaemon *dbus);
-
-_TP_AVAILABLE_IN_0_16
-TpDBusDaemon *tp_simple_client_factory_get_dbus_daemon (
- TpSimpleClientFactory *self);
-
-/* TpAccount */
-_TP_AVAILABLE_IN_0_16
-TpAccount *tp_simple_client_factory_ensure_account (TpSimpleClientFactory *self,
- const gchar *object_path,
- const GHashTable *immutable_properties,
- GError **error);
-_TP_AVAILABLE_IN_0_16
-GArray *tp_simple_client_factory_dup_account_features (
- TpSimpleClientFactory *self,
- TpAccount *account);
-_TP_AVAILABLE_IN_0_16
-void tp_simple_client_factory_add_account_features (TpSimpleClientFactory *self,
- const GQuark *features);
-_TP_AVAILABLE_IN_0_16
-void tp_simple_client_factory_add_account_features_varargs (
- TpSimpleClientFactory *self,
- GQuark feature,
- ...);
-
-/* TpConnection */
-_TP_AVAILABLE_IN_0_16
-TpConnection *tp_simple_client_factory_ensure_connection (
- TpSimpleClientFactory *self,
- const gchar *object_path,
- const GHashTable *immutable_properties,
- GError **error);
-_TP_AVAILABLE_IN_0_16
-GArray *tp_simple_client_factory_dup_connection_features (
- TpSimpleClientFactory *self,
- TpConnection *connection);
-_TP_AVAILABLE_IN_0_16
-void tp_simple_client_factory_add_connection_features (
- TpSimpleClientFactory *self,
- const GQuark *features);
-_TP_AVAILABLE_IN_0_16
-void tp_simple_client_factory_add_connection_features_varargs (
- TpSimpleClientFactory *self,
- GQuark feature,
- ...);
-
-/* TpChannel */
-_TP_AVAILABLE_IN_0_16
-TpChannel *tp_simple_client_factory_ensure_channel (TpSimpleClientFactory *self,
- TpConnection *connection,
- const gchar *object_path,
- const GHashTable *immutable_properties,
- GError **error);
-_TP_AVAILABLE_IN_0_16
-GArray *tp_simple_client_factory_dup_channel_features (
- TpSimpleClientFactory *self,
- TpChannel *channel);
-_TP_AVAILABLE_IN_0_16
-void tp_simple_client_factory_add_channel_features (TpSimpleClientFactory *self,
- const GQuark *features);
-_TP_AVAILABLE_IN_0_16
-void tp_simple_client_factory_add_channel_features_varargs (
- TpSimpleClientFactory *self,
- GQuark feature,
- ...);
-
-/* TpContact */
-_TP_AVAILABLE_IN_0_16
-TpContact *tp_simple_client_factory_ensure_contact (TpSimpleClientFactory *self,
- TpConnection *connection,
- TpHandle handle,
- const gchar *identifier);
-_TP_AVAILABLE_IN_0_16
-GArray *tp_simple_client_factory_dup_contact_features (
- TpSimpleClientFactory *self,
- TpConnection *connection);
-_TP_AVAILABLE_IN_0_16
-void tp_simple_client_factory_add_contact_features (TpSimpleClientFactory *self,
- guint n_features,
- const TpContactFeature *features);
-_TP_AVAILABLE_IN_0_16
-void tp_simple_client_factory_add_contact_features_varargs (
- TpSimpleClientFactory *self,
- TpContactFeature feature,
- ...);
-
-G_END_DECLS
-
-#endif
diff --git a/telepathy-glib/simple-handler.c b/telepathy-glib/simple-handler.c
index 0fcba4a54..64cd339cc 100644
--- a/telepathy-glib/simple-handler.c
+++ b/telepathy-glib/simple-handler.c
@@ -45,10 +45,8 @@
* tp_handle_channels_context_accept (context);
* }
*
- * factory = tp_automatic_client_factory_new (dbus);
- * client = tp_simple_handler_new_with_factory (factory, FALSE, FALSE,
+ * client = tp_simple_handler_new (NULL, FALSE, FALSE,
* "MyHandler", FALSE, my_handle_channels, user_data);
- * g_object_unref (factory);
*
* tp_base_client_take_handler_filter (client, tp_asv_new (
* TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_TEXT,
@@ -314,7 +312,7 @@ tp_simple_handler_class_init (TpSimpleHandlerClass *cls)
/**
* tp_simple_handler_new:
- * @dbus: a #TpDBusDaemon object, may not be %NULL
+ * @factory: a #TpClientFactory, or %NULL
* @bypass_approval: the value of the Handler.BypassApproval D-Bus property
* (see tp_base_client_set_handler_bypass_approval() for details)
* @requests: whether this handler should implement Requests (see
@@ -328,17 +326,14 @@ tp_simple_handler_class_init (TpSimpleHandlerClass *cls)
*
* Convenient function to create a new #TpSimpleHandler instance.
*
- * If @dbus is not the result of tp_dbus_daemon_dup(), you should call
- * tp_simple_handler_new_with_am() instead, so that #TpAccount,
- * #TpConnection and #TpContact instances can be shared between modules.
+ * If @factory is %NULL a new #TpAutomaticClientFactory will be used.
*
* Returns: (type TelepathyGLib.SimpleHandler): a new #TpSimpleHandler
*
- * Since: 0.11.6
- * Deprecated: New code should use tp_simple_handler_new_with_am() instead.
+ * Since: 0.UNRELEASED
*/
TpBaseClient *
-tp_simple_handler_new (TpDBusDaemon *dbus,
+tp_simple_handler_new (TpClientFactory *factory,
gboolean bypass_approval,
gboolean requests,
const gchar *name,
@@ -348,7 +343,7 @@ tp_simple_handler_new (TpDBusDaemon *dbus,
GDestroyNotify destroy)
{
return g_object_new (TP_TYPE_SIMPLE_HANDLER,
- "dbus-daemon", dbus,
+ "factory", factory,
"bypass-approval", bypass_approval,
"requests", requests,
"name", name,
@@ -393,57 +388,6 @@ tp_simple_handler_new_with_am (TpAccountManager *account_manager,
gpointer user_data,
GDestroyNotify destroy)
{
- return g_object_new (TP_TYPE_SIMPLE_HANDLER,
- "account-manager", account_manager,
- "bypass-approval", bypass_approval,
- "requests", requests,
- "name", name,
- "uniquify-name", uniquify,
- "callback", callback,
- "user-data", user_data,
- "destroy", destroy,
- NULL);
-}
-
-/**
- * tp_simple_handler_new_with_factory:
- * @factory: a #TpSimpleClientFactory, which may not be %NULL
- * @bypass_approval: the value of the Handler.BypassApproval D-Bus property
- * (see tp_base_client_set_handler_bypass_approval() for details)
- * @requests: whether this handler should implement Requests (see
- * tp_base_client_set_handler_request_notification() for details)
- * @name: the name of the Handler (see #TpBaseClient:name for details)
- * @uniquify: the value of the #TpBaseClient:uniquify-name property
- * @callback: the function called when HandleChannels is called
- * @user_data: arbitrary user-supplied data passed to @callback
- * @destroy: called with @user_data as its argument when the #TpSimpleHandler
- * is destroyed
- *
- * Convenient function to create a new #TpSimpleHandler instance with a
- * specified #TpSimpleClientFactory.
- *
- * Returns: (type TelepathyGLib.SimpleHandler): a new #TpSimpleHandler
- *
- * Since: 0.15.5
- */
-TpBaseClient *
-tp_simple_handler_new_with_factory (TpSimpleClientFactory *factory,
- gboolean bypass_approval,
- gboolean requests,
- const gchar *name,
- gboolean uniquify,
- TpSimpleHandlerHandleChannelsImpl callback,
- gpointer user_data,
- GDestroyNotify destroy)
-{
- return g_object_new (TP_TYPE_SIMPLE_HANDLER,
- "factory", factory,
- "bypass-approval", bypass_approval,
- "requests", requests,
- "name", name,
- "uniquify-name", uniquify,
- "callback", callback,
- "user-data", user_data,
- "destroy", destroy,
- NULL);
+ return tp_simple_handler_new (tp_proxy_get_factory (account_manager),
+ bypass_approval, requests, name, uniquify, callback, user_data, destroy);
}
diff --git a/telepathy-glib/simple-handler.h b/telepathy-glib/simple-handler.h
index 48e5d765e..1f27fb2f6 100644
--- a/telepathy-glib/simple-handler.h
+++ b/telepathy-glib/simple-handler.h
@@ -24,6 +24,7 @@
#include <dbus/dbus-glib.h>
#include <glib-object.h>
+#include <telepathy-glib/account-manager.h>
#include <telepathy-glib/base-client.h>
#include <telepathy-glib/defs.h>
@@ -73,9 +74,7 @@ typedef void (*TpSimpleHandlerHandleChannelsImpl) (
TpHandleChannelsContext *context,
gpointer user_data);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_16_FOR (tp_simple_handler_new_with_factory)
-TpBaseClient * tp_simple_handler_new (TpDBusDaemon *dbus,
+TpBaseClient *tp_simple_handler_new (TpClientFactory *factory,
gboolean bypass_approval,
gboolean requests,
const gchar *name,
@@ -83,7 +82,6 @@ TpBaseClient * tp_simple_handler_new (TpDBusDaemon *dbus,
TpSimpleHandlerHandleChannelsImpl callback,
gpointer user_data,
GDestroyNotify destroy);
-#endif
TpBaseClient *tp_simple_handler_new_with_am (TpAccountManager *account_manager,
gboolean bypass_approval,
@@ -94,17 +92,6 @@ TpBaseClient *tp_simple_handler_new_with_am (TpAccountManager *account_manager,
gpointer user_data,
GDestroyNotify destroy);
-_TP_AVAILABLE_IN_0_16
-TpBaseClient *tp_simple_handler_new_with_factory (
- TpSimpleClientFactory *factory,
- gboolean bypass_approval,
- gboolean requests,
- const gchar *name,
- gboolean uniquify,
- TpSimpleHandlerHandleChannelsImpl callback,
- gpointer user_data,
- GDestroyNotify destroy);
-
G_END_DECLS
#endif
diff --git a/telepathy-glib/simple-observer.c b/telepathy-glib/simple-observer.c
index ee74a8478..607e5074f 100644
--- a/telepathy-glib/simple-observer.c
+++ b/telepathy-glib/simple-observer.c
@@ -44,10 +44,8 @@
* tp_observe_channels_context_accept (context);
* }
*
- * factory = tp_automatic_client_factory_new (dbus);
- * client = tp_simple_observer_new_with_factory (factory, TRUE, "MyObserver",
+ * client = tp_simple_observer_new (NULL, TRUE, "MyObserver",
* FALSE, my_observe_channels, user_data);
- * g_object_unref (factory);
*
* tp_base_client_take_observer_filter (client, tp_asv_new (
* TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_TEXT,
@@ -289,7 +287,7 @@ tp_simple_observer_class_init (TpSimpleObserverClass *cls)
/**
* tp_simple_observer_new:
- * @dbus: a #TpDBusDaemon object, may not be %NULL
+ * @factory: a #TpClientFactory, or %NULL
* @recover: the value of the Observer.Recover D-Bus property
* @name: the name of the Observer (see #TpBaseClient:name: for details)
* @uniquify: the value of the #TpBaseClient:uniquify-name: property
@@ -300,17 +298,14 @@ tp_simple_observer_class_init (TpSimpleObserverClass *cls)
*
* Convenient function to create a new #TpSimpleObserver instance.
*
- * If @dbus is not the result of tp_dbus_daemon_dup(), you should call
- * tp_simple_observer_new_with_am() instead, so that #TpAccount,
- * #TpConnection and #TpContact instances can be shared between modules.
+ * If @factory is %NULL a new #TpAutomaticClientFactory will be used.
*
* Returns: (type TelepathyGLib.SimpleObserver): a new #TpSimpleObserver
*
- * Since: 0.11.5
- * Deprecated: New code should use tp_simple_observer_new_with_am() instead.
+ * Since: 0.UNRELEASED
*/
TpBaseClient *
-tp_simple_observer_new (TpDBusDaemon *dbus,
+tp_simple_observer_new (TpClientFactory *factory,
gboolean recover,
const gchar *name,
gboolean uniquify,
@@ -319,7 +314,7 @@ tp_simple_observer_new (TpDBusDaemon *dbus,
GDestroyNotify destroy)
{
return g_object_new (TP_TYPE_SIMPLE_OBSERVER,
- "dbus-daemon", dbus,
+ "factory", factory,
"recover", recover,
"name", name,
"uniquify-name", uniquify,
@@ -359,51 +354,6 @@ tp_simple_observer_new_with_am (TpAccountManager *account_manager,
gpointer user_data,
GDestroyNotify destroy)
{
- return g_object_new (TP_TYPE_SIMPLE_OBSERVER,
- "account-manager", account_manager,
- "recover", recover,
- "name", name,
- "uniquify-name", uniquify,
- "callback", callback,
- "user-data", user_data,
- "destroy", destroy,
- NULL);
-}
-
-/**
- * tp_simple_observer_new_with_factory:
- * @factory: a #TpSimpleClientFactory, which may not be %NULL
- * @recover: the value of the Observer.Recover D-Bus property
- * @name: the name of the Observer (see #TpBaseClient:name: for details)
- * @uniquify: the value of the #TpBaseClient:uniquify-name: property
- * @callback: the function called when ObserveChannels is called
- * @user_data: arbitrary user-supplied data passed to @callback
- * @destroy: called with the user_data as argument, when the #TpSimpleObserver
- * is destroyed
- *
- * Convenient function to create a new #TpSimpleObserver instance with a
- * specified #TpSimpleClientFactory.
- *
- * Returns: (type TelepathyGLib.SimpleObserver): a new #TpSimpleObserver
- *
- * Since: 0.15.5
- */
-TpBaseClient *
-tp_simple_observer_new_with_factory (TpSimpleClientFactory *factory,
- gboolean recover,
- const gchar *name,
- gboolean uniquify,
- TpSimpleObserverObserveChannelsImpl callback,
- gpointer user_data,
- GDestroyNotify destroy)
-{
- return g_object_new (TP_TYPE_SIMPLE_OBSERVER,
- "factory", factory,
- "recover", recover,
- "name", name,
- "uniquify-name", uniquify,
- "callback", callback,
- "user-data", user_data,
- "destroy", destroy,
- NULL);
+ return tp_simple_observer_new (tp_proxy_get_factory (account_manager),
+ recover, name, uniquify, callback, user_data, destroy);
}
diff --git a/telepathy-glib/simple-observer.h b/telepathy-glib/simple-observer.h
index 107ef3662..276bb935e 100644
--- a/telepathy-glib/simple-observer.h
+++ b/telepathy-glib/simple-observer.h
@@ -24,6 +24,7 @@
#include <dbus/dbus-glib.h>
#include <glib-object.h>
+#include <telepathy-glib/account-manager.h>
#include <telepathy-glib/base-client.h>
#include <telepathy-glib/defs.h>
@@ -73,16 +74,13 @@ typedef void (*TpSimpleObserverObserveChannelsImpl) (
TpObserveChannelsContext *context,
gpointer user_data);
-#ifndef TP_DISABLE_DEPRECATED
-_TP_DEPRECATED_IN_0_16_FOR (tp_simple_observer_new_with_factory)
-TpBaseClient * tp_simple_observer_new (TpDBusDaemon *dbus,
+TpBaseClient * tp_simple_observer_new (TpClientFactory *factory,
gboolean recover,
const gchar *name,
gboolean uniquify,
TpSimpleObserverObserveChannelsImpl callback,
gpointer user_data,
GDestroyNotify destroy);
-#endif
TpBaseClient *tp_simple_observer_new_with_am (
TpAccountManager *account_manager,
@@ -93,16 +91,6 @@ TpBaseClient *tp_simple_observer_new_with_am (
gpointer user_data,
GDestroyNotify destroy);
-_TP_AVAILABLE_IN_0_16
-TpBaseClient *tp_simple_observer_new_with_factory (
- TpSimpleClientFactory *factory,
- gboolean recover,
- const gchar *name,
- gboolean uniquify,
- TpSimpleObserverObserveChannelsImpl callback,
- gpointer user_data,
- GDestroyNotify destroy);
-
G_END_DECLS
#endif
diff --git a/telepathy-glib/stable-interfaces.xml b/telepathy-glib/stable-interfaces.xml
index 808c43259..19ca874d6 100644
--- a/telepathy-glib/stable-interfaces.xml
+++ b/telepathy-glib/stable-interfaces.xml
@@ -8,8 +8,6 @@
<xi:include href="protocol.xml"/>
<xi:include href="connection.xml"/>
<xi:include href="channel.xml"/>
-<xi:include href="media-session-handler.xml"/>
-<xi:include href="media-stream-handler.xml"/>
<xi:include href="generic.xml"/>
<xi:include href="dbus-daemon.xml"/>
diff --git a/telepathy-glib/stream-tube-channel.c b/telepathy-glib/stream-tube-channel.c
index d3bf54541..0d15978d7 100644
--- a/telepathy-glib/stream-tube-channel.c
+++ b/telepathy-glib/stream-tube-channel.c
@@ -49,6 +49,7 @@
#include "telepathy-glib/stream-tube-channel.h"
+#include <telepathy-glib/cli-channel.h>
#include <telepathy-glib/contact.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/enums.h>
@@ -501,7 +502,7 @@ tp_stream_tube_channel_new (TpConnection *conn,
TpStreamTubeChannel *
_tp_stream_tube_channel_new_with_factory (
- TpSimpleClientFactory *factory,
+ TpClientFactory *factory,
TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
@@ -533,7 +534,7 @@ operation_failed (TpStreamTubeChannel *self,
{
g_simple_async_result_set_from_error (self->priv->result, error);
- g_simple_async_result_complete_in_idle (self->priv->result);
+ g_simple_async_result_complete (self->priv->result);
tp_clear_object (&self->priv->result);
}
@@ -548,46 +549,12 @@ complete_accept_operation (TpStreamTubeChannel *self,
}
static void
-new_local_connection_with_contact (TpConnection *conn,
- guint n_contacts,
- TpContact * const *contacts,
- guint n_failed,
- const TpHandle *failed,
- const GError *in_error,
- gpointer user_data,
- GObject *obj)
-{
- TpStreamTubeChannel *self = (TpStreamTubeChannel *) obj;
- TpContact *contact;
- TpStreamTubeConnection *tube_conn = user_data;
-
- if (in_error != NULL)
- {
- DEBUG ("Failed to prepare TpContact: %s", in_error->message);
- return;
- }
-
- if (n_failed > 0)
- {
- DEBUG ("Failed to prepare TpContact (InvalidHandle)");
- return;
- }
-
- contact = contacts[0];
- _tp_stream_tube_connection_set_contact (tube_conn, contact);
-
- complete_accept_operation (self, tube_conn);
-}
-
-static void
new_local_connection_identified (TpStreamTubeChannel *self,
GSocketConnection *conn,
guint connection_id)
{
- TpHandle initiator_handle;
TpStreamTubeConnection *tube_conn;
- TpConnection *connection;
- GArray *features;
+ TpContact *initiator;
tube_conn = _tp_stream_tube_connection_new (conn, self);
@@ -599,22 +566,12 @@ new_local_connection_identified (TpStreamTubeChannel *self,
/* We are accepting a tube so the contact of the connection is the
* initiator of the tube */
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- initiator_handle = tp_channel_get_initiator_handle (TP_CHANNEL (self));
-
- connection = tp_channel_borrow_connection (TP_CHANNEL (self));
- features = tp_simple_client_factory_dup_contact_features (
- tp_proxy_get_factory (connection), connection);
-
- /* Pass ownership of tube_conn to the function */
- tp_connection_get_contacts_by_handle (connection,
- 1, &initiator_handle,
- features->len, (TpContactFeature *) features->data,
- new_local_connection_with_contact,
- tube_conn, g_object_unref, G_OBJECT (self));
- G_GNUC_END_IGNORE_DEPRECATIONS
-
- g_array_unref (features);
+ initiator = tp_channel_get_initiator_contact (TP_CHANNEL (self));
+ _tp_stream_tube_connection_set_contact (tube_conn, initiator);
+
+ complete_accept_operation (self, tube_conn);
+
+ g_object_unref (tube_conn);
}
#ifdef HAVE_GIO_UNIX
@@ -1075,7 +1032,7 @@ connection_identified (TpStreamTubeChannel *self,
GArray *features;
connection = tp_channel_borrow_connection (TP_CHANNEL (self));
- features = tp_simple_client_factory_dup_contact_features (
+ features = tp_client_factory_dup_contact_features (
tp_proxy_get_factory (connection), connection);
/* Spec does not give the id with the handle */
@@ -1083,7 +1040,7 @@ connection_identified (TpStreamTubeChannel *self,
/* Pass the ref on tube_conn to the function */
tp_connection_get_contacts_by_handle (connection,
1, &handle,
- features->len, (TpContactFeature *) features->data,
+ (const GQuark *) features->data,
_new_remote_connection_with_contact,
tube_conn, g_object_unref, G_OBJECT (self));
G_GNUC_END_IGNORE_DEPRECATIONS
@@ -1129,6 +1086,7 @@ connection_rejected (TpStreamTubeChannel *self,
static void
_new_remote_connection (TpChannel *channel,
guint handle,
+ const gchar *id,
const GValue *param,
guint connection_id,
gpointer user_data,
@@ -1207,7 +1165,7 @@ _channel_offered (TpChannel *channel,
DEBUG ("Stream Tube offered");
- g_simple_async_result_complete_in_idle (self->priv->result);
+ g_simple_async_result_complete (self->priv->result);
tp_clear_object (&self->priv->result);
}
diff --git a/telepathy-glib/stream-tube-connection.c b/telepathy-glib/stream-tube-connection.c
index 03ea60dc1..efa3149be 100644
--- a/telepathy-glib/stream-tube-connection.c
+++ b/telepathy-glib/stream-tube-connection.c
@@ -228,7 +228,7 @@ tp_stream_tube_connection_class_init (TpStreamTubeConnectionClass *cls)
*
* If not %NULL, the #TpContact objects is guaranteed to have all of the
* features previously passed to
- * tp_simple_client_factory_add_contact_features() prepared.
+ * tp_client_factory_add_contact_features() prepared.
*
* Since: 0.13.2
*/
diff --git a/telepathy-glib/svc-media-interfaces.h b/telepathy-glib/svc-media-interfaces.h
deleted file mode 100644
index c1c27ad38..000000000
--- a/telepathy-glib/svc-media-interfaces.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __TP_SVC_MEDIA_INTERFACES_H__
-#define __TP_SVC_MEDIA_INTERFACES_H__
-
-#include <telepathy-glib/_gen/tp-svc-media-session-handler.h>
-#include <telepathy-glib/_gen/tp-svc-media-stream-handler.h>
-
-#endif
diff --git a/telepathy-glib/telepathy-glib-1-dbus-uninstalled.pc.in b/telepathy-glib/telepathy-glib-1-dbus-uninstalled.pc.in
new file mode 100644
index 000000000..2c009a5ce
--- /dev/null
+++ b/telepathy-glib/telepathy-glib-1-dbus-uninstalled.pc.in
@@ -0,0 +1,12 @@
+prefix=
+exec_prefix=
+abs_top_srcdir=@abs_top_srcdir@
+abs_top_builddir=@abs_top_builddir@
+
+Name: Telepathy-GLib-DBus (uninstalled copy)
+Description: D-Bus interfaces from the Telepathy framework
+Version: @VERSION@
+Requires: pkg-config >= 0.21
+Requires.private: dbus-1 >= 0.95, dbus-glib-1 >= 0.90, glib-2.0 >= 2.30, gobject-2.0 >= 2.30, gio-2.0 >= 2.30
+Libs: ${abs_top_builddir}/telepathy-glib/libtelepathy-glib-1-dbus.la
+Cflags: -I${abs_top_srcdir} -I${abs_top_builddir}
diff --git a/telepathy-glib/telepathy-glib-1-dbus.pc.in b/telepathy-glib/telepathy-glib-1-dbus.pc.in
new file mode 100644
index 000000000..07b29d8df
--- /dev/null
+++ b/telepathy-glib/telepathy-glib-1-dbus.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Telepathy-GLib-DBus
+Description: D-Bus interfaces from the Telepathy framework
+Version: @VERSION@
+Requires: pkg-config >= 0.21
+Requires.private: dbus-1 >= 0.95, dbus-glib-1 >= 0.90, glib-2.0 >= 2.30, gobject-2.0 >= 2.30, gio-2.0 >= 2.30
+Libs: -L${libdir} -ltelepathy-glib-1-dbus -ltelepathy-glib-1-core
+Cflags: -I${includedir}/telepathy-glib-1-dbus -I${includedir}/telepathy-glib-1
diff --git a/telepathy-glib/telepathy-glib-uninstalled.pc.in b/telepathy-glib/telepathy-glib-1-uninstalled.pc.in
index 932983c77..621f4a272 100644
--- a/telepathy-glib/telepathy-glib-uninstalled.pc.in
+++ b/telepathy-glib/telepathy-glib-1-uninstalled.pc.in
@@ -3,10 +3,10 @@ exec_prefix=
abs_top_srcdir=@abs_top_srcdir@
abs_top_builddir=@abs_top_builddir@
-Name: Telepathy-GLib (uninstalled copy)
+Name: Telepathy-GLib-1 (uninstalled copy)
Description: GLib utility library for the Telepathy framework
Version: @VERSION@
Requires: pkg-config >= 0.21
Requires.private: dbus-1 >= 0.95, dbus-glib-1 >= 0.90, glib-2.0 >= 2.30, gobject-2.0 >= 2.30, gio-2.0 >= 2.30
-Libs: ${abs_top_builddir}/telepathy-glib/libtelepathy-glib.la
+Libs: ${abs_top_builddir}/telepathy-glib/libtelepathy-glib-1.la
Cflags: -I${abs_top_srcdir} -I${abs_top_builddir}
diff --git a/telepathy-glib/telepathy-glib.pc.in b/telepathy-glib/telepathy-glib-1.pc.in
index 1c5f4b637..8ae1ad9a7 100644
--- a/telepathy-glib/telepathy-glib.pc.in
+++ b/telepathy-glib/telepathy-glib-1.pc.in
@@ -3,10 +3,11 @@ exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
-Name: Telepathy-GLib
+Name: Telepathy-GLib-1
Description: GLib utility library for the Telepathy framework
Version: @VERSION@
Requires: pkg-config >= 0.21
Requires.private: dbus-1 >= 0.95, dbus-glib-1 >= 0.90, glib-2.0 >= 2.30, gobject-2.0 >= 2.30, gio-2.0 >= 2.30
-Libs: -L${libdir} -ltelepathy-glib
-Cflags: -I${includedir}/telepathy-1.0
+Libs: -L${libdir} -ltelepathy-glib-1 -ltelepathy-glib-1-core
+Libs.private: -ltelepathy-glib-1-dbus
+Cflags: -I${includedir}/telepathy-glib-1
diff --git a/telepathy-glib/telepathy-glib-dbus.h b/telepathy-glib/telepathy-glib-dbus.h
index 7e1645511..ea644674c 100644
--- a/telepathy-glib/telepathy-glib-dbus.h
+++ b/telepathy-glib/telepathy-glib-dbus.h
@@ -45,8 +45,6 @@
#include <telepathy-glib/_gen/tp-cli-dbus-daemon.h>
#include <telepathy-glib/_gen/tp-cli-debug.h>
#include <telepathy-glib/_gen/tp-cli-generic.h>
-#include <telepathy-glib/_gen/tp-cli-media-session-handler.h>
-#include <telepathy-glib/_gen/tp-cli-media-stream-handler.h>
#include <telepathy-glib/_gen/tp-cli-protocol.h>
/* service-side */
@@ -62,7 +60,6 @@
#include <telepathy-glib/svc-connection-manager.h>
#include <telepathy-glib/svc-debug.h>
#include <telepathy-glib/svc-generic.h>
-#include <telepathy-glib/svc-media-interfaces.h>
#include <telepathy-glib/svc-properties-interface.h>
#include <telepathy-glib/svc-protocol.h>
#include <telepathy-glib/svc-tls.h>
diff --git a/telepathy-glib/telepathy-glib.h b/telepathy-glib/telepathy-glib.h
index a150ad53f..cb4d7279b 100644
--- a/telepathy-glib/telepathy-glib.h
+++ b/telepathy-glib/telepathy-glib.h
@@ -90,7 +90,6 @@
#include <telepathy-glib/handle-repo-dynamic.h>
#include <telepathy-glib/handle-repo-static.h>
#include <telepathy-glib/handle.h>
-#include <telepathy-glib/media-interfaces.h>
#include <telepathy-glib/message.h>
#include <telepathy-glib/message-mixin.h>
#include <telepathy-glib/observe-channels-context.h>
@@ -102,7 +101,7 @@
#include <telepathy-glib/run.h>
#include <telepathy-glib/signalled-message.h>
#include <telepathy-glib/simple-approver.h>
-#include <telepathy-glib/simple-client-factory.h>
+#include <telepathy-glib/client-factory.h>
#include <telepathy-glib/simple-handler.h>
#include <telepathy-glib/simple-password-manager.h>
#include <telepathy-glib/simple-observer.h>
@@ -111,17 +110,5 @@
#include <telepathy-glib/text-channel.h>
#include <telepathy-glib/tls-certificate.h>
-/* deprecated, gone in 1.0 */
-#include <telepathy-glib/automatic-proxy-factory.h>
-#include <telepathy-glib/basic-proxy-factory.h>
-#include <telepathy-glib/channel-iface.h>
-#include <telepathy-glib/client-channel-factory.h>
-
-/* D-Bus-API-dependent, moved to telepathy-glib-dbus.h in 1.0 */
-#include <telepathy-glib/gtypes.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/svc-generic.h>
-#include <telepathy-glib/svc-client.h>
-
#undef __TP_IN_GLIB_H__
#endif /* __TP_GLIB_H__ */
diff --git a/telepathy-glib/text-channel.c b/telepathy-glib/text-channel.c
index 24c49afb7..95688a929 100644
--- a/telepathy-glib/text-channel.c
+++ b/telepathy-glib/text-channel.c
@@ -47,6 +47,8 @@
#include "telepathy-glib/text-channel.h"
+#include <telepathy-glib/cli-channel.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/contact.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/enums.h>
@@ -198,12 +200,8 @@ get_sender (TpTextChannel *self,
if (*contact == NULL)
{
- if (!tp_connection_has_immortal_handles (conn))
- DEBUG ("Connection %s don't have immortal handles, please fix CM",
- tp_proxy_get_object_path (conn));
- else if (tp_str_empty (sender_id))
- DEBUG ("Message received on %s doesn't include message-sender-id, "
- "please fix CM", tp_proxy_get_object_path (self));
+ DEBUG ("Message received on %s doesn't include message-sender-id, "
+ "please fix CM", tp_proxy_get_object_path (self));
}
out:
@@ -422,20 +420,6 @@ tp_text_channel_constructed (GObject *obj)
return;
}
- if (!tp_proxy_has_interface_by_id (self,
- TP_IFACE_QUARK_CHANNEL_INTERFACE_MESSAGES))
- {
- GError error = { TP_DBUS_ERRORS, TP_DBUS_ERROR_INCONSISTENT,
- "Channel does not implement the Messages interface" };
-
- DEBUG ("Channel %s does not implement the Messages interface",
- tp_proxy_get_object_path (self));
-
- tp_proxy_invalidate (TP_PROXY (self), &error);
- return;
-
- }
-
/* Forward TpChannel::chat-state-changed as
* TpTextChannel::contact-chat-state-changed */
g_signal_connect (self, "chat-state-changed",
@@ -444,12 +428,12 @@ tp_text_channel_constructed (GObject *obj)
props = tp_channel_borrow_immutable_properties (TP_CHANNEL (self));
self->priv->supported_content_types = (GStrv) tp_asv_get_strv (props,
- TP_PROP_CHANNEL_INTERFACE_MESSAGES_SUPPORTED_CONTENT_TYPES);
+ TP_PROP_CHANNEL_TYPE_TEXT_SUPPORTED_CONTENT_TYPES);
if (self->priv->supported_content_types == NULL)
{
const gchar * const plain[] = { "text/plain", NULL };
- DEBUG ("Channel %s doesn't have Messages.SupportedContentTypes in its "
+ DEBUG ("Channel %s doesn't have SupportedContentTypes in its "
"immutable properties", tp_proxy_get_object_path (self));
/* spec mandates that plain text is always allowed. */
@@ -462,23 +446,23 @@ tp_text_channel_constructed (GObject *obj)
}
self->priv->message_part_support_flags = tp_asv_get_uint32 (props,
- TP_PROP_CHANNEL_INTERFACE_MESSAGES_MESSAGE_PART_SUPPORT_FLAGS, &valid);
+ TP_PROP_CHANNEL_TYPE_TEXT_MESSAGE_PART_SUPPORT_FLAGS, &valid);
if (!valid)
{
- DEBUG ("Channel %s doesn't have Messages.MessagePartSupportFlags in its "
+ DEBUG ("Channel %s doesn't have MessagePartSupportFlags in its "
"immutable properties", tp_proxy_get_object_path (self));
}
self->priv->delivery_reporting_support = tp_asv_get_uint32 (props,
- TP_PROP_CHANNEL_INTERFACE_MESSAGES_DELIVERY_REPORTING_SUPPORT, &valid);
+ TP_PROP_CHANNEL_TYPE_TEXT_DELIVERY_REPORTING_SUPPORT, &valid);
if (!valid)
{
- DEBUG ("Channel %s doesn't have Messages.DeliveryReportingSupport in its "
+ DEBUG ("Channel %s doesn't have DeliveryReportingSupport in its "
"immutable properties", tp_proxy_get_object_path (self));
}
self->priv->message_types = tp_asv_get_boxed (props,
- TP_PROP_CHANNEL_INTERFACE_MESSAGES_MESSAGE_TYPES, DBUS_TYPE_G_UINT_ARRAY);
+ TP_PROP_CHANNEL_TYPE_TEXT_MESSAGE_TYPES, DBUS_TYPE_G_UINT_ARRAY);
if (self->priv->message_types != NULL)
{
self->priv->message_types = g_boxed_copy (DBUS_TYPE_G_UINT_ARRAY,
@@ -489,11 +473,11 @@ tp_text_channel_constructed (GObject *obj)
self->priv->message_types = g_array_new (FALSE, FALSE,
sizeof (TpChannelTextMessageType));
- DEBUG ("Channel %s doesn't have Messages.MessageTypes in its "
+ DEBUG ("Channel %s doesn't have MessageTypes in its "
"immutable properties", tp_proxy_get_object_path (self));
}
- tp_cli_channel_interface_messages_connect_to_message_sent (chan,
+ tp_cli_channel_type_text_connect_to_message_sent (chan,
message_sent_cb, NULL, NULL, NULL, &err);
if (err != NULL)
{
@@ -681,7 +665,7 @@ get_pending_messages_cb (TpProxy *proxy,
error->domain, error->code,
"Failed to get PendingMessages property: %s", error->message);
- g_simple_async_result_complete_in_idle (self->priv->pending_messages_result);
+ g_simple_async_result_complete (self->priv->pending_messages_result);
g_clear_object (&self->priv->pending_messages_result);
return;
}
@@ -694,7 +678,7 @@ get_pending_messages_cb (TpProxy *proxy,
TP_ERROR, TP_ERROR_CONFUSED,
"PendingMessages property is of the wrong type");
- g_simple_async_result_complete_in_idle (self->priv->pending_messages_result);
+ g_simple_async_result_complete (self->priv->pending_messages_result);
g_clear_object (&self->priv->pending_messages_result);
return;
}
@@ -703,7 +687,7 @@ get_pending_messages_cb (TpProxy *proxy,
if (messages->len == 0)
{
- g_simple_async_result_complete_in_idle (self->priv->pending_messages_result);
+ g_simple_async_result_complete (self->priv->pending_messages_result);
g_clear_object (&self->priv->pending_messages_result);
return;
}
@@ -729,7 +713,7 @@ tp_text_channel_prepare_pending_messages_async (TpProxy *proxy,
TpChannel *channel = (TpChannel *) self;
GError *error = NULL;
- tp_cli_channel_interface_messages_connect_to_message_received (channel,
+ tp_cli_channel_type_text_connect_to_message_received (channel,
message_received_cb, proxy, NULL, G_OBJECT (proxy), &error);
if (error != NULL)
{
@@ -738,7 +722,7 @@ tp_text_channel_prepare_pending_messages_async (TpProxy *proxy,
return;
}
- tp_cli_channel_interface_messages_connect_to_pending_messages_removed (
+ tp_cli_channel_type_text_connect_to_pending_messages_removed (
channel, pending_messages_removed_cb, proxy, NULL, G_OBJECT (proxy),
&error);
if (error != NULL)
@@ -755,7 +739,7 @@ tp_text_channel_prepare_pending_messages_async (TpProxy *proxy,
tp_cli_dbus_properties_call_get (proxy, -1,
- TP_IFACE_CHANNEL_INTERFACE_MESSAGES, "PendingMessages",
+ TP_IFACE_CHANNEL_TYPE_TEXT, "PendingMessages",
get_pending_messages_cb, NULL, NULL, G_OBJECT (proxy));
}
@@ -795,7 +779,7 @@ get_sms_channel_cb (TpProxy *proxy,
g_object_notify (G_OBJECT (self), "is-sms-channel");
out:
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -908,7 +892,7 @@ tp_text_channel_class_init (TpTextChannelClass *klass)
*/
param_spec = g_param_spec_boxed ("supported-content-types",
"SupportedContentTypes",
- "The Messages.SupportedContentTypes property of the channel",
+ "The SupportedContentTypes property of the channel",
G_TYPE_STRV,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (gobject_class, PROP_SUPPORTED_CONTENT_TYPES,
@@ -924,7 +908,7 @@ tp_text_channel_class_init (TpTextChannelClass *klass)
*/
param_spec = g_param_spec_uint ("message-part-support-flags",
"MessagePartSupportFlags",
- "The Messages.MessagePartSupportFlags property of the channel",
+ "The MessagePartSupportFlags property of the channel",
0, G_MAXUINT32, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (gobject_class,
@@ -940,7 +924,7 @@ tp_text_channel_class_init (TpTextChannelClass *klass)
*/
param_spec = g_param_spec_uint ("delivery-reporting-support",
"DeliveryReportingSupport",
- "The Messages.DeliveryReportingSupport property of the channel",
+ "The DeliveryReportingSupport property of the channel",
0, G_MAXUINT32, 0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (gobject_class,
@@ -956,7 +940,7 @@ tp_text_channel_class_init (TpTextChannelClass *klass)
*/
param_spec = g_param_spec_boxed ("message-types",
"MessageTypes",
- "The Messages.MessageTypes property of the channel",
+ "The MessageTypes property of the channel",
DBUS_TYPE_G_UINT_ARRAY,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (gobject_class,
@@ -1015,7 +999,7 @@ tp_text_channel_class_init (TpTextChannelClass *klass)
*
* It is guaranteed that @message's #TpSignalledMessage:sender has all of the
* features previously passed to
- * tp_simple_client_factory_add_contact_features() prepared.
+ * tp_client_factory_add_contact_features() prepared.
*
* Since: 0.13.10
*/
@@ -1039,7 +1023,7 @@ tp_text_channel_class_init (TpTextChannelClass *klass)
*
* It is guaranteed that @message's #TpSignalledMessage:sender has all of the
* features previously passed to
- * tp_simple_client_factory_add_contact_features() prepared.
+ * tp_client_factory_add_contact_features() prepared.
*
* Since: 0.13.10
*/
@@ -1065,7 +1049,7 @@ tp_text_channel_class_init (TpTextChannelClass *klass)
*
* It is guaranteed that @message's #TpSignalledMessage:sender has all of the
* features previously passed to
- * tp_simple_client_factory_add_contact_features() prepared.
+ * tp_client_factory_add_contact_features() prepared.
*
* Since: 0.13.10
*/
@@ -1139,7 +1123,7 @@ tp_text_channel_new (TpConnection *conn,
TpTextChannel *
_tp_text_channel_new_with_factory (
- TpSimpleClientFactory *factory,
+ TpClientFactory *factory,
TpConnection *conn,
const gchar *object_path,
const GHashTable *immutable_properties,
@@ -1254,7 +1238,7 @@ tp_text_channel_get_feature_quark_incoming_messages (void)
*
* It is guaranteed that the #TpSignalledMessage:sender of each
* #TpSignalledMessage has all of the features previously passed to
- * tp_simple_client_factory_add_contact_features() prepared.
+ * tp_client_factory_add_contact_features() prepared.
*
* Returns: (transfer container) (element-type TelepathyGLib.SignalledMessage):
* a #GList of borrowed #TpSignalledMessage
@@ -1286,7 +1270,7 @@ send_message_cb (TpChannel *proxy,
g_simple_async_result_set_op_res_gpointer (result,
tp_str_empty (token) ? NULL : g_strdup (token), g_free);
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -1320,7 +1304,7 @@ tp_text_channel_send_message_async (TpTextChannel *self,
result = g_simple_async_result_new (G_OBJECT (self), callback,
user_data, tp_text_channel_send_message_async);
- tp_cli_channel_interface_messages_call_send_message (TP_CHANNEL (self),
+ tp_cli_channel_type_text_call_send_message (TP_CHANNEL (self),
-1, message->parts, flags, send_message_cb, result, NULL, NULL);
}
@@ -1364,7 +1348,7 @@ acknowledge_pending_messages_ready_cb (GObject *object,
_tp_channel_contacts_queue_prepare_finish (channel, res, NULL, NULL);
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -1381,7 +1365,7 @@ acknowledge_pending_messages_cb (TpChannel *channel,
DEBUG ("Failed to ack messages: %s", error->message);
g_simple_async_result_set_from_error (result, error);
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
return;
}
@@ -1629,7 +1613,7 @@ set_chat_state_cb (TpChannel *proxy,
g_simple_async_result_set_from_error (result, error);
}
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
g_object_unref (result);
}
@@ -1841,7 +1825,7 @@ get_sms_length_cb (TpChannel *proxy,
(GDestroyNotify) get_sms_length_return_free);
out:
- g_simple_async_result_complete_in_idle (result);
+ g_simple_async_result_complete (result);
}
/**
diff --git a/telepathy-glib/text-mixin.c b/telepathy-glib/text-mixin.c
deleted file mode 100644
index 7d6364f95..000000000
--- a/telepathy-glib/text-mixin.c
+++ /dev/null
@@ -1,719 +0,0 @@
-/*
- * text-mixin.c - Source for TpTextMixin
- * Copyright (C) 2006, 2007 Collabora Ltd.
- * Copyright (C) 2006, 2007 Nokia Corporation
- * @author Ole Andre Vadla Ravnaas <ole.andre.ravnaas@collabora.co.uk>
- * @author Robert McQueen <robert.mcqueen@collabora.co.uk>
- * @author Senko Rasic <senko@senko.net>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-/**
- * SECTION:text-mixin
- * @title: TpTextMixin
- * @short_description: a mixin implementation of the text channel type
- * @see_also: #TpSvcChannelTypeText
- *
- * This mixin can be added to a channel GObject class to implement the
- * text channel type in a general way. It implements the pending message
- * queue and GetMessageTypes, so the implementation should only need to
- * implement Send.
- *
- * To use the text mixin, include a #TpTextMixinClass somewhere in your
- * class structure and a #TpTextMixin somewhere in your instance structure,
- * and call tp_text_mixin_class_init() from your class_init function,
- * tp_text_mixin_init() from your init function or constructor, and
- * tp_text_mixin_finalize() from your dispose or finalize function.
- *
- * To use the text mixin as the implementation of
- * #TpSvcChannelTypeText, in the function you pass to G_IMPLEMENT_INTERFACE,
- * you should first call tp_text_mixin_iface_init(), then call
- * tp_svc_channel_type_text_implement_send() to register your implementation
- * of the Send method.
- *
- * Deprecated: Use #TpMessageMixin instead.
- */
-
-#include "config.h"
-
-#include <telepathy-glib/text-mixin.h>
-
-#include <dbus/dbus-glib.h>
-#include <string.h>
-
-#include <telepathy-glib/enums.h>
-#include <telepathy-glib/errors.h>
-#include <telepathy-glib/gtypes.h>
-
-#define DEBUG_FLAG TP_DEBUG_IM
-
-#include "debug-internal.h"
-
-/* Deprecated module can use deprecated APIs */
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-
-struct _TpTextMixinPrivate
-{
- TpHandleRepoIface *contacts_repo;
- guint recv_id;
- gboolean message_lost;
-
- GQueue *pending;
-
- GArray *msg_types;
-};
-
-/* pending message */
-
-/*
- * _PendingMessage:
- * @id: The message ID
- * @timestamp: The Unix time at which the message was received
- * @sender: The contact handle of the sender
- * @type: The message type
- * @text: The message itself
- * @flags: The message's flags
- *
- * Represents a message in the pending messages queue.
- */
-typedef struct
-{
- guint id;
- guint timestamp;
- TpHandle sender;
- TpChannelTextMessageType type;
- char *text;
- guint flags;
-} _PendingMessage;
-
-/**
- * tp_text_mixin_class_get_offset_quark:
- *
- * <!--no documentation beyond Returns: needed-->
- *
- * Returns: the quark used for storing mixin offset on a GObjectClass
- * Deprecated: Use #TpMessageMixin instead.
- */
-GQuark
-tp_text_mixin_class_get_offset_quark ()
-{
- static GQuark offset_quark = 0;
-
- if (G_UNLIKELY (offset_quark == 0))
- offset_quark = g_quark_from_static_string ("TpTextMixinClassOffsetQuark");
-
- return offset_quark;
-}
-
-/**
- * tp_text_mixin_get_offset_quark:
- *
- * <!--no documentation beyond Returns: needed-->
- *
- * Returns: the quark used for storing mixin offset on a GObject
- * Deprecated: Use #TpMessageMixin instead.
- */
-GQuark
-tp_text_mixin_get_offset_quark ()
-{
- static GQuark offset_quark = 0;
-
- if (G_UNLIKELY (offset_quark == 0))
- offset_quark = g_quark_from_static_string ("TpTextMixinOffsetQuark");
-
- return offset_quark;
-}
-
-
-/**
- * tp_text_mixin_class_init:
- * @obj_cls: The class of the implementation that uses this mixin
- * @offset: The byte offset of the TpTextMixinClass within the class structure
- *
- * Initialize the text mixin. Should be called from the implementation's
- * class_init function like so:
- *
- * <informalexample><programlisting>
- * tp_text_mixin_class_init ((GObjectClass *) klass,
- * G_STRUCT_OFFSET (SomeObjectClass, text_mixin));
- * </programlisting></informalexample>
- *
- * Deprecated: Use #TpMessageMixin instead.
- */
-
-void
-tp_text_mixin_class_init (GObjectClass *obj_cls, glong offset)
-{
- TpTextMixinClass *mixin_cls;
-
- g_assert (G_IS_OBJECT_CLASS (obj_cls));
-
- g_type_set_qdata (G_OBJECT_CLASS_TYPE (obj_cls),
- TP_TEXT_MIXIN_CLASS_OFFSET_QUARK,
- GINT_TO_POINTER (offset));
-
- mixin_cls = TP_TEXT_MIXIN_CLASS (obj_cls);
- g_return_if_fail (mixin_cls != NULL);
-}
-
-
-/**
- * tp_text_mixin_init:
- * @obj: An instance of the implementation that uses this mixin
- * @offset: The byte offset of the TpTextMixin within the object structure
- * @contacts_repo: The connection's %TP_HANDLE_TYPE_CONTACT repository
- *
- * Initialize the text mixin. Should be called from the implementation's
- * instance init function like so:
- *
- * <informalexample><programlisting>
- * tp_text_mixin_init ((GObject *) self,
- * G_STRUCT_OFFSET (SomeObject, text_mixin),
- * self->contact_repo);
- * </programlisting></informalexample>
- *
- * Deprecated: Use tp_message_mixin_init() instead.
- */
-void
-tp_text_mixin_init (GObject *obj,
- glong offset,
- TpHandleRepoIface *contacts_repo)
-{
- TpTextMixin *mixin;
-
- g_assert (G_IS_OBJECT (obj));
-
- g_type_set_qdata (G_OBJECT_TYPE (obj),
- TP_TEXT_MIXIN_OFFSET_QUARK,
- GINT_TO_POINTER (offset));
-
- mixin = TP_TEXT_MIXIN (obj);
-
- mixin->priv = g_slice_new0 (TpTextMixinPrivate);
-
- mixin->priv->pending = g_queue_new ();
- mixin->priv->contacts_repo = contacts_repo;
- mixin->priv->recv_id = 0;
- mixin->priv->msg_types = g_array_sized_new (FALSE, FALSE, sizeof (guint), 4);
-
- mixin->priv->message_lost = FALSE;
-}
-
-/**
- * tp_text_mixin_set_message_types:
- * @obj: An object with this mixin
- * @...: guints representing members of #TpChannelTextMessageType, terminated
- * by G_MAXUINT
- *
- * Set the supported message types.
- *
- * Deprecated: Use #TpMessageMixin instead.
- */
-void
-tp_text_mixin_set_message_types (GObject *obj,
- ...)
-{
- TpTextMixin *mixin = TP_TEXT_MIXIN (obj);
- va_list args;
- guint type;
-
- va_start (args, obj);
-
- while ((type = va_arg (args, guint)) != G_MAXUINT)
- g_array_append_val (mixin->priv->msg_types, type);
-
- va_end (args);
-}
-
-static inline _PendingMessage *
-_pending_new0 (void)
-{
- return g_slice_new0 (_PendingMessage);
-}
-
-/**
- * _pending_free
- *
- * Free up a _PendingMessage struct.
- */
-static void
-_pending_free (_PendingMessage *msg,
- TpHandleRepoIface *contacts_repo)
-{
- g_free (msg->text);
- tp_handle_unref (contacts_repo, msg->sender);
- g_slice_free (_PendingMessage, msg);
-}
-
-/**
- * tp_text_mixin_finalize:
- * @obj: An object with this mixin.
- *
- * Free resources held by the text mixin.
- *
- * Deprecated: Use tp_message_mixin_finalize() instead.
- */
-void
-tp_text_mixin_finalize (GObject *obj)
-{
- TpTextMixin *mixin = TP_TEXT_MIXIN (obj);
-
- DEBUG ("%p", obj);
-
- /* free any data held directly by the object here */
-
- tp_text_mixin_clear (obj);
-
- g_queue_free (mixin->priv->pending);
-
- g_array_unref (mixin->priv->msg_types);
-
- g_slice_free (TpTextMixinPrivate, mixin->priv);
-}
-
-/**
- * tp_text_mixin_receive_with_flags:
- * @obj: An object with the text mixin
- * @type: The type of message received from the underlying protocol
- * @sender: The handle of the message sender
- * @timestamp: The time the message was received
- * @text: The text of the message
- * @flags: the message's flags
- *
- * Add a message to the pending queue and emit Received.
- *
- * Returns: %TRUE on success; %FALSE if the message was lost due to the memory
- * limit.
- *
- * Deprecated: Use tp_message_mixin_take_received() instead.
- */
-gboolean
-tp_text_mixin_receive_with_flags (GObject *obj,
- TpChannelTextMessageType type,
- TpHandle sender,
- time_t timestamp,
- const char *text,
- TpChannelTextMessageFlags flags)
-{
- TpTextMixin *mixin = TP_TEXT_MIXIN (obj);
- _PendingMessage *msg;
- size_t len;
-
- msg = _pending_new0 ();
- msg->sender = tp_handle_ref (mixin->priv->contacts_repo, sender);
- /* FIXME: we don't check for overflow, so in highly pathological cases we
- * might end up with multiple messages with the same ID */
- msg->id = mixin->priv->recv_id++;
- msg->timestamp = timestamp;
- msg->type = type;
- msg->flags = flags;
-
- len = strlen (text);
- msg->text = g_try_malloc (len + 1);
-
- if (msg->text == NULL)
- {
- DEBUG ("unable to copy message, giving up");
-
- if (!mixin->priv->message_lost)
- {
- tp_svc_channel_type_text_emit_lost_message (obj);
- mixin->priv->message_lost = TRUE;
- }
-
- _pending_free (msg, mixin->priv->contacts_repo);
-
- return FALSE;
- }
-
- g_strlcpy (msg->text, text, len + 1);
-
- g_queue_push_tail (mixin->priv->pending, msg);
-
- tp_svc_channel_type_text_emit_received (obj,
- msg->id,
- msg->timestamp,
- msg->sender,
- msg->type,
- msg->flags,
- msg->text);
-
- DEBUG ("queued message %u", msg->id);
-
- mixin->priv->message_lost = FALSE;
-
- return TRUE;
-}
-
-
-/**
- * tp_text_mixin_receive:
- * @obj: An object with the text mixin
- * @type: The type of message received from the underlying protocol
- * @sender: The handle of the message sender
- * @timestamp: The time the message was received
- * @text: The text of the message
- *
- * Add a message to the pending queue and emit Received. Exactly equivalent
- * to tp_text_mixin_receive_with_flags() with @flags == 0.
- *
- * Returns: %TRUE on success; %FALSE if the message was lost due to the memory
- * limit.
- *
- * Deprecated: Use tp_message_mixin_take_received() instead.
- */
-gboolean
-tp_text_mixin_receive (GObject *obj,
- TpChannelTextMessageType type,
- TpHandle sender,
- time_t timestamp,
- const char *text)
-{
- return tp_text_mixin_receive_with_flags (obj, type, sender, timestamp, text,
- 0);
-}
-
-static gint
-compare_pending_message (gconstpointer haystack,
- gconstpointer needle)
-{
- _PendingMessage *msg = (_PendingMessage *) haystack;
- guint id = GPOINTER_TO_INT (needle);
-
- return (msg->id != id);
-}
-
-/**
- * tp_text_mixin_acknowledge_pending_messages:
- * @obj: An object with this mixin
- * @ids: An array of guint representing message IDs
- * @error: Used to return a pointer to a GError detailing any error
- * that occurred, D-Bus will throw the error only if this
- * function returns false.
- *
- * Implements D-Bus method AcknowledgePendingMessages
- * on interface org.freedesktop.Telepathy.Channel.Type.Text
- *
- * Returns: TRUE if successful, FALSE if an error was thrown.
- *
- * Deprecated: Use #TpMessageMixin instead.
- */
-gboolean
-tp_text_mixin_acknowledge_pending_messages (GObject *obj,
- const GArray *ids,
- GError **error)
-{
- TpTextMixin *mixin = TP_TEXT_MIXIN (obj);
- GList **nodes;
- _PendingMessage *msg;
- guint i;
-
- nodes = g_new (GList *, ids->len);
-
- for (i = 0; i < ids->len; i++)
- {
- guint id = g_array_index (ids, guint, i);
-
- nodes[i] = g_queue_find_custom (mixin->priv->pending,
- GINT_TO_POINTER (id),
- compare_pending_message);
-
- if (nodes[i] == NULL)
- {
- DEBUG ("invalid message id %u", id);
-
- g_set_error (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT,
- "invalid message id %u", id);
-
- g_free (nodes);
- return FALSE;
- }
- }
-
- for (i = 0; i < ids->len; i++)
- {
- msg = (_PendingMessage *) nodes[i]->data;
-
- DEBUG ("acknowleding message id %u", msg->id);
-
- g_queue_remove (mixin->priv->pending, msg);
-
- _pending_free (msg, mixin->priv->contacts_repo);
- }
-
- g_free (nodes);
- return TRUE;
-}
-
-static void
-tp_text_mixin_acknowledge_pending_messages_async (TpSvcChannelTypeText *iface,
- const GArray *ids,
- DBusGMethodInvocation *context)
-{
- GError *error = NULL;
-
- if (tp_text_mixin_acknowledge_pending_messages (G_OBJECT (iface), ids,
- &error))
- {
- tp_svc_channel_type_text_return_from_acknowledge_pending_messages (
- context);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
-/**
- * tp_text_mixin_list_pending_messages:
- * @obj: An object with this mixin
- * @clear: If %TRUE, delete the pending messages from the queue
- * @ret: Used to return a pointer to a new GPtrArray of D-Bus structures
- * @error: Used to return a pointer to a GError detailing any error
- * that occurred, D-Bus will throw the error only if this
- * function returns false.
- *
- * Implements D-Bus method ListPendingMessages
- * on interface org.freedesktop.Telepathy.Channel.Type.Text
- *
- * Returns: TRUE if successful, FALSE if an error was thrown.
- *
- * Deprecated: Use #TpMessageMixin instead.
- */
-gboolean
-tp_text_mixin_list_pending_messages (GObject *obj,
- gboolean clear,
- GPtrArray **ret,
- GError **error)
-{
- TpTextMixin *mixin = TP_TEXT_MIXIN (obj);
- GType pending_type = TP_STRUCT_TYPE_PENDING_TEXT_MESSAGE;
- guint count;
- GPtrArray *messages;
- GList *cur;
-
- count = g_queue_get_length (mixin->priv->pending);
- messages = g_ptr_array_sized_new (count);
-
- for (cur = g_queue_peek_head_link (mixin->priv->pending);
- cur != NULL;
- cur = cur->next)
- {
- _PendingMessage *msg = cur->data;
- GValue val = { 0, };
-
- g_value_init (&val, pending_type);
- g_value_take_boxed (&val,
- dbus_g_type_specialized_construct (pending_type));
- dbus_g_type_struct_set (&val,
- 0, msg->id,
- 1, msg->timestamp,
- 2, msg->sender,
- 3, msg->type,
- 4, msg->flags,
- 5, msg->text,
- G_MAXUINT);
-
- g_ptr_array_add (messages, g_value_get_boxed (&val));
- }
-
- if (clear)
- {
- DEBUG ("WARNING: ListPendingMessages(clear=TRUE) is deprecated");
- tp_text_mixin_clear (obj);
- }
-
- *ret = messages;
-
- return TRUE;
-}
-
-static void
-tp_text_mixin_list_pending_messages_async (TpSvcChannelTypeText *iface,
- gboolean clear,
- DBusGMethodInvocation *context)
-{
- GPtrArray *ret;
- GError *error = NULL;
-
- if (tp_text_mixin_list_pending_messages (G_OBJECT (iface), clear, &ret,
- &error))
- {
- guint i;
-
- tp_svc_channel_type_text_return_from_list_pending_messages (
- context, ret);
-
- for (i = 0; i < ret->len; i++)
- g_value_array_free (g_ptr_array_index (ret, i));
-
- g_ptr_array_unref (ret);
- }
- else
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- }
-}
-
-/**
- * tp_text_mixin_get_message_types:
- * @obj: An object with this mixin
- * @ret: A pointer to where a GArray of guint will be placed on success
- * @error: A pointer to where an error will be placed on failure
- *
- * Return a newly allocated GArray of guint, representing message types
- * taken from #TpChannelTextMessageType, through @ret.
- *
- * Returns: %TRUE on success
- *
- * Deprecated: Use #TpMessageMixin instead.
- */
-gboolean
-tp_text_mixin_get_message_types (GObject *obj,
- GArray **ret,
- GError **error)
-{
- TpTextMixin *mixin = TP_TEXT_MIXIN (obj);
- guint i;
-
- *ret = g_array_sized_new (FALSE, FALSE, sizeof (guint),
- mixin->priv->msg_types->len);
-
- for (i = 0; i < mixin->priv->msg_types->len; i++)
- {
- g_array_append_val (*ret, g_array_index (mixin->priv->msg_types, guint,
- i));
- }
-
- return TRUE;
-}
-
-
-static void
-tp_text_mixin_get_message_types_async (TpSvcChannelTypeText *iface,
- DBusGMethodInvocation *context)
-{
- TpTextMixin *mixin = TP_TEXT_MIXIN (iface);
-
- tp_svc_channel_type_text_return_from_get_message_types (context,
- mixin->priv->msg_types);
-}
-
-/**
- * tp_text_mixin_clear:
- * @obj: An object with this mixin
- *
- * Clear the pending message queue, deleting all messages.
- *
- * Deprecated: Use tp_message_mixin_clear() instead.
- */
-void
-tp_text_mixin_clear (GObject *obj)
-{
- TpTextMixin *mixin = TP_TEXT_MIXIN (obj);
- _PendingMessage *msg;
-
- while ((msg = g_queue_pop_head (mixin->priv->pending)) != NULL)
- {
- _pending_free (msg, mixin->priv->contacts_repo);
- }
-}
-
-/**
- * tp_text_mixin_has_pending_messages:
- * @obj: An object with this mixin
- * @first_sender: If not %NULL, used to store the sender of the oldest pending
- * message
- *
- * Return whether the channel @obj has unacknowledged messages. If so, and
- * @first_sender is not %NULL, the handle of the sender of the first message
- * is placed in it, without incrementing the handle's reference count.
- *
- * Returns: %TRUE if there are pending messages
- *
- * Deprecated: Use tp_message_mixin_has_pending_messages() instead.
- */
-gboolean
-tp_text_mixin_has_pending_messages (GObject *obj,
- TpHandle *first_sender)
-{
- TpTextMixin *mixin = TP_TEXT_MIXIN (obj);
- _PendingMessage *msg = g_queue_peek_head (mixin->priv->pending);
-
- if (msg != NULL && first_sender != NULL)
- {
- *first_sender = msg->sender;
- }
-
- return (msg != NULL);
-}
-
-/**
- * tp_text_mixin_set_rescued:
- * @obj: An object with this mixin
- *
- * Mark all pending messages as having been "rescued" from a channel that
- * previously closed.
- *
- * Deprecated: Use tp_message_mixin_set_rescued() instead.
- */
-void
-tp_text_mixin_set_rescued (GObject *obj)
-{
- TpTextMixin *mixin = TP_TEXT_MIXIN (obj);
- GList *cur;
-
- for (cur = g_queue_peek_head_link (mixin->priv->pending);
- cur != NULL;
- cur = cur->next)
- {
- _PendingMessage *msg = cur->data;
-
- msg->flags |= TP_CHANNEL_TEXT_MESSAGE_FLAG_RESCUED;
- }
-}
-
-/**
- * tp_text_mixin_iface_init:
- * @g_iface: A pointer to the #TpSvcChannelTypeTextClass in an object class
- * @iface_data: Ignored
- *
- * Fill in this mixin's AcknowledgePendingMessages, GetMessageTypes and
- * ListPendingMessages implementations in the given interface vtable.
- * In addition to calling this function during interface initialization, the
- * implementor is expected to call tp_svc_channel_type_text_implement_send(),
- * providing a Send implementation.
- *
- * Deprecated: Use tp_message_mixin_text_iface_init() instead.
- */
-void
-tp_text_mixin_iface_init (gpointer g_iface,
- gpointer iface_data)
-{
- TpSvcChannelTypeTextClass *klass = g_iface;
-
-#define IMPLEMENT(x) tp_svc_channel_type_text_implement_##x (klass,\
- tp_text_mixin_##x##_async)
- IMPLEMENT(acknowledge_pending_messages);
- IMPLEMENT(get_message_types);
- IMPLEMENT(list_pending_messages);
- /* send not implemented here */
-#undef IMPLEMENT
-}
-
-G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/telepathy-glib/text-mixin.h b/telepathy-glib/text-mixin.h
deleted file mode 100644
index 9222896c8..000000000
--- a/telepathy-glib/text-mixin.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * text-mixin.h - Header for GabbleTextMixin
- * Copyright (C) 2006 Collabora Ltd.
- * Copyright (C) 2006 Nokia Corporation
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __TP_TEXT_MIXIN_H__
-#define __TP_TEXT_MIXIN_H__
-
-#include <time.h>
-
-#include <telepathy-glib/defs.h>
-#include <telepathy-glib/handle-repo.h>
-#include <telepathy-glib/svc-channel.h>
-#include "util.h"
-
-G_BEGIN_DECLS
-
-#ifndef TP_DISABLE_DEPRECATED
-
-typedef struct _TpTextMixinClass TpTextMixinClass;
-typedef struct _TpTextMixinClassPrivate TpTextMixinClassPrivate;
-typedef struct _TpTextMixin TpTextMixin;
-typedef struct _TpTextMixinPrivate TpTextMixinPrivate;
-
-/**
- * TpTextMixinClass:
- *
- * Structure to be included in the class structure of objects that
- * use this mixin. Initialize it with tp_text_mixin_class_init().
- *
- * There are no public fields.
- */
-struct _TpTextMixinClass {
- /*<private>*/
- TpTextMixinClassPrivate *priv;
-};
-
-/**
- * TpTextMixin:
- *
- * Structure to be included in the instance structure of objects that
- * use this mixin. Initialize it with tp_text_mixin_init().
- *
- * There are no public fields.
- */
-struct _TpTextMixin {
- /*<private>*/
- TpTextMixinPrivate *priv;
-};
-
-/* TYPE MACROS */
-#define TP_TEXT_MIXIN_CLASS_OFFSET_QUARK \
- (tp_text_mixin_class_get_offset_quark ())
-#define TP_TEXT_MIXIN_CLASS_OFFSET(o) \
- tp_mixin_class_get_offset (o, TP_TEXT_MIXIN_CLASS_OFFSET_QUARK)
-#define TP_TEXT_MIXIN_CLASS(o) \
- ((TpTextMixinClass *) tp_mixin_offset_cast (o, \
- TP_TEXT_MIXIN_CLASS_OFFSET (o)))
-
-#define TP_TEXT_MIXIN_OFFSET_QUARK (tp_text_mixin_get_offset_quark ())
-#define TP_TEXT_MIXIN_OFFSET(o) \
- tp_mixin_instance_get_offset (o, TP_TEXT_MIXIN_OFFSET_QUARK)
-#define TP_TEXT_MIXIN(o) \
- ((TpTextMixin *) tp_mixin_offset_cast (o, TP_TEXT_MIXIN_OFFSET (o)))
-
-GQuark tp_text_mixin_class_get_offset_quark (void) _TP_GNUC_DEPRECATED;
-GQuark tp_text_mixin_get_offset_quark (void) _TP_GNUC_DEPRECATED;
-
-void tp_text_mixin_class_init (GObjectClass *obj_cls, glong offset)
- _TP_GNUC_DEPRECATED;
-
-void tp_text_mixin_init (GObject *obj, glong offset,
- TpHandleRepoIface *contacts_repo)
- _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_init);
-void tp_text_mixin_set_message_types (GObject *obj, ...) _TP_GNUC_DEPRECATED;
-void tp_text_mixin_finalize (GObject *obj)
- _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_finalize);
-
-gboolean tp_text_mixin_receive_with_flags (GObject *obj,
- TpChannelTextMessageType type, TpHandle sender, time_t timestamp,
- const char *text, TpChannelTextMessageFlags flags)
- _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_take_received);
-gboolean tp_text_mixin_receive (GObject *obj, TpChannelTextMessageType type,
- TpHandle sender, time_t timestamp, const char *text)
- _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_take_received);
-gboolean tp_text_mixin_acknowledge_pending_messages (GObject *obj,
- const GArray * ids, GError **error) _TP_GNUC_DEPRECATED;
-gboolean tp_text_mixin_list_pending_messages (GObject *obj, gboolean clear,
- GPtrArray ** ret, GError **error) _TP_GNUC_DEPRECATED;
-gboolean tp_text_mixin_get_message_types (GObject *obj, GArray **ret,
- GError **error) _TP_GNUC_DEPRECATED;
-void tp_text_mixin_clear (GObject *obj)
- _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_clear);
-
-gboolean tp_text_mixin_has_pending_messages (GObject *obj,
- TpHandle *first_sender)
- _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_has_pending_messages);
-void tp_text_mixin_set_rescued (GObject *obj)
- _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_set_rescued);
-
-void tp_text_mixin_iface_init (gpointer g_iface, gpointer iface_data)
- _TP_GNUC_DEPRECATED_FOR (tp_message_mixin_text_iface_init);
-
-#endif
-
-G_END_DECLS
-
-#endif /* #ifndef __TP_TEXT_MIXIN_H__ */
diff --git a/telepathy-glib/tls-certificate.c b/telepathy-glib/tls-certificate.c
index 8827094ca..46374c127 100644
--- a/telepathy-glib/tls-certificate.c
+++ b/telepathy-glib/tls-certificate.c
@@ -25,8 +25,7 @@
#include <glib/gstdio.h>
-#include <telepathy-glib/_gen/tp-cli-tls-cert.h>
-
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/dbus-internal.h>
#include <telepathy-glib/enums.h>
diff --git a/telepathy-glib/util-internal.h b/telepathy-glib/util-internal.h
index d035270b6..a841b1f19 100644
--- a/telepathy-glib/util-internal.h
+++ b/telepathy-glib/util-internal.h
@@ -42,7 +42,7 @@ GSocketAddress * _tp_create_temp_unix_socket (GSocketService *service,
GError **error);
#endif /* HAVE_GIO_UNIX */
-GList * _tp_create_channel_request_list (TpSimpleClientFactory *factory,
+GList * _tp_create_channel_request_list (TpClientFactory *factory,
GHashTable *request_props);
/* Copied from wocky/wocky-utils.h */
diff --git a/telepathy-glib/util.c b/telepathy-glib/util.c
index 0ee31a3fe..5aab72c51 100644
--- a/telepathy-glib/util.c
+++ b/telepathy-glib/util.c
@@ -48,67 +48,7 @@
#define DEBUG_FLAG TP_DEBUG_MISC
#include "debug-internal.h"
-#include "simple-client-factory-internal.h"
-
-/**
- * tp_verify:
- * @R: a requirement (constant expression) to be checked at compile-time
- *
- * Make an assertion at compile time, like C++0x's proposed static_assert
- * keyword. If @R is determined to be true, there is no overhead at runtime;
- * if @R is determined to be false, compilation will fail.
- *
- * This macro can be used at file scope (it expands to a dummy extern
- * declaration).
- *
- * (This is gnulib's verify macro, written by Paul Eggert, Bruno Haible and
- * Jim Meyering.)
- *
- * This macro will be deprecated in a future telepathy-glib release. Please
- * use GLib 2.20's G_STATIC_ASSERT() macro in new code.
- *
- * Since: 0.7.34
- */
-
-/**
- * tp_verify_true:
- * @R: a requirement (constant expression) to be checked at compile-time
- *
- * Make an assertion at compile time, like C++0x's proposed static_assert
- * keyword. If @R is determined to be true, there is no overhead at runtime,
- * and the macro evaluates to 1 as an integer constant expression;
- * if @R is determined to be false, compilation will fail.
- *
- * This macro can be used anywhere that an integer constant expression would
- * be allowed.
- *
- * (This is gnulib's verify_true macro, written by Paul Eggert, Bruno Haible
- * and Jim Meyering.)
- *
- * This macro will be deprecated in a future telepathy-glib release. Please
- * use GLib 2.20's G_STATIC_ASSERT() macro in new code.
- *
- * Returns: 1
- *
- * Since: 0.7.34
- */
-
-/**
- * tp_verify_statement:
- * @R: a requirement (constant expression) to be checked at compile-time
- *
- * Make an assertion at compile time, like C++0x's proposed static_assert
- * keyword. If @R is determined to be true, there is no overhead at runtime;
- * if @R is determined to be false, compilation will fail.
- *
- * This macro can be used anywhere that a statement would be allowed; it
- * is equivalent to ((void) tp_verify_true (R)).
- *
- * This macro will be deprecated in a future telepathy-glib release. Please
- * use GLib 2.20's G_STATIC_ASSERT() macro in new code.
- *
- * Since: 0.7.34
- */
+#include "client-factory-internal.h"
/**
* tp_g_ptr_array_contains:
@@ -1590,7 +1530,7 @@ _tp_create_temp_unix_socket (GSocketService *service,
#endif /* HAVE_GIO_UNIX */
GList *
-_tp_create_channel_request_list (TpSimpleClientFactory *factory,
+_tp_create_channel_request_list (TpClientFactory *factory,
GHashTable *request_props)
{
GHashTableIter iter;
@@ -1605,7 +1545,7 @@ _tp_create_channel_request_list (TpSimpleClientFactory *factory,
GHashTable *props = value;
GError *error = NULL;
- req = _tp_simple_client_factory_ensure_channel_request (factory, path,
+ req = _tp_client_factory_ensure_channel_request (factory, path,
props, &error);
if (req == NULL)
{
diff --git a/telepathy-glib/util.h b/telepathy-glib/util.h
index 3474e7ee5..64cc018af 100644
--- a/telepathy-glib/util.h
+++ b/telepathy-glib/util.h
@@ -25,10 +25,6 @@
#include <gio/gio.h>
-#include <telepathy-glib/verify.h>
-
-#define tp_verify_statement(R) ((void) tp_verify_true (R))
-
G_BEGIN_DECLS
gboolean tp_g_ptr_array_contains (GPtrArray *haystack, gpointer needle);
diff --git a/telepathy-glib/verify.h b/telepathy-glib/verify.h
deleted file mode 100644
index d46a46013..000000000
--- a/telepathy-glib/verify.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/* Compile-time assert-like macros.
-
- Imported from gnulib 20090701 and adapted to Telepathy namespace.
-
- Copyright (C) 2005, 2006 Free Software Foundation, Inc.
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
-/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */
-
-#ifndef __TP_IN_UTIL_H__
-#error Not to be used directly, #include <telepathy-glib/util.h> instead
-#endif
-
-#ifndef TP_VERIFY_H
-# define TP_VERIFY_H 1
-
-/* Each of these macros verifies that its argument R is nonzero. To
- be portable, R should be an integer constant expression. Unlike
- assert (R), there is no run-time overhead.
-
- There are two macros, since no single macro can be used in all
- contexts in C. verify_true (R) is for scalar contexts, including
- integer constant expression contexts. verify (R) is for declaration
- contexts, e.g., the top level.
-
- Symbols ending in "__" are private to this header.
-
- The code below uses several ideas.
-
- * The first step is ((R) ? 1 : -1). Given an expression R, of
- integral or boolean or floating-point type, this yields an
- expression of integral type, whose value is later verified to be
- constant and nonnegative.
-
- * Next this expression W is wrapped in a type
- struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }.
- If W is negative, this yields a compile-time error. No compiler can
- deal with a bit-field of negative size.
-
- One might think that an array size check would have the same
- effect, that is, that the type struct { unsigned int dummy[W]; }
- would work as well. However, inside a function, some compilers
- (such as C++ compilers and GNU C) allow local parameters and
- variables inside array size expressions. With these compilers,
- an array size check would not properly diagnose this misuse of
- the verify macro:
-
- void function (int n) { verify (n < 0); }
-
- * For the verify macro, the struct verify_type__ will need to
- somehow be embedded into a declaration. To be portable, this
- declaration must declare an object, a constant, a function, or a
- typedef name. If the declared entity uses the type directly,
- such as in
-
- struct dummy {...};
- typedef struct {...} dummy;
- extern struct {...} *dummy;
- extern void dummy (struct {...} *);
- extern struct {...} *dummy (void);
-
- two uses of the verify macro would yield colliding declarations
- if the entity names are not disambiguated. A workaround is to
- attach the current line number to the entity name:
-
- #define GL_CONCAT0(x, y) x##y
- #define GL_CONCAT(x, y) GL_CONCAT0 (x, y)
- extern struct {...} * GL_CONCAT(dummy,__LINE__);
-
- But this has the problem that two invocations of verify from
- within the same macro would collide, since the __LINE__ value
- would be the same for both invocations.
-
- A solution is to use the sizeof operator. It yields a number,
- getting rid of the identity of the type. Declarations like
-
- extern int dummy [sizeof (struct {...})];
- extern void dummy (int [sizeof (struct {...})]);
- extern int (*dummy (void)) [sizeof (struct {...})];
-
- can be repeated.
-
- * Should the implementation use a named struct or an unnamed struct?
- Which of the following alternatives can be used?
-
- extern int dummy [sizeof (struct {...})];
- extern int dummy [sizeof (struct verify_type__ {...})];
- extern void dummy (int [sizeof (struct {...})]);
- extern void dummy (int [sizeof (struct verify_type__ {...})]);
- extern int (*dummy (void)) [sizeof (struct {...})];
- extern int (*dummy (void)) [sizeof (struct verify_type__ {...})];
-
- In the second and sixth case, the struct type is exported to the
- outer scope; two such declarations therefore collide. GCC warns
- about the first, third, and fourth cases. So the only remaining
- possibility is the fifth case:
-
- extern int (*dummy (void)) [sizeof (struct {...})];
-
- * This implementation exploits the fact that GCC does not warn about
- the last declaration mentioned above. If a future version of GCC
- introduces a warning for this, the problem could be worked around
- by using code specialized to GCC, e.g.,:
-
- #if 4 <= __GNUC__
- # define verify(R) \
- extern int (* verify_function__ (void)) \
- [__builtin_constant_p (R) && (R) ? 1 : -1]
- #endif
-
- * In C++, any struct definition inside sizeof is invalid.
- Use a template type to work around the problem. */
-
-
-/* Verify requirement R at compile-time, as an integer constant expression.
- Return 1. */
-
-# ifdef __cplusplus
-template <int w>
- struct tp_verify_type__ { unsigned int verify_error_if_negative_size__: w; };
-# define tp_verify_true(R) \
- (!!sizeof (tp_verify_type__<(R) ? 1 : -1>))
-# else
-# define tp_verify_true(R) \
- (!!sizeof \
- (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; }))
-# endif
-
-/* Verify requirement R at compile-time, as a declaration without a
- trailing ';'. */
-
-# define tp_verify(R) extern int (* tp_verify_function__ (void)) [tp_verify_true (R)]
-
-#endif
diff --git a/telepathy-glib/versions/0.11.0.abi b/telepathy-glib/versions/0.11.0.abi
deleted file mode 100644
index 117d3e4cc..000000000
--- a/telepathy-glib/versions/0.11.0.abi
+++ /dev/null
@@ -1,13 +0,0 @@
-Version: TELEPATHY_GLIB_0.11.0
-Extends: TELEPATHY_GLIB_0.9.2
-Release: 0.11.0
-
-tp_address_variant_from_g_socket_address
-tp_cli_connection_interface_balance_connect_to_balance_changed
-tp_g_socket_address_from_variant
-tp_g_value_slice_new_byte
-tp_iface_quark_connection_interface_balance
-tp_svc_connection_interface_balance_emit_balance_changed
-tp_svc_connection_interface_balance_get_type
-tp_type_dbus_struct_ius
-tp_value_array_unpack
diff --git a/telepathy-glib/versions/0.11.1.abi b/telepathy-glib/versions/0.11.1.abi
deleted file mode 100644
index fee764eaf..000000000
--- a/telepathy-glib/versions/0.11.1.abi
+++ /dev/null
@@ -1,8 +0,0 @@
-Version: TELEPATHY_GLIB_0.11.1
-Extends: TELEPATHY_GLIB_0.11.0
-Release: 0.11.1
-
-tp_contact_get_location
-tp_account_set_avatar_finish
-tp_account_set_avatar_async
-tp_type_dbus_array_of_y
diff --git a/telepathy-glib/versions/0.11.11.abi b/telepathy-glib/versions/0.11.11.abi
deleted file mode 100644
index 86d25d3f0..000000000
--- a/telepathy-glib/versions/0.11.11.abi
+++ /dev/null
@@ -1,53 +0,0 @@
-Version: TELEPATHY_GLIB_0.11.11
-Extends: TELEPATHY_GLIB_0.11.9
-Release: 0.11.11
-
-tp_base_client_get_dbus_daemon
-tp_base_client_get_name
-tp_base_client_get_uniquify_name
-tp_base_connection_manager_add_protocol
-tp_base_protocol_get_immutable_properties
-tp_base_protocol_get_name
-tp_base_protocol_get_parameters
-tp_base_protocol_get_type
-tp_base_protocol_new_connection
-tp_channel_manager_type_foreach_channel_class
-tp_cli_channel_type_contact_search_call_more
-tp_cli_channel_type_contact_search_call_search
-tp_cli_channel_type_contact_search_call_stop
-tp_cli_channel_type_contact_search_connect_to_search_result_received
-tp_cli_channel_type_contact_search_connect_to_search_state_changed
-tp_cli_channel_type_contact_search_run_more
-tp_cli_channel_type_contact_search_run_search
-tp_cli_channel_type_contact_search_run_stop
-tp_cli_protocol_call_identify_account
-tp_cli_protocol_call_normalize_contact
-tp_connection_manager_get_protocol_object
-tp_dbus_properties_mixin_fill_properties_hash
-tp_iface_quark_channel_type_contact_search
-tp_iface_quark_protocol
-tp_protocol_can_register
-tp_protocol_dup_param_names
-tp_protocol_get_capabilities
-tp_protocol_get_english_name
-tp_protocol_get_feature_quark_core
-tp_protocol_get_feature_quark_parameters
-tp_protocol_get_icon_name
-tp_protocol_get_name
-tp_protocol_get_param
-tp_protocol_get_type
-tp_protocol_get_vcard_field
-tp_protocol_has_param
-tp_protocol_init_known_interfaces
-tp_protocol_new
-tp_proxy_has_interface
-tp_svc_channel_type_contact_search_emit_search_result_received
-tp_svc_channel_type_contact_search_emit_search_state_changed
-tp_svc_channel_type_contact_search_get_type
-tp_svc_channel_type_contact_search_implement_more
-tp_svc_channel_type_contact_search_implement_search
-tp_svc_channel_type_contact_search_implement_stop
-tp_svc_protocol_get_type
-tp_svc_protocol_implement_identify_account
-tp_svc_protocol_implement_normalize_contact
-tp_type_dbus_hash_sa_28sasas_29
diff --git a/telepathy-glib/versions/0.11.12.abi b/telepathy-glib/versions/0.11.12.abi
deleted file mode 100644
index 5a53d2a4d..000000000
--- a/telepathy-glib/versions/0.11.12.abi
+++ /dev/null
@@ -1,17 +0,0 @@
-Version: TELEPATHY_GLIB_0.11.12
-Extends: TELEPATHY_GLIB_0.11.11
-Release: 0.11.12
-
-tp_account_channel_request_create_and_handle_channel_async
-tp_account_channel_request_create_and_handle_channel_finish
-tp_account_channel_request_create_channel_async
-tp_account_channel_request_create_channel_finish
-tp_account_channel_request_ensure_and_handle_channel_async
-tp_account_channel_request_ensure_and_handle_channel_finish
-tp_account_channel_request_ensure_channel_async
-tp_account_channel_request_ensure_channel_finish
-tp_account_channel_request_get_account
-tp_account_channel_request_get_request
-tp_account_channel_request_get_type
-tp_account_channel_request_get_user_action_time
-tp_account_channel_request_new
diff --git a/telepathy-glib/versions/0.11.13.abi b/telepathy-glib/versions/0.11.13.abi
deleted file mode 100644
index eb4bf8e2c..000000000
--- a/telepathy-glib/versions/0.11.13.abi
+++ /dev/null
@@ -1,7 +0,0 @@
-Version: TELEPATHY_GLIB_0.11.13
-Extends: TELEPATHY_GLIB_0.11.12
-Release: 0.11.13
-
-tp_error_quark
-tp_user_action_time_from_x11
-tp_user_action_time_should_present
diff --git a/telepathy-glib/versions/0.11.14.abi b/telepathy-glib/versions/0.11.14.abi
deleted file mode 100644
index a8e7d2068..000000000
--- a/telepathy-glib/versions/0.11.14.abi
+++ /dev/null
@@ -1,28 +0,0 @@
-Version: TELEPATHY_GLIB_0.11.14
-Extends: TELEPATHY_GLIB_0.11.13
-Release: 0.11.14
-
-tp_base_channel_close
-tp_base_channel_destroyed
-tp_base_channel_get_connection
-tp_base_channel_get_initiator
-tp_base_channel_get_object_path
-tp_base_channel_get_target_handle
-tp_base_channel_get_type
-tp_base_channel_is_destroyed
-tp_base_channel_is_registered
-tp_base_channel_is_requested
-tp_base_channel_register
-tp_base_channel_reopened
-tp_base_client_add_account_features
-tp_base_client_add_account_features_varargs
-tp_base_client_add_channel_features
-tp_base_client_add_channel_features_varargs
-tp_base_client_add_connection_features
-tp_base_client_add_connection_features_varargs
-tp_base_client_get_account_manager
-tp_handle_channels_context_get_handler_info
-tp_simple_approver_new_with_am
-tp_simple_handler_new_with_am
-tp_simple_observer_new_with_am
-tp_type_dbus_array_of_ay
diff --git a/telepathy-glib/versions/0.11.15.abi b/telepathy-glib/versions/0.11.15.abi
deleted file mode 100644
index 57dd7c927..000000000
--- a/telepathy-glib/versions/0.11.15.abi
+++ /dev/null
@@ -1,11 +0,0 @@
-Version: TELEPATHY_GLIB_0.11.15
-Extends: TELEPATHY_GLIB_0.11.14
-Release: 0.11.15
-
-tp_channel_get_initiator_handle
-tp_channel_get_initiator_identifier
-tp_channel_get_requested
-tp_iface_quark_channel_interface_sms
-tp_svc_channel_interface_sms_get_type
-tp_type_dbus_array_of_a_7boa_7bsv_7d_7d
-tp_type_dbus_hash_oa_7bsv_7d
diff --git a/telepathy-glib/versions/0.11.16.abi b/telepathy-glib/versions/0.11.16.abi
deleted file mode 100644
index 79c442509..000000000
--- a/telepathy-glib/versions/0.11.16.abi
+++ /dev/null
@@ -1,19 +0,0 @@
-Version: TELEPATHY_GLIB_0.11.16
-Extends: TELEPATHY_GLIB_0.11.15
-Release: 0.11.16
-
-tp_svc_channel_interface_conference_emit_channel_removed
-tp_type_dbus_hash_uo
-tp_cli_channel_interface_conference_connect_to_channel_removed
-tp_cli_channel_interface_conference_connect_to_channel_merged
-tp_svc_channel_interface_conference_emit_channel_merged
-tp_iface_quark_channel_interface_conference
-tp_svc_channel_interface_conference_get_type
-tp_iface_quark_authentication_tls_certificate
-tp_iface_quark_channel_type_server_tls_connection
-tp_svc_authentication_tls_certificate_emit_accepted
-tp_svc_authentication_tls_certificate_emit_rejected
-tp_svc_authentication_tls_certificate_get_type
-tp_svc_authentication_tls_certificate_implement_accept
-tp_svc_authentication_tls_certificate_implement_reject
-tp_svc_channel_type_server_tls_connection_get_type
diff --git a/telepathy-glib/versions/0.11.3.abi b/telepathy-glib/versions/0.11.3.abi
deleted file mode 100644
index a5720c9ed..000000000
--- a/telepathy-glib/versions/0.11.3.abi
+++ /dev/null
@@ -1,58 +0,0 @@
-Version: TELEPATHY_GLIB_0.11.3
-Extends: TELEPATHY_GLIB_0.11.1
-Release: 0.11.3
-
-tp_base_connection_get_dbus_daemon
-tp_base_connection_manager_get_dbus_daemon
-tp_capabilities_get_channel_classes
-tp_capabilities_get_type
-tp_capabilities_is_specific_to_contact
-tp_capabilities_supports_text_chatrooms
-tp_capabilities_supports_text_chats
-tp_channel_get_chat_state
-tp_channel_get_feature_quark_chat_states
-tp_channel_get_feature_quark_core
-tp_channel_get_feature_quark_group
-tp_cli_connection_interface_contact_info_call_get_contact_info
-tp_cli_connection_interface_contact_info_call_refresh_contact_info
-tp_cli_connection_interface_contact_info_call_request_contact_info
-tp_cli_connection_interface_contact_info_call_set_contact_info
-tp_cli_connection_interface_contact_info_connect_to_contact_info_changed
-tp_cli_connection_interface_contact_info_run_get_contact_info
-tp_cli_connection_interface_contact_info_run_refresh_contact_info
-tp_cli_connection_interface_contact_info_run_request_contact_info
-tp_cli_connection_interface_contact_info_run_set_contact_info
-tp_connection_get_capabilities
-tp_connection_get_feature_quark_capabilities
-tp_connection_get_feature_quark_connected
-tp_connection_get_feature_quark_core
-tp_connection_manager_get_feature_quark_core
-tp_connection_manager_param_copy
-tp_connection_manager_param_free
-tp_connection_manager_param_get_type
-tp_connection_manager_protocol_copy
-tp_connection_manager_protocol_free
-tp_connection_manager_protocol_get_type
-tp_contact_get_capabilities
-tp_dbus_daemon_register_object
-tp_dbus_daemon_unregister_object
-tp_iface_quark_connection_interface_contact_info
-tp_intset_get_type
-tp_proxy_is_prepared
-tp_proxy_prepare_async
-tp_proxy_prepare_finish
-tp_svc_connection_interface_contact_info_emit_contact_info_changed
-tp_svc_connection_interface_contact_info_get_type
-tp_svc_connection_interface_contact_info_implement_get_contact_info
-tp_svc_connection_interface_contact_info_implement_refresh_contact_info
-tp_svc_connection_interface_contact_info_implement_request_contact_info
-tp_svc_connection_interface_contact_info_implement_set_contact_info
-tp_type_dbus_array_sasas
-tp_type_dbus_array_sasuu
-tp_type_dbus_hash_ua_28sasas_29
-tp_type_dbus_struct_sasas
-tp_type_dbus_struct_sasuu
-tp_weak_ref_destroy
-tp_weak_ref_dup_object
-tp_weak_ref_get_user_data
-tp_weak_ref_new
diff --git a/telepathy-glib/versions/0.11.4.abi b/telepathy-glib/versions/0.11.4.abi
deleted file mode 100644
index d15604b99..000000000
--- a/telepathy-glib/versions/0.11.4.abi
+++ /dev/null
@@ -1,11 +0,0 @@
-Version: TELEPATHY_GLIB_0.11.4
-Extends: TELEPATHY_GLIB_0.11.3
-Release: 0.11.4
-
-tp_avatar_requirements_copy
-tp_avatar_requirements_destroy
-tp_avatar_requirements_get_type
-tp_avatar_requirements_new
-tp_connection_get_avatar_requirements
-tp_connection_get_detailed_error
-tp_connection_get_feature_quark_avatar_requirements
diff --git a/telepathy-glib/versions/0.11.5.abi b/telepathy-glib/versions/0.11.5.abi
deleted file mode 100644
index 8be36e4bc..000000000
--- a/telepathy-glib/versions/0.11.5.abi
+++ /dev/null
@@ -1,43 +0,0 @@
-Version: TELEPATHY_GLIB_0.11.5
-Extends: TELEPATHY_GLIB_0.11.4
-Release: 0.11.5
-
-tp_add_dispatch_operation_context_accept
-tp_add_dispatch_operation_context_delay
-tp_add_dispatch_operation_context_fail
-tp_add_dispatch_operation_context_get_type
-tp_base_client_add_approver_filter
-tp_base_client_add_observer_filter
-tp_base_client_get_bus_name
-tp_base_client_get_object_path
-tp_base_client_get_type
-tp_base_client_implement_add_dispatch_operation
-tp_base_client_implement_observe_channels
-tp_base_client_register
-tp_base_client_set_observer_recover
-tp_base_client_take_approver_filter
-tp_base_client_take_observer_filter
-tp_channel_dispatch_operation_borrow_account
-tp_channel_dispatch_operation_borrow_channels
-tp_channel_dispatch_operation_borrow_connection
-tp_channel_dispatch_operation_borrow_immutable_properties
-tp_channel_dispatch_operation_borrow_possible_handlers
-tp_channel_dispatch_operation_claim_async
-tp_channel_dispatch_operation_claim_finish
-tp_channel_dispatch_operation_get_feature_quark_core
-tp_channel_dispatch_operation_handle_with_async
-tp_channel_dispatch_operation_handle_with_finish
-tp_cm_info_source_get_type
-tp_contact_feature_get_type
-tp_dbus_error_get_type
-tp_dbus_name_type_get_type
-tp_dbus_properties_mixin_flags_get_type
-tp_observe_channels_context_accept
-tp_observe_channels_context_delay
-tp_observe_channels_context_fail
-tp_observe_channels_context_get_type
-tp_observe_channels_context_is_recovering
-tp_simple_approver_get_type
-tp_simple_approver_new
-tp_simple_observer_get_type
-tp_simple_observer_new
diff --git a/telepathy-glib/versions/0.11.6.abi b/telepathy-glib/versions/0.11.6.abi
deleted file mode 100644
index a5b6c3b62..000000000
--- a/telepathy-glib/versions/0.11.6.abi
+++ /dev/null
@@ -1,41 +0,0 @@
-Version: TELEPATHY_GLIB_0.11.6
-Extends: TELEPATHY_GLIB_0.11.5
-Release: 0.11.6
-
-tp_account_get_changing_presence
-tp_base_client_add_handler_capabilities
-tp_base_client_add_handler_capabilities_varargs
-tp_base_client_add_handler_capability
-tp_base_client_add_handler_filter
-tp_base_client_be_a_handler
-tp_base_client_get_handled_channels
-tp_base_client_get_pending_requests
-tp_base_client_implement_handle_channels
-tp_base_client_set_handler_bypass_approval
-tp_base_client_set_handler_request_notification
-tp_base_client_take_handler_filter
-tp_base_client_unregister
-tp_cli_channel_dispatch_operation_call_handle_with_time
-tp_cli_channel_interface_dtmf_call_multiple_tones
-tp_cli_channel_interface_dtmf_connect_to_sending_tones
-tp_cli_channel_interface_dtmf_connect_to_stopped_tones
-tp_cli_channel_interface_dtmf_run_multiple_tones
-tp_contact_get_avatar_file
-tp_contact_get_avatar_mime_type
-tp_handle_channels_context_accept
-tp_handle_channels_context_delay
-tp_handle_channels_context_fail
-tp_handle_channels_context_get_type
-tp_handle_set_clear
-tp_handle_set_copy
-tp_handle_set_get_type
-tp_handle_set_is_empty
-tp_intset_fast_iter_init
-tp_intset_fast_iter_next
-tp_intset_is_empty
-tp_simple_handler_get_type
-tp_simple_handler_new
-tp_svc_channel_dispatch_operation_implement_handle_with_time
-tp_svc_channel_interface_dtmf_emit_sending_tones
-tp_svc_channel_interface_dtmf_emit_stopped_tones
-tp_svc_channel_interface_dtmf_implement_multiple_tones
diff --git a/telepathy-glib/versions/0.11.7.abi b/telepathy-glib/versions/0.11.7.abi
deleted file mode 100644
index b836ca675..000000000
--- a/telepathy-glib/versions/0.11.7.abi
+++ /dev/null
@@ -1,46 +0,0 @@
-Version: TELEPATHY_GLIB_0.11.7
-Extends: TELEPATHY_GLIB_0.11.6
-Release: 0.11.7
-
-tp_account_get_detailed_error
-tp_channel_dispatch_operation_handle_with_time_async
-tp_channel_dispatch_operation_handle_with_time_finish
-tp_cli_channel_interface_service_point_connect_to_service_point_changed
-tp_cli_connection_interface_anonymity_connect_to_anonymity_modes_changed
-tp_cli_connection_interface_service_point_connect_to_service_points_changed
-tp_connection_get_contact_info_flags
-tp_connection_get_contact_info_supported_fields
-tp_connection_get_feature_quark_contact_info
-tp_connection_refresh_contact_info
-tp_connection_set_contact_info_async
-tp_connection_set_contact_info_finish
-tp_contact_get_contact_info
-tp_contact_info_field_copy
-tp_contact_info_field_free
-tp_contact_info_field_get_type
-tp_contact_info_field_new
-tp_contact_info_field_spec_copy
-tp_contact_info_field_spec_free
-tp_contact_info_field_spec_get_type
-tp_contact_info_list_copy
-tp_contact_info_list_free
-tp_contact_info_list_get_type
-tp_contact_info_spec_list_copy
-tp_contact_info_spec_list_free
-tp_contact_info_spec_list_get_type
-tp_contact_request_contact_info_async
-tp_contact_request_contact_info_finish
-tp_handle_set_new_from_array
-tp_iface_quark_channel_interface_anonymity
-tp_iface_quark_channel_interface_service_point
-tp_iface_quark_connection_interface_anonymity
-tp_iface_quark_connection_interface_service_point
-tp_svc_channel_interface_anonymity_get_type
-tp_svc_channel_interface_service_point_emit_service_point_changed
-tp_svc_channel_interface_service_point_get_type
-tp_svc_connection_interface_anonymity_emit_anonymity_modes_changed
-tp_svc_connection_interface_anonymity_get_type
-tp_svc_connection_interface_service_point_emit_service_points_changed
-tp_svc_connection_interface_service_point_get_type
-tp_type_dbus_array__28us_29as
-tp_type_dbus_struct__28us_29as
diff --git a/telepathy-glib/versions/0.11.9.abi b/telepathy-glib/versions/0.11.9.abi
deleted file mode 100644
index 4352b069d..000000000
--- a/telepathy-glib/versions/0.11.9.abi
+++ /dev/null
@@ -1,14 +0,0 @@
-Version: TELEPATHY_GLIB_0.11.9
-Extends: TELEPATHY_GLIB_0.11.7
-Release: 0.11.9
-
-tp_account_get_service
-tp_account_set_service_async
-tp_account_set_service_finish
-tp_cli_connection_interface_cellular_connect_to_imsi_changed
-tp_iface_quark_account_interface_storage
-tp_iface_quark_connection_interface_cellular
-tp_simple_async_report_success_in_idle
-tp_svc_account_interface_storage_get_type
-tp_svc_connection_interface_cellular_emit_imsi_changed
-tp_svc_connection_interface_cellular_get_type
diff --git a/telepathy-glib/versions/0.13.0.abi b/telepathy-glib/versions/0.13.0.abi
deleted file mode 100644
index 0a121d9b4..000000000
--- a/telepathy-glib/versions/0.13.0.abi
+++ /dev/null
@@ -1,131 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.0
-Extends: TELEPATHY_GLIB_0.11.16
-Release: 0.13.0
-
-tp_base_contact_list_add_to_group_async
-tp_base_contact_list_add_to_group_finish
-tp_base_contact_list_authorize_publication_async
-tp_base_contact_list_authorize_publication_finish
-tp_base_contact_list_block_contacts_async
-tp_base_contact_list_block_contacts_finish
-tp_base_contact_list_can_block
-tp_base_contact_list_can_change_contact_list
-tp_base_contact_list_contact_blocking_changed
-tp_base_contact_list_contacts_changed
-tp_base_contact_list_dup_blocked_contacts
-tp_base_contact_list_dup_contact_groups
-tp_base_contact_list_dup_contacts
-tp_base_contact_list_dup_group_members
-tp_base_contact_list_dup_groups
-tp_base_contact_list_dup_states
-tp_base_contact_list_false_func
-tp_base_contact_list_get_connection
-tp_base_contact_list_get_contact_list_persists
-tp_base_contact_list_get_group_storage
-tp_base_contact_list_get_request_uses_message
-tp_base_contact_list_get_state
-tp_base_contact_list_get_type
-tp_base_contact_list_group_renamed
-tp_base_contact_list_groups_changed
-tp_base_contact_list_groups_created
-tp_base_contact_list_groups_removed
-tp_base_contact_list_has_disjoint_groups
-tp_base_contact_list_mixin_class_init
-tp_base_contact_list_mixin_groups_iface_init
-tp_base_contact_list_mixin_list_iface_init
-tp_base_contact_list_mixin_register_with_contacts_mixin
-tp_base_contact_list_normalize_group
-tp_base_contact_list_one_contact_changed
-tp_base_contact_list_one_contact_groups_changed
-tp_base_contact_list_one_contact_removed
-tp_base_contact_list_remove_contacts_async
-tp_base_contact_list_remove_contacts_finish
-tp_base_contact_list_remove_from_group_async
-tp_base_contact_list_remove_from_group_finish
-tp_base_contact_list_remove_group_async
-tp_base_contact_list_remove_group_finish
-tp_base_contact_list_rename_group_async
-tp_base_contact_list_rename_group_finish
-tp_base_contact_list_request_subscription_async
-tp_base_contact_list_request_subscription_finish
-tp_base_contact_list_set_contact_groups_async
-tp_base_contact_list_set_contact_groups_finish
-tp_base_contact_list_set_group_members_async
-tp_base_contact_list_set_group_members_finish
-tp_base_contact_list_set_list_failed
-tp_base_contact_list_set_list_pending
-tp_base_contact_list_set_list_received
-tp_base_contact_list_store_contacts_async
-tp_base_contact_list_store_contacts_finish
-tp_base_contact_list_true_func
-tp_base_contact_list_unblock_contacts_async
-tp_base_contact_list_unblock_contacts_finish
-tp_base_contact_list_unpublish_async
-tp_base_contact_list_unpublish_finish
-tp_base_contact_list_unsubscribe_async
-tp_base_contact_list_unsubscribe_finish
-tp_blockable_contact_list_get_type
-tp_capabilities_supports_dbus_tubes
-tp_capabilities_supports_stream_tubes
-tp_cli_connection_interface_contact_groups_call_add_to_group
-tp_cli_connection_interface_contact_groups_call_remove_from_group
-tp_cli_connection_interface_contact_groups_call_remove_group
-tp_cli_connection_interface_contact_groups_call_rename_group
-tp_cli_connection_interface_contact_groups_call_set_contact_groups
-tp_cli_connection_interface_contact_groups_call_set_group_members
-tp_cli_connection_interface_contact_groups_connect_to_group_renamed
-tp_cli_connection_interface_contact_groups_connect_to_groups_changed
-tp_cli_connection_interface_contact_groups_connect_to_groups_created
-tp_cli_connection_interface_contact_groups_connect_to_groups_removed
-tp_cli_connection_interface_contact_groups_run_add_to_group
-tp_cli_connection_interface_contact_groups_run_remove_from_group
-tp_cli_connection_interface_contact_groups_run_remove_group
-tp_cli_connection_interface_contact_groups_run_rename_group
-tp_cli_connection_interface_contact_groups_run_set_contact_groups
-tp_cli_connection_interface_contact_groups_run_set_group_members
-tp_cli_connection_interface_contact_list_call_authorize_publication
-tp_cli_connection_interface_contact_list_call_get_contact_list_attributes
-tp_cli_connection_interface_contact_list_call_remove_contacts
-tp_cli_connection_interface_contact_list_call_request_subscription
-tp_cli_connection_interface_contact_list_call_unpublish
-tp_cli_connection_interface_contact_list_call_unsubscribe
-tp_cli_connection_interface_contact_list_connect_to_contact_list_state_changed
-tp_cli_connection_interface_contact_list_connect_to_contacts_changed
-tp_cli_connection_interface_contact_list_run_authorize_publication
-tp_cli_connection_interface_contact_list_run_get_contact_list_attributes
-tp_cli_connection_interface_contact_list_run_remove_contacts
-tp_cli_connection_interface_contact_list_run_request_subscription
-tp_cli_connection_interface_contact_list_run_unpublish
-tp_cli_connection_interface_contact_list_run_unsubscribe
-tp_connection_get_contact_list_attributes
-tp_contact_group_list_get_type
-tp_contacts_mixin_get_contact_attributes
-tp_handle_set_dump
-tp_handle_set_new_containing
-tp_handle_set_new_from_intset
-tp_iface_quark_connection_interface_contact_groups
-tp_iface_quark_connection_interface_contact_list
-tp_mutable_contact_group_list_get_type
-tp_mutable_contact_list_get_type
-tp_svc_connection_interface_contact_groups_emit_group_renamed
-tp_svc_connection_interface_contact_groups_emit_groups_changed
-tp_svc_connection_interface_contact_groups_emit_groups_created
-tp_svc_connection_interface_contact_groups_emit_groups_removed
-tp_svc_connection_interface_contact_groups_get_type
-tp_svc_connection_interface_contact_groups_implement_add_to_group
-tp_svc_connection_interface_contact_groups_implement_remove_from_group
-tp_svc_connection_interface_contact_groups_implement_remove_group
-tp_svc_connection_interface_contact_groups_implement_rename_group
-tp_svc_connection_interface_contact_groups_implement_set_contact_groups
-tp_svc_connection_interface_contact_groups_implement_set_group_members
-tp_svc_connection_interface_contact_list_emit_contact_list_state_changed
-tp_svc_connection_interface_contact_list_emit_contacts_changed
-tp_svc_connection_interface_contact_list_get_type
-tp_svc_connection_interface_contact_list_implement_authorize_publication
-tp_svc_connection_interface_contact_list_implement_get_contact_list_attributes
-tp_svc_connection_interface_contact_list_implement_remove_contacts
-tp_svc_connection_interface_contact_list_implement_request_subscription
-tp_svc_connection_interface_contact_list_implement_unpublish
-tp_svc_connection_interface_contact_list_implement_unsubscribe
-tp_type_dbus_hash_u_28uus_29
-tp_type_dbus_struct_uus
diff --git a/telepathy-glib/versions/0.13.1.abi b/telepathy-glib/versions/0.13.1.abi
deleted file mode 100644
index 153fe8de5..000000000
--- a/telepathy-glib/versions/0.13.1.abi
+++ /dev/null
@@ -1,16 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.1
-Extends: TELEPATHY_GLIB_0.13.0
-Release: 0.13.1
-
-tp_cli_connection_interface_client_types_call_get_client_types
-tp_cli_connection_interface_client_types_call_request_client_types
-tp_cli_connection_interface_client_types_connect_to_client_types_updated
-tp_cli_connection_interface_client_types_run_get_client_types
-tp_cli_connection_interface_client_types_run_request_client_types
-tp_contact_get_client_types
-tp_iface_quark_connection_interface_client_types
-tp_svc_connection_interface_client_types_emit_client_types_updated
-tp_svc_connection_interface_client_types_get_type
-tp_svc_connection_interface_client_types_implement_get_client_types
-tp_svc_connection_interface_client_types_implement_request_client_types
-tp_type_dbus_hash_uas
diff --git a/telepathy-glib/versions/0.13.10.abi b/telepathy-glib/versions/0.13.10.abi
deleted file mode 100644
index d036794d9..000000000
--- a/telepathy-glib/versions/0.13.10.abi
+++ /dev/null
@@ -1,29 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.10
-Extends: TELEPATHY_GLIB_0.13.9
-Release: 0.13.10
-
-tp_channel_close_async
-tp_channel_close_finish
-tp_channel_leave_async
-tp_channel_leave_finish
-tp_cli_connection_interface_contact_list_connect_to_contacts_changed_with_id
-tp_cm_message_new_text
-tp_intset_difference_update
-tp_intset_union_update
-tp_message_get_message_type
-tp_svc_connection_interface_contact_list_emit_contacts_changed_with_id
-tp_text_channel_ack_message_async
-tp_text_channel_ack_message_finish
-tp_text_channel_ack_messages_async
-tp_text_channel_ack_messages_finish
-tp_text_channel_get_delivery_reporting_support
-tp_text_channel_get_feature_quark_incoming_messages
-tp_text_channel_get_message_part_support_flags
-tp_text_channel_get_pending_messages
-tp_text_channel_get_supported_content_types
-tp_text_channel_get_type
-tp_text_channel_new
-tp_text_channel_send_message_async
-tp_text_channel_send_message_finish
-tp_text_channel_set_chat_state_async
-tp_text_channel_set_chat_state_finish
diff --git a/telepathy-glib/versions/0.13.11.abi b/telepathy-glib/versions/0.13.11.abi
deleted file mode 100644
index 4769c9d21..000000000
--- a/telepathy-glib/versions/0.13.11.abi
+++ /dev/null
@@ -1,19 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.11
-Extends: TELEPATHY_GLIB_0.13.10
-Release: 0.13.11
-
-tp_contact_search_get_account
-tp_contact_search_result_get_identifier
-tp_contact_search_start
-tp_contact_search_new_finish
-tp_contact_search_reset_finish
-tp_contact_search_reset_async
-tp_contact_search_get_type
-tp_capabilities_supports_contact_search
-tp_contact_search_get_server
-tp_contact_search_new_async
-tp_contact_search_result_get_field
-tp_contact_search_result_get_type
-tp_contact_search_result_get_fields
-tp_contact_search_get_limit
-tp_contact_search_get_search_keys
diff --git a/telepathy-glib/versions/0.13.12.abi b/telepathy-glib/versions/0.13.12.abi
deleted file mode 100644
index bac096091..000000000
--- a/telepathy-glib/versions/0.13.12.abi
+++ /dev/null
@@ -1,9 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.12
-Extends: TELEPATHY_GLIB_0.13.11
-Release: 0.13.12
-
-tp_cli_channel_type_file_transfer_connect_to_uri_defined
-tp_contact_get_publish_request
-tp_contact_get_publish_state
-tp_contact_get_subscribe_state
-tp_svc_channel_type_file_transfer_emit_uri_defined
diff --git a/telepathy-glib/versions/0.13.13.abi b/telepathy-glib/versions/0.13.13.abi
deleted file mode 100644
index 72323ff54..000000000
--- a/telepathy-glib/versions/0.13.13.abi
+++ /dev/null
@@ -1,7 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.13
-Extends: TELEPATHY_GLIB_0.13.12
-Release: 0.13.13
-
-tp_debug_sender_add_message_vprintf
-tp_debug_sender_add_message_printf
-tp_account_channel_request_get_channel_request
diff --git a/telepathy-glib/versions/0.13.14.abi b/telepathy-glib/versions/0.13.14.abi
deleted file mode 100644
index 3287e7cfd..000000000
--- a/telepathy-glib/versions/0.13.14.abi
+++ /dev/null
@@ -1,20 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.14
-Extends: TELEPATHY_GLIB_0.13.13
-Release: 0.13.14
-
-tp_account_channel_request_create_and_observe_channel_async
-tp_account_channel_request_create_and_observe_channel_finish
-tp_account_channel_request_ensure_and_observe_channel_async
-tp_account_channel_request_ensure_and_observe_channel_finish
-tp_account_channel_request_set_hints
-tp_capabilities_supports_room_list
-tp_channel_request_get_hints
-tp_channel_request_get_immutable_properties
-tp_channel_request_set_channel_factory
-tp_cli_dbus_properties_connect_to_properties_changed
-tp_contact_get_contact_groups
-tp_contact_set_contact_groups_async
-tp_contact_set_contact_groups_finish
-tp_handle_channels_context_get_requests
-tp_observe_channels_context_get_requests
-tp_svc_dbus_properties_emit_properties_changed
diff --git a/telepathy-glib/versions/0.13.15.abi b/telepathy-glib/versions/0.13.15.abi
deleted file mode 100644
index 08539b7a6..000000000
--- a/telepathy-glib/versions/0.13.15.abi
+++ /dev/null
@@ -1,8 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.15
-Extends: TELEPATHY_GLIB_0.13.14
-Release: 0.13.15
-
-tp_base_password_channel_get_type
-tp_simple_password_manager_prompt_for_channel_finish
-tp_simple_password_manager_prompt_for_channel_async
-tp_utf8_make_valid
diff --git a/telepathy-glib/versions/0.13.16.abi b/telepathy-glib/versions/0.13.16.abi
deleted file mode 100644
index d431eea20..000000000
--- a/telepathy-glib/versions/0.13.16.abi
+++ /dev/null
@@ -1,11 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.16
-Extends: TELEPATHY_GLIB_0.13.15
-Release: 0.13.16
-
-tp_base_client_set_observer_delay_approvers
-tp_connection_get_protocol_name
-tp_connection_bind_connection_status_to_property
-tp_text_channel_get_message_types
-tp_text_channel_supports_message_type
-tp_connection_get_connection_manager_name
-tp_account_bind_connection_status_to_property
diff --git a/telepathy-glib/versions/0.13.2.abi b/telepathy-glib/versions/0.13.2.abi
deleted file mode 100644
index a41688a26..000000000
--- a/telepathy-glib/versions/0.13.2.abi
+++ /dev/null
@@ -1,39 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.2
-Extends: TELEPATHY_GLIB_0.13.1
-Release: 0.13.2
-
-tp_account_channel_request_set_channel_factory
-tp_account_get_feature_quark_storage
-tp_account_get_storage_identifier
-tp_account_get_storage_provider
-tp_account_get_storage_restrictions
-tp_account_get_storage_specific_information_async
-tp_account_get_storage_specific_information_finish
-tp_automatic_proxy_factory_dup
-tp_automatic_proxy_factory_get_type
-tp_automatic_proxy_factory_new
-tp_base_client_get_channel_factory
-tp_base_client_set_channel_factory
-tp_basic_proxy_factory_dup
-tp_basic_proxy_factory_get_type
-tp_basic_proxy_factory_new
-tp_cli_media_stream_handler_connect_to_start_named_telephony_event
-tp_cli_media_stream_handler_connect_to_start_sound_telephony_event
-tp_client_channel_factory_create_channel
-tp_client_channel_factory_get_type
-tp_stream_tube_channel_accept_async
-tp_stream_tube_channel_accept_finish
-tp_stream_tube_channel_get_parameters
-tp_stream_tube_channel_get_service
-tp_stream_tube_channel_get_type
-tp_stream_tube_channel_new
-tp_stream_tube_channel_offer_async
-tp_stream_tube_channel_offer_finish
-tp_stream_tube_connection_get_channel
-tp_stream_tube_connection_get_contact
-tp_stream_tube_connection_get_socket_connection
-tp_stream_tube_connection_get_type
-tp_svc_media_stream_handler_emit_start_named_telephony_event
-tp_svc_media_stream_handler_emit_start_sound_telephony_event
-tp_unix_connection_receive_credentials_with_byte
-tp_unix_connection_send_credentials_with_byte
diff --git a/telepathy-glib/versions/0.13.3.abi b/telepathy-glib/versions/0.13.3.abi
deleted file mode 100644
index 211dba495..000000000
--- a/telepathy-glib/versions/0.13.3.abi
+++ /dev/null
@@ -1,40 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.3
-Extends: TELEPATHY_GLIB_0.13.2
-Release: 0.13.3
-
-tp_base_connection_add_client_interest
-tp_base_connection_add_possible_client_interest
-tp_cli_channel_interface_dtmf_connect_to_tones_deferred
-tp_cli_connection_call_add_client_interest
-tp_cli_connection_call_remove_client_interest
-tp_cli_connection_interface_mail_notification_call_request_inbox_url
-tp_cli_connection_interface_mail_notification_call_request_mail_url
-tp_cli_connection_interface_mail_notification_connect_to_mails_received
-tp_cli_connection_interface_mail_notification_connect_to_unread_mails_changed
-tp_cli_connection_interface_mail_notification_run_request_inbox_url
-tp_cli_connection_interface_mail_notification_run_request_mail_url
-tp_cli_connection_run_add_client_interest
-tp_cli_connection_run_remove_client_interest
-tp_client_channel_factory_dup_channel_features
-tp_connection_add_client_interest
-tp_connection_add_client_interest_by_id
-tp_dtmf_event_to_char
-tp_dtmf_player_cancel
-tp_dtmf_player_get_type
-tp_dtmf_player_is_active
-tp_dtmf_player_new
-tp_dtmf_player_play
-tp_iface_quark_connection_interface_mail_notification
-tp_iface_quark_protocol_interface_presence
-tp_svc_channel_interface_dtmf_emit_tones_deferred
-tp_svc_connection_implement_add_client_interest
-tp_svc_connection_implement_remove_client_interest
-tp_svc_connection_interface_mail_notification_emit_mails_received
-tp_svc_connection_interface_mail_notification_emit_unread_mails_changed
-tp_svc_connection_interface_mail_notification_get_type
-tp_svc_connection_interface_mail_notification_implement_request_inbox_url
-tp_svc_connection_interface_mail_notification_implement_request_mail_url
-tp_svc_protocol_interface_presence_get_type
-tp_type_dbus_array_ss
-tp_type_dbus_struct_ss
-tp_type_dbus_struct_sua_28ss_29
diff --git a/telepathy-glib/versions/0.13.4.abi b/telepathy-glib/versions/0.13.4.abi
deleted file mode 100644
index daec8d603..000000000
--- a/telepathy-glib/versions/0.13.4.abi
+++ /dev/null
@@ -1,7 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.4
-Extends: TELEPATHY_GLIB_0.13.3
-Release: 0.13.4
-
-tp_cli_media_stream_handler_call_new_active_transport_pair
-tp_cli_media_stream_handler_run_new_active_transport_pair
-tp_svc_media_stream_handler_implement_new_active_transport_pair
diff --git a/telepathy-glib/versions/0.13.5.abi b/telepathy-glib/versions/0.13.5.abi
deleted file mode 100644
index 5352e851c..000000000
--- a/telepathy-glib/versions/0.13.5.abi
+++ /dev/null
@@ -1,5 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.5
-Extends: TELEPATHY_GLIB_0.13.4
-Release: 0.13.5
-
-tp_base_protocol_get_statuses
diff --git a/telepathy-glib/versions/0.13.7.abi b/telepathy-glib/versions/0.13.7.abi
deleted file mode 100644
index 96fe1c969..000000000
--- a/telepathy-glib/versions/0.13.7.abi
+++ /dev/null
@@ -1,48 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.7
-Extends: TELEPATHY_GLIB_0.13.5
-Release: 0.13.7
-
-tp_cli_account_interface_addressing_call_set_uri_scheme_association
-tp_cli_channel_dispatcher_call_create_channel_with_hints
-tp_cli_channel_dispatcher_call_ensure_channel_with_hints
-tp_cli_channel_interface_sasl_authentication_call_abort_sasl
-tp_cli_channel_interface_sasl_authentication_call_accept_sasl
-tp_cli_channel_interface_sasl_authentication_call_respond
-tp_cli_channel_interface_sasl_authentication_call_start_mechanism
-tp_cli_channel_interface_sasl_authentication_call_start_mechanism_with_data
-tp_cli_channel_interface_sasl_authentication_connect_to_new_challenge
-tp_cli_channel_interface_sasl_authentication_connect_to_sasl_status_changed
-tp_cli_channel_interface_sasl_authentication_run_abort_sasl
-tp_cli_channel_interface_sasl_authentication_run_accept_sasl
-tp_cli_channel_interface_sasl_authentication_run_respond
-tp_cli_channel_interface_sasl_authentication_run_start_mechanism
-tp_cli_channel_interface_sasl_authentication_run_start_mechanism_with_data
-tp_cli_channel_request_connect_to_succeeded_with_channel
-tp_cli_connection_interface_power_saving_call_set_power_saving
-tp_cli_connection_interface_power_saving_connect_to_power_saving_changed
-tp_cli_connection_interface_power_saving_run_set_power_saving
-tp_iface_quark_account_interface_addressing
-tp_iface_quark_channel_interface_sasl_authentication
-tp_iface_quark_channel_interface_securable
-tp_iface_quark_channel_type_server_authentication
-tp_iface_quark_connection_interface_power_saving
-tp_iface_quark_protocol_interface_avatars
-tp_svc_account_interface_addressing_get_type
-tp_svc_account_interface_addressing_implement_set_uri_scheme_association
-tp_svc_channel_dispatcher_implement_create_channel_with_hints
-tp_svc_channel_dispatcher_implement_ensure_channel_with_hints
-tp_svc_channel_interface_sasl_authentication_emit_new_challenge
-tp_svc_channel_interface_sasl_authentication_emit_sasl_status_changed
-tp_svc_channel_interface_sasl_authentication_get_type
-tp_svc_channel_interface_sasl_authentication_implement_abort_sasl
-tp_svc_channel_interface_sasl_authentication_implement_accept_sasl
-tp_svc_channel_interface_sasl_authentication_implement_respond
-tp_svc_channel_interface_sasl_authentication_implement_start_mechanism
-tp_svc_channel_interface_sasl_authentication_implement_start_mechanism_with_data
-tp_svc_channel_interface_securable_get_type
-tp_svc_channel_request_emit_succeeded_with_channel
-tp_svc_channel_type_server_authentication_get_type
-tp_svc_connection_interface_power_saving_emit_power_saving_changed
-tp_svc_connection_interface_power_saving_get_type
-tp_svc_connection_interface_power_saving_implement_set_power_saving
-tp_svc_protocol_interface_avatars_get_type
diff --git a/telepathy-glib/versions/0.13.8.abi b/telepathy-glib/versions/0.13.8.abi
deleted file mode 100644
index b64ac26b0..000000000
--- a/telepathy-glib/versions/0.13.8.abi
+++ /dev/null
@@ -1,18 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.8
-Extends: TELEPATHY_GLIB_0.13.7
-Release: 0.13.8
-
-tp_account_associated_with_uri_scheme
-tp_account_get_automatic_presence
-tp_account_get_feature_quark_addressing
-tp_account_get_normalized_name
-tp_account_get_uri_schemes
-tp_account_set_automatic_presence_async
-tp_account_set_automatic_presence_finish
-tp_account_set_uri_scheme_association_async
-tp_account_set_uri_scheme_association_finish
-tp_connection_has_immortal_handles
-tp_simple_password_manager_get_type
-tp_simple_password_manager_new
-tp_simple_password_manager_prompt_async
-tp_simple_password_manager_prompt_finish
diff --git a/telepathy-glib/versions/0.13.9.abi b/telepathy-glib/versions/0.13.9.abi
deleted file mode 100644
index f60af3f42..000000000
--- a/telepathy-glib/versions/0.13.9.abi
+++ /dev/null
@@ -1,31 +0,0 @@
-Version: TELEPATHY_GLIB_0.13.9
-Extends: TELEPATHY_GLIB_0.13.8
-Release: 0.13.9
-
-tp_account_get_path_suffix
-tp_cli_channel_interface_sms_connect_to_sms_channel_changed
-tp_client_message_get_type
-tp_client_message_new
-tp_client_message_new_text
-tp_cm_message_get_sender
-tp_cm_message_get_type
-tp_cm_message_new
-tp_cm_message_set_sender
-tp_cm_message_take_message
-tp_connection_dup_contact_if_possible
-tp_connection_get_self_contact
-tp_message_get_received_timestamp
-tp_message_get_sent_timestamp
-tp_message_get_specific_to_interface
-tp_message_get_supersedes
-tp_message_get_token
-tp_message_get_type
-tp_message_is_delivery_report
-tp_message_is_mutable
-tp_message_is_rescued
-tp_message_is_scrollback
-tp_message_to_text
-tp_protocol_get_authentication_types
-tp_signalled_message_get_sender
-tp_signalled_message_get_type
-tp_svc_channel_interface_sms_emit_sms_channel_changed
diff --git a/telepathy-glib/versions/0.14.1.abi b/telepathy-glib/versions/0.14.1.abi
deleted file mode 100644
index af0fee37a..000000000
--- a/telepathy-glib/versions/0.14.1.abi
+++ /dev/null
@@ -1,17 +0,0 @@
-Version: TELEPATHY_GLIB_0.14.2
-Extends: TELEPATHY_GLIB_0.13.16
-Release: 0.14.2
-
-tp_cli_connection_interface_contact_blocking_connect_to_blocked_contacts_changed
-tp_svc_connection_interface_contact_blocking_emit_blocked_contacts_changed
-tp_svc_connection_interface_contact_blocking_implement_block_contacts
-tp_cli_connection_interface_contact_blocking_call_request_blocked_contacts
-tp_cli_connection_interface_contact_blocking_run_block_contacts
-tp_iface_quark_connection_interface_contact_blocking
-tp_cli_connection_interface_contact_blocking_call_unblock_contacts
-tp_svc_connection_interface_contact_blocking_get_type
-tp_svc_connection_interface_contact_blocking_implement_request_blocked_contacts
-tp_cli_connection_interface_contact_blocking_call_block_contacts
-tp_cli_connection_interface_contact_blocking_run_request_blocked_contacts
-tp_cli_connection_interface_contact_blocking_run_unblock_contacts
-tp_svc_connection_interface_contact_blocking_implement_unblock_contacts
diff --git a/telepathy-glib/versions/0.14.3.abi b/telepathy-glib/versions/0.14.3.abi
deleted file mode 100644
index 0f9f9855b..000000000
--- a/telepathy-glib/versions/0.14.3.abi
+++ /dev/null
@@ -1,21 +0,0 @@
-Version: TELEPATHY_GLIB_0.14.3
-Extends: TELEPATHY_GLIB_0.14.2
-Release: 0.14.3
-
-tp_cli_media_stream_handler_call_supported_feedback_messages
-tp_cli_media_stream_handler_call_supported_header_extensions
-tp_cli_media_stream_handler_connect_to_set_remote_feedback_messages
-tp_cli_media_stream_handler_connect_to_set_remote_header_extensions
-tp_cli_media_stream_handler_run_supported_feedback_messages
-tp_cli_media_stream_handler_run_supported_header_extensions
-tp_g_ptr_array_extend
-tp_svc_media_stream_handler_emit_set_remote_feedback_messages
-tp_svc_media_stream_handler_emit_set_remote_header_extensions
-tp_svc_media_stream_handler_implement_supported_feedback_messages
-tp_svc_media_stream_handler_implement_supported_header_extensions
-tp_type_dbus_array_sss
-tp_type_dbus_array_uuss
-tp_type_dbus_hash_u_28ua_28sss_29_29
-tp_type_dbus_struct_sss
-tp_type_dbus_struct_ua_28sss_29
-tp_type_dbus_struct_uuss
diff --git a/telepathy-glib/versions/0.14.4.abi b/telepathy-glib/versions/0.14.4.abi
deleted file mode 100644
index 1aa75fcb4..000000000
--- a/telepathy-glib/versions/0.14.4.abi
+++ /dev/null
@@ -1,5 +0,0 @@
-Version: TELEPATHY_GLIB_0.14.4
-Extends: TELEPATHY_GLIB_0.14.3
-Release: 0.14.4
-
-tp_proxy_add_interfaces
diff --git a/telepathy-glib/versions/0.14.5.abi b/telepathy-glib/versions/0.14.5.abi
deleted file mode 100644
index a16aca76a..000000000
--- a/telepathy-glib/versions/0.14.5.abi
+++ /dev/null
@@ -1,7 +0,0 @@
-Version: TELEPATHY_GLIB_0.14.5
-Extends: TELEPATHY_GLIB_0.14.4
-Release: 0.14.5
-
-tp_base_client_is_handling_channel
-tp_intset_iter_init
-tp_intset_iter_reset
diff --git a/telepathy-glib/versions/0.15.0.abi b/telepathy-glib/versions/0.15.0.abi
deleted file mode 100644
index d2275adc9..000000000
--- a/telepathy-glib/versions/0.15.0.abi
+++ /dev/null
@@ -1,18 +0,0 @@
-Version: TELEPATHY_GLIB_0.15.0
-Extends: TELEPATHY_GLIB_0.14.5
-Release: 0.15.0
-
-tp_base_client_delegate_channels_async
-tp_base_client_delegate_channels_finish
-tp_channel_dispatch_operation_claim_with_async
-tp_channel_dispatch_operation_claim_with_finish
-tp_channel_dispatcher_present_channel_async
-tp_channel_dispatcher_present_channel_finish
-tp_cli_channel_dispatcher_call_delegate_channels
-tp_cli_channel_dispatcher_call_present_channel
-tp_cli_channel_interface_sms_call_get_sms_length
-tp_cli_channel_interface_sms_run_get_sms_length
-tp_svc_channel_dispatcher_implement_delegate_channels
-tp_svc_channel_dispatcher_implement_present_channel
-tp_svc_channel_interface_sms_implement_get_sms_length
-tp_type_dbus_hash_o_28ss_29
diff --git a/telepathy-glib/versions/0.15.1.abi b/telepathy-glib/versions/0.15.1.abi
deleted file mode 100644
index 4ac44bb9a..000000000
--- a/telepathy-glib/versions/0.15.1.abi
+++ /dev/null
@@ -1,18 +0,0 @@
-Version: TELEPATHY_GLIB_0.15.1
-Extends: TELEPATHY_GLIB_0.15.0
-Release: 0.15.1
-
-tp_base_contact_list_block_contacts_with_abuse_async
-tp_base_contact_list_block_contacts_with_abuse_finish
-tp_base_contact_list_mixin_blocking_iface_init
-tp_channel_dispatch_operation_close_channels_async
-tp_channel_dispatch_operation_close_channels_finish
-tp_connection_get_balance
-tp_connection_get_balance_uri
-tp_connection_get_feature_quark_balance
-tp_handle_set_to_identifier_map
-tp_text_channel_get_feature_quark_sms
-tp_text_channel_get_sms_flash
-tp_text_channel_get_sms_length_async
-tp_text_channel_get_sms_length_finish
-tp_text_channel_is_sms_channel
diff --git a/telepathy-glib/versions/0.15.2.abi b/telepathy-glib/versions/0.15.2.abi
deleted file mode 100644
index aabe8794b..000000000
--- a/telepathy-glib/versions/0.15.2.abi
+++ /dev/null
@@ -1,14 +0,0 @@
-Version: TELEPATHY_GLIB_0.15.2
-Extends: TELEPATHY_GLIB_0.15.1
-Release: 0.15.2
-
-tp_channel_destroy_async
-tp_channel_destroy_finish
-tp_channel_dispatch_operation_destroy_channels_async
-tp_channel_dispatch_operation_destroy_channels_finish
-tp_channel_dispatch_operation_leave_channels_async
-tp_channel_dispatch_operation_leave_channels_finish
-tp_channel_get_feature_quark_password
-tp_channel_password_needed
-tp_channel_provide_password_async
-tp_channel_provide_password_finish
diff --git a/telepathy-glib/versions/0.15.3.abi b/telepathy-glib/versions/0.15.3.abi
deleted file mode 100644
index 3f39b7c5e..000000000
--- a/telepathy-glib/versions/0.15.3.abi
+++ /dev/null
@@ -1,13 +0,0 @@
-Version: TELEPATHY_GLIB_0.15.3
-Extends: TELEPATHY_GLIB_0.15.2
-Release: 0.15.3
-
-tp_account_channel_request_set_delegate_to_preferred_handler
-tp_account_channel_request_set_delegated_channel_callback
-tp_base_client_set_delegated_channels_callback
-tp_channel_request_get_account
-tp_channel_request_get_preferred_handler
-tp_channel_request_get_user_action_time
-tp_message_get_pending_message_id
-tp_text_channel_ack_all_pending_messages_async
-tp_text_channel_ack_all_pending_messages_finish
diff --git a/telepathy-glib/versions/0.15.5.abi b/telepathy-glib/versions/0.15.5.abi
deleted file mode 100644
index 47248549d..000000000
--- a/telepathy-glib/versions/0.15.5.abi
+++ /dev/null
@@ -1,90 +0,0 @@
-Version: TELEPATHY_GLIB_0.15.5
-Extends: TELEPATHY_GLIB_0.15.3
-Release: 0.15.5
-
-tp_account_get_feature_quark_connection
-tp_account_manager_new_with_factory
-tp_account_manager_set_default
-tp_automatic_client_factory_get_type
-tp_automatic_client_factory_new
-tp_channel_join_async
-tp_channel_join_finish
-tp_cm_message_set_message
-tp_connection_add_to_group_async
-tp_connection_add_to_group_finish
-tp_connection_authorize_publication_async
-tp_connection_authorize_publication_finish
-tp_connection_dup_contact_list
-tp_connection_get_account
-tp_connection_get_can_change_contact_list
-tp_connection_get_contact_groups
-tp_connection_get_contact_list_persists
-tp_connection_get_contact_list_state
-tp_connection_get_disjoint_groups
-tp_connection_get_feature_quark_contact_groups
-tp_connection_get_feature_quark_contact_list
-tp_connection_get_group_storage
-tp_connection_get_request_uses_message
-tp_connection_remove_contacts_async
-tp_connection_remove_contacts_finish
-tp_connection_remove_from_group_async
-tp_connection_remove_from_group_finish
-tp_connection_remove_group_async
-tp_connection_remove_group_finish
-tp_connection_rename_group_async
-tp_connection_rename_group_finish
-tp_connection_request_subscription_async
-tp_connection_request_subscription_finish
-tp_connection_set_group_members_async
-tp_connection_set_group_members_finish
-tp_connection_unpublish_async
-tp_connection_unpublish_finish
-tp_connection_unsubscribe_async
-tp_connection_unsubscribe_finish
-tp_contact_add_to_group_async
-tp_contact_add_to_group_finish
-tp_contact_authorize_publication_async
-tp_contact_authorize_publication_finish
-tp_contact_remove_async
-tp_contact_remove_finish
-tp_contact_remove_from_group_async
-tp_contact_remove_from_group_finish
-tp_contact_request_subscription_async
-tp_contact_request_subscription_finish
-tp_contact_unpublish_async
-tp_contact_unpublish_finish
-tp_contact_unsubscribe_async
-tp_contact_unsubscribe_finish
-tp_debug_sender_set_timestamps
-tp_file_transfer_channel_get_date
-tp_file_transfer_channel_get_description
-tp_file_transfer_channel_get_feature_quark_core
-tp_file_transfer_channel_get_filename
-tp_file_transfer_channel_get_mime_type
-tp_file_transfer_channel_get_size
-tp_file_transfer_channel_get_transferred_bytes
-tp_file_transfer_channel_get_type
-tp_file_transfer_channel_new
-tp_proxy_get_factory
-tp_simple_approver_new_with_factory
-tp_simple_client_factory_add_account_features
-tp_simple_client_factory_add_account_features_varargs
-tp_simple_client_factory_add_channel_features
-tp_simple_client_factory_add_channel_features_varargs
-tp_simple_client_factory_add_connection_features
-tp_simple_client_factory_add_connection_features_varargs
-tp_simple_client_factory_add_contact_features
-tp_simple_client_factory_add_contact_features_varargs
-tp_simple_client_factory_dup_account_features
-tp_simple_client_factory_dup_channel_features
-tp_simple_client_factory_dup_connection_features
-tp_simple_client_factory_dup_contact_features
-tp_simple_client_factory_ensure_account
-tp_simple_client_factory_ensure_channel
-tp_simple_client_factory_ensure_connection
-tp_simple_client_factory_ensure_contact
-tp_simple_client_factory_get_dbus_daemon
-tp_simple_client_factory_get_type
-tp_simple_client_factory_new
-tp_simple_handler_new_with_factory
-tp_simple_observer_new_with_factory
diff --git a/telepathy-glib/versions/0.15.6.abi b/telepathy-glib/versions/0.15.6.abi
deleted file mode 100644
index e70f0c49e..000000000
--- a/telepathy-glib/versions/0.15.6.abi
+++ /dev/null
@@ -1,23 +0,0 @@
-Version: TELEPATHY_GLIB_0.15.6
-Extends: TELEPATHY_GLIB_0.15.5
-Release: 0.15.6
-
-tp_dbus_properties_mixin_emit_properties_changed
-tp_dbus_properties_mixin_emit_properties_changed_varargs
-tp_channel_get_target_contact
-tp_channel_get_initiator_contact
-tp_channel_get_feature_quark_contacts
-tp_channel_group_get_contact_owner
-tp_channel_group_get_self_contact
-tp_channel_group_dup_members_contacts
-tp_channel_group_dup_local_pending_contacts
-tp_channel_group_dup_remote_pending_contacts
-tp_channel_group_get_local_pending_contact_info
-tp_cli_channel_interface_group_connect_to_handle_owners_changed_detailed
-tp_cli_channel_interface_group_connect_to_self_contact_changed
-tp_svc_channel_interface_group_emit_handle_owners_changed_detailed
-tp_svc_channel_interface_group_emit_self_contact_changed
-tp_protocol_get_avatar_requirements
-tp_dbus_tube_channel_get_parameters
-tp_dbus_tube_channel_get_service_name
-tp_dbus_tube_channel_get_type
diff --git a/telepathy-glib/versions/0.15.8.abi b/telepathy-glib/versions/0.15.8.abi
deleted file mode 100644
index 41911ec80..000000000
--- a/telepathy-glib/versions/0.15.8.abi
+++ /dev/null
@@ -1,25 +0,0 @@
-Version: TELEPATHY_GLIB_0.15.8
-Extends: TELEPATHY_GLIB_0.15.6
-Release: 0.15.8
-
-tp_base_room_config_dup_channel
-tp_base_room_config_emit_properties_changed
-tp_base_room_config_get_type
-tp_base_room_config_iface_init
-tp_base_room_config_property_get_type
-tp_base_room_config_register_class
-tp_base_room_config_set_can_update_configuration
-tp_base_room_config_set_property_mutable
-tp_base_room_config_set_retrieved
-tp_cli_channel_interface_room_config_call_update_configuration
-tp_cli_channel_interface_subject_call_set_subject
-tp_dbus_properties_mixin_set
-tp_iface_quark_channel_interface_room
-tp_iface_quark_channel_interface_room_config
-tp_iface_quark_channel_interface_subject
-tp_svc_channel_interface_room_config_get_type
-tp_svc_channel_interface_room_config_implement_update_configuration
-tp_svc_channel_interface_room_get_type
-tp_svc_channel_interface_subject_get_type
-tp_svc_channel_interface_subject_implement_set_subject
-tp_svc_interface_get_dbus_properties_info
diff --git a/telepathy-glib/versions/0.17.0.abi b/telepathy-glib/versions/0.17.0.abi
deleted file mode 100644
index 1e75f2d89..000000000
--- a/telepathy-glib/versions/0.17.0.abi
+++ /dev/null
@@ -1,17 +0,0 @@
-Version: TELEPATHY_GLIB_0.17.0
-Extends: TELEPATHY_GLIB_0.15.8
-Release: 0.17.0
-
-tp_connection_block_contacts_async
-tp_connection_block_contacts_finish
-tp_connection_can_report_abusive
-tp_connection_get_blocked_contacts
-tp_connection_get_feature_quark_contact_blocking
-tp_connection_get_feature_quark_contact_list_properties
-tp_connection_unblock_contacts_async
-tp_connection_unblock_contacts_finish
-tp_contact_block_async
-tp_contact_block_finish
-tp_contact_is_blocked
-tp_contact_unblock_async
-tp_contact_unblock_finish
diff --git a/telepathy-glib/versions/0.17.1.abi b/telepathy-glib/versions/0.17.1.abi
deleted file mode 100644
index b12f1c851..000000000
--- a/telepathy-glib/versions/0.17.1.abi
+++ /dev/null
@@ -1,14 +0,0 @@
-Version: TELEPATHY_GLIB_0.17.1
-Extends: TELEPATHY_GLIB_0.17.0
-Release: 0.17.1
-
-tp_svc_channel_interface_file_transfer_metadata_get_type
-tp_file_transfer_channel_provide_file_async
-tp_file_transfer_channel_get_service_name
-tp_type_dbus_hash_sas
-tp_file_transfer_channel_provide_file_finish
-tp_iface_quark_channel_interface_file_transfer_metadata
-tp_file_transfer_channel_get_metadata
-tp_file_transfer_channel_accept_file_async
-tp_file_transfer_channel_accept_file_finish
-tp_file_transfer_channel_get_state
diff --git a/telepathy-glib/versions/0.17.2.abi b/telepathy-glib/versions/0.17.2.abi
deleted file mode 100644
index e246a700e..000000000
--- a/telepathy-glib/versions/0.17.2.abi
+++ /dev/null
@@ -1,11 +0,0 @@
-Version: TELEPATHY_GLIB_0.17.2
-Extends: TELEPATHY_GLIB_0.17.1
-Release: 0.17.2
-
-tp_cli_protocol_interface_addressing_call_normalize_contact_uri
-tp_cli_protocol_interface_addressing_call_normalize_vcard_address
-tp_iface_quark_protocol_interface_addressing
-tp_protocol_addressing_get_type
-tp_svc_protocol_interface_addressing_get_type
-tp_svc_protocol_interface_addressing_implement_normalize_contact_uri
-tp_svc_protocol_interface_addressing_implement_normalize_vcard_address
diff --git a/telepathy-glib/versions/0.17.3.abi b/telepathy-glib/versions/0.17.3.abi
deleted file mode 100644
index 1e0c0daa1..000000000
--- a/telepathy-glib/versions/0.17.3.abi
+++ /dev/null
@@ -1,6 +0,0 @@
-Version: TELEPATHY_GLIB_0.17.3
-Extends: TELEPATHY_GLIB_0.17.2
-Release: 0.17.3
-
-tp_connection_can_set_contact_alias
-tp_connection_get_feature_quark_aliasing
diff --git a/telepathy-glib/versions/0.17.5.abi b/telepathy-glib/versions/0.17.5.abi
deleted file mode 100644
index fc0b8b573..000000000
--- a/telepathy-glib/versions/0.17.5.abi
+++ /dev/null
@@ -1,310 +0,0 @@
-Version: TELEPATHY_GLIB_0.17.5
-Extends: TELEPATHY_GLIB_0.17.3
-Release: 0.17.5
-
-tp_account_get_supersedes
-tp_base_call_channel_add_content
-tp_base_call_channel_get_call_members
-tp_base_call_channel_get_contents
-tp_base_call_channel_get_state
-tp_base_call_channel_get_type
-tp_base_call_channel_has_initial_audio
-tp_base_call_channel_has_initial_video
-tp_base_call_channel_has_mutable_contents
-tp_base_call_channel_is_accepted
-tp_base_call_channel_remote_accept
-tp_base_call_channel_remove_content
-tp_base_call_channel_remove_member
-tp_base_call_channel_set_state
-tp_base_call_channel_update_member_flags
-tp_base_call_content_add_stream
-tp_base_call_content_get_connection
-tp_base_call_content_get_disposition
-tp_base_call_content_get_media_type
-tp_base_call_content_get_name
-tp_base_call_content_get_object_path
-tp_base_call_content_get_streams
-tp_base_call_content_get_type
-tp_base_call_content_remove_stream
-tp_base_call_stream_get_connection
-tp_base_call_stream_get_local_sending_state
-tp_base_call_stream_get_object_path
-tp_base_call_stream_get_remote_sending_state
-tp_base_call_stream_get_type
-tp_base_call_stream_remove_member
-tp_base_call_stream_update_local_sending_state
-tp_base_call_stream_update_remote_sending_state
-tp_base_channel_get_self_handle
-tp_base_media_call_channel_get_type
-tp_base_media_call_content_get_local_media_description
-tp_base_media_call_content_get_type
-tp_base_media_call_content_offer_media_description_async
-tp_base_media_call_content_offer_media_description_finish
-tp_base_media_call_stream_add_endpoint
-tp_base_media_call_stream_get_endpoints
-tp_base_media_call_stream_get_local_candidates
-tp_base_media_call_stream_get_password
-tp_base_media_call_stream_get_receiving_state
-tp_base_media_call_stream_get_sending_state
-tp_base_media_call_stream_get_type
-tp_base_media_call_stream_get_username
-tp_base_media_call_stream_remove_endpoint
-tp_base_media_call_stream_set_local_sending
-tp_base_media_call_stream_set_relay_info
-tp_base_media_call_stream_set_stun_servers
-tp_base_media_call_stream_update_receiving_state
-tp_base_media_call_stream_update_sending_state
-tp_call_channel_accept_async
-tp_call_channel_accept_finish
-tp_call_channel_add_content_async
-tp_call_channel_add_content_finish
-tp_call_channel_get_contents
-tp_call_channel_get_feature_quark_core
-tp_call_channel_get_members
-tp_call_channel_get_state
-tp_call_channel_get_type
-tp_call_channel_hangup_async
-tp_call_channel_hangup_finish
-tp_call_channel_has_dtmf
-tp_call_channel_has_hardware_streaming
-tp_call_channel_has_initial_audio
-tp_call_channel_has_initial_video
-tp_call_channel_has_mutable_contents
-tp_call_channel_send_tones_async
-tp_call_channel_send_tones_finish
-tp_call_channel_set_queued_async
-tp_call_channel_set_queued_finish
-tp_call_channel_set_ringing_async
-tp_call_channel_set_ringing_finish
-tp_call_content_get_disposition
-tp_call_content_get_feature_quark_core
-tp_call_content_get_media_type
-tp_call_content_get_name
-tp_call_content_get_streams
-tp_call_content_get_type
-tp_call_content_init_known_interfaces
-tp_call_content_media_description_add_ssrc
-tp_call_content_media_description_append_codec
-tp_call_content_media_description_get_object_path
-tp_call_content_media_description_get_remote_contact
-tp_call_content_media_description_get_type
-tp_call_content_media_description_init_known_interfaces
-tp_call_content_media_description_new
-tp_call_content_remove_async
-tp_call_content_remove_finish
-tp_call_content_send_tones_async
-tp_call_content_send_tones_finish
-tp_call_state_reason_get_type
-tp_call_stream_can_request_receiving
-tp_call_stream_endpoint_add_new_candidate
-tp_call_stream_endpoint_add_new_candidates
-tp_call_stream_endpoint_get_object_path
-tp_call_stream_endpoint_get_state
-tp_call_stream_endpoint_get_type
-tp_call_stream_endpoint_init_known_interfaces
-tp_call_stream_endpoint_new
-tp_call_stream_endpoint_set_remote_credentials
-tp_call_stream_get_feature_quark_core
-tp_call_stream_get_local_sending_state
-tp_call_stream_get_remote_members
-tp_call_stream_get_type
-tp_call_stream_init_known_interfaces
-tp_call_stream_request_receiving_async
-tp_call_stream_request_receiving_finish
-tp_call_stream_set_sending_async
-tp_call_stream_set_sending_finish
-tp_cli_call_content_call_remove
-tp_cli_call_content_connect_to_streams_added
-tp_cli_call_content_connect_to_streams_removed
-tp_cli_call_content_interface_audio_control_call_report_input_volume
-tp_cli_call_content_interface_audio_control_call_report_output_volume
-tp_cli_call_content_interface_dtmf_call_multiple_tones
-tp_cli_call_content_interface_dtmf_call_start_tone
-tp_cli_call_content_interface_dtmf_call_stop_tone
-tp_cli_call_content_interface_dtmf_connect_to_sending_tones
-tp_cli_call_content_interface_dtmf_connect_to_stopped_tones
-tp_cli_call_content_interface_dtmf_connect_to_tones_deferred
-tp_cli_call_content_interface_media_call_acknowledge_dtmf_change
-tp_cli_call_content_interface_media_call_fail
-tp_cli_call_content_interface_media_call_update_local_media_description
-tp_cli_call_content_interface_media_connect_to_dtmf_change_requested
-tp_cli_call_content_interface_media_connect_to_local_media_description_changed
-tp_cli_call_content_interface_media_connect_to_media_description_offer_done
-tp_cli_call_content_interface_media_connect_to_media_descriptions_removed
-tp_cli_call_content_interface_media_connect_to_new_media_description_offer
-tp_cli_call_content_interface_media_connect_to_remote_media_descriptions_changed
-tp_cli_call_content_interface_video_control_connect_to_bitrate_changed
-tp_cli_call_content_interface_video_control_connect_to_framerate_changed
-tp_cli_call_content_interface_video_control_connect_to_key_frame_requested
-tp_cli_call_content_interface_video_control_connect_to_mtu_changed
-tp_cli_call_content_interface_video_control_connect_to_video_resolution_changed
-tp_cli_call_content_media_description_call_accept
-tp_cli_call_content_media_description_call_reject
-tp_cli_call_stream_call_request_receiving
-tp_cli_call_stream_call_set_sending
-tp_cli_call_stream_connect_to_local_sending_state_changed
-tp_cli_call_stream_connect_to_remote_members_changed
-tp_cli_call_stream_endpoint_call_accept_selected_candidate_pair
-tp_cli_call_stream_endpoint_call_reject_selected_candidate_pair
-tp_cli_call_stream_endpoint_call_set_controlling
-tp_cli_call_stream_endpoint_call_set_endpoint_state
-tp_cli_call_stream_endpoint_call_set_selected_candidate_pair
-tp_cli_call_stream_endpoint_connect_to_candidate_pair_selected
-tp_cli_call_stream_endpoint_connect_to_controlling_changed
-tp_cli_call_stream_endpoint_connect_to_endpoint_state_changed
-tp_cli_call_stream_endpoint_connect_to_remote_candidates_added
-tp_cli_call_stream_endpoint_connect_to_remote_credentials_set
-tp_cli_call_stream_interface_media_call_add_candidates
-tp_cli_call_stream_interface_media_call_complete_receiving_state_change
-tp_cli_call_stream_interface_media_call_complete_sending_state_change
-tp_cli_call_stream_interface_media_call_fail
-tp_cli_call_stream_interface_media_call_finish_initial_candidates
-tp_cli_call_stream_interface_media_call_report_receiving_failure
-tp_cli_call_stream_interface_media_call_report_sending_failure
-tp_cli_call_stream_interface_media_call_set_credentials
-tp_cli_call_stream_interface_media_connect_to_endpoints_changed
-tp_cli_call_stream_interface_media_connect_to_ice_restart_requested
-tp_cli_call_stream_interface_media_connect_to_local_candidates_added
-tp_cli_call_stream_interface_media_connect_to_local_credentials_changed
-tp_cli_call_stream_interface_media_connect_to_receiving_state_changed
-tp_cli_call_stream_interface_media_connect_to_relay_info_changed
-tp_cli_call_stream_interface_media_connect_to_sending_state_changed
-tp_cli_call_stream_interface_media_connect_to_server_info_retrieved
-tp_cli_call_stream_interface_media_connect_to_stun_servers_changed
-tp_cli_channel_interface_captcha_authentication_call_answer_captchas
-tp_cli_channel_interface_captcha_authentication_call_cancel_captcha
-tp_cli_channel_interface_captcha_authentication_call_get_captcha_data
-tp_cli_channel_interface_captcha_authentication_call_get_captchas
-tp_cli_channel_type_call_call_accept
-tp_cli_channel_type_call_call_add_content
-tp_cli_channel_type_call_call_hangup
-tp_cli_channel_type_call_call_set_queued
-tp_cli_channel_type_call_call_set_ringing
-tp_cli_channel_type_call_connect_to_call_members_changed
-tp_cli_channel_type_call_connect_to_call_state_changed
-tp_cli_channel_type_call_connect_to_content_added
-tp_cli_channel_type_call_connect_to_content_removed
-tp_cli_connection_interface_addressing_call_get_contacts_by_uri
-tp_cli_connection_interface_addressing_call_get_contacts_by_vcard_field
-tp_cli_connection_interface_contact_list_call_download
-tp_connection_disconnect_async
-tp_connection_disconnect_finish
-tp_iface_quark_call_content
-tp_iface_quark_call_content_interface_audio_control
-tp_iface_quark_call_content_interface_dtmf
-tp_iface_quark_call_content_interface_media
-tp_iface_quark_call_content_interface_video_control
-tp_iface_quark_call_content_media_description
-tp_iface_quark_call_content_media_description_interface_rtcp_extended_reports
-tp_iface_quark_call_content_media_description_interface_rtcp_feedback
-tp_iface_quark_call_content_media_description_interface_rtp_header_extensions
-tp_iface_quark_call_stream
-tp_iface_quark_call_stream_endpoint
-tp_iface_quark_call_stream_interface_media
-tp_iface_quark_channel_interface_captcha_authentication
-tp_iface_quark_channel_type_call
-tp_iface_quark_connection_interface_addressing
-tp_svc_call_content_emit_streams_added
-tp_svc_call_content_emit_streams_removed
-tp_svc_call_content_get_type
-tp_svc_call_content_implement_remove
-tp_svc_call_content_interface_audio_control_get_type
-tp_svc_call_content_interface_audio_control_implement_report_input_volume
-tp_svc_call_content_interface_audio_control_implement_report_output_volume
-tp_svc_call_content_interface_dtmf_emit_sending_tones
-tp_svc_call_content_interface_dtmf_emit_stopped_tones
-tp_svc_call_content_interface_dtmf_emit_tones_deferred
-tp_svc_call_content_interface_dtmf_get_type
-tp_svc_call_content_interface_dtmf_implement_multiple_tones
-tp_svc_call_content_interface_dtmf_implement_start_tone
-tp_svc_call_content_interface_dtmf_implement_stop_tone
-tp_svc_call_content_interface_media_emit_dtmf_change_requested
-tp_svc_call_content_interface_media_emit_local_media_description_changed
-tp_svc_call_content_interface_media_emit_media_description_offer_done
-tp_svc_call_content_interface_media_emit_media_descriptions_removed
-tp_svc_call_content_interface_media_emit_new_media_description_offer
-tp_svc_call_content_interface_media_emit_remote_media_descriptions_changed
-tp_svc_call_content_interface_media_get_type
-tp_svc_call_content_interface_media_implement_acknowledge_dtmf_change
-tp_svc_call_content_interface_media_implement_fail
-tp_svc_call_content_interface_media_implement_update_local_media_description
-tp_svc_call_content_interface_video_control_emit_bitrate_changed
-tp_svc_call_content_interface_video_control_emit_framerate_changed
-tp_svc_call_content_interface_video_control_emit_key_frame_requested
-tp_svc_call_content_interface_video_control_emit_mtu_changed
-tp_svc_call_content_interface_video_control_emit_video_resolution_changed
-tp_svc_call_content_interface_video_control_get_type
-tp_svc_call_content_media_description_get_type
-tp_svc_call_content_media_description_implement_accept
-tp_svc_call_content_media_description_implement_reject
-tp_svc_call_content_media_description_interface_rtcp_extended_reports_get_type
-tp_svc_call_content_media_description_interface_rtcp_feedback_get_type
-tp_svc_call_content_media_description_interface_rtp_header_extensions_get_type
-tp_svc_call_stream_emit_local_sending_state_changed
-tp_svc_call_stream_emit_remote_members_changed
-tp_svc_call_stream_endpoint_emit_candidate_pair_selected
-tp_svc_call_stream_endpoint_emit_controlling_changed
-tp_svc_call_stream_endpoint_emit_endpoint_state_changed
-tp_svc_call_stream_endpoint_emit_remote_candidates_added
-tp_svc_call_stream_endpoint_emit_remote_credentials_set
-tp_svc_call_stream_endpoint_get_type
-tp_svc_call_stream_endpoint_implement_accept_selected_candidate_pair
-tp_svc_call_stream_endpoint_implement_reject_selected_candidate_pair
-tp_svc_call_stream_endpoint_implement_set_controlling
-tp_svc_call_stream_endpoint_implement_set_endpoint_state
-tp_svc_call_stream_endpoint_implement_set_selected_candidate_pair
-tp_svc_call_stream_get_type
-tp_svc_call_stream_implement_request_receiving
-tp_svc_call_stream_implement_set_sending
-tp_svc_call_stream_interface_media_emit_endpoints_changed
-tp_svc_call_stream_interface_media_emit_ice_restart_requested
-tp_svc_call_stream_interface_media_emit_local_candidates_added
-tp_svc_call_stream_interface_media_emit_local_credentials_changed
-tp_svc_call_stream_interface_media_emit_receiving_state_changed
-tp_svc_call_stream_interface_media_emit_relay_info_changed
-tp_svc_call_stream_interface_media_emit_sending_state_changed
-tp_svc_call_stream_interface_media_emit_server_info_retrieved
-tp_svc_call_stream_interface_media_emit_stun_servers_changed
-tp_svc_call_stream_interface_media_get_type
-tp_svc_call_stream_interface_media_implement_add_candidates
-tp_svc_call_stream_interface_media_implement_complete_receiving_state_change
-tp_svc_call_stream_interface_media_implement_complete_sending_state_change
-tp_svc_call_stream_interface_media_implement_fail
-tp_svc_call_stream_interface_media_implement_finish_initial_candidates
-tp_svc_call_stream_interface_media_implement_report_receiving_failure
-tp_svc_call_stream_interface_media_implement_report_sending_failure
-tp_svc_call_stream_interface_media_implement_set_credentials
-tp_svc_channel_interface_captcha_authentication_get_type
-tp_svc_channel_interface_captcha_authentication_implement_answer_captchas
-tp_svc_channel_interface_captcha_authentication_implement_cancel_captcha
-tp_svc_channel_interface_captcha_authentication_implement_get_captcha_data
-tp_svc_channel_interface_captcha_authentication_implement_get_captchas
-tp_svc_channel_type_call_emit_call_members_changed
-tp_svc_channel_type_call_emit_call_state_changed
-tp_svc_channel_type_call_emit_content_added
-tp_svc_channel_type_call_emit_content_removed
-tp_svc_channel_type_call_get_type
-tp_svc_channel_type_call_implement_accept
-tp_svc_channel_type_call_implement_add_content
-tp_svc_channel_type_call_implement_hangup
-tp_svc_channel_type_call_implement_set_queued
-tp_svc_channel_type_call_implement_set_ringing
-tp_svc_connection_interface_addressing_get_type
-tp_svc_connection_interface_addressing_implement_get_contacts_by_uri
-tp_svc_connection_interface_addressing_implement_get_contacts_by_vcard_field
-tp_svc_connection_interface_contact_list_implement_download
-tp_type_dbus_array__28usua_7bsv_7d_29_28usua_7bsv_7d_29
-tp_type_dbus_array_of_a_7buu_7d
-tp_type_dbus_array_ussuas
-tp_type_dbus_array_usua_7bsv_7d
-tp_type_dbus_array_usuuba_7bss_7d
-tp_type_dbus_hash_su
-tp_type_dbus_hash_ua_28usuuba_7bss_7d_29
-tp_type_dbus_struct__28usua_7bsv_7d_29_28usua_7bsv_7d_29
-tp_type_dbus_struct_ussuas
-tp_type_dbus_struct_usua_7bsv_7d
-tp_type_dbus_struct_usuuba_7bss_7d
-tp_unix_connection_receive_credentials_with_byte_async
-tp_unix_connection_receive_credentials_with_byte_finish
-tp_unix_connection_send_credentials_with_byte_async
-tp_unix_connection_send_credentials_with_byte_finish
diff --git a/telepathy-glib/versions/0.7.0.abi b/telepathy-glib/versions/0.7.0.abi
deleted file mode 100644
index 52efbb1de..000000000
--- a/telepathy-glib/versions/0.7.0.abi
+++ /dev/null
@@ -1,396 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.0
-Extends: -
-# not a typo - we only introduced versioned symbols in 0.7.1
-Release: 0.7.1
-
-tp_base_connection_add_interfaces
-tp_base_connection_change_status
-tp_base_connection_dbus_request_handles
-tp_base_connection_finish_shutdown
-tp_base_connection_get_handles
-tp_base_connection_get_type
-tp_base_connection_manager_get_type
-tp_base_connection_manager_register
-tp_base_connection_register
-tp_channel_factory_iface_close_all
-tp_channel_factory_iface_connected
-tp_channel_factory_iface_connecting
-tp_channel_factory_iface_disconnected
-tp_channel_factory_iface_emit_channel_error
-tp_channel_factory_iface_emit_new_channel
-tp_channel_factory_iface_foreach
-tp_channel_factory_iface_get_type
-tp_channel_factory_iface_request
-tp_channel_iface_get_type
-tp_cm_param_filter_string_nonempty
-tp_cm_param_filter_uint_nonzero
-tp_cm_param_setter_offset
-tp_dbus_g_method_return_not_implemented
-tp_dbus_specialized_value_slice_new
-tp_debug_set_all_flags
-tp_debug_set_flags
-tp_debug_set_flags_from_env
-tp_debug_set_flags_from_string
-tp_debug_set_persistent
-tp_dynamic_handle_repo_get_type
-tp_dynamic_handle_repo_lookup_exact
-tp_error_get_type
-tp_errors_quark
-tp_escape_as_identifier
-tp_external_group_mixin_finalize
-tp_external_group_mixin_iface_init
-tp_external_group_mixin_init
-tp_g_hash_table_update
-tp_g_ptr_array_contains
-tp_g_set_error_invalid_handle_type
-tp_g_set_error_unsupported_handle_type
-tp_g_value_slice_dup
-tp_g_value_slice_free
-tp_g_value_slice_new
-tp_get_bus
-tp_get_bus_proxy
-tp_group_mixin_add_handle_owner
-tp_group_mixin_add_members
-tp_group_mixin_change_flags
-tp_group_mixin_change_members
-tp_group_mixin_class_get_offset_quark
-tp_group_mixin_class_init
-tp_group_mixin_class_set_remove_with_reason_func
-tp_group_mixin_finalize
-tp_group_mixin_get_all_members
-tp_group_mixin_get_group_flags
-tp_group_mixin_get_handle_owners
-tp_group_mixin_get_local_pending_members
-tp_group_mixin_get_local_pending_members_with_info
-tp_group_mixin_get_members
-tp_group_mixin_get_offset_quark
-tp_group_mixin_get_remote_pending_members
-tp_group_mixin_get_self_handle
-tp_group_mixin_iface_init
-tp_group_mixin_init
-tp_group_mixin_remove_members
-tp_group_mixin_remove_members_with_reason
-tp_handle_client_hold
-tp_handle_client_release
-tp_handle_ensure
-tp_handle_get_qdata
-tp_handle_inspect
-tp_handle_is_valid
-tp_handle_lookup
-tp_handle_ref
-tp_handle_repo_iface_get_type
-tp_handle_set_add
-tp_handle_set_destroy
-tp_handle_set_difference_update
-tp_handle_set_foreach
-tp_handle_set_is_member
-tp_handle_set_new
-tp_handle_set_peek
-tp_handle_set_qdata
-tp_handle_set_remove
-tp_handle_set_size
-tp_handle_set_to_array
-tp_handle_set_update
-tp_handle_type_to_string
-tp_handle_unref
-tp_handles_are_valid
-tp_handles_client_hold
-tp_handles_client_release
-tp_handles_ref
-tp_handles_unref
-tp_heap_add
-tp_heap_clear
-tp_heap_destroy
-tp_heap_extract_first
-tp_heap_new
-tp_heap_peek_first
-tp_heap_remove
-tp_heap_size
-tp_iface_quark_channel
-tp_iface_quark_channel_interface_chat_state
-tp_iface_quark_channel_interface_dtmf
-tp_iface_quark_channel_interface_group
-tp_iface_quark_channel_interface_media_signalling
-tp_iface_quark_channel_interface_password
-tp_iface_quark_channel_type_contact_list
-tp_iface_quark_channel_type_room_list
-tp_iface_quark_channel_type_streamed_media
-tp_iface_quark_channel_type_text
-tp_iface_quark_channel_type_tubes
-tp_iface_quark_connection
-tp_iface_quark_connection_interface_aliasing
-tp_iface_quark_connection_interface_avatars
-tp_iface_quark_connection_interface_capabilities
-tp_iface_quark_connection_interface_presence
-tp_iface_quark_connection_manager
-tp_iface_quark_media_session_handler
-tp_iface_quark_media_stream_handler
-tp_iface_quark_properties_interface
-tp_intset_add
-tp_intset_clear
-tp_intset_copy
-tp_intset_destroy
-tp_intset_difference
-tp_intset_dump
-tp_intset_foreach
-tp_intset_from_array
-tp_intset_intersection
-tp_intset_is_equal
-tp_intset_is_member
-tp_intset_iter_next
-tp_intset_new
-tp_intset_remove
-tp_intset_size
-tp_intset_sized_new
-tp_intset_symmetric_difference
-tp_intset_to_array
-tp_intset_union
-tp_mixin_offset_cast
-tp_presence_mixin_class_get_offset_quark
-tp_presence_mixin_class_init
-tp_presence_mixin_emit_one_presence_update
-tp_presence_mixin_emit_presence_update
-tp_presence_mixin_finalize
-tp_presence_mixin_get_offset_quark
-tp_presence_mixin_iface_init
-tp_presence_mixin_init
-tp_presence_status_free
-tp_presence_status_new
-tp_properties_context_get
-tp_properties_context_get_value_count
-tp_properties_context_has
-tp_properties_context_has_other_than
-tp_properties_context_remove
-tp_properties_context_return
-tp_properties_context_return_if_done
-tp_properties_mixin_change_flags
-tp_properties_mixin_change_value
-tp_properties_mixin_class_get_offset_quark
-tp_properties_mixin_class_init
-tp_properties_mixin_emit_changed
-tp_properties_mixin_emit_flags
-tp_properties_mixin_finalize
-tp_properties_mixin_get_offset_quark
-tp_properties_mixin_get_properties
-tp_properties_mixin_has_property
-tp_properties_mixin_iface_init
-tp_properties_mixin_init
-tp_properties_mixin_is_readable
-tp_properties_mixin_is_writable
-tp_properties_mixin_list_properties
-tp_properties_mixin_set_properties
-tp_run_connection_manager
-tp_static_handle_repo_get_type
-tp_strdiff
-tp_svc_channel_emit_closed
-tp_svc_channel_get_type
-tp_svc_channel_implement_close
-tp_svc_channel_implement_get_channel_type
-tp_svc_channel_implement_get_handle
-tp_svc_channel_implement_get_interfaces
-tp_svc_channel_interface_chat_state_emit_chat_state_changed
-tp_svc_channel_interface_chat_state_get_type
-tp_svc_channel_interface_chat_state_implement_set_chat_state
-tp_svc_channel_interface_dtmf_get_type
-tp_svc_channel_interface_dtmf_implement_start_tone
-tp_svc_channel_interface_dtmf_implement_stop_tone
-tp_svc_channel_interface_group_emit_group_flags_changed
-tp_svc_channel_interface_group_emit_members_changed
-tp_svc_channel_interface_group_get_type
-tp_svc_channel_interface_group_implement_add_members
-tp_svc_channel_interface_group_implement_get_all_members
-tp_svc_channel_interface_group_implement_get_group_flags
-tp_svc_channel_interface_group_implement_get_handle_owners
-tp_svc_channel_interface_group_implement_get_local_pending_members
-tp_svc_channel_interface_group_implement_get_local_pending_members_with_info
-tp_svc_channel_interface_group_implement_get_members
-tp_svc_channel_interface_group_implement_get_remote_pending_members
-tp_svc_channel_interface_group_implement_get_self_handle
-tp_svc_channel_interface_group_implement_remove_members
-tp_svc_channel_interface_group_implement_remove_members_with_reason
-tp_svc_channel_interface_media_signalling_emit_new_session_handler
-tp_svc_channel_interface_media_signalling_get_type
-tp_svc_channel_interface_media_signalling_implement_get_session_handlers
-tp_svc_channel_interface_password_emit_password_flags_changed
-tp_svc_channel_interface_password_get_type
-tp_svc_channel_interface_password_implement_get_password_flags
-tp_svc_channel_interface_password_implement_provide_password
-tp_svc_channel_type_contact_list_get_type
-tp_svc_channel_type_room_list_emit_got_rooms
-tp_svc_channel_type_room_list_emit_listing_rooms
-tp_svc_channel_type_room_list_get_type
-tp_svc_channel_type_room_list_implement_get_listing_rooms
-tp_svc_channel_type_room_list_implement_list_rooms
-tp_svc_channel_type_room_list_implement_stop_listing
-tp_svc_channel_type_streamed_media_emit_stream_added
-tp_svc_channel_type_streamed_media_emit_stream_direction_changed
-tp_svc_channel_type_streamed_media_emit_stream_error
-tp_svc_channel_type_streamed_media_emit_stream_removed
-tp_svc_channel_type_streamed_media_emit_stream_state_changed
-tp_svc_channel_type_streamed_media_get_type
-tp_svc_channel_type_streamed_media_implement_list_streams
-tp_svc_channel_type_streamed_media_implement_remove_streams
-tp_svc_channel_type_streamed_media_implement_request_stream_direction
-tp_svc_channel_type_streamed_media_implement_request_streams
-tp_svc_channel_type_text_emit_lost_message
-tp_svc_channel_type_text_emit_received
-tp_svc_channel_type_text_emit_send_error
-tp_svc_channel_type_text_emit_sent
-tp_svc_channel_type_text_get_type
-tp_svc_channel_type_text_implement_acknowledge_pending_messages
-tp_svc_channel_type_text_implement_get_message_types
-tp_svc_channel_type_text_implement_list_pending_messages
-tp_svc_channel_type_text_implement_send
-tp_svc_channel_type_tubes_emit_d_bus_names_changed
-tp_svc_channel_type_tubes_emit_new_tube
-tp_svc_channel_type_tubes_emit_stream_tube_new_connection
-tp_svc_channel_type_tubes_emit_tube_closed
-tp_svc_channel_type_tubes_emit_tube_state_changed
-tp_svc_channel_type_tubes_get_type
-tp_svc_channel_type_tubes_implement_accept_d_bus_tube
-tp_svc_channel_type_tubes_implement_accept_stream_tube
-tp_svc_channel_type_tubes_implement_close_tube
-tp_svc_channel_type_tubes_implement_get_available_stream_tube_types
-tp_svc_channel_type_tubes_implement_get_available_tube_types
-tp_svc_channel_type_tubes_implement_get_d_bus_names
-tp_svc_channel_type_tubes_implement_get_d_bus_tube_address
-tp_svc_channel_type_tubes_implement_get_stream_tube_socket_address
-tp_svc_channel_type_tubes_implement_list_tubes
-tp_svc_channel_type_tubes_implement_offer_d_bus_tube
-tp_svc_channel_type_tubes_implement_offer_stream_tube
-tp_svc_connection_emit_new_channel
-tp_svc_connection_emit_status_changed
-tp_svc_connection_get_type
-tp_svc_connection_implement_connect
-tp_svc_connection_implement_disconnect
-tp_svc_connection_implement_get_interfaces
-tp_svc_connection_implement_get_protocol
-tp_svc_connection_implement_get_self_handle
-tp_svc_connection_implement_get_status
-tp_svc_connection_implement_hold_handles
-tp_svc_connection_implement_inspect_handles
-tp_svc_connection_implement_list_channels
-tp_svc_connection_implement_release_handles
-tp_svc_connection_implement_request_channel
-tp_svc_connection_implement_request_handles
-tp_svc_connection_interface_aliasing_emit_aliases_changed
-tp_svc_connection_interface_aliasing_get_type
-tp_svc_connection_interface_aliasing_implement_get_alias_flags
-tp_svc_connection_interface_aliasing_implement_request_aliases
-tp_svc_connection_interface_aliasing_implement_set_aliases
-tp_svc_connection_interface_avatars_emit_avatar_retrieved
-tp_svc_connection_interface_avatars_emit_avatar_updated
-tp_svc_connection_interface_avatars_get_type
-tp_svc_connection_interface_avatars_implement_clear_avatar
-tp_svc_connection_interface_avatars_implement_get_avatar_requirements
-tp_svc_connection_interface_avatars_implement_get_avatar_tokens
-tp_svc_connection_interface_avatars_implement_get_known_avatar_tokens
-tp_svc_connection_interface_avatars_implement_request_avatar
-tp_svc_connection_interface_avatars_implement_request_avatars
-tp_svc_connection_interface_avatars_implement_set_avatar
-tp_svc_connection_interface_capabilities_emit_capabilities_changed
-tp_svc_connection_interface_capabilities_get_type
-tp_svc_connection_interface_capabilities_implement_advertise_capabilities
-tp_svc_connection_interface_capabilities_implement_get_capabilities
-tp_svc_connection_interface_presence_emit_presence_update
-tp_svc_connection_interface_presence_get_type
-tp_svc_connection_interface_presence_implement_add_status
-tp_svc_connection_interface_presence_implement_clear_status
-tp_svc_connection_interface_presence_implement_get_presence
-tp_svc_connection_interface_presence_implement_get_statuses
-tp_svc_connection_interface_presence_implement_remove_status
-tp_svc_connection_interface_presence_implement_request_presence
-tp_svc_connection_interface_presence_implement_set_last_activity_time
-tp_svc_connection_interface_presence_implement_set_status
-tp_svc_connection_manager_emit_new_connection
-tp_svc_connection_manager_get_type
-tp_svc_connection_manager_implement_get_parameters
-tp_svc_connection_manager_implement_list_protocols
-tp_svc_connection_manager_implement_request_connection
-tp_svc_media_session_handler_emit_new_stream_handler
-tp_svc_media_session_handler_get_type
-tp_svc_media_session_handler_implement_error
-tp_svc_media_session_handler_implement_ready
-tp_svc_media_stream_handler_emit_add_remote_candidate
-tp_svc_media_stream_handler_emit_close
-tp_svc_media_stream_handler_emit_remove_remote_candidate
-tp_svc_media_stream_handler_emit_set_active_candidate_pair
-tp_svc_media_stream_handler_emit_set_remote_candidate_list
-tp_svc_media_stream_handler_emit_set_remote_codecs
-tp_svc_media_stream_handler_emit_set_stream_playing
-tp_svc_media_stream_handler_emit_set_stream_sending
-tp_svc_media_stream_handler_emit_start_telephony_event
-tp_svc_media_stream_handler_emit_stop_telephony_event
-tp_svc_media_stream_handler_get_type
-tp_svc_media_stream_handler_implement_codec_choice
-tp_svc_media_stream_handler_implement_error
-tp_svc_media_stream_handler_implement_native_candidates_prepared
-tp_svc_media_stream_handler_implement_new_active_candidate_pair
-tp_svc_media_stream_handler_implement_new_native_candidate
-tp_svc_media_stream_handler_implement_ready
-tp_svc_media_stream_handler_implement_set_local_codecs
-tp_svc_media_stream_handler_implement_stream_state
-tp_svc_media_stream_handler_implement_supported_codecs
-tp_svc_properties_interface_emit_properties_changed
-tp_svc_properties_interface_emit_property_flags_changed
-tp_svc_properties_interface_get_type
-tp_svc_properties_interface_implement_get_properties
-tp_svc_properties_interface_implement_list_properties
-tp_svc_properties_interface_implement_set_properties
-tp_text_mixin_acknowledge_pending_messages
-tp_text_mixin_class_get_offset_quark
-tp_text_mixin_class_init
-tp_text_mixin_clear
-tp_text_mixin_finalize
-tp_text_mixin_get_message_types
-tp_text_mixin_get_offset_quark
-tp_text_mixin_iface_init
-tp_text_mixin_init
-tp_text_mixin_list_pending_messages
-tp_text_mixin_receive
-tp_text_mixin_set_message_types
-tp_type_dbus_array_osuu
-tp_type_dbus_array_sa_28usuussduss_29
-tp_type_dbus_array_su
-tp_type_dbus_array_susv
-tp_type_dbus_array_us
-tp_type_dbus_array_usa_7bsv_7d
-tp_type_dbus_array_ussu
-tp_type_dbus_array_usuu
-tp_type_dbus_array_usuussduss
-tp_type_dbus_array_usuuua_7bss_7d
-tp_type_dbus_array_usuuuu
-tp_type_dbus_array_uu
-tp_type_dbus_array_uuus
-tp_type_dbus_array_uuusa_7bsv_7du
-tp_type_dbus_array_uuuuus
-tp_type_dbus_array_uuuuuu
-tp_type_dbus_array_uv
-tp_type_dbus_hash_s_28ubba_7bss_7d_29
-tp_type_dbus_hash_sa_7bsv_7d
-tp_type_dbus_hash_ss
-tp_type_dbus_hash_sv
-tp_type_dbus_hash_u_28ua_7bsa_7bsv_7d_7d_29
-tp_type_dbus_hash_uau
-tp_type_dbus_hash_us
-tp_type_dbus_struct_osuu
-tp_type_dbus_struct_sa_28usuussduss_29
-tp_type_dbus_struct_sq
-tp_type_dbus_struct_su
-tp_type_dbus_struct_susv
-tp_type_dbus_struct_sy
-tp_type_dbus_struct_ua_7bsa_7bsv_7d_7d
-tp_type_dbus_struct_ubba_7bss_7d
-tp_type_dbus_struct_us
-tp_type_dbus_struct_usa_7bsv_7d
-tp_type_dbus_struct_ussu
-tp_type_dbus_struct_usuu
-tp_type_dbus_struct_usuussduss
-tp_type_dbus_struct_usuuua_7bss_7d
-tp_type_dbus_struct_usuuuu
-tp_type_dbus_struct_uu
-tp_type_dbus_struct_uuus
-tp_type_dbus_struct_uuusa_7bsv_7du
-tp_type_dbus_struct_uuuuus
-tp_type_dbus_struct_uuuuuu
-tp_type_dbus_struct_uv
diff --git a/telepathy-glib/versions/0.7.1.abi b/telepathy-glib/versions/0.7.1.abi
deleted file mode 100644
index ad75c3c8b..000000000
--- a/telepathy-glib/versions/0.7.1.abi
+++ /dev/null
@@ -1,312 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.1
-Extends: TELEPATHY_GLIB_0.7.0
-Release: 0.7.1
-
-tp_channel_get_type
-tp_channel_new
-tp_channel_run_until_ready
-tp_cli_channel_call_close
-tp_cli_channel_call_get_channel_type
-tp_cli_channel_call_get_handle
-tp_cli_channel_call_get_interfaces
-tp_cli_channel_connect_to_closed
-tp_cli_channel_interface_chat_state_call_set_chat_state
-tp_cli_channel_interface_chat_state_connect_to_chat_state_changed
-tp_cli_channel_interface_chat_state_run_set_chat_state
-tp_cli_channel_interface_dtmf_call_start_tone
-tp_cli_channel_interface_dtmf_call_stop_tone
-tp_cli_channel_interface_dtmf_run_start_tone
-tp_cli_channel_interface_dtmf_run_stop_tone
-tp_cli_channel_interface_group_call_add_members
-tp_cli_channel_interface_group_call_get_all_members
-tp_cli_channel_interface_group_call_get_group_flags
-tp_cli_channel_interface_group_call_get_handle_owners
-tp_cli_channel_interface_group_call_get_local_pending_members
-tp_cli_channel_interface_group_call_get_local_pending_members_with_info
-tp_cli_channel_interface_group_call_get_members
-tp_cli_channel_interface_group_call_get_remote_pending_members
-tp_cli_channel_interface_group_call_get_self_handle
-tp_cli_channel_interface_group_call_remove_members
-tp_cli_channel_interface_group_call_remove_members_with_reason
-tp_cli_channel_interface_group_connect_to_group_flags_changed
-tp_cli_channel_interface_group_connect_to_members_changed
-tp_cli_channel_interface_group_run_add_members
-tp_cli_channel_interface_group_run_get_all_members
-tp_cli_channel_interface_group_run_get_group_flags
-tp_cli_channel_interface_group_run_get_handle_owners
-tp_cli_channel_interface_group_run_get_local_pending_members
-tp_cli_channel_interface_group_run_get_local_pending_members_with_info
-tp_cli_channel_interface_group_run_get_members
-tp_cli_channel_interface_group_run_get_remote_pending_members
-tp_cli_channel_interface_group_run_get_self_handle
-tp_cli_channel_interface_group_run_remove_members
-tp_cli_channel_interface_group_run_remove_members_with_reason
-tp_cli_channel_interface_media_signalling_call_get_session_handlers
-tp_cli_channel_interface_media_signalling_connect_to_new_session_handler
-tp_cli_channel_interface_media_signalling_run_get_session_handlers
-tp_cli_channel_interface_password_call_get_password_flags
-tp_cli_channel_interface_password_call_provide_password
-tp_cli_channel_interface_password_connect_to_password_flags_changed
-tp_cli_channel_interface_password_run_get_password_flags
-tp_cli_channel_interface_password_run_provide_password
-tp_cli_channel_run_close
-tp_cli_channel_run_get_channel_type
-tp_cli_channel_run_get_handle
-tp_cli_channel_run_get_interfaces
-tp_cli_channel_type_room_list_call_get_listing_rooms
-tp_cli_channel_type_room_list_call_list_rooms
-tp_cli_channel_type_room_list_call_stop_listing
-tp_cli_channel_type_room_list_connect_to_got_rooms
-tp_cli_channel_type_room_list_connect_to_listing_rooms
-tp_cli_channel_type_room_list_run_get_listing_rooms
-tp_cli_channel_type_room_list_run_list_rooms
-tp_cli_channel_type_room_list_run_stop_listing
-tp_cli_channel_type_streamed_media_call_list_streams
-tp_cli_channel_type_streamed_media_call_remove_streams
-tp_cli_channel_type_streamed_media_call_request_stream_direction
-tp_cli_channel_type_streamed_media_call_request_streams
-tp_cli_channel_type_streamed_media_connect_to_stream_added
-tp_cli_channel_type_streamed_media_connect_to_stream_direction_changed
-tp_cli_channel_type_streamed_media_connect_to_stream_error
-tp_cli_channel_type_streamed_media_connect_to_stream_removed
-tp_cli_channel_type_streamed_media_connect_to_stream_state_changed
-tp_cli_channel_type_streamed_media_run_list_streams
-tp_cli_channel_type_streamed_media_run_remove_streams
-tp_cli_channel_type_streamed_media_run_request_stream_direction
-tp_cli_channel_type_streamed_media_run_request_streams
-tp_cli_channel_type_text_call_acknowledge_pending_messages
-tp_cli_channel_type_text_call_get_message_types
-tp_cli_channel_type_text_call_list_pending_messages
-tp_cli_channel_type_text_call_send
-tp_cli_channel_type_text_connect_to_lost_message
-tp_cli_channel_type_text_connect_to_received
-tp_cli_channel_type_text_connect_to_send_error
-tp_cli_channel_type_text_connect_to_sent
-tp_cli_channel_type_text_run_acknowledge_pending_messages
-tp_cli_channel_type_text_run_get_message_types
-tp_cli_channel_type_text_run_list_pending_messages
-tp_cli_channel_type_text_run_send
-tp_cli_channel_type_tubes_call_accept_d_bus_tube
-tp_cli_channel_type_tubes_call_accept_stream_tube
-tp_cli_channel_type_tubes_call_close_tube
-tp_cli_channel_type_tubes_call_get_available_stream_tube_types
-tp_cli_channel_type_tubes_call_get_available_tube_types
-tp_cli_channel_type_tubes_call_get_d_bus_names
-tp_cli_channel_type_tubes_call_get_d_bus_tube_address
-tp_cli_channel_type_tubes_call_get_stream_tube_socket_address
-tp_cli_channel_type_tubes_call_list_tubes
-tp_cli_channel_type_tubes_call_offer_d_bus_tube
-tp_cli_channel_type_tubes_call_offer_stream_tube
-tp_cli_channel_type_tubes_connect_to_d_bus_names_changed
-tp_cli_channel_type_tubes_connect_to_new_tube
-tp_cli_channel_type_tubes_connect_to_stream_tube_new_connection
-tp_cli_channel_type_tubes_connect_to_tube_closed
-tp_cli_channel_type_tubes_connect_to_tube_state_changed
-tp_cli_channel_type_tubes_run_accept_d_bus_tube
-tp_cli_channel_type_tubes_run_accept_stream_tube
-tp_cli_channel_type_tubes_run_close_tube
-tp_cli_channel_type_tubes_run_get_available_stream_tube_types
-tp_cli_channel_type_tubes_run_get_available_tube_types
-tp_cli_channel_type_tubes_run_get_d_bus_names
-tp_cli_channel_type_tubes_run_get_d_bus_tube_address
-tp_cli_channel_type_tubes_run_get_stream_tube_socket_address
-tp_cli_channel_type_tubes_run_list_tubes
-tp_cli_channel_type_tubes_run_offer_d_bus_tube
-tp_cli_channel_type_tubes_run_offer_stream_tube
-tp_cli_connection_call_connect
-tp_cli_connection_call_disconnect
-tp_cli_connection_call_get_interfaces
-tp_cli_connection_call_get_protocol
-tp_cli_connection_call_get_self_handle
-tp_cli_connection_call_get_status
-tp_cli_connection_call_hold_handles
-tp_cli_connection_call_inspect_handles
-tp_cli_connection_call_list_channels
-tp_cli_connection_call_release_handles
-tp_cli_connection_call_request_channel
-tp_cli_connection_call_request_handles
-tp_cli_connection_connect_to_new_channel
-tp_cli_connection_connect_to_status_changed
-tp_cli_connection_interface_aliasing_call_get_alias_flags
-tp_cli_connection_interface_aliasing_call_request_aliases
-tp_cli_connection_interface_aliasing_call_set_aliases
-tp_cli_connection_interface_aliasing_connect_to_aliases_changed
-tp_cli_connection_interface_aliasing_run_get_alias_flags
-tp_cli_connection_interface_aliasing_run_request_aliases
-tp_cli_connection_interface_aliasing_run_set_aliases
-tp_cli_connection_interface_avatars_call_clear_avatar
-tp_cli_connection_interface_avatars_call_get_avatar_requirements
-tp_cli_connection_interface_avatars_call_get_avatar_tokens
-tp_cli_connection_interface_avatars_call_get_known_avatar_tokens
-tp_cli_connection_interface_avatars_call_request_avatar
-tp_cli_connection_interface_avatars_call_request_avatars
-tp_cli_connection_interface_avatars_call_set_avatar
-tp_cli_connection_interface_avatars_connect_to_avatar_retrieved
-tp_cli_connection_interface_avatars_connect_to_avatar_updated
-tp_cli_connection_interface_avatars_run_clear_avatar
-tp_cli_connection_interface_avatars_run_get_avatar_requirements
-tp_cli_connection_interface_avatars_run_get_avatar_tokens
-tp_cli_connection_interface_avatars_run_get_known_avatar_tokens
-tp_cli_connection_interface_avatars_run_request_avatar
-tp_cli_connection_interface_avatars_run_request_avatars
-tp_cli_connection_interface_avatars_run_set_avatar
-tp_cli_connection_interface_capabilities_call_advertise_capabilities
-tp_cli_connection_interface_capabilities_call_get_capabilities
-tp_cli_connection_interface_capabilities_connect_to_capabilities_changed
-tp_cli_connection_interface_capabilities_run_advertise_capabilities
-tp_cli_connection_interface_capabilities_run_get_capabilities
-tp_cli_connection_interface_presence_call_add_status
-tp_cli_connection_interface_presence_call_clear_status
-tp_cli_connection_interface_presence_call_get_presence
-tp_cli_connection_interface_presence_call_get_statuses
-tp_cli_connection_interface_presence_call_remove_status
-tp_cli_connection_interface_presence_call_request_presence
-tp_cli_connection_interface_presence_call_set_last_activity_time
-tp_cli_connection_interface_presence_call_set_status
-tp_cli_connection_interface_presence_connect_to_presence_update
-tp_cli_connection_interface_presence_run_add_status
-tp_cli_connection_interface_presence_run_clear_status
-tp_cli_connection_interface_presence_run_get_presence
-tp_cli_connection_interface_presence_run_get_statuses
-tp_cli_connection_interface_presence_run_remove_status
-tp_cli_connection_interface_presence_run_request_presence
-tp_cli_connection_interface_presence_run_set_last_activity_time
-tp_cli_connection_interface_presence_run_set_status
-tp_cli_connection_manager_call_get_parameters
-tp_cli_connection_manager_call_list_protocols
-tp_cli_connection_manager_call_request_connection
-tp_cli_connection_manager_connect_to_new_connection
-tp_cli_connection_manager_run_get_parameters
-tp_cli_connection_manager_run_list_protocols
-tp_cli_connection_manager_run_request_connection
-tp_cli_connection_run_connect
-tp_cli_connection_run_disconnect
-tp_cli_connection_run_get_interfaces
-tp_cli_connection_run_get_protocol
-tp_cli_connection_run_get_self_handle
-tp_cli_connection_run_get_status
-tp_cli_connection_run_hold_handles
-tp_cli_connection_run_inspect_handles
-tp_cli_connection_run_list_channels
-tp_cli_connection_run_release_handles
-tp_cli_connection_run_request_channel
-tp_cli_connection_run_request_handles
-tp_cli_dbus_daemon_call_add_match
-tp_cli_dbus_daemon_call_get_connection_se_linux_security_context
-tp_cli_dbus_daemon_call_get_connection_unix_process_id
-tp_cli_dbus_daemon_call_get_connection_unix_user
-tp_cli_dbus_daemon_call_get_id
-tp_cli_dbus_daemon_call_get_name_owner
-tp_cli_dbus_daemon_call_hello
-tp_cli_dbus_daemon_call_list_activatable_names
-tp_cli_dbus_daemon_call_list_names
-tp_cli_dbus_daemon_call_list_queued_owners
-tp_cli_dbus_daemon_call_name_has_owner
-tp_cli_dbus_daemon_call_release_name
-tp_cli_dbus_daemon_call_reload_config
-tp_cli_dbus_daemon_call_remove_match
-tp_cli_dbus_daemon_call_request_name
-tp_cli_dbus_daemon_call_start_service_by_name
-tp_cli_dbus_daemon_connect_to_name_acquired
-tp_cli_dbus_daemon_connect_to_name_lost
-tp_cli_dbus_daemon_connect_to_name_owner_changed
-tp_cli_dbus_daemon_run_add_match
-tp_cli_dbus_daemon_run_get_connection_se_linux_security_context
-tp_cli_dbus_daemon_run_get_connection_unix_process_id
-tp_cli_dbus_daemon_run_get_connection_unix_user
-tp_cli_dbus_daemon_run_get_id
-tp_cli_dbus_daemon_run_get_name_owner
-tp_cli_dbus_daemon_run_hello
-tp_cli_dbus_daemon_run_list_activatable_names
-tp_cli_dbus_daemon_run_list_names
-tp_cli_dbus_daemon_run_list_queued_owners
-tp_cli_dbus_daemon_run_name_has_owner
-tp_cli_dbus_daemon_run_release_name
-tp_cli_dbus_daemon_run_reload_config
-tp_cli_dbus_daemon_run_remove_match
-tp_cli_dbus_daemon_run_request_name
-tp_cli_dbus_daemon_run_start_service_by_name
-tp_cli_media_session_handler_call_error
-tp_cli_media_session_handler_call_ready
-tp_cli_media_session_handler_connect_to_new_stream_handler
-tp_cli_media_session_handler_run_error
-tp_cli_media_session_handler_run_ready
-tp_cli_media_stream_handler_call_codec_choice
-tp_cli_media_stream_handler_call_error
-tp_cli_media_stream_handler_call_native_candidates_prepared
-tp_cli_media_stream_handler_call_new_active_candidate_pair
-tp_cli_media_stream_handler_call_new_native_candidate
-tp_cli_media_stream_handler_call_ready
-tp_cli_media_stream_handler_call_set_local_codecs
-tp_cli_media_stream_handler_call_stream_state
-tp_cli_media_stream_handler_call_supported_codecs
-tp_cli_media_stream_handler_connect_to_add_remote_candidate
-tp_cli_media_stream_handler_connect_to_close
-tp_cli_media_stream_handler_connect_to_remove_remote_candidate
-tp_cli_media_stream_handler_connect_to_set_active_candidate_pair
-tp_cli_media_stream_handler_connect_to_set_remote_candidate_list
-tp_cli_media_stream_handler_connect_to_set_remote_codecs
-tp_cli_media_stream_handler_connect_to_set_stream_playing
-tp_cli_media_stream_handler_connect_to_set_stream_sending
-tp_cli_media_stream_handler_connect_to_start_telephony_event
-tp_cli_media_stream_handler_connect_to_stop_telephony_event
-tp_cli_media_stream_handler_run_codec_choice
-tp_cli_media_stream_handler_run_error
-tp_cli_media_stream_handler_run_native_candidates_prepared
-tp_cli_media_stream_handler_run_new_active_candidate_pair
-tp_cli_media_stream_handler_run_new_native_candidate
-tp_cli_media_stream_handler_run_ready
-tp_cli_media_stream_handler_run_set_local_codecs
-tp_cli_media_stream_handler_run_stream_state
-tp_cli_media_stream_handler_run_supported_codecs
-tp_cli_properties_interface_call_get_properties
-tp_cli_properties_interface_call_list_properties
-tp_cli_properties_interface_call_set_properties
-tp_cli_properties_interface_connect_to_properties_changed
-tp_cli_properties_interface_connect_to_property_flags_changed
-tp_cli_properties_interface_run_get_properties
-tp_cli_properties_interface_run_list_properties
-tp_cli_properties_interface_run_set_properties
-tp_connection_get_type
-tp_connection_manager_activate
-tp_connection_manager_check_valid_name
-tp_connection_manager_check_valid_protocol_name
-tp_connection_manager_get_type
-tp_connection_manager_new
-tp_connection_new
-tp_connection_run_until_ready
-tp_dbus_check_valid_bus_name
-tp_dbus_check_valid_interface_name
-tp_dbus_check_valid_member_name
-tp_dbus_check_valid_object_path
-tp_dbus_daemon_cancel_name_owner_watch
-tp_dbus_daemon_get_type
-tp_dbus_daemon_new
-tp_dbus_daemon_watch_name_owner
-tp_dbus_errors_quark
-tp_debug_divert_messages
-tp_debug_timestamped_log_handler
-tp_errors_disconnected_quark
-tp_errors_removed_from_group_quark
-tp_iface_quark_dbus_daemon
-tp_list_connection_managers
-tp_list_connection_names
-tp_media_session_handler_get_type
-tp_media_session_handler_new
-tp_media_stream_handler_get_type
-tp_media_stream_handler_new
-tp_proxy_add_interface_by_id
-tp_proxy_borrow_interface_by_id
-tp_proxy_get_type
-tp_proxy_has_interface_by_id
-tp_proxy_invalidate
-tp_proxy_or_subclass_hook_on_interface_add
-tp_proxy_pending_call_cancel
-tp_proxy_pending_call_v0_completed
-tp_proxy_pending_call_v0_new
-tp_proxy_pending_call_v0_take_pending_call
-tp_proxy_pending_call_v0_take_results
-tp_proxy_signal_connection_disconnect
-tp_proxy_signal_connection_v0_new
-tp_proxy_signal_connection_v0_take_results
-tp_proxy_subclass_add_error_mapping
diff --git a/telepathy-glib/versions/0.7.10.abi b/telepathy-glib/versions/0.7.10.abi
deleted file mode 100644
index 14c9f049e..000000000
--- a/telepathy-glib/versions/0.7.10.abi
+++ /dev/null
@@ -1,10 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.10
-Extends: TELEPATHY_GLIB_0.7.9
-Release: 0.7.10
-
-tp_external_group_mixin_get_dbus_property
-tp_external_group_mixin_init_dbus_properties
-tp_group_mixin_add_handle_owners
-tp_group_mixin_change_self_handle
-tp_group_mixin_get_dbus_property
-tp_group_mixin_init_dbus_properties
diff --git a/telepathy-glib/versions/0.7.12.abi b/telepathy-glib/versions/0.7.12.abi
deleted file mode 100644
index 171b46be2..000000000
--- a/telepathy-glib/versions/0.7.12.abi
+++ /dev/null
@@ -1,16 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.12
-Extends: TELEPATHY_GLIB_0.7.10
-Release: 0.7.12
-
-tp_channel_borrow_connection
-tp_channel_get_channel_type
-tp_channel_get_channel_type_id
-tp_channel_get_handle
-tp_channel_group_get_flags
-tp_channel_group_get_handle_owner
-tp_channel_group_get_local_pending
-tp_channel_group_get_local_pending_info
-tp_channel_group_get_members
-tp_channel_group_get_remote_pending
-tp_channel_group_get_self_handle
-tp_channel_is_ready
diff --git a/telepathy-glib/versions/0.7.13.abi b/telepathy-glib/versions/0.7.13.abi
deleted file mode 100644
index 863710c1b..000000000
--- a/telepathy-glib/versions/0.7.13.abi
+++ /dev/null
@@ -1,22 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.13
-Extends: TELEPATHY_GLIB_0.7.12
-Release: 0.7.13
-
-tp_cli_connection_interface_simple_presence_call_get_presences
-tp_cli_connection_interface_simple_presence_call_set_presence
-tp_cli_connection_interface_simple_presence_connect_to_presences_changed
-tp_cli_connection_interface_simple_presence_run_get_presences
-tp_cli_connection_interface_simple_presence_run_set_presence
-tp_dbus_properties_mixin_get
-tp_iface_quark_connection_interface_simple_presence
-tp_presence_mixin_simple_presence_iface_init
-tp_presence_mixin_simple_presence_init_dbus_properties
-tp_svc_connection_interface_simple_presence_emit_presences_changed
-tp_svc_connection_interface_simple_presence_get_type
-tp_svc_connection_interface_simple_presence_implement_get_presences
-tp_svc_connection_interface_simple_presence_implement_set_presence
-tp_text_mixin_has_pending_messages
-tp_type_dbus_hash_s_28ubb_29
-tp_type_dbus_hash_u_28uss_29
-tp_type_dbus_struct_ubb
-tp_type_dbus_struct_uss
diff --git a/telepathy-glib/versions/0.7.14.abi b/telepathy-glib/versions/0.7.14.abi
deleted file mode 100644
index 433da03d8..000000000
--- a/telepathy-glib/versions/0.7.14.abi
+++ /dev/null
@@ -1,24 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.14
-Extends: TELEPATHY_GLIB_0.7.13
-Release: 0.7.14
-
-tp_base_connection_register_with_contacts_mixin
-tp_cli_connection_interface_aliasing_call_get_aliases
-tp_cli_connection_interface_aliasing_run_get_aliases
-tp_cli_connection_interface_contacts_call_get_contact_attributes
-tp_cli_connection_interface_contacts_run_get_contact_attributes
-tp_connection_get_status
-tp_contacts_mixin_add_contact_attributes_iface
-tp_contacts_mixin_class_get_offset_quark
-tp_contacts_mixin_class_init
-tp_contacts_mixin_finalize
-tp_contacts_mixin_get_offset_quark
-tp_contacts_mixin_iface_init
-tp_contacts_mixin_init
-tp_contacts_mixin_set_contact_attribute
-tp_iface_quark_connection_interface_contacts
-tp_presence_mixin_simple_presence_register_with_contacts_mixin
-tp_svc_connection_interface_aliasing_implement_get_aliases
-tp_svc_connection_interface_contacts_get_type
-tp_svc_connection_interface_contacts_implement_get_contact_attributes
-tp_type_dbus_hash_ua_7bsv_7d
diff --git a/telepathy-glib/versions/0.7.15.abi b/telepathy-glib/versions/0.7.15.abi
deleted file mode 100644
index 402bc1ccd..000000000
--- a/telepathy-glib/versions/0.7.15.abi
+++ /dev/null
@@ -1,39 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.15
-Extends: TELEPATHY_GLIB_0.7.14
-Release: 0.7.15
-
-tp_base_connection_channel_manager_iter_init
-tp_base_connection_channel_manager_iter_next
-tp_base_connection_get_self_handle
-tp_base_connection_set_self_handle
-tp_channel_manager_asv_has_unknown_properties
-tp_channel_manager_create_channel
-tp_channel_manager_emit_channel_closed
-tp_channel_manager_emit_channel_closed_for_object
-tp_channel_manager_emit_new_channel
-tp_channel_manager_emit_new_channels
-tp_channel_manager_emit_request_already_satisfied
-tp_channel_manager_emit_request_failed
-tp_channel_manager_emit_request_failed_printf
-tp_channel_manager_foreach_channel
-tp_channel_manager_foreach_channel_class
-tp_channel_manager_get_type
-tp_channel_manager_request_channel
-tp_cli_connection_connect_to_self_handle_changed
-tp_cli_connection_interface_requests_call_create_channel
-tp_cli_connection_interface_requests_connect_to_channel_closed
-tp_cli_connection_interface_requests_connect_to_new_channels
-tp_cli_connection_interface_requests_run_create_channel
-tp_dbus_properties_mixin_make_properties_hash
-tp_exportable_channel_get_type
-tp_iface_quark_connection_interface_requests
-tp_strv_contains
-tp_svc_connection_emit_self_handle_changed
-tp_svc_connection_interface_requests_emit_channel_closed
-tp_svc_connection_interface_requests_emit_new_channels
-tp_svc_connection_interface_requests_get_type
-tp_svc_connection_interface_requests_implement_create_channel
-tp_type_dbus_array_a_7bsv_7das
-tp_type_dbus_array_oa_7bsv_7d
-tp_type_dbus_struct_a_7bsv_7das
-tp_type_dbus_struct_oa_7bsv_7d
diff --git a/telepathy-glib/versions/0.7.16.abi b/telepathy-glib/versions/0.7.16.abi
deleted file mode 100644
index 7d2ec51de..000000000
--- a/telepathy-glib/versions/0.7.16.abi
+++ /dev/null
@@ -1,9 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.16
-Extends: TELEPATHY_GLIB_0.7.15
-Release: 0.7.16
-
-tp_channel_manager_ensure_channel
-tp_cli_connection_interface_requests_call_ensure_channel
-tp_cli_connection_interface_requests_run_ensure_channel
-tp_connection_presence_type_cmp_availability
-tp_svc_connection_interface_requests_implement_ensure_channel
diff --git a/telepathy-glib/versions/0.7.17.abi b/telepathy-glib/versions/0.7.17.abi
deleted file mode 100644
index 2a89858e1..000000000
--- a/telepathy-glib/versions/0.7.17.abi
+++ /dev/null
@@ -1,13 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.17
-Extends: TELEPATHY_GLIB_0.7.16
-Release: 0.7.17
-
-tp_connection_hold_handles
-tp_connection_is_ready
-tp_connection_request_handles
-tp_connection_unref_handles
-tp_proxy_get_bus_name
-tp_proxy_get_dbus_connection
-tp_proxy_get_dbus_daemon
-tp_proxy_get_invalidated
-tp_proxy_get_object_path
diff --git a/telepathy-glib/versions/0.7.18.abi b/telepathy-glib/versions/0.7.18.abi
deleted file mode 100644
index adff118bb..000000000
--- a/telepathy-glib/versions/0.7.18.abi
+++ /dev/null
@@ -1,24 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.18
-Extends: TELEPATHY_GLIB_0.7.17
-Release: 0.7.18
-
-tp_cli_channel_interface_destroyable_call_destroy
-tp_cli_channel_interface_destroyable_run_destroy
-tp_connection_get_contacts_by_handle
-tp_connection_get_contacts_by_id
-tp_connection_upgrade_contacts
-tp_contact_get_alias
-tp_contact_get_avatar_token
-tp_contact_get_connection
-tp_contact_get_handle
-tp_contact_get_identifier
-tp_contact_get_presence_message
-tp_contact_get_presence_status
-tp_contact_get_presence_type
-tp_contact_get_type
-tp_contact_has_feature
-tp_iface_quark_channel_interface_destroyable
-tp_svc_channel_interface_destroyable_get_type
-tp_svc_channel_interface_destroyable_implement_destroy
-tp_text_mixin_receive_with_flags
-tp_text_mixin_set_rescued
diff --git a/telepathy-glib/versions/0.7.19.abi b/telepathy-glib/versions/0.7.19.abi
deleted file mode 100644
index 6060608fc..000000000
--- a/telepathy-glib/versions/0.7.19.abi
+++ /dev/null
@@ -1,9 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.19
-Extends: TELEPATHY_GLIB_0.7.18
-Release: 0.7.19
-
-tp_channel_borrow_immutable_properties
-tp_channel_new_from_properties
-tp_connection_get_contact_attributes
-tp_mixin_class_get_offset
-tp_mixin_instance_get_offset
diff --git a/telepathy-glib/versions/0.7.2.abi b/telepathy-glib/versions/0.7.2.abi
deleted file mode 100644
index 6b5593238..000000000
--- a/telepathy-glib/versions/0.7.2.abi
+++ /dev/null
@@ -1,25 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.2
-Extends: TELEPATHY_GLIB_0.7.1
-Release: 0.7.2
-
-tp_cli_dbus_introspectable_call_introspect
-tp_cli_dbus_introspectable_run_introspect
-tp_cli_dbus_peer_call_get_machine_id
-tp_cli_dbus_peer_call_ping
-tp_cli_dbus_peer_run_get_machine_id
-tp_cli_dbus_peer_run_ping
-tp_cli_dbus_properties_call_get
-tp_cli_dbus_properties_call_get_all
-tp_cli_dbus_properties_call_set
-tp_cli_dbus_properties_run_get
-tp_cli_dbus_properties_run_get_all
-tp_cli_dbus_properties_run_set
-tp_iface_quark_dbus_introspectable
-tp_iface_quark_dbus_peer
-tp_iface_quark_dbus_properties
-tp_svc_dbus_introspectable_get_type
-tp_svc_dbus_introspectable_implement_introspect
-tp_svc_dbus_properties_get_type
-tp_svc_dbus_properties_implement_get
-tp_svc_dbus_properties_implement_get_all
-tp_svc_dbus_properties_implement_set
diff --git a/telepathy-glib/versions/0.7.20.abi b/telepathy-glib/versions/0.7.20.abi
deleted file mode 100644
index 3b0860c53..000000000
--- a/telepathy-glib/versions/0.7.20.abi
+++ /dev/null
@@ -1,20 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.20
-Extends: TELEPATHY_GLIB_0.7.19
-Release: 0.7.20
-
-tp_cli_channel_interface_group_connect_to_members_changed_detailed
-tp_cli_channel_interface_messages_call_get_pending_message_content
-tp_cli_channel_interface_messages_call_send_message
-tp_cli_channel_interface_messages_connect_to_message_received
-tp_cli_channel_interface_messages_connect_to_message_sent
-tp_cli_channel_interface_messages_connect_to_pending_messages_removed
-tp_cli_channel_interface_messages_run_get_pending_message_content
-tp_cli_channel_interface_messages_run_send_message
-tp_iface_quark_channel_interface_messages
-tp_svc_channel_interface_group_emit_members_changed_detailed
-tp_svc_channel_interface_messages_emit_message_received
-tp_svc_channel_interface_messages_emit_message_sent
-tp_svc_channel_interface_messages_emit_pending_messages_removed
-tp_svc_channel_interface_messages_get_type
-tp_svc_channel_interface_messages_implement_get_pending_message_content
-tp_svc_channel_interface_messages_implement_send_message
diff --git a/telepathy-glib/versions/0.7.21.abi b/telepathy-glib/versions/0.7.21.abi
deleted file mode 100644
index ab5ac465d..000000000
--- a/telepathy-glib/versions/0.7.21.abi
+++ /dev/null
@@ -1,38 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.21
-Extends: TELEPATHY_GLIB_0.7.20
-Release: 0.7.21
-
-tp_type_dbus_hash_uv
-tp_group_mixin_change_members_detailed
-tp_message_append_part
-tp_message_count_parts
-tp_message_delete_key
-tp_message_delete_part
-tp_message_destroy
-tp_message_new
-tp_message_peek
-tp_message_ref_handle
-tp_message_set
-tp_message_set_boolean
-tp_message_set_bytes
-tp_message_set_handle
-tp_message_set_int32
-tp_message_set_int64
-tp_message_set_string
-tp_message_set_string_printf
-tp_message_set_uint32
-tp_message_set_uint64
-tp_message_take_message
-tp_message_mixin_finalize
-tp_message_mixin_implement_sending
-tp_message_mixin_init
-tp_message_mixin_init_dbus_properties
-tp_message_mixin_messages_iface_init
-tp_message_mixin_get_dbus_property
-tp_message_mixin_sent
-tp_message_mixin_set_rescued
-tp_message_mixin_take_received
-tp_message_mixin_has_pending_messages
-tp_message_mixin_clear
-tp_message_mixin_text_iface_init
-tp_channel_get_identifier
diff --git a/telepathy-glib/versions/0.7.23.abi b/telepathy-glib/versions/0.7.23.abi
deleted file mode 100644
index f356959a0..000000000
--- a/telepathy-glib/versions/0.7.23.abi
+++ /dev/null
@@ -1,21 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.23
-Extends: TELEPATHY_GLIB_0.7.21
-Release: 0.7.23
-
-tp_cli_channel_type_file_transfer_call_accept_file
-tp_cli_channel_type_file_transfer_call_provide_file
-tp_cli_channel_type_file_transfer_connect_to_file_transfer_state_changed
-tp_cli_channel_type_file_transfer_connect_to_initial_offset_defined
-tp_cli_channel_type_file_transfer_connect_to_transferred_bytes_changed
-tp_cli_channel_type_file_transfer_run_accept_file
-tp_cli_channel_type_file_transfer_run_provide_file
-tp_cli_media_stream_handler_call_codecs_updated
-tp_cli_media_stream_handler_run_codecs_updated
-tp_iface_quark_channel_type_file_transfer
-tp_svc_channel_type_file_transfer_emit_file_transfer_state_changed
-tp_svc_channel_type_file_transfer_emit_initial_offset_defined
-tp_svc_channel_type_file_transfer_emit_transferred_bytes_changed
-tp_svc_channel_type_file_transfer_get_type
-tp_svc_channel_type_file_transfer_implement_accept_file
-tp_svc_channel_type_file_transfer_implement_provide_file
-tp_svc_media_stream_handler_implement_codecs_updated
diff --git a/telepathy-glib/versions/0.7.24.abi b/telepathy-glib/versions/0.7.24.abi
deleted file mode 100644
index 5b0196363..000000000
--- a/telepathy-glib/versions/0.7.24.abi
+++ /dev/null
@@ -1,8 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.24
-Extends: TELEPATHY_GLIB_0.7.23
-Release: 0.7.24
-
-tp_base_connection_disconnect_with_dbus_error
-tp_cli_connection_connect_to_connection_error
-tp_proxy_dbus_error_to_gerror
-tp_svc_connection_emit_connection_error
diff --git a/telepathy-glib/versions/0.7.26.abi b/telepathy-glib/versions/0.7.26.abi
deleted file mode 100644
index 3ed7ff6f9..000000000
--- a/telepathy-glib/versions/0.7.26.abi
+++ /dev/null
@@ -1,27 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.26
-Extends: TELEPATHY_GLIB_0.7.24
-Release: 0.7.26
-
-tp_connection_get_self_handle
-tp_connection_manager_call_when_ready
-tp_connection_manager_dup_protocol_names
-tp_connection_manager_get_info_source
-tp_connection_manager_get_name
-tp_connection_manager_get_protocol
-tp_connection_manager_has_protocol
-tp_connection_manager_is_ready
-tp_connection_manager_is_running
-tp_connection_manager_param_get_dbus_signature
-tp_connection_manager_param_get_default
-tp_connection_manager_param_get_name
-tp_connection_manager_param_is_dbus_property
-tp_connection_manager_param_is_required
-tp_connection_manager_param_is_required_for_registration
-tp_connection_manager_param_is_secret
-tp_connection_manager_protocol_can_register
-tp_connection_manager_protocol_dup_param_names
-tp_connection_manager_protocol_get_param
-tp_connection_manager_protocol_has_param
-tp_dbus_daemon_dup
-tp_intset_new_containing
-tp_type_dbus_array_of_a_7bsv_7d
diff --git a/telepathy-glib/versions/0.7.27.abi b/telepathy-glib/versions/0.7.27.abi
deleted file mode 100644
index b0a2ce133..000000000
--- a/telepathy-glib/versions/0.7.27.abi
+++ /dev/null
@@ -1,23 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.27
-Extends: TELEPATHY_GLIB_0.7.26
-Release: 0.7.27
-
-tp_connection_parse_object_path
-tp_group_mixin_class_allow_self_removal
-tp_g_value_slice_new_boolean
-tp_g_value_slice_new_boxed
-tp_g_value_slice_new_bytes
-tp_g_value_slice_new_double
-tp_g_value_slice_new_int
-tp_g_value_slice_new_int64
-tp_g_value_slice_new_object_path
-tp_g_value_slice_new_static_boxed
-tp_g_value_slice_new_static_object_path
-tp_g_value_slice_new_static_string
-tp_g_value_slice_new_string
-tp_g_value_slice_new_take_boxed
-tp_g_value_slice_new_take_bytes
-tp_g_value_slice_new_take_object_path
-tp_g_value_slice_new_take_string
-tp_g_value_slice_new_uint
-tp_g_value_slice_new_uint64
diff --git a/telepathy-glib/versions/0.7.28.abi b/telepathy-glib/versions/0.7.28.abi
deleted file mode 100644
index f989f2cea..000000000
--- a/telepathy-glib/versions/0.7.28.abi
+++ /dev/null
@@ -1,6 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.28
-Extends: TELEPATHY_GLIB_0.7.27
-Release: 0.7.28
-
-tp_type_dbus_array_of_a_7bss_7d
-tp_type_dbus_array_sq
diff --git a/telepathy-glib/versions/0.7.29.abi b/telepathy-glib/versions/0.7.29.abi
deleted file mode 100644
index af96b7d00..000000000
--- a/telepathy-glib/versions/0.7.29.abi
+++ /dev/null
@@ -1,24 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.29
-Extends: TELEPATHY_GLIB_0.7.28
-Release: 0.7.29
-
-tp_asv_dump
-tp_asv_new
-tp_asv_set_boolean
-tp_asv_set_boxed
-tp_asv_set_bytes
-tp_asv_set_double
-tp_asv_set_int32
-tp_asv_set_int64
-tp_asv_set_object_path
-tp_asv_set_static_boxed
-tp_asv_set_static_object_path
-tp_asv_set_static_string
-tp_asv_set_string
-tp_asv_set_strv
-tp_asv_set_uint32
-tp_asv_set_uint64
-tp_asv_take_boxed
-tp_asv_take_bytes
-tp_asv_take_object_path
-tp_asv_take_string
diff --git a/telepathy-glib/versions/0.7.3.abi b/telepathy-glib/versions/0.7.3.abi
deleted file mode 100644
index 339b723c7..000000000
--- a/telepathy-glib/versions/0.7.3.abi
+++ /dev/null
@@ -1,9 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.3
-Extends: TELEPATHY_GLIB_0.7.2
-Release: 0.7.3
-
-tp_dbus_properties_mixin_class_init
-tp_dbus_properties_mixin_getter_gobject_properties
-tp_dbus_properties_mixin_iface_init
-tp_dbus_properties_mixin_setter_gobject_properties
-tp_svc_interface_set_dbus_properties_info
diff --git a/telepathy-glib/versions/0.7.30.abi b/telepathy-glib/versions/0.7.30.abi
deleted file mode 100644
index 76423b2a0..000000000
--- a/telepathy-glib/versions/0.7.30.abi
+++ /dev/null
@@ -1,6 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.30
-Extends: TELEPATHY_GLIB_0.7.29
-Release: 0.7.30
-
-tp_dbus_daemon_release_name
-tp_dbus_daemon_request_name
diff --git a/telepathy-glib/versions/0.7.31.abi b/telepathy-glib/versions/0.7.31.abi
deleted file mode 100644
index ed1e4d524..000000000
--- a/telepathy-glib/versions/0.7.31.abi
+++ /dev/null
@@ -1,35 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.31
-Extends: TELEPATHY_GLIB_0.7.30
-Release: 0.7.31
-
-tp_cli_channel_interface_tube_connect_to_tube_channel_state_changed
-tp_cli_channel_type_dbus_tube_call_accept
-tp_cli_channel_type_dbus_tube_call_offer
-tp_cli_channel_type_dbus_tube_connect_to_dbus_names_changed
-tp_cli_channel_type_dbus_tube_run_accept
-tp_cli_channel_type_dbus_tube_run_offer
-tp_cli_channel_type_stream_tube_call_accept
-tp_cli_channel_type_stream_tube_call_offer
-tp_cli_channel_type_stream_tube_connect_to_connection_closed
-tp_cli_channel_type_stream_tube_connect_to_new_local_connection
-tp_cli_channel_type_stream_tube_connect_to_new_remote_connection
-tp_cli_channel_type_stream_tube_run_accept
-tp_cli_channel_type_stream_tube_run_offer
-tp_error_get_dbus_name
-tp_g_key_file_get_int64
-tp_g_key_file_get_uint64
-tp_iface_quark_channel_interface_tube
-tp_iface_quark_channel_type_dbus_tube
-tp_iface_quark_channel_type_stream_tube
-tp_svc_channel_interface_tube_emit_tube_channel_state_changed
-tp_svc_channel_interface_tube_get_type
-tp_svc_channel_type_dbus_tube_emit_dbus_names_changed
-tp_svc_channel_type_dbus_tube_get_type
-tp_svc_channel_type_dbus_tube_implement_accept
-tp_svc_channel_type_dbus_tube_implement_offer
-tp_svc_channel_type_stream_tube_emit_connection_closed
-tp_svc_channel_type_stream_tube_emit_new_local_connection
-tp_svc_channel_type_stream_tube_emit_new_remote_connection
-tp_svc_channel_type_stream_tube_get_type
-tp_svc_channel_type_stream_tube_implement_accept
-tp_svc_channel_type_stream_tube_implement_offer
diff --git a/telepathy-glib/versions/0.7.32.abi b/telepathy-glib/versions/0.7.32.abi
deleted file mode 100644
index 5ac4bc88b..000000000
--- a/telepathy-glib/versions/0.7.32.abi
+++ /dev/null
@@ -1,102 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.32
-Extends: TELEPATHY_GLIB_0.7.31
-Release: 0.7.32
-
-tp_account_get_type
-tp_account_init_known_interfaces
-tp_account_manager_get_type
-tp_account_manager_init_known_interfaces
-tp_account_manager_new
-tp_account_new
-tp_channel_dispatch_operation_get_type
-tp_channel_dispatch_operation_init_known_interfaces
-tp_channel_dispatch_operation_new
-tp_channel_dispatcher_get_type
-tp_channel_dispatcher_init_known_interfaces
-tp_channel_dispatcher_new
-tp_channel_request_get_type
-tp_channel_request_init_known_interfaces
-tp_channel_request_new
-tp_cli_account_call_reconnect
-tp_cli_account_call_remove
-tp_cli_account_call_update_parameters
-tp_cli_account_connect_to_account_property_changed
-tp_cli_account_connect_to_removed
-tp_cli_account_interface_avatar_connect_to_avatar_changed
-tp_cli_account_manager_call_create_account
-tp_cli_account_manager_connect_to_account_removed
-tp_cli_account_manager_connect_to_account_validity_changed
-tp_cli_channel_dispatch_operation_call_claim
-tp_cli_channel_dispatch_operation_call_handle_with
-tp_cli_channel_dispatch_operation_connect_to_channel_lost
-tp_cli_channel_dispatch_operation_connect_to_finished
-tp_cli_channel_dispatcher_call_create_channel
-tp_cli_channel_dispatcher_call_ensure_channel
-tp_cli_channel_dispatcher_interface_operation_list_connect_to_dispatch_operation_finished
-tp_cli_channel_dispatcher_interface_operation_list_connect_to_new_dispatch_operation
-tp_cli_channel_request_call_cancel
-tp_cli_channel_request_call_proceed
-tp_cli_channel_request_connect_to_failed
-tp_cli_channel_request_connect_to_succeeded
-tp_cli_client_approver_call_add_dispatch_operation
-tp_cli_client_handler_call_handle_channels
-tp_cli_client_interface_requests_call_add_request
-tp_cli_client_interface_requests_call_remove_request
-tp_cli_client_observer_call_observe_channels
-tp_client_get_type
-tp_client_init_known_interfaces
-tp_connection_manager_init_known_interfaces
-tp_dbus_daemon_init_known_interfaces
-tp_iface_quark_account
-tp_iface_quark_account_interface_avatar
-tp_iface_quark_account_manager
-tp_iface_quark_channel_dispatch_operation
-tp_iface_quark_channel_dispatcher
-tp_iface_quark_channel_dispatcher_interface_operation_list
-tp_iface_quark_channel_request
-tp_iface_quark_client
-tp_iface_quark_client_approver
-tp_iface_quark_client_handler
-tp_iface_quark_client_interface_requests
-tp_iface_quark_client_observer
-tp_media_session_handler_init_known_interfaces
-tp_media_stream_handler_init_known_interfaces
-tp_svc_account_emit_account_property_changed
-tp_svc_account_emit_removed
-tp_svc_account_get_type
-tp_svc_account_implement_reconnect
-tp_svc_account_implement_remove
-tp_svc_account_implement_update_parameters
-tp_svc_account_interface_avatar_emit_avatar_changed
-tp_svc_account_interface_avatar_get_type
-tp_svc_account_manager_emit_account_removed
-tp_svc_account_manager_emit_account_validity_changed
-tp_svc_account_manager_get_type
-tp_svc_account_manager_implement_create_account
-tp_svc_channel_dispatch_operation_emit_channel_lost
-tp_svc_channel_dispatch_operation_emit_finished
-tp_svc_channel_dispatch_operation_get_type
-tp_svc_channel_dispatch_operation_implement_claim
-tp_svc_channel_dispatch_operation_implement_handle_with
-tp_svc_channel_dispatcher_get_type
-tp_svc_channel_dispatcher_implement_create_channel
-tp_svc_channel_dispatcher_implement_ensure_channel
-tp_svc_channel_dispatcher_interface_operation_list_emit_dispatch_operation_finished
-tp_svc_channel_dispatcher_interface_operation_list_emit_new_dispatch_operation
-tp_svc_channel_dispatcher_interface_operation_list_get_type
-tp_svc_channel_request_emit_failed
-tp_svc_channel_request_emit_succeeded
-tp_svc_channel_request_get_type
-tp_svc_channel_request_implement_cancel
-tp_svc_channel_request_implement_proceed
-tp_svc_client_approver_get_type
-tp_svc_client_approver_implement_add_dispatch_operation
-tp_svc_client_get_type
-tp_svc_client_handler_get_type
-tp_svc_client_handler_implement_handle_channels
-tp_svc_client_interface_requests_get_type
-tp_svc_client_interface_requests_implement_add_request
-tp_svc_client_interface_requests_implement_remove_request
-tp_svc_client_observer_get_type
-tp_svc_client_observer_implement_observe_channels
-tp_type_dbus_struct_ays
diff --git a/telepathy-glib/versions/0.7.34.abi b/telepathy-glib/versions/0.7.34.abi
deleted file mode 100644
index 195b25c4c..000000000
--- a/telepathy-glib/versions/0.7.34.abi
+++ /dev/null
@@ -1,18 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.34
-Extends: TELEPATHY_GLIB_0.7.32
-Release: 0.7.34
-
-tp_cli_connection_interface_location_call_get_locations
-tp_cli_connection_interface_location_call_request_location
-tp_cli_connection_interface_location_call_set_location
-tp_cli_connection_interface_location_connect_to_location_updated
-tp_cli_connection_interface_location_run_get_locations
-tp_cli_connection_interface_location_run_request_location
-tp_cli_connection_interface_location_run_set_location
-tp_iface_quark_connection_interface_location
-tp_svc_connection_interface_location_emit_location_updated
-tp_svc_connection_interface_location_get_type
-tp_svc_connection_interface_location_implement_get_locations
-tp_svc_connection_interface_location_implement_request_location
-tp_svc_connection_interface_location_implement_set_location
-tp_type_dbus_array_of_o
diff --git a/telepathy-glib/versions/0.7.35.abi b/telepathy-glib/versions/0.7.35.abi
deleted file mode 100644
index 86c3b76d4..000000000
--- a/telepathy-glib/versions/0.7.35.abi
+++ /dev/null
@@ -1,7 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.35
-Extends: TELEPATHY_GLIB_0.7.34
-Release: 0.7.35
-
-tp_dbus_daemon_get_unique_name
-tp_dbus_daemon_list_activatable_names
-tp_dbus_daemon_list_names
diff --git a/telepathy-glib/versions/0.7.36.abi b/telepathy-glib/versions/0.7.36.abi
deleted file mode 100644
index 8c474da69..000000000
--- a/telepathy-glib/versions/0.7.36.abi
+++ /dev/null
@@ -1,14 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.36
-Extends: TELEPATHY_GLIB_0.7.35
-Release: 0.7.36
-
-tp_debug_sender_add_message
-tp_debug_sender_dup
-tp_debug_sender_get_type
-tp_debug_sender_log_handler
-tp_iface_quark_debug
-tp_svc_debug_emit_new_debug_message
-tp_svc_debug_get_type
-tp_svc_debug_implement_get_messages
-tp_type_dbus_array_dsus
-tp_type_dbus_struct_dsus
diff --git a/telepathy-glib/versions/0.7.37.abi b/telepathy-glib/versions/0.7.37.abi
deleted file mode 100644
index 8e6df8db8..000000000
--- a/telepathy-glib/versions/0.7.37.abi
+++ /dev/null
@@ -1,18 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.37
-Extends: TELEPATHY_GLIB_0.7.36
-Release: 0.7.37
-
-tp_cli_connection_interface_contact_capabilities_call_get_contact_capabilities
-tp_cli_connection_interface_contact_capabilities_call_update_capabilities
-tp_cli_connection_interface_contact_capabilities_connect_to_contact_capabilities_changed
-tp_cli_connection_interface_contact_capabilities_run_get_contact_capabilities
-tp_cli_connection_interface_contact_capabilities_run_update_capabilities
-tp_iface_quark_connection_interface_contact_capabilities
-tp_svc_connection_interface_contact_capabilities_emit_contact_capabilities_changed
-tp_svc_connection_interface_contact_capabilities_get_type
-tp_svc_connection_interface_contact_capabilities_implement_get_contact_capabilities
-tp_svc_connection_interface_contact_capabilities_implement_update_capabilities
-tp_type_dbus_array_of_a_7bua_28a_7bsv_7das_29_7d
-tp_type_dbus_array_saa_7bsv_7das
-tp_type_dbus_hash_ua_28a_7bsv_7das_29
-tp_type_dbus_struct_saa_7bsv_7das
diff --git a/telepathy-glib/versions/0.7.5.abi b/telepathy-glib/versions/0.7.5.abi
deleted file mode 100644
index e84cfd54c..000000000
--- a/telepathy-glib/versions/0.7.5.abi
+++ /dev/null
@@ -1,6 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.5
-Extends: TELEPATHY_GLIB_0.7.3
-Release: 0.7.5
-
-tp_type_dbus_array_os
-tp_type_dbus_struct_os
diff --git a/telepathy-glib/versions/0.7.6.abi b/telepathy-glib/versions/0.7.6.abi
deleted file mode 100644
index 05e79d326..000000000
--- a/telepathy-glib/versions/0.7.6.abi
+++ /dev/null
@@ -1,24 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.6
-Extends: TELEPATHY_GLIB_0.7.5
-Release: 0.7.6
-
-tp_channel_init_known_interfaces
-tp_cli_channel_interface_call_state_call_get_call_states
-tp_cli_channel_interface_call_state_connect_to_call_state_changed
-tp_cli_channel_interface_call_state_run_get_call_states
-tp_cli_media_stream_handler_call_hold_state
-tp_cli_media_stream_handler_call_unhold_failure
-tp_cli_media_stream_handler_connect_to_set_stream_held
-tp_cli_media_stream_handler_run_hold_state
-tp_cli_media_stream_handler_run_unhold_failure
-tp_connection_init_known_interfaces
-tp_iface_quark_channel_interface_call_state
-tp_proxy_dbus_g_proxy_claim_for_signal_adding
-tp_proxy_init_known_interfaces
-tp_svc_channel_interface_call_state_implement_get_call_states
-tp_svc_channel_interface_call_state_emit_call_state_changed
-tp_svc_channel_interface_call_state_get_type
-tp_svc_media_stream_handler_emit_set_stream_held
-tp_svc_media_stream_handler_implement_hold_state
-tp_svc_media_stream_handler_implement_unhold_failure
-tp_type_dbus_hash_uu
diff --git a/telepathy-glib/versions/0.7.7.abi b/telepathy-glib/versions/0.7.7.abi
deleted file mode 100644
index e48bafa6f..000000000
--- a/telepathy-glib/versions/0.7.7.abi
+++ /dev/null
@@ -1,6 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.7
-Extends: TELEPATHY_GLIB_0.7.6
-Release: 0.7.7
-
-tp_channel_call_when_ready
-tp_connection_call_when_ready
diff --git a/telepathy-glib/versions/0.7.8.abi b/telepathy-glib/versions/0.7.8.abi
deleted file mode 100644
index 012fe1578..000000000
--- a/telepathy-glib/versions/0.7.8.abi
+++ /dev/null
@@ -1,14 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.8
-Extends: TELEPATHY_GLIB_0.7.7
-Release: 0.7.8
-
-tp_cli_channel_interface_hold_call_get_hold_state
-tp_cli_channel_interface_hold_call_request_hold
-tp_cli_channel_interface_hold_connect_to_hold_state_changed
-tp_cli_channel_interface_hold_run_get_hold_state
-tp_cli_channel_interface_hold_run_request_hold
-tp_iface_quark_channel_interface_hold
-tp_svc_channel_interface_hold_emit_hold_state_changed
-tp_svc_channel_interface_hold_get_type
-tp_svc_channel_interface_hold_implement_get_hold_state
-tp_svc_channel_interface_hold_implement_request_hold
diff --git a/telepathy-glib/versions/0.7.9.abi b/telepathy-glib/versions/0.7.9.abi
deleted file mode 100644
index 9e73e6f47..000000000
--- a/telepathy-glib/versions/0.7.9.abi
+++ /dev/null
@@ -1,21 +0,0 @@
-Version: TELEPATHY_GLIB_0.7.9
-Extends: TELEPATHY_GLIB_0.7.8
-Release: 0.7.9
-
-tp_asv_get_boolean
-tp_asv_get_boxed
-tp_asv_get_bytes
-tp_asv_get_double
-tp_asv_get_int32
-tp_asv_get_int64
-tp_asv_get_object_path
-tp_asv_get_string
-tp_asv_get_strv
-tp_asv_get_uint32
-tp_asv_get_uint64
-tp_asv_lookup
-tp_cli_channel_interface_group_connect_to_handle_owners_changed
-tp_cli_channel_interface_group_connect_to_self_handle_changed
-tp_dbus_properties_mixin_implement_interface
-tp_svc_channel_interface_group_emit_handle_owners_changed
-tp_svc_channel_interface_group_emit_self_handle_changed
diff --git a/telepathy-glib/versions/0.9.0.abi b/telepathy-glib/versions/0.9.0.abi
deleted file mode 100644
index 2be1ed781..000000000
--- a/telepathy-glib/versions/0.9.0.abi
+++ /dev/null
@@ -1,56 +0,0 @@
-Version: TELEPATHY_GLIB_0.9.0
-Extends: TELEPATHY_GLIB_0.7.37
-Release: 0.9.0
-
-tp_account_ensure_connection
-tp_account_get_avatar_async
-tp_account_get_avatar_finish
-tp_account_get_connect_automatically
-tp_account_get_connection
-tp_account_get_connection_manager
-tp_account_get_connection_status
-tp_account_get_current_presence
-tp_account_get_display_name
-tp_account_get_feature_quark_core
-tp_account_get_has_been_online
-tp_account_get_icon_name
-tp_account_get_nickname
-tp_account_get_parameters
-tp_account_get_protocol
-tp_account_get_requested_presence
-tp_account_is_enabled
-tp_account_is_prepared
-tp_account_is_valid
-tp_account_manager_create_account_async
-tp_account_manager_create_account_finish
-tp_account_manager_dup
-tp_account_manager_enable_restart
-tp_account_manager_ensure_account
-tp_account_manager_get_feature_quark_core
-tp_account_manager_get_most_available_presence
-tp_account_manager_get_valid_accounts
-tp_account_manager_is_prepared
-tp_account_manager_prepare_async
-tp_account_manager_prepare_finish
-tp_account_manager_set_all_requested_presences
-tp_account_parse_object_path
-tp_account_prepare_async
-tp_account_prepare_finish
-tp_account_reconnect_async
-tp_account_reconnect_finish
-tp_account_remove_async
-tp_account_remove_finish
-tp_account_request_presence_async
-tp_account_request_presence_finish
-tp_account_set_connect_automatically_async
-tp_account_set_connect_automatically_finish
-tp_account_set_display_name_async
-tp_account_set_display_name_finish
-tp_account_set_enabled_async
-tp_account_set_enabled_finish
-tp_account_set_icon_name_async
-tp_account_set_icon_name_finish
-tp_account_set_nickname_async
-tp_account_set_nickname_finish
-tp_account_update_parameters_async
-tp_account_update_parameters_finish
diff --git a/telepathy-glib/versions/0.9.2.abi b/telepathy-glib/versions/0.9.2.abi
deleted file mode 100644
index 662f87531..000000000
--- a/telepathy-glib/versions/0.9.2.abi
+++ /dev/null
@@ -1,6 +0,0 @@
-Version: TELEPATHY_GLIB_0.9.2
-Extends: TELEPATHY_GLIB_0.9.0
-Release: 0.9.2
-
-tp_g_signal_connect_object
-tp_value_array_build
diff --git a/telepathy-glib/versions/core-1.0.0.abi b/telepathy-glib/versions/core-1.0.0.abi
new file mode 100644
index 000000000..60a381f8b
--- /dev/null
+++ b/telepathy-glib/versions/core-1.0.0.abi
@@ -0,0 +1,6 @@
+Version: TELEPATHY_GLIB_CORE_1.0.0
+Extends: -
+Release: 1.0.0
+
+# just to have something in this file
+tp_error_quark
diff --git a/telepathy-glib/versions/dbus-1.0.0.abi b/telepathy-glib/versions/dbus-1.0.0.abi
new file mode 100644
index 000000000..b1ce61aae
--- /dev/null
+++ b/telepathy-glib/versions/dbus-1.0.0.abi
@@ -0,0 +1,6 @@
+Version: TELEPATHY_GLIB_DBUS_1.0.0
+Extends: -
+Release: 1.0.0
+
+# just to have something in this file
+tp_iface_quark_connection_manager
diff --git a/telepathy-glib/versions/main-1.0.0.abi b/telepathy-glib/versions/main-1.0.0.abi
new file mode 100644
index 000000000..daef34725
--- /dev/null
+++ b/telepathy-glib/versions/main-1.0.0.abi
@@ -0,0 +1,6 @@
+Version: TELEPATHY_GLIB_1.0.0
+Extends: -
+Release: 1.0.0
+
+# just to have something in this file
+tp_account_get_type
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0be106911..15339f9a4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -77,7 +77,9 @@ test_capabilities_SOURCES = \
capabilities.c
test_capabilities_LDADD = \
$(top_builddir)/tests/lib/libtp-glib-tests-internal.la \
- $(top_builddir)/telepathy-glib/libtelepathy-glib-internal.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-main-internal.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
$(GLIB_LIBS)
# this one uses internal ABI
@@ -85,7 +87,9 @@ test_contact_search_result_SOURCES = \
contact-search-result.c
test_contact_search_result_LDADD = \
$(top_builddir)/tests/lib/libtp-glib-tests-internal.la \
- $(top_builddir)/telepathy-glib/libtelepathy-glib-internal.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-main-internal.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
$(GLIB_LIBS)
test_dtmf_player_SOURCES = dtmf-player.c
@@ -126,16 +130,24 @@ test_signal_connect_object_LDADD = \
# this needs to link against the static convenience library so that
# _tp_log is still visible
test_debug_domain_LDADD = \
- $(top_builddir)/telepathy-glib/libtelepathy-glib-internal.la
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-main-internal.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
+ $(NULL)
test_internal_debug_LDADD = \
- $(top_builddir)/telepathy-glib/libtelepathy-glib-internal.la
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-main-internal.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
+ $(NULL)
check_c_sources = *.c
include $(top_srcdir)/tools/check-coding-style.mk
check-local: check-coding-style
LDADD = \
- $(top_builddir)/telepathy-glib/libtelepathy-glib.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(NULL)
diff --git a/tests/dbus/Makefile.am b/tests/dbus/Makefile.am
index 00f675673..ae869fa79 100644
--- a/tests/dbus/Makefile.am
+++ b/tests/dbus/Makefile.am
@@ -14,7 +14,6 @@ tests_list = \
test-channel-manager-request-properties \
test-cli-group \
test-client \
- test-client-channel-factory \
test-cm \
test-cm-message \
test-connection \
@@ -23,15 +22,12 @@ tests_list = \
test-connection-bug-18845 \
test-connection-error \
test-connection-handles \
- test-connection-inject-bug16307 \
test-connection-interests \
- test-connection-getinterfaces-failure \
test-contact-lists \
test-contact-list-client \
test-contacts \
test-contacts-bug-19101 \
test-contacts-mixin \
- test-contacts-slow-path \
test-dbus \
test-dbus-tube \
test-debug-client \
@@ -59,7 +55,6 @@ tests_list = \
test-simple-observer \
test-stream-tube \
test-text-channel \
- test-text-mixin \
test-text-respawn \
test-tls-certificate \
test-unsupported-interface
@@ -87,7 +82,10 @@ tpglib-dbus-tests.list:
LDADD = \
$(top_builddir)/tests/lib/libtp-glib-tests.la \
- $(top_builddir)/telepathy-glib/libtelepathy-glib.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-reentrants.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
$(GLIB_LIBS) \
$(DBUS_LIBS) \
$(NULL)
@@ -98,7 +96,9 @@ test_account_SOURCES = account.c
test_account_channel_request_SOURCES = account-channel-request.c
test_account_channel_request_LDADD = \
$(top_builddir)/tests/lib/libtp-glib-tests-internal.la \
- $(top_builddir)/telepathy-glib/libtelepathy-glib-internal.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-main-internal.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
$(GLIB_LIBS)
test_account_request_SOURCES = account-request.c
@@ -155,21 +155,14 @@ test_connection_handles_SOURCES = connection-handles.c
test_connection_error_SOURCES = connection-error.c
-test_connection_inject_bug16307_SOURCES = connection-inject-bug16307.c
-
test_connection_interests_SOURCES = connection-interests.c
-test_connection_getinterfaces_failure_SOURCES = \
- connection-getinterfaces-failure.c
-
test_contacts_SOURCES = contacts.c
test_contacts_bug_19101_SOURCES = contacts-bug-19101.c
test_contacts_mixin_SOURCES = contacts-mixin.c
-test_contacts_slow_path_SOURCES = contacts-slow-path.c
-
test_dbus_SOURCES = dbus.c
test_disconnection_SOURCES = disconnection.c
@@ -218,8 +211,6 @@ test_self_handle_SOURCES = self-handle.c
test_self_presence_SOURCES = self-presence.c
-test_text_mixin_SOURCES = text-mixin.c
-
test_text_respawn_SOURCES = text-respawn.c
test_unsupported_interface_SOURCES = unsupported-interface.c
@@ -235,8 +226,6 @@ test_simple_handler_SOURCES = simple-handler.c
test_stream_tube_SOURCES = stream-tube.c
-test_client_channel_factory_SOURCES = client-channel-factory.c
-
test_proxy_preparation_SOURCES = proxy-preparation.c
test_channel_manager_request_properties_SOURCES = channel-manager-request-properties.c
@@ -248,7 +237,9 @@ test_cm_message_SOURCES = \
cm-message.c
test_cm_message_LDADD = \
$(top_builddir)/tests/lib/libtp-glib-tests-internal.la \
- $(top_builddir)/telepathy-glib/libtelepathy-glib-internal.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-main-internal.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
$(GLIB_LIBS)
test_text_channel_SOURCES = text-channel.c
diff --git a/tests/dbus/account-channel-request.c b/tests/dbus/account-channel-request.c
index 6621f1e5a..06d3d3165 100644
--- a/tests/dbus/account-channel-request.c
+++ b/tests/dbus/account-channel-request.c
@@ -12,7 +12,11 @@
#include <telepathy-glib/telepathy-glib.h>
#include <telepathy-glib/account-channel-request-internal.h>
+#include <telepathy-glib/cli-channel.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/client.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/proxy-subclass.h>
#include "tests/lib/util.h"
@@ -208,8 +212,6 @@ test_handle_create_success (Test *test,
tp_account_channel_request_create_and_handle_channel_async (req,
NULL, create_and_handle_cb, test);
- g_object_unref (req);
-
g_main_loop_run (test->mainloop);
g_assert_no_error (test->error);
@@ -227,6 +229,8 @@ test_handle_create_success (Test *test,
g_assert_cmpuint (tp_asv_get_uint32 (test->cd_service->last_request,
TP_PROP_CHANNEL_TARGET_HANDLE_TYPE, NULL), ==, TP_HANDLE_TYPE_CONTACT);
g_assert_cmpuint (tp_asv_size (test->cd_service->last_request), ==, 3);
+
+ g_object_unref (req);
}
/* ChannelDispatcher.CreateChannel() call fails */
@@ -439,7 +443,7 @@ test_handle_ensure_success (Test *test,
TpContact *alice;
alice = tp_tests_connection_run_until_contact_by_id (test->connection,
- "alice", 0, NULL);
+ "alice", NULL);
req = tp_account_channel_request_new_text (test->account, 0);
tp_account_channel_request_set_target_contact (req, alice);
@@ -749,7 +753,7 @@ test_handle_delegated (Test *test,
requests = g_ptr_array_new ();
hints = tp_asv_new (
- "org.freedesktop.Telepathy.ChannelRequest.DelegateToPreferredHandler",
+ "im.telepathy1.ChannelRequest.DelegateToPreferredHandler",
G_TYPE_BOOLEAN, TRUE,
NULL);
@@ -1206,27 +1210,6 @@ test_observe_cancel_after_create (Test *test,
g_assert_error (test->error, TP_ERROR, TP_ERROR_CANCELLED);
}
-/* Succeeded is fired but not SucceededWithChannel */
-static void
-test_observe_no_channel (Test *test,
- gconstpointer data G_GNUC_UNUSED)
-{
- GHashTable *request;
- TpAccountChannelRequest *req;
-
- request = create_request ();
- req = tp_account_channel_request_new (test->account, request, 0);
-
- tp_account_channel_request_create_and_observe_channel_async (req,
- "FakeNoChannel", NULL, create_and_observe_cb, test);
-
- g_hash_table_unref (request);
- g_object_unref (req);
-
- g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERROR, TP_ERROR_CONFUSED);
-}
-
int
main (int argc,
char **argv)
@@ -1287,8 +1270,6 @@ main (int argc,
setup, test_observe_cancel_before, teardown);
g_test_add ("/account-channels/request-observe/after-create", Test, NULL,
setup, test_observe_cancel_after_create, teardown);
- g_test_add ("/account-channels/request-observe/no-channel", Test, NULL,
- setup, test_observe_no_channel, teardown);
/* Particular properties of the request */
g_test_add ("/account-channels/test-ft-props", Test, NULL,
diff --git a/tests/dbus/account-manager.c b/tests/dbus/account-manager.c
index 22de1c59d..75dc2a1d9 100644
--- a/tests/dbus/account-manager.c
+++ b/tests/dbus/account-manager.c
@@ -13,6 +13,7 @@
#include <telepathy-glib/account-manager.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/defs.h>
+#include <telepathy-glib/interfaces.h>
#include "tests/lib/simple-account.h"
#include "tests/lib/simple-account-manager.h"
@@ -215,6 +216,7 @@ teardown_service (Test *test,
g_clear_object (&test->account1);
g_clear_object (&test->account2);
+ g_clear_object (&test->account);
test->service = NULL;
teardown (test, data);
@@ -275,8 +277,8 @@ finish_prepare_action (GObject *source_object,
TpAccountManager *am = TP_ACCOUNT_MANAGER (source_object);
g_assert (test->am == am);
- test->prepared = tp_account_manager_prepare_finish (am, res, &test->error);
- is_prepared_reply = tp_account_manager_is_prepared (test->am,
+ test->prepared = tp_proxy_prepare_finish (am, res, &test->error);
+ is_prepared_reply = tp_proxy_is_prepared (test->am,
TP_ACCOUNT_MANAGER_FEATURE_CORE);
g_assert_cmpint (is_prepared_reply, ==, test->prepared);
script_continue (test);
@@ -288,7 +290,7 @@ prepare_action (gpointer script_data,
{
Test *test = (Test *) script_data;
- tp_account_manager_prepare_async (test->am, NULL, finish_prepare_action, test);
+ tp_proxy_prepare_async (test->am, NULL, finish_prepare_action, test);
}
static void
@@ -316,7 +318,7 @@ finish_assert_am_not_activatable_action (TpDBusDaemon *proxy,
for (i=0; names[i] != NULL; i++)
{
g_assert_cmpstr (names[i], !=, TP_ACCOUNT_MANAGER_BUS_NAME);
- g_assert_cmpstr (names[i], !=, "org.freedesktop.Telepathy.MissionControl5");
+ g_assert_cmpstr (names[i], !=, "im.telepathy1.MissionControl5");
}
script_continue (user_data);
@@ -338,7 +340,7 @@ assert_core_not_ready_action (gpointer script_data,
{
Test *test = (Test *) script_data;
- g_assert (!tp_account_manager_is_prepared (test->am,
+ g_assert (!tp_proxy_is_prepared (test->am,
TP_ACCOUNT_MANAGER_FEATURE_CORE));
script_continue (script_data);
@@ -350,7 +352,7 @@ assert_feature_not_ready_action (gpointer script_data,
{
Test *test = (Test *) script_data;
- g_assert (!tp_account_manager_is_prepared (test->am,
+ g_assert (!tp_proxy_is_prepared (test->am,
g_quark_from_string ((gchar *) user_data)));
g_free (user_data);
@@ -368,7 +370,7 @@ prepare_feature_action (gpointer script_data,
features[1] = g_quark_from_string ((gchar *) user_data);
features[2] = 0;
- tp_account_manager_prepare_async (test->am, features, finish_prepare_action, test);
+ tp_proxy_prepare_async (test->am, features, finish_prepare_action, test);
g_free (user_data);
}
@@ -410,9 +412,11 @@ ensure_action (gpointer script_data,
Test *test = (Test *) script_data;
g_assert (test != NULL);
g_assert (test->am != NULL);
- g_assert (tp_account_manager_is_prepared (test->am, TP_ACCOUNT_MANAGER_FEATURE_CORE));
- test->account = tp_account_manager_ensure_account (test->am,
- path);
+ g_assert (tp_proxy_is_prepared (test->am, TP_ACCOUNT_MANAGER_FEATURE_CORE));
+ test->account = tp_client_factory_ensure_account (
+ tp_proxy_get_factory (test->am), path, NULL, &test->error);
+ g_assert_no_error (test->error);
+ g_assert (TP_IS_ACCOUNT (test->account));
script_continue (script_data);
}
@@ -436,8 +440,8 @@ finish_account_prepare_action (GObject *source_object,
TpAccount *account = TP_ACCOUNT (source_object);
g_assert (test->account == account);
- test->prepared = tp_account_prepare_finish (account, res, &test->error);
- g_assert (test->prepared == tp_account_is_prepared (account, TP_ACCOUNT_FEATURE_CORE));
+ test->prepared = tp_proxy_prepare_finish (account, res, &test->error);
+ g_assert (test->prepared == tp_proxy_is_prepared (account, TP_ACCOUNT_FEATURE_CORE));
script_continue (test);
}
@@ -448,7 +452,7 @@ account_prepare_action (gpointer script_data,
{
Test *test = (Test *) script_data;
- tp_account_prepare_async (test->account, NULL, finish_account_prepare_action, test);
+ tp_proxy_prepare_async (test->account, NULL, finish_account_prepare_action, test);
}
static void
@@ -560,11 +564,15 @@ create_tp_accounts (gpointer script_data,
{
Test *test = (Test *) script_data;
- test->account1 = tp_account_manager_ensure_account (test->am, ACCOUNT1_PATH);
- g_object_ref (test->account1);
+ test->account1 = tp_client_factory_ensure_account (
+ tp_proxy_get_factory (test->am), ACCOUNT1_PATH, NULL, &test->error);
+ g_assert_no_error (test->error);
+ g_assert (TP_IS_ACCOUNT (test->account1));
- test->account2 = tp_account_manager_ensure_account (test->am, ACCOUNT2_PATH);
- g_object_ref (test->account2);
+ test->account2 = tp_client_factory_ensure_account (
+ tp_proxy_get_factory (test->am), ACCOUNT2_PATH, NULL, &test->error);
+ g_assert_no_error (test->error);
+ g_assert (TP_IS_ACCOUNT (test->account2));
script_continue (test);
}
diff --git a/tests/dbus/account-request.c b/tests/dbus/account-request.c
index 2a67cd8f7..8402f6f5e 100644
--- a/tests/dbus/account-request.c
+++ b/tests/dbus/account-request.c
@@ -12,6 +12,7 @@
#include <string.h>
#include <telepathy-glib/account-request.h>
+#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
#include "tests/lib/simple-account.h"
@@ -429,7 +430,7 @@ test_create_succeed (Test *test,
array = tp_asv_get_boxed (test->am->create_properties,
TP_PROP_ACCOUNT_REQUESTED_PRESENCE,
- TP_STRUCT_TYPE_SIMPLE_PRESENCE);
+ TP_STRUCT_TYPE_PRESENCE);
g_assert_cmpuint (g_value_get_uint (array->values), ==,
TP_CONNECTION_PRESENCE_TYPE_AVAILABLE);
g_assert_cmpstr (g_value_get_string (array->values + 1), ==,
@@ -439,7 +440,7 @@ test_create_succeed (Test *test,
array = tp_asv_get_boxed (test->am->create_properties,
TP_PROP_ACCOUNT_AUTOMATIC_PRESENCE,
- TP_STRUCT_TYPE_SIMPLE_PRESENCE);
+ TP_STRUCT_TYPE_PRESENCE);
g_assert_cmpuint (g_value_get_uint (array->values), ==,
TP_CONNECTION_PRESENCE_TYPE_BUSY);
g_assert_cmpstr (g_value_get_string (array->values + 1), ==,
diff --git a/tests/dbus/account.c b/tests/dbus/account.c
index f78ccf143..5e164c4eb 100644
--- a/tests/dbus/account.c
+++ b/tests/dbus/account.c
@@ -13,8 +13,10 @@
#include <telepathy-glib/account.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/defs.h>
-#include <telepathy-glib/svc-account.h>
#include <telepathy-glib/enums.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/svc-account.h>
#include "tests/lib/contacts-conn.h"
#include "tests/lib/simple-account.h"
@@ -233,7 +235,7 @@ test_new (Test *test,
g_assert (test->account == NULL);
test->account = tp_account_new (test->dbus,
- "/org/freedesktop/Telepathy/Account/what/ev/er", NULL);
+ "/im/telepathy1/Account/what/ev/er", NULL);
g_assert (test->account != NULL);
}
@@ -242,7 +244,7 @@ test_setters (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
test->account = tp_account_new (test->dbus,
- "/org/freedesktop/Telepathy/Account/what/ev/er", NULL);
+ "/im/telepathy1/Account/what/ev/er", NULL);
g_assert (test->account != NULL);
tp_account_set_enabled_async (test->account, TRUE, tp_tests_result_ready_cb,
@@ -371,11 +373,11 @@ test_prepare_success (Test *test,
g_main_loop_run (test->mainloop);
/* the obvious accessors */
- g_assert (tp_account_is_prepared (test->account, TP_ACCOUNT_FEATURE_CORE));
+ g_assert (tp_proxy_is_prepared (test->account, TP_ACCOUNT_FEATURE_CORE));
g_assert (tp_account_is_enabled (test->account));
assert_boolprop (test->account, "enabled", TRUE);
- g_assert (tp_account_is_valid (test->account));
- assert_boolprop (test->account, "valid", TRUE);
+ g_assert (tp_account_is_usable (test->account));
+ assert_boolprop (test->account, "usable", TRUE);
g_assert_cmpstr (tp_account_get_display_name (test->account), ==,
"Fake Account");
assert_strprop (test->account, "display-name", "Fake Account");
@@ -537,9 +539,9 @@ test_storage (Test *test,
g_main_loop_run (test->mainloop);
g_assert_cmpstr (tp_account_get_storage_provider (test->account), ==,
- "org.freedesktop.Telepathy.glib.test");
+ "im.telepathy1.glib.test");
assert_strprop (test->account, "storage-provider",
- "org.freedesktop.Telepathy.glib.test");
+ "im.telepathy1.glib.test");
g_assert_cmpstr (
g_value_get_string (tp_account_get_storage_identifier (test->account)),
@@ -708,7 +710,7 @@ test_connection (Test *test,
account_prepare_cb, test);
g_main_loop_run (test->mainloop);
- g_assert (tp_account_is_prepared (test->account, TP_ACCOUNT_FEATURE_CORE));
+ g_assert (tp_proxy_is_prepared (test->account, TP_ACCOUNT_FEATURE_CORE));
/* a connection turns up */
@@ -884,11 +886,11 @@ main (int argc,
g_test_add_data_func ("/account/parse/no-prefix",
"/this/is/not/an/account/path", test_parse_failure);
g_test_add_data_func ("/account/parse/too-few-components",
- "/org/freedesktop/Telepathy/Account/wrong", test_parse_failure);
+ "/im/telepathy1/Account/wrong", test_parse_failure);
g_test_add_data_func ("/account/parse/too-many-components",
- "/org/freedesktop/Telepathy/Account/a/b/c/d", test_parse_failure);
+ "/im/telepathy1/Account/a/b/c/d", test_parse_failure);
g_test_add_data_func ("/account/parse/illegal-components",
- "/org/freedesktop/Telepathy/Account/1/2/3", test_parse_failure);
+ "/im/telepathy1/Account/1/2/3", test_parse_failure);
g_test_add_data_func ("/account/parse/legal",
test_parse_data_new (
diff --git a/tests/dbus/base-client.c b/tests/dbus/base-client.c
index 843391510..9b4f60620 100644
--- a/tests/dbus/base-client.c
+++ b/tests/dbus/base-client.c
@@ -11,13 +11,16 @@
/* We include -internal headers of context to be able to easily access to
* their semi-private attributes (connection, account, channels, etc). */
-#include <telepathy-glib/account-manager.h>
#include <telepathy-glib/add-dispatch-operation-context-internal.h>
#include <telepathy-glib/base-client.h>
+#include <telepathy-glib/cli-channel.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/client.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/defs.h>
+#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/handle-channels-context-internal.h>
+#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/observe-channels-context-internal.h>
#include <telepathy-glib/proxy-subclass.h>
@@ -27,7 +30,7 @@
#include "tests/lib/simple-channel-dispatcher.h"
#include "tests/lib/simple-channel-request.h"
#include "tests/lib/simple-client.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/textchan-null.h"
typedef struct {
@@ -45,7 +48,7 @@ typedef struct {
TpTestsSimpleChannelDispatcher *cd_service;
/* Client side objects */
- TpAccountManager *account_mgr;
+ TpClientFactory *factory;
TpClient *client;
TpConnection *connection;
TpAccount *account;
@@ -70,6 +73,7 @@ setup (Test *test,
gchar *chan_path;
TpHandle handle;
TpHandleRepoIface *contact_repo;
+ GError *error = NULL;
test->mainloop = g_main_loop_new (NULL, FALSE);
test->dbus = tp_tests_dbus_daemon_dup_or_die ();
@@ -77,10 +81,8 @@ setup (Test *test,
test->error = NULL;
test->interfaces = NULL;
- /* The case of a non-shared TpAccountManager is tested in
- * simple-approver.c */
- test->account_mgr = tp_account_manager_dup ();
- g_assert (test->account_mgr != NULL);
+ test->factory = tp_client_factory_new (test->dbus);
+ g_assert (test->factory != NULL);
/* Claim AccountManager bus-name (needed as we're going to export an Account
* object). */
@@ -89,7 +91,8 @@ setup (Test *test,
g_assert_no_error (test->error);
/* Create service-side Client object */
- test->simple_client = tp_tests_simple_client_new (test->dbus, "Test", FALSE);
+ test->simple_client = tp_tests_simple_client_new (test->factory,
+ "Test", FALSE);
g_assert (test->simple_client != NULL);
test->base_client = TP_BASE_CLIENT (test->simple_client);
@@ -109,13 +112,13 @@ setup (Test *test,
g_assert (test->client != NULL);
/* Create client-side Account object */
- test->account = tp_account_manager_ensure_account (test->account_mgr,
- ACCOUNT_PATH);
+ test->account = tp_client_factory_ensure_account (test->factory,
+ ACCOUNT_PATH, NULL, &error);
+ g_assert_no_error (error);
g_assert (test->account != NULL);
- g_object_ref (test->account);
/* Create (service and client sides) connection objects */
- tp_tests_create_and_connect_conn (TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ tp_tests_create_and_connect_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION,
"me@test.com", &test->base_connection, &test->connection);
/* Create service-side text channel object */
@@ -131,7 +134,7 @@ setup (Test *test,
test->text_chan_service = TP_TESTS_TEXT_CHANNEL_NULL (
tp_tests_object_new_static_class (
- TP_TESTS_TYPE_TEXT_CHANNEL_NULL,
+ TP_TESTS_TYPE_PROPS_TEXT_CHANNEL,
"connection", test->base_connection,
"object-path", chan_path,
"handle", handle,
@@ -154,7 +157,7 @@ setup (Test *test,
test->text_chan_service_2 = TP_TESTS_TEXT_CHANNEL_NULL (
tp_tests_object_new_static_class (
- TP_TESTS_TYPE_TEXT_CHANNEL_NULL,
+ TP_TESTS_TYPE_PROPS_TEXT_CHANNEL,
"connection", test->base_connection,
"object-path", chan_path,
"handle", handle,
@@ -231,7 +234,7 @@ teardown (Test *test,
g_strfreev (test->interfaces);
- g_object_unref (test->account_mgr);
+ g_object_unref (test->factory);
tp_dbus_daemon_release_name (test->dbus, TP_CHANNEL_DISPATCHER_BUS_NAME,
NULL);
@@ -279,30 +282,27 @@ static void
test_basics (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
- TpAccountManager *account_manager;
+ TpClientFactory *factory;
TpDBusDaemon *dbus;
gchar *name;
gboolean unique;
g_object_get (test->base_client,
- "account-manager", &account_manager,
+ "factory", &factory,
"dbus-daemon", &dbus,
"name", &name,
"uniquify-name", &unique,
NULL);
- g_assert (test->account_mgr == account_manager);
+ g_assert (test->factory == factory);
g_assert (test->dbus == dbus);
g_assert_cmpstr ("Test", ==, name);
g_assert (!unique);
- g_assert (test->account_mgr == tp_base_client_get_account_manager (
- test->base_client));
g_assert (test->dbus == tp_base_client_get_dbus_daemon (test->base_client));
g_assert_cmpstr ("Test", ==, tp_base_client_get_name (test->base_client));
g_assert (!tp_base_client_get_uniquify_name (test->base_client));
- g_object_unref (account_manager);
g_object_unref (dbus);
g_free (name);
}
@@ -938,7 +938,7 @@ test_handler (Test *test,
test->text_chan_2));
/* Create another client sharing the same unique name */
- client_2 = tp_tests_simple_client_new (test->dbus, "Test", TRUE);
+ client_2 = tp_tests_simple_client_new (NULL, "Test", TRUE);
tp_base_client_be_a_handler (TP_BASE_CLIENT (client_2));
tp_base_client_register (TP_BASE_CLIENT (client_2), &test->error);
g_assert_no_error (test->error);
@@ -1495,7 +1495,7 @@ delegate_to_preferred_handler (Test *test,
requests = g_ptr_array_new ();
hints = tp_asv_new (
- "org.freedesktop.Telepathy.ChannelRequest.DelegateToPreferredHandler",
+ "im.telepathy1.ChannelRequest.DelegateToPreferredHandler",
G_TYPE_BOOLEAN, TRUE,
NULL);
diff --git a/tests/dbus/call-cancellation.c b/tests/dbus/call-cancellation.c
index d1f15f81c..70c006258 100644
--- a/tests/dbus/call-cancellation.c
+++ b/tests/dbus/call-cancellation.c
@@ -1,5 +1,6 @@
#include "config.h"
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/errors.h>
diff --git a/tests/dbus/call-channel.c b/tests/dbus/call-channel.c
index 7310c0ff1..0b61be185 100644
--- a/tests/dbus/call-channel.c
+++ b/tests/dbus/call-channel.c
@@ -18,8 +18,15 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <telepathy-glib/cli-connection.h>
+#include <telepathy-glib/cli-call.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/telepathy-glib.h>
#include <telepathy-glib/proxy-subclass.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
+
+#include "telepathy-glib/reentrants.h"
#include "examples/cm/call/cm.h"
#include "examples/cm/call/conn.h"
@@ -37,7 +44,7 @@ typedef struct
ExampleCallConnectionManager *service_cm;
- TpSimpleClientFactory *factory;
+ TpClientFactory *factory;
TpConnectionManager *cm;
TpConnection *conn;
TpChannel *chan;
@@ -102,20 +109,17 @@ setup (Test *test,
"example", parameters, &bus_name, &object_path, &test->error, NULL);
g_assert_no_error (test->error);
- test->factory = (TpSimpleClientFactory *)
- tp_automatic_client_factory_new (test->dbus);
- tp_simple_client_factory_add_channel_features_varargs (test->factory,
- TP_CHANNEL_FEATURE_CONTACTS,
- 0);
+ test->factory = tp_automatic_client_factory_new (test->dbus);
- test->conn = tp_simple_client_factory_ensure_connection (test->factory,
+ test->conn = tp_client_factory_ensure_connection (test->factory,
object_path, NULL, &test->error);
g_assert_no_error (test->error);
g_assert (test->conn != NULL);
tp_cli_connection_call_connect (test->conn, -1, NULL, NULL, NULL, NULL);
tp_tests_proxy_run_until_prepared (test->conn, conn_features);
- test->self_handle = tp_connection_get_self_handle (test->conn);
+ test->self_handle = tp_contact_get_handle (
+ tp_connection_get_self_contact (test->conn));
g_assert (test->self_handle != 0);
test->audio_request = g_array_sized_new (FALSE, FALSE, sizeof (guint), 1);
@@ -147,7 +151,7 @@ channel_created_cb (TpConnection *connection,
g_assert_no_error ((GError *) error);
- test->chan = tp_simple_client_factory_ensure_channel (test->factory,
+ test->chan = tp_client_factory_ensure_channel (test->factory,
connection, object_path, immutable_properties, &new_error);
g_assert_no_error (new_error);
@@ -870,7 +874,7 @@ expect_incoming_call_cb (TpConnection *conn,
/* we only expect to receive one call */
g_assert (test->chan == NULL);
- test->chan = tp_simple_client_factory_ensure_channel (test->factory,
+ test->chan = tp_client_factory_ensure_channel (test->factory,
conn, object_path, properties, &error);
g_assert_no_error (error);
@@ -890,7 +894,7 @@ trigger_incoming_call (Test *test,
{
TpProxySignalConnection *new_channels_sig;
- tp_cli_connection_interface_simple_presence_run_set_presence (test->conn, -1,
+ tp_cli_connection_interface_presence_run_set_presence (test->conn, -1,
"away", "preparing for a test", &test->error, NULL);
g_assert_no_error (test->error);
@@ -899,7 +903,7 @@ trigger_incoming_call (Test *test,
expect_incoming_call_cb, test, NULL, NULL, &test->error);
g_assert_no_error (test->error);
- tp_cli_connection_interface_simple_presence_run_set_presence (test->conn, -1,
+ tp_cli_connection_interface_presence_run_set_presence (test->conn, -1,
"available", message, &test->error, NULL);
g_assert_no_error (test->error);
diff --git a/tests/dbus/channel-dispatch-operation.c b/tests/dbus/channel-dispatch-operation.c
index 31410ca18..5a6643746 100644
--- a/tests/dbus/channel-dispatch-operation.c
+++ b/tests/dbus/channel-dispatch-operation.c
@@ -13,6 +13,7 @@
#include <telepathy-glib/channel-dispatch-operation.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/debug.h>
+#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/svc-channel-dispatch-operation.h>
#include <dbus/dbus.h>
@@ -20,7 +21,7 @@
#include <dbus/dbus-glib-lowlevel.h>
#include "tests/lib/simple-channel-dispatch-operation.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/textchan-null.h"
#include "tests/lib/util.h"
@@ -93,7 +94,7 @@ setup_services (Test *test,
setup (test, data);
/* Create (service and client sides) connection objects */
- tp_tests_create_and_connect_conn (TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ tp_tests_create_and_connect_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION,
"me@test.com", &test->base_connection, &test->connection);
/* Create service-side text channel object */
@@ -109,7 +110,7 @@ setup_services (Test *test,
test->text_chan_service = TP_TESTS_TEXT_CHANNEL_NULL (
tp_tests_object_new_static_class (
- TP_TESTS_TYPE_TEXT_CHANNEL_NULL,
+ TP_TESTS_TYPE_PROPS_TEXT_CHANNEL,
"connection", test->base_connection,
"object-path", chan_path,
"handle", handle,
@@ -132,7 +133,7 @@ setup_services (Test *test,
test->text_chan_service_2 = TP_TESTS_TEXT_CHANNEL_NULL (
tp_tests_object_new_static_class (
- TP_TESTS_TYPE_TEXT_CHANNEL_NULL,
+ TP_TESTS_TYPE_PROPS_TEXT_CHANNEL,
"connection", test->base_connection,
"object-path", chan_path,
"handle", handle,
@@ -632,36 +633,6 @@ test_handle_with (Test *test,
}
static void
-claim_cb (GObject *source,
- GAsyncResult *result,
- gpointer user_data)
-{
- Test *test = user_data;
-
- tp_channel_dispatch_operation_claim_finish (
- TP_CHANNEL_DISPATCH_OPERATION (source), result, &test->error);
-
- g_main_loop_quit (test->mainloop);
-}
-
-static void
-test_claim (Test *test,
- gconstpointer data G_GNUC_UNUSED)
-{
- test->cdo = tp_channel_dispatch_operation_new (test->dbus,
- "/whatever", NULL, &test->error);
- g_assert_no_error (test->error);
-
- tp_channel_dispatch_operation_claim_async (test->cdo, claim_cb, test);
- g_main_loop_run (test->mainloop);
-
- g_assert_no_error (test->error);
-
- /* tp_channel_dispatch_operation_claim_with_async() is tested in
- * tests/dbus/base-client.c */
-}
-
-static void
test_channel_lost_preparing (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
@@ -930,8 +901,6 @@ main (int argc,
test_channel_lost, teardown_services);
g_test_add ("/cdo/handle-with", Test, NULL, setup_services,
test_handle_with, teardown_services);
- g_test_add ("/cdo/claim", Test, NULL, setup_services,
- test_claim, teardown_services);
g_test_add ("/cdo/channel-lost-preparing", Test, NULL, setup_services,
test_channel_lost_preparing, teardown_services);
g_test_add ("/cdo/finished--preparing", Test, NULL, setup_services,
@@ -945,5 +914,8 @@ main (int argc,
g_test_add ("/cdo/destroy-channels", Test, NULL, setup_services,
test_destroy_channels, teardown_services);
+ /* tp_channel_dispatch_operation_claim_with_async() is tested in
+ * tests/dbus/base-client.c */
+
return g_test_run ();
}
diff --git a/tests/dbus/channel-introspect.c b/tests/dbus/channel-introspect.c
index 3b56218b7..66a6d6ab7 100644
--- a/tests/dbus/channel-introspect.c
+++ b/tests/dbus/channel-introspect.c
@@ -18,41 +18,15 @@
#include <telepathy-glib/proxy-subclass.h>
#include "tests/lib/myassert.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/textchan-null.h"
#include "tests/lib/util.h"
#define IDENTIFIER "them@example.org"
-static GError *invalidated = NULL;
static GMainLoop *mainloop;
static void
-channel_ready (TpChannel *channel,
- const GError *error,
- gpointer user_data)
-{
- gboolean *set = user_data;
-
- *set = TRUE;
-
- if (error == NULL)
- {
- g_message ("channel %p ready", channel);
- }
- else
- {
- g_message ("channel %p invalidated: %s #%u \"%s\"", channel,
- g_quark_to_string (error->domain), error->code, error->message);
-
- invalidated = g_error_copy (error);
- }
-
- if (mainloop != NULL)
- g_main_loop_quit (mainloop);
-}
-
-static void
channel_prepared_cb (GObject *object,
GAsyncResult *res,
gpointer user_data)
@@ -75,8 +49,10 @@ assert_chan_sane (TpChannel *chan,
{
GHashTable *asv;
TpHandleType type;
+ TpContact *contact;
- g_assert (tp_channel_is_ready (chan));
+ g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CORE), ==,
+ TRUE);
g_assert_cmpuint (tp_channel_get_handle (chan, NULL), ==, handle);
g_assert_cmpuint (tp_channel_get_handle (chan, &type), ==, handle);
g_assert_cmpuint (type, ==, TP_HANDLE_TYPE_CONTACT);
@@ -87,10 +63,15 @@ assert_chan_sane (TpChannel *chan,
g_assert (TP_IS_CONNECTION (tp_channel_borrow_connection (chan)));
g_assert_cmpstr (tp_channel_get_identifier (chan), ==, IDENTIFIER);
g_assert (tp_channel_get_requested (chan) == requested);
- g_assert_cmpuint (tp_channel_get_initiator_handle (chan), ==,
- initiator_handle);
- g_assert_cmpstr (tp_channel_get_initiator_identifier (chan), ==,
- initiator_id);
+
+ contact = tp_channel_get_initiator_contact (chan);
+ g_assert (contact != NULL);
+ g_assert_cmpuint (tp_contact_get_handle (contact), ==, initiator_handle);
+ g_assert_cmpstr (tp_contact_get_identifier (contact), ==, initiator_id);
+
+ contact = tp_channel_get_target_contact (chan);
+ g_assert (contact != NULL);
+ g_assert_cmpuint (tp_contact_get_handle (contact), ==, handle);
asv = tp_channel_borrow_immutable_properties (chan);
g_assert (asv != NULL);
@@ -115,52 +96,29 @@ main (int argc,
TpTestsSimpleConnection *service_conn;
TpBaseConnection *service_conn_as_base;
TpHandleRepoIface *contact_repo;
- TpTestsTextChannelNull *service_chan;
TpTestsPropsTextChannel *service_props_chan;
TpTestsPropsGroupTextChannel *service_props_group_chan;
TpDBusDaemon *dbus;
TpConnection *conn, *conn2;
TpChannel *chan, *chan2;
GError *error = NULL;
- gchar *name;
- gchar *conn_path;
- gchar *chan_path;
gchar *props_chan_path;
gchar *props_group_chan_path;
gchar *bad_chan_path;
TpHandle handle;
- gboolean was_ready;
- GError invalidated_for_test = { TP_ERROR, TP_ERROR_PERMISSION_DENIED,
- "No channel for you!" };
GHashTable *asv;
GAsyncResult *prepare_result;
- GQuark some_features[] = { TP_CHANNEL_FEATURE_CORE,
+ GQuark chat_states_features[] = { TP_CHANNEL_FEATURE_CORE,
TP_CHANNEL_FEATURE_CHAT_STATES, 0 };
+ GQuark group_features[] = { TP_CHANNEL_FEATURE_GROUP, 0 };
g_type_init ();
tp_tests_abort_after (10);
dbus = tp_tests_dbus_daemon_dup_or_die ();
- service_conn = TP_TESTS_SIMPLE_CONNECTION (tp_tests_object_new_static_class (
- TP_TESTS_TYPE_SIMPLE_CONNECTION,
- "account", "me@example.com",
- "protocol", "simple",
- NULL));
- service_conn_as_base = TP_BASE_CONNECTION (service_conn);
- g_assert (service_conn != NULL);
- g_assert (service_conn_as_base != NULL);
-
- MYASSERT (tp_base_connection_register (service_conn_as_base, "simple",
- &name, &conn_path, &error), "");
- g_assert_no_error (error);
-
- conn = tp_connection_new (dbus, name, conn_path, &error);
- g_assert (conn != NULL);
- g_assert_no_error (error);
-
- MYASSERT (tp_connection_run_until_ready (conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
+ tp_tests_create_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION, "me@example.com",
+ TRUE, &service_conn_as_base, &conn);
+ service_conn = TP_TESTS_SIMPLE_CONNECTION (service_conn_as_base);
contact_repo = tp_base_connection_get_handles (service_conn_as_base,
TP_HANDLE_TYPE_CONTACT);
@@ -169,16 +127,8 @@ main (int argc,
handle = tp_handle_ensure (contact_repo, IDENTIFIER, NULL, &error);
g_assert_no_error (error);
- chan_path = g_strdup_printf ("%s/Channel", conn_path);
-
- service_chan = TP_TESTS_TEXT_CHANNEL_NULL (tp_tests_object_new_static_class (
- TP_TESTS_TYPE_TEXT_CHANNEL_NULL,
- "connection", service_conn,
- "object-path", chan_path,
- "handle", handle,
- NULL));
-
- props_chan_path = g_strdup_printf ("%s/PropertiesChannel", conn_path);
+ props_chan_path = g_strdup_printf ("%s/PropertiesChannel",
+ tp_proxy_get_object_path (conn));
service_props_chan = TP_TESTS_PROPS_TEXT_CHANNEL (
tp_tests_object_new_static_class (
@@ -188,7 +138,8 @@ main (int argc,
"handle", handle,
NULL));
- props_group_chan_path = g_strdup_printf ("%s/PropsGroupChannel", conn_path);
+ props_group_chan_path = g_strdup_printf ("%s/PropsGroupChannel",
+ tp_proxy_get_object_path (conn));
service_props_group_chan = TP_TESTS_PROPS_GROUP_TEXT_CHANNEL (
tp_tests_object_new_static_class (
@@ -200,147 +151,17 @@ main (int argc,
mainloop = g_main_loop_new (NULL, FALSE);
- g_message ("Channel becomes invalid while we wait");
-
- chan = tp_channel_new (conn, chan_path, TP_IFACE_CHANNEL_TYPE_TEXT,
- TP_HANDLE_TYPE_CONTACT, handle, &error);
- g_assert_no_error (error);
-
- g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CORE), ==,
- FALSE);
- g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CHAT_STATES),
- ==, FALSE);
-
- tp_proxy_invalidate ((TpProxy *) chan, &invalidated_for_test);
-
- prepare_result = NULL;
- tp_proxy_prepare_async (chan, NULL, channel_prepared_cb, &prepare_result);
-
- MYASSERT (!tp_channel_run_until_ready (chan, &error, NULL), "");
- g_assert_error (error, invalidated_for_test.domain,
- invalidated_for_test.code);
- g_assert_cmpstr (error->message, ==, invalidated_for_test.message);
- g_error_free (error);
- error = NULL;
-
- if (prepare_result == NULL)
- g_main_loop_run (mainloop);
-
- MYASSERT (!tp_proxy_prepare_finish (chan, prepare_result, &error), "");
- g_assert_error (error, invalidated_for_test.domain,
- invalidated_for_test.code);
- g_assert_cmpstr (error->message, ==, invalidated_for_test.message);
- g_clear_error (&error);
- /* it was never ready */
- g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CORE), ==,
- FALSE);
- g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CHAT_STATES),
- ==, FALSE);
-
- g_object_unref (prepare_result);
- prepare_result = NULL;
-
- g_object_unref (chan);
- chan = NULL;
-
- g_message ("Channel becomes invalid and we are called back synchronously");
-
- chan = tp_channel_new (conn, chan_path, TP_IFACE_CHANNEL_TYPE_TEXT,
- TP_HANDLE_TYPE_CONTACT, handle, &error);
- g_assert_no_error (error);
-
- was_ready = FALSE;
- tp_proxy_prepare_async (chan, NULL, channel_prepared_cb, &prepare_result);
-
- /* no way to see what this is doing - just make sure it doesn't crash */
- tp_proxy_prepare_async (chan, some_features, NULL, NULL);
-
- tp_channel_call_when_ready (chan, channel_ready, &was_ready);
- tp_proxy_invalidate ((TpProxy *) chan, &invalidated_for_test);
- g_assert (was_ready);
- g_assert (invalidated != NULL);
- g_assert_error (invalidated, invalidated_for_test.domain,
- invalidated_for_test.code);
- g_assert_cmpstr (invalidated->message, ==, invalidated_for_test.message);
- g_error_free (invalidated);
- invalidated = NULL;
-
- /* prepare_async never calls back synchronously */
- g_assert (prepare_result == NULL);
- g_main_loop_run (mainloop);
- MYASSERT (!tp_proxy_prepare_finish (chan, prepare_result, &error), "");
- g_assert_error (error, invalidated_for_test.domain,
- invalidated_for_test.code);
- g_assert_cmpstr (error->message, ==, invalidated_for_test.message);
- g_clear_error (&error);
- g_object_unref (prepare_result);
- prepare_result = NULL;
- /* it was never ready */
- g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CORE), ==,
- FALSE);
- g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CHAT_STATES),
- ==, FALSE);
-
- g_object_unref (chan);
- chan = NULL;
-
- g_message ("Channel becomes ready while we wait");
-
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
-
- service_chan->get_handle_called = 0;
- service_chan->get_interfaces_called = 0;
- service_chan->get_channel_type_called = 0;
-
- chan = tp_channel_new (conn, chan_path, TP_IFACE_CHANNEL_TYPE_TEXT,
- TP_HANDLE_TYPE_CONTACT, handle, &error);
- g_assert_no_error (error);
-
- prepare_result = NULL;
- tp_proxy_prepare_async (chan, NULL, channel_prepared_cb, &prepare_result);
-
- MYASSERT (tp_channel_run_until_ready (chan, &error, NULL), "");
- g_assert_no_error (error);
- g_assert_cmpuint (service_chan->get_handle_called, ==, 0);
- g_assert_cmpuint (service_chan->get_interfaces_called, ==, 1);
- g_assert_cmpuint (service_chan->get_channel_type_called, ==, 0);
-
- g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CORE), ==,
- TRUE);
- g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CHAT_STATES),
- ==, FALSE);
-
- if (prepare_result == NULL)
- g_main_loop_run (mainloop);
-
- MYASSERT (tp_proxy_prepare_finish (chan, prepare_result, &error), "");
- g_assert_no_error (error);
-
- g_object_unref (prepare_result);
- prepare_result = NULL;
-
- /* No property so we can't know if the channel was requested and its
- * initiator */
- assert_chan_sane (chan, handle, FALSE, 0, "");
-
- g_object_unref (chan);
- chan = NULL;
-
g_message ("Channel becomes ready while we wait (the version with "
"Properties)");
tp_tests_proxy_run_until_dbus_queue_processed (conn);
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_chan)->get_handle_called = 0;
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_chan)->get_interfaces_called = 0;
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_chan)->get_channel_type_called = 0;
-
chan = tp_channel_new (conn, props_chan_path, NULL,
TP_UNKNOWN_HANDLE_TYPE, 0, &error);
g_assert_no_error (error);
prepare_result = NULL;
- tp_proxy_prepare_async (chan, some_features, channel_prepared_cb,
+ tp_proxy_prepare_async (chan, chat_states_features, channel_prepared_cb,
&prepare_result);
g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CORE), ==,
@@ -348,17 +169,7 @@ main (int argc,
g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CHAT_STATES),
==, FALSE);
- MYASSERT (tp_channel_run_until_ready (chan, &error, NULL), "");
- g_assert_no_error (error);
- g_assert_cmpuint (
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_chan)->get_handle_called, ==,
- 0);
- g_assert_cmpuint (
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_chan)->get_channel_type_called,
- ==, 0);
- g_assert_cmpuint (
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_chan)->get_interfaces_called,
- ==, 0);
+ tp_tests_proxy_run_until_prepared (chan, NULL);
g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CORE), ==,
TRUE);
@@ -378,10 +189,10 @@ main (int argc,
tp_handle_inspect (contact_repo, service_conn_as_base->self_handle));
/* no way to see what this is doing - just make sure it doesn't crash */
- tp_proxy_prepare_async (chan, some_features, NULL, NULL);
+ tp_proxy_prepare_async (chan, chat_states_features, NULL, NULL);
prepare_result = NULL;
- tp_proxy_prepare_async (chan, some_features, channel_prepared_cb,
+ tp_proxy_prepare_async (chan, chat_states_features, channel_prepared_cb,
&prepare_result);
if (prepare_result == NULL)
@@ -401,10 +212,6 @@ main (int argc,
tp_tests_proxy_run_until_dbus_queue_processed (conn);
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_chan)->get_handle_called = 0;
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_chan)->get_interfaces_called = 0;
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_chan)->get_channel_type_called = 0;
-
g_hash_table_remove_all (TP_TESTS_PROPS_TEXT_CHANNEL (service_props_chan)
->dbus_property_interfaces_retrieved);
@@ -426,23 +233,12 @@ main (int argc,
g_hash_table_unref (asv);
asv = NULL;
- MYASSERT (tp_channel_run_until_ready (chan, &error, NULL), "");
- g_assert_no_error (error);
+ tp_tests_proxy_run_until_prepared (chan, NULL);
g_assert_cmpuint (g_hash_table_size (
- service_props_chan->dbus_property_interfaces_retrieved), ==, 0);
- g_assert_cmpuint (
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_chan)->get_handle_called, ==, 0);
- g_assert_cmpuint (
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_chan)->get_channel_type_called,
- ==, 0);
- /* FIXME: with an improved fast-path we could avoid this one too maybe? */
- /*
- g_assert_cmpuint (
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_chan)->get_interfaces_called,
- ==, 0);
- */
+ service_props_chan->dbus_property_interfaces_retrieved), ==, 1);
- assert_chan_sane (chan, handle, FALSE, handle, IDENTIFIER);
+ assert_chan_sane (chan, handle, TRUE, service_conn_as_base->self_handle,
+ tp_handle_inspect (contact_repo, service_conn_as_base->self_handle));
g_object_unref (chan);
chan = NULL;
@@ -452,11 +248,6 @@ main (int argc,
tp_tests_proxy_run_until_dbus_queue_processed (conn);
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_group_chan)->get_handle_called = 0;
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_group_chan)->get_interfaces_called = 0;
- TP_TESTS_TEXT_CHANNEL_NULL (service_props_group_chan)->get_channel_type_called
- = 0;
-
g_hash_table_remove_all (TP_TESTS_PROPS_TEXT_CHANNEL (
service_props_group_chan)
->dbus_property_interfaces_retrieved);
@@ -487,128 +278,34 @@ main (int argc,
g_hash_table_unref (asv);
asv = NULL;
- MYASSERT (tp_channel_run_until_ready (chan, &error, NULL), "");
- g_assert_no_error (error);
- g_assert_cmpuint (TP_TESTS_TEXT_CHANNEL_NULL (service_props_group_chan)
- ->get_handle_called, ==, 0);
- g_assert_cmpuint (TP_TESTS_TEXT_CHANNEL_NULL (service_props_group_chan)
- ->get_channel_type_called, ==, 0);
- g_assert_cmpuint (TP_TESTS_TEXT_CHANNEL_NULL (service_props_group_chan)
- ->get_interfaces_called, ==, 0);
+ tp_tests_proxy_run_until_prepared (chan, group_features);
g_assert_cmpuint (g_hash_table_size (
TP_TESTS_PROPS_TEXT_CHANNEL (service_props_group_chan)
- ->dbus_property_interfaces_retrieved), ==, 1);
- /* Only Chan.I.Group's properties should have been retrieved */
+ ->dbus_property_interfaces_retrieved), ==, 2);
g_assert (g_hash_table_lookup (
TP_TESTS_PROPS_TEXT_CHANNEL (service_props_group_chan)
->dbus_property_interfaces_retrieved,
GUINT_TO_POINTER (TP_IFACE_QUARK_CHANNEL_INTERFACE_GROUP)) != NULL);
+ g_assert (g_hash_table_lookup (
+ TP_TESTS_PROPS_TEXT_CHANNEL (service_props_group_chan)
+ ->dbus_property_interfaces_retrieved,
+ GUINT_TO_POINTER (TP_IFACE_QUARK_CHANNEL)) != NULL);
- assert_chan_sane (chan, handle, FALSE, handle, IDENTIFIER);
-
- g_object_unref (chan);
- chan = NULL;
-
- g_message ("Channel becomes ready while we wait (in the case where we "
- "have to discover the channel type)");
-
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
-
- service_chan->get_handle_called = 0;
- service_chan->get_interfaces_called = 0;
- service_chan->get_channel_type_called = 0;
-
- chan = tp_channel_new (conn, chan_path, NULL,
- TP_HANDLE_TYPE_CONTACT, handle, &error);
- g_assert_no_error (error);
-
- MYASSERT (tp_channel_run_until_ready (chan, &error, NULL), "");
- g_assert_no_error (error);
- g_assert_cmpuint (service_chan->get_handle_called, ==, 0);
- g_assert_cmpuint (service_chan->get_interfaces_called, ==, 1);
- g_assert_cmpuint (service_chan->get_channel_type_called, ==, 1);
-
- assert_chan_sane (chan, handle, FALSE, 0, "");
-
- g_object_unref (chan);
- chan = NULL;
-
- g_message ("Channel becomes ready while we wait (in the case where we "
- "have to discover the handle type)");
-
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
-
- service_chan->get_handle_called = 0;
- service_chan->get_interfaces_called = 0;
- service_chan->get_channel_type_called = 0;
-
- chan = tp_channel_new (conn, chan_path, TP_IFACE_CHANNEL_TYPE_TEXT,
- TP_UNKNOWN_HANDLE_TYPE, 0, &error);
- g_assert_no_error (error);
-
- MYASSERT (tp_channel_run_until_ready (chan, &error, NULL), "");
- g_assert_no_error (error);
- g_assert_cmpuint (service_chan->get_handle_called, ==, 1);
- g_assert_cmpuint (service_chan->get_interfaces_called, ==, 1);
- g_assert_cmpuint (service_chan->get_channel_type_called, ==, 0);
-
- assert_chan_sane (chan, handle, FALSE, 0, "");
-
- g_object_unref (chan);
- chan = NULL;
-
- g_message ("Channel becomes ready while we wait (in the case where we "
- "have to discover the handle)");
-
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
-
- service_chan->get_handle_called = 0;
- service_chan->get_interfaces_called = 0;
- service_chan->get_channel_type_called = 0;
-
- chan = tp_channel_new (conn, chan_path, TP_IFACE_CHANNEL_TYPE_TEXT,
- TP_HANDLE_TYPE_CONTACT, 0, &error);
- g_assert_no_error (error);
-
- MYASSERT (tp_channel_run_until_ready (chan, &error, NULL), "");
- g_assert_no_error (error);
- g_assert_cmpuint (service_chan->get_handle_called, ==, 1);
- g_assert_cmpuint (service_chan->get_interfaces_called, ==, 1);
- g_assert_cmpuint (service_chan->get_channel_type_called, ==, 0);
-
- assert_chan_sane (chan, handle, FALSE, 0, "");
-
- g_object_unref (chan);
- chan = NULL;
-
- g_message ("channel does not, in fact, exist (callback)");
-
- bad_chan_path = g_strdup_printf ("%s/Does/Not/Actually/Exist", conn_path);
- chan = tp_channel_new (conn, bad_chan_path, NULL,
- TP_UNKNOWN_HANDLE_TYPE, 0, &error);
- g_assert_no_error (error);
-
- was_ready = FALSE;
- tp_channel_call_when_ready (chan, channel_ready, &was_ready);
- g_main_loop_run (mainloop);
- g_assert (was_ready);
- g_assert_error (invalidated, DBUS_GERROR, DBUS_GERROR_UNKNOWN_METHOD);
- g_error_free (invalidated);
- invalidated = NULL;
+ assert_chan_sane (chan, handle, TRUE, service_conn_as_base->self_handle,
+ tp_handle_inspect (contact_repo, service_conn_as_base->self_handle));
g_object_unref (chan);
chan = NULL;
- g_free (bad_chan_path);
- bad_chan_path = NULL;
- g_message ("channel does not, in fact, exist (run_until_ready)");
+ g_message ("channel does not, in fact, exist");
- bad_chan_path = g_strdup_printf ("%s/Does/Not/Actually/Exist", conn_path);
+ bad_chan_path = g_strdup_printf ("%s/Does/Not/Actually/Exist",
+ tp_proxy_get_object_path (conn));
chan = tp_channel_new (conn, bad_chan_path, NULL,
TP_UNKNOWN_HANDLE_TYPE, 0, &error);
g_assert_no_error (error);
- MYASSERT (!tp_channel_run_until_ready (chan, &error, NULL), "");
+ tp_tests_proxy_run_until_prepared_or_failed (chan, NULL, &error);
g_assert_error (error, DBUS_GERROR, DBUS_GERROR_UNKNOWN_METHOD);
g_error_free (error);
error = NULL;
@@ -623,10 +320,6 @@ main (int argc,
tp_tests_proxy_run_until_dbus_queue_processed (conn);
- service_chan->get_handle_called = 0;
- service_chan->get_interfaces_called = 0;
- service_chan->get_channel_type_called = 0;
-
{
const gchar *interfaces[] = {
TP_IFACE_CHANNEL_INTERFACE_GROUP,
@@ -647,63 +340,6 @@ main (int argc,
NULL);
}
- /* We lie and say that the basic Text channel has the Group interface; this
- * should make introspection fail.
- */
- chan = tp_channel_new_from_properties (conn, chan_path, asv, &error);
- g_assert_no_error (error);
-
- g_hash_table_unref (asv);
- asv = NULL;
-
- MYASSERT (!tp_channel_run_until_ready (chan, &error, NULL), "");
- g_assert_error (error, DBUS_GERROR, DBUS_GERROR_UNKNOWN_METHOD);
- g_error_free (error);
- error = NULL;
-
- g_assert_cmpuint (service_chan->get_handle_called, ==, 0);
- g_assert_cmpuint (service_chan->get_channel_type_called, ==, 0);
- g_assert_cmpuint (service_chan->get_interfaces_called, ==, 0);
-
- g_object_unref (chan);
- chan = NULL;
-
- g_message ("Channel becomes ready and we are called back");
-
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
-
- service_chan->get_handle_called = 0;
- service_chan->get_interfaces_called = 0;
- service_chan->get_channel_type_called = 0;
-
- chan = tp_channel_new (conn, chan_path, TP_IFACE_CHANNEL_TYPE_TEXT,
- TP_HANDLE_TYPE_CONTACT, handle, &error);
- g_assert_no_error (error);
-
- was_ready = FALSE;
- tp_channel_call_when_ready (chan, channel_ready, &was_ready);
- g_message ("Entering main loop");
- g_main_loop_run (mainloop);
- g_message ("Leaving main loop");
- g_assert (was_ready);
- g_assert_no_error (invalidated);
- g_assert_cmpuint (service_chan->get_handle_called, ==, 0);
- g_assert_cmpuint (service_chan->get_interfaces_called, ==, 1);
- g_assert_cmpuint (service_chan->get_channel_type_called, ==, 0);
-
- assert_chan_sane (chan, handle, FALSE, 0, "");
-
- /* ... keep the same channel for the next test */
-
- g_message ("Channel already ready, so we are called back synchronously");
-
- was_ready = FALSE;
- tp_channel_call_when_ready (chan, channel_ready, &was_ready);
- g_assert (was_ready);
- g_assert_no_error (invalidated);
-
- assert_chan_sane (chan, handle, FALSE, 0, "");
-
/* regression test for fdo#41729
*
* tp-glib uses to rely on its introspection queue to add the interface ID
@@ -714,7 +350,9 @@ main (int argc,
* TpChannel isn't prepared yet, and check that the interface is added right
* away after its construction.
* */
- conn2 = tp_connection_new (dbus, name, conn_path, &error);
+ conn2 = tp_connection_new (dbus, tp_proxy_get_bus_name (conn),
+ tp_proxy_get_object_path (conn),
+ &error);
g_assert_no_error (error);
{
@@ -751,9 +389,21 @@ main (int argc,
g_clear_object (&chan2);
g_clear_object (&conn2);
- /* ... keep the same channel for the next test */
+ g_message ("Channel already dead");
+
+ chan = tp_channel_new (conn, props_chan_path, NULL,
+ TP_UNKNOWN_HANDLE_TYPE, 0, &error);
+ g_assert_no_error (error);
- g_message ("Channel already dead, so we are called back synchronously");
+ prepare_result = NULL;
+ tp_proxy_prepare_async (chan, chat_states_features, channel_prepared_cb,
+ &prepare_result);
+ g_assert (prepare_result == NULL);
+ g_main_loop_run (mainloop);
+ MYASSERT (tp_proxy_prepare_finish (chan, prepare_result, &error), "");
+ g_assert_no_error (error);
+ g_object_unref (prepare_result);
+ prepare_result = NULL;
g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CORE), ==,
TRUE);
@@ -762,37 +412,29 @@ main (int argc,
tp_tests_connection_assert_disconnect_succeeds (conn);
- was_ready = FALSE;
-
prepare_result = NULL;
- tp_proxy_prepare_async (chan, some_features, channel_prepared_cb,
+ tp_proxy_prepare_async (chan, chat_states_features, channel_prepared_cb,
&prepare_result);
- tp_channel_call_when_ready (chan, channel_ready, &was_ready);
- g_assert (was_ready);
- g_assert_error (invalidated, TP_ERROR, TP_ERROR_CANCELLED);
-
/* is_prepared becomes FALSE because the channel broke */
g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CORE), ==,
FALSE);
g_assert_cmpint (tp_proxy_is_prepared (chan, TP_CHANNEL_FEATURE_CHAT_STATES),
==, FALSE);
- g_assert_error (invalidated, tp_proxy_get_invalidated (chan)->domain,
- tp_proxy_get_invalidated (chan)->code);
- g_assert_cmpstr (invalidated->message, ==,
- tp_proxy_get_invalidated (chan)->message);
+ g_assert_error (tp_proxy_get_invalidated (chan),
+ TP_ERROR, TP_ERROR_CANCELLED);
/* ... but prepare_async still hasn't finished until we run the main loop */
g_assert (prepare_result == NULL);
g_main_loop_run (mainloop);
g_assert (prepare_result != NULL);
MYASSERT (!tp_proxy_prepare_finish (chan, prepare_result, &error), "");
- g_assert_error (error, invalidated->domain, invalidated->code);
- g_assert_cmpstr (error->message, ==, invalidated->message);
+ g_assert_error (error, TP_ERROR, TP_ERROR_CANCELLED);
+ g_assert_cmpstr (error->message, ==,
+ tp_proxy_get_invalidated (chan)->message);
tp_clear_object (&prepare_result);
g_clear_error (&error);
- g_clear_error (&invalidated);
g_object_unref (chan);
chan = NULL;
@@ -805,16 +447,12 @@ main (int argc,
tp_handle_unref (contact_repo, handle);
g_object_unref (conn);
- g_object_unref (service_chan);
g_object_unref (service_props_chan);
g_object_unref (service_props_group_chan);
service_conn_as_base = NULL;
g_object_unref (service_conn);
g_object_unref (dbus);
- g_free (name);
- g_free (conn_path);
- g_free (chan_path);
g_free (props_chan_path);
g_free (props_group_chan_path);
diff --git a/tests/dbus/channel-manager-request-properties.c b/tests/dbus/channel-manager-request-properties.c
index 5a5ecf342..9c3fa2646 100644
--- a/tests/dbus/channel-manager-request-properties.c
+++ b/tests/dbus/channel-manager-request-properties.c
@@ -10,13 +10,14 @@
#include "config.h"
#include <telepathy-glib/channel.h>
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
-#include "tests/lib/echo-channel-manager-conn.h"
+#include "tests/lib/echo-conn.h"
#include "tests/lib/simple-channel-manager.h"
#include "tests/lib/myassert.h"
#include "tests/lib/util.h"
@@ -25,7 +26,7 @@ typedef struct
{
GMainLoop *mainloop;
TpDBusDaemon *dbus;
- TpTestsEchoChannelManagerConnection *service_conn;
+ TpTestsEchoConnection *service_conn;
TpTestsSimpleChannelManager *channel_manager;
TpConnection *conn;
@@ -41,6 +42,7 @@ setup (Test *test,
TpBaseConnection *service_conn_as_base;
gboolean ok;
gchar *name, *conn_path;
+ GQuark connected_feature[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 };
g_type_init ();
tp_debug_set_flags ("all");
@@ -52,9 +54,9 @@ setup (Test *test,
TP_TESTS_TYPE_SIMPLE_CHANNEL_MANAGER, NULL);
g_assert (test->channel_manager != NULL);
- test->service_conn = TP_TESTS_ECHO_CHANNEL_MANAGER_CONNECTION (
+ test->service_conn = TP_TESTS_ECHO_CONNECTION (
tp_tests_object_new_static_class (
- TP_TESTS_TYPE_ECHO_CHANNEL_MANAGER_CONNECTION,
+ TP_TESTS_TYPE_ECHO_CONNECTION,
"account", "me@example",
"protocol", "example",
"channel-manager", test->channel_manager,
@@ -74,9 +76,8 @@ setup (Test *test,
g_assert (test->conn != NULL);
g_assert_no_error (test->error);
- g_assert (tp_connection_run_until_ready (test->conn, TRUE, &test->error,
- NULL));
- g_assert_no_error (test->error);
+ tp_cli_connection_call_connect (test->conn, -1, NULL, NULL, NULL, NULL);
+ tp_tests_proxy_run_until_prepared (test->conn, connected_feature);
g_free (name);
g_free (conn_path);
diff --git a/tests/dbus/channel-request.c b/tests/dbus/channel-request.c
index 5afe9a633..5c83d117a 100644
--- a/tests/dbus/channel-request.c
+++ b/tests/dbus/channel-request.c
@@ -13,13 +13,15 @@
#include <telepathy-glib/channel-request.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/debug.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/svc-channel-request.h>
#include <dbus/dbus.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/util.h"
/* This object implements no methods and no properties - TpChannelRequest
@@ -95,7 +97,7 @@ setup (Test *test,
g_assert (test->private_dbus != NULL);
/* Create (service and client sides) connection objects */
- tp_tests_create_and_connect_conn (TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ tp_tests_create_and_connect_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION,
"me@test.com", &test->base_connection, &test->connection);
test->cr = NULL;
@@ -208,13 +210,7 @@ test_crash (Test *test,
}
static void
-succeeded_cb (Test *test)
-{
- test->succeeded++;
-}
-
-static void
-succeeded_with_channel_cb (TpChannelRequest *request,
+succeeded_cb (TpChannelRequest *request,
TpConnection *connection,
TpChannel *channel,
Test *test)
@@ -245,30 +241,26 @@ test_succeeded (Test *test,
g_assert (test->cr != NULL);
g_assert (tp_proxy_get_invalidated (test->cr) == NULL);
- g_signal_connect_swapped (test->cr, "succeeded", G_CALLBACK (succeeded_cb),
- test);
- g_signal_connect (test->cr, "succeeded-with-channel",
- G_CALLBACK (succeeded_with_channel_cb), test);
+ g_signal_connect (test->cr, "succeeded",
+ G_CALLBACK (succeeded_cb), test);
/* sync up both sockets to ensure that the match rules are in place */
tp_tests_proxy_run_until_dbus_queue_processed (test->cr);
props = g_hash_table_new (NULL, NULL);
- tp_svc_channel_request_emit_succeeded_with_channel (test->cr_service,
+ tp_svc_channel_request_emit_succeeded (test->cr_service,
test->base_connection->object_path, props, "/Channel", props);
g_hash_table_unref (props);
- tp_svc_channel_request_emit_succeeded (test->cr_service);
-
tp_tests_proxy_run_until_dbus_queue_processed (test->cr);
g_assert (tp_proxy_get_invalidated (test->cr) != NULL);
g_assert (tp_proxy_get_invalidated (test->cr)->domain == TP_DBUS_ERRORS);
g_assert (tp_proxy_get_invalidated (test->cr)->code ==
TP_DBUS_ERROR_OBJECT_REMOVED);
- g_assert_cmpuint (test->succeeded, ==, 2);
+ g_assert_cmpuint (test->succeeded, ==, 1);
g_signal_handlers_disconnect_by_func (test->cr, G_CALLBACK (succeeded_cb),
test);
diff --git a/tests/dbus/channel.c b/tests/dbus/channel.c
index 0cec68374..d35207096 100644
--- a/tests/dbus/channel.c
+++ b/tests/dbus/channel.c
@@ -13,6 +13,7 @@
#include <string.h>
+#include <telepathy-glib/cli-channel.h>
#include <telepathy-glib/telepathy-glib.h>
#include "tests/lib/util.h"
@@ -51,7 +52,7 @@ create_contact_chan (Test *test)
tp_clear_object (&test->chan_room_service);
/* Create service-side channel object */
- chan_path = g_strdup_printf ("%s/Channel",
+ chan_path = g_strdup_printf ("%s/ContactChannel",
tp_proxy_get_object_path (test->connection));
test->contact_repo = tp_base_connection_get_handles (test->base_connection,
@@ -63,7 +64,7 @@ create_contact_chan (Test *test)
g_assert_no_error (test->error);
test->chan_contact_service = tp_tests_object_new_static_class (
- TP_TESTS_TYPE_TEXT_CHANNEL_NULL,
+ TP_TESTS_TYPE_PROPS_TEXT_CHANNEL,
"connection", test->base_connection,
"handle", handle,
"object-path", chan_path,
@@ -90,7 +91,7 @@ create_room_chan (Test *test)
tp_clear_object (&test->chan_room_service);
/* Create service-side channel object */
- chan_path = g_strdup_printf ("%s/Channel2",
+ chan_path = g_strdup_printf ("%s/RoomChannel",
tp_proxy_get_object_path (test->connection));
test->room_repo = tp_base_connection_get_handles (test->base_connection,
@@ -225,10 +226,7 @@ test_leave_contact_prepared_no_reason (Test *test,
g_assert (tp_proxy_get_invalidated (test->channel_contact) == NULL);
- tp_proxy_prepare_async (test->channel_contact, features,
- channel_prepared_cb, test);
- g_main_loop_run (test->mainloop);
- g_assert_no_error (test->error);
+ tp_tests_proxy_run_until_prepared (test->channel_contact, features);
tp_channel_leave_async (test->channel_contact,
TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
@@ -248,10 +246,7 @@ test_leave_contact_prepared_reason (Test *test,
g_assert (tp_proxy_get_invalidated (test->channel_contact) == NULL);
- tp_proxy_prepare_async (test->channel_contact, features,
- channel_prepared_cb, test);
- g_main_loop_run (test->mainloop);
- g_assert_no_error (test->error);
+ tp_tests_proxy_run_until_prepared (test->channel_contact, features);
tp_channel_leave_async (test->channel_contact,
TP_CHANNEL_GROUP_CHANGE_REASON_BUSY,
@@ -295,8 +290,8 @@ test_leave_room_unprepared_no_reason (Test *test,
g_assert_no_error (test->error);
g_assert (tp_proxy_get_invalidated (test->channel_room) != NULL);
- g_assert_cmpuint (test->chan_room_service->removed_handle, !=, 0);
- g_assert_cmpstr (test->chan_room_service->removed_message, ==, "");
+ g_assert_cmpuint (test->chan_room_service->removed_handle, ==, 0);
+ g_assert_cmpstr (test->chan_room_service->removed_message, ==, NULL);
g_assert_cmpuint (test->chan_room_service->removed_reason, ==,
TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
}
@@ -315,21 +310,21 @@ test_leave_room_unprepared_reason (Test *test,
g_assert_no_error (test->error);
g_assert (tp_proxy_get_invalidated (test->channel_room) != NULL);
- check_removed (test->chan_room_service);
+ g_assert_cmpuint (test->chan_room_service->removed_handle, ==, 0);
+ g_assert_cmpstr (test->chan_room_service->removed_message, ==, NULL);
+ g_assert_cmpuint (test->chan_room_service->removed_reason, ==,
+ TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
}
static void
test_leave_room_prepared_no_reason (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
- GQuark features[] = { TP_CHANNEL_FEATURE_CORE, 0 };
+ GQuark features[] = { TP_CHANNEL_FEATURE_GROUP, 0 };
g_assert (tp_proxy_get_invalidated (test->channel_room) == NULL);
- tp_proxy_prepare_async (test->channel_room, features,
- channel_prepared_cb, test);
- g_main_loop_run (test->mainloop);
- g_assert_no_error (test->error);
+ tp_tests_proxy_run_until_prepared (test->channel_room, features);
tp_channel_leave_async (test->channel_room,
TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
@@ -349,14 +344,11 @@ static void
test_leave_room_prepared_reason (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
- GQuark features[] = { TP_CHANNEL_FEATURE_CORE, 0 };
+ GQuark features[] = { TP_CHANNEL_FEATURE_GROUP, 0 };
g_assert (tp_proxy_get_invalidated (test->channel_room) == NULL);
- tp_proxy_prepare_async (test->channel_room, features,
- channel_prepared_cb, test);
- g_main_loop_run (test->mainloop);
- g_assert_no_error (test->error);
+ tp_tests_proxy_run_until_prepared (test->channel_room, features);
tp_channel_leave_async (test->channel_room,
TP_CHANNEL_GROUP_CHANGE_REASON_BUSY,
@@ -562,10 +554,7 @@ test_join_room (Test *test,
{
GQuark features[] = { TP_CHANNEL_FEATURE_GROUP, 0 };
- tp_proxy_prepare_async (test->channel_room, features,
- channel_prepared_cb, test);
- g_main_loop_run (test->mainloop);
- g_assert_no_error (test->error);
+ tp_tests_proxy_run_until_prepared (test->channel_room, features);
tp_channel_join_async (test->channel_room, "Hello World",
join_cb, test);
@@ -594,11 +583,11 @@ static void
test_contacts (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
- TpSimpleClientFactory *factory;
+ TpClientFactory *factory;
const gchar *id = "badger";
const gchar *alias1 = "Alias 1";
const gchar *alias2 = "Alias 2";
- GQuark channel_features[] = { TP_CHANNEL_FEATURE_CONTACTS, 0 };
+ GQuark channel_features[] = { TP_CHANNEL_FEATURE_GROUP, 0 };
TpHandle handle;
GArray *handles;
TpContact *contact;
@@ -606,9 +595,9 @@ test_contacts (Test *test,
/* Tell factory we want to prepare ALIAS feature on TpContact objects */
factory = tp_proxy_get_factory (test->connection);
- tp_simple_client_factory_add_contact_features_varargs (factory,
+ tp_client_factory_add_contact_features_varargs (factory,
TP_CONTACT_FEATURE_ALIAS,
- TP_CONTACT_FEATURE_INVALID);
+ 0);
/* Set an alias for channel's target contact */
handle = tp_channel_get_handle (test->channel_contact, NULL);
@@ -641,7 +630,7 @@ test_contacts (Test *test,
TP_TESTS_CONTACTS_CONNECTION (test->base_connection),
1, &handle, &alias2);
- g_signal_connect (test->channel_room, "group-contacts-changed",
+ g_signal_connect (test->channel_room, "group-members-changed",
G_CALLBACK (group_contacts_changed_cb), test);
handles = g_array_new (FALSE, FALSE, sizeof (TpHandle));
@@ -653,7 +642,7 @@ test_contacts (Test *test,
g_main_loop_run (test->mainloop);
/* There is ourself and the new contact, get the new one */
- contacts = tp_channel_group_dup_members_contacts (test->channel_room);
+ contacts = tp_channel_group_dup_members (test->channel_room);
g_assert (contacts != NULL);
g_assert (contacts->len == 2);
contact = g_ptr_array_index (contacts, 0);
diff --git a/tests/dbus/cli-group.c b/tests/dbus/cli-group.c
index 82a138dac..fa62b9e4e 100644
--- a/tests/dbus/cli-group.c
+++ b/tests/dbus/cli-group.c
@@ -13,6 +13,8 @@
#include <string.h>
#include <telepathy-glib/channel.h>
+#include <telepathy-glib/cli-channel.h>
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
@@ -20,100 +22,61 @@
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/proxy-subclass.h>
+#include "telepathy-glib/reentrants.h"
+
#include "tests/lib/debug.h"
#include "tests/lib/myassert.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/textchan-group.h"
#include "tests/lib/util.h"
static GMainLoop *mainloop;
TpTestsSimpleConnection *service_conn;
-gchar *conn_path;
TpConnection *conn;
TpHandleRepoIface *contact_repo;
TpHandle self_handle, h1, h2, h3;
gboolean expecting_group_members_changed = FALSE;
-gboolean expecting_group_members_changed_detailed = FALSE;
TpChannelGroupChangeReason expected_reason = TP_CHANNEL_GROUP_CHANGE_REASON_NONE;
gboolean expecting_invalidated = FALSE;
static void
group_members_changed_cb (TpChannel *chan_,
- gchar *message,
- GArray *added,
- GArray *removed,
- GArray *local_pending,
- GArray *remote_pending,
- guint actor,
- guint reason,
+ GPtrArray *added,
+ GPtrArray *removed,
+ GPtrArray *local_pending,
+ GPtrArray *remote_pending,
+ TpContact *actor,
+ GHashTable *details,
gpointer user_data)
{
- DEBUG ("\"%s\", %u, %u, %u, %u, %u, %u", message, added->len, removed->len,
- local_pending->len, remote_pending->len, actor, reason);
-
- MYASSERT (expecting_group_members_changed, "");
- g_assert_cmpuint (reason, ==, expected_reason);
-
- expecting_group_members_changed = FALSE;
-}
-
-static void
-group_members_changed_detailed_cb (TpChannel *chan_,
- GArray *added,
- GArray *removed,
- GArray *local_pending,
- GArray *remote_pending,
- GHashTable *details,
- gpointer user_data)
-{
guint reason = tp_asv_get_uint32 (details, "change-reason", NULL);
+ GMainLoop *loop = user_data;
DEBUG ("%u, %u, %u, %u, %u details", added->len, removed->len,
local_pending->len, remote_pending->len, g_hash_table_size (details));
- MYASSERT (expecting_group_members_changed_detailed, "");
+ MYASSERT (expecting_group_members_changed, "");
g_assert_cmpuint (reason, ==, expected_reason);
- expecting_group_members_changed_detailed = FALSE;
+ expecting_group_members_changed = FALSE;
+ g_main_loop_quit (loop);
}
static void
test_channel_proxy (TpTestsTextChannelGroup *service_chan,
- TpChannel *chan,
- gboolean detailed,
- gboolean properties)
+ TpChannel *chan)
{
TpIntset *add, *rem, *expected_members;
- GArray *arr, *yarr;
- GError *error = NULL;
- TpChannelGroupFlags flags;
- gboolean has_detailed_flag, has_properties_flag;
+ GHashTable *details;
+ GQuark features[] = { TP_CHANNEL_FEATURE_GROUP, 0 };
+ GMainLoop *loop = g_main_loop_new (NULL, FALSE);
- MYASSERT (tp_channel_run_until_ready (chan, &error, NULL), "");
- g_assert_no_error (error);
+ tp_tests_proxy_run_until_prepared (chan, features);
- /* We want to ensure that each of these signals fires exactly once per
- * change. The channel emits both MembersChanged and MembersChangedDetailed,
- * but TpChannel should only be reacting to one of them, based on whether the
- * Members_Changed_Detailed flag is set. So, each signal's handler has a
- * corresponding "expected" flag, which it asserts on then sets back to FALSE.
- */
g_signal_connect (chan, "group-members-changed",
- (GCallback) group_members_changed_cb, NULL);
- g_signal_connect (chan, "group-members-changed-detailed",
- (GCallback) group_members_changed_detailed_cb, NULL);
-
- flags = tp_channel_group_get_flags (chan);
- has_detailed_flag = !!(flags & TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED);
- MYASSERT (detailed == has_detailed_flag,
- ": expected Members_Changed_Detailed to be %sset",
- (detailed ? "" : "un"));
- has_properties_flag = !!(flags & TP_CHANNEL_GROUP_FLAG_PROPERTIES);
- MYASSERT (properties == has_properties_flag,
- ": expected Properties to be %sset",
- (detailed ? "" : "un"));
+ (GCallback) group_members_changed_cb, loop);
/* Add a couple of members. */
add = tp_intset_new ();
@@ -121,19 +84,25 @@ test_channel_proxy (TpTestsTextChannelGroup *service_chan,
tp_intset_add (add, h2);
expecting_group_members_changed = TRUE;
- expecting_group_members_changed_detailed = TRUE;
+
expected_reason++;
+
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, "quantum tunnelling",
+ "change-reason", G_TYPE_UINT, expected_reason,
+ "actor", G_TYPE_UINT, 0,
+ NULL);
+
tp_group_mixin_change_members ((GObject *) service_chan,
- "quantum tunnelling", add, NULL, NULL, NULL, 0, expected_reason);
+ add, NULL, NULL, NULL, details);
- /* Clear the queue to ensure that there aren't any more
- * MembersChanged[Detailed] signals waiting for us.
- */
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
+ tp_clear_pointer (&details, g_hash_table_unref);
+
+ /* Run until we get "group-members-changed" signal */
+ g_main_loop_run (loop);
expected_members = add;
- MYASSERT (tp_intset_is_equal (expected_members,
- tp_channel_group_get_members (chan)), "");
+ tp_tests_channel_assert_expect_members (chan, expected_members);
/* Add one, remove one. Check that the cache is properly updated. */
add = tp_intset_new ();
@@ -142,58 +111,28 @@ test_channel_proxy (TpTestsTextChannelGroup *service_chan,
tp_intset_add (rem, h1);
expecting_group_members_changed = TRUE;
- expecting_group_members_changed_detailed = TRUE;
expected_reason++;
+
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, "goat",
+ "change-reason", G_TYPE_UINT, expected_reason,
+ "actor", G_TYPE_UINT, 0,
+ NULL);
+
tp_group_mixin_change_members ((GObject *) service_chan,
- "goat", add, rem, NULL, NULL, 0, expected_reason);
+ add, rem, NULL, NULL, details);
+
+ tp_clear_pointer (&details, g_hash_table_unref);
tp_intset_destroy (add);
tp_intset_destroy (rem);
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
+ /* Run until we get "group-members-changed" signal */
+ g_main_loop_run (loop);
tp_intset_add (expected_members, h3);
tp_intset_remove (expected_members, h1);
- MYASSERT (tp_intset_is_equal (expected_members,
- tp_channel_group_get_members (chan)), "");
-
- /* Now, emit a spurious instance of whichever DBus signal the proxy should
- * not be listening to to check it's really not listening to it. If the
- * TpChannel is reacting to the wrong DBus signal, it'll trigger an assertion
- * in the GObject signal handlers.
- */
- yarr = g_array_new (FALSE, FALSE, sizeof (TpHandle));
- arr = g_array_sized_new (FALSE, FALSE, sizeof (TpHandle), 1);
- g_array_insert_val (arr, 0, h1);
-
- expecting_group_members_changed = FALSE;
- expecting_group_members_changed_detailed = FALSE;
-
- if (detailed)
- {
- tp_svc_channel_interface_group_emit_members_changed (service_chan,
- "whee", arr, yarr, yarr, yarr, 0,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
- }
- else
- {
- GHashTable *details = g_hash_table_new (NULL, NULL);
-
- tp_svc_channel_interface_group_emit_members_changed_detailed (
- service_chan, arr, yarr, yarr, yarr, details);
- g_hash_table_unref (details);
- }
-
- g_array_unref (yarr);
- g_array_unref (arr);
-
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
-
- /* And, the cache of group members should be unaltered, since the signal the
- * TpChannel cares about was not fired.
- */
- MYASSERT (tp_intset_is_equal (expected_members,
- tp_channel_group_get_members (chan)), "");
+ tp_tests_channel_assert_expect_members (chan, expected_members);
tp_intset_destroy (expected_members);
}
@@ -207,65 +146,25 @@ channel_invalidated_cb (TpProxy *proxy,
{
DEBUG ("called");
MYASSERT (expecting_invalidated, ": I've been EXPECTING YOU");
- g_assert_cmpuint (domain, ==, TP_DBUS_ERRORS);
- MYASSERT (code == TP_DBUS_ERROR_INCONSISTENT, ": was %i", code);
-
- expecting_invalidated = FALSE;
-}
-
-static void
-test_invalidated_on_illegal_change (TpTestsTextChannelGroup *serv_chan,
- TpChannel *chan,
- gboolean detailed,
- gboolean properties)
-{
- TpChannelGroupFlags add, del;
-
- DEBUG ("This channel has detailed %sset and properties %sset",
- (detailed ? "" : "un"), (properties ? "" : "un"));
-
- /* If we re-set or -unset the flags the channel already has, then the
- * TpChannel shouldn't care. This emits the signal directly rather than going
- * through the mixin, because the mixin helpfully optimizes out the spurious
- * change notification.
- */
expecting_invalidated = FALSE;
- add = del = 0;
- *(detailed ? &add : &del) |= TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED;
- *(properties ? &add : &del) |= TP_CHANNEL_GROUP_FLAG_PROPERTIES;
- DEBUG ("Changing flags: add %u, del %u", add, del);
- tp_svc_channel_interface_group_emit_group_flags_changed (serv_chan, add, del);
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
-
- /* Now, let's flip the Detailed and Properties flags, and check that the
- * proxy gets invalidated due to inconsistency on the part of the service.
- */
- expecting_invalidated = TRUE;
- DEBUG ("Changing flags: add %u, del %u", del, add);
- tp_group_mixin_change_flags ((GObject *) serv_chan, del, add);
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
-
- MYASSERT (!expecting_invalidated, ": invalidated should have fired");
}
static void
-run_membership_test (guint channel_number,
- gboolean detailed,
- gboolean properties)
+run_membership_test (void)
{
gchar *chan_path;
TpTestsTextChannelGroup *service_chan;
TpChannel *chan;
GError *error = NULL;
+ guint invalidated_id = 0;
- chan_path = g_strdup_printf ("%s/Channel%u", conn_path, channel_number);
+ chan_path = g_strdup_printf ("%s/Channel",
+ tp_proxy_get_object_path (conn));
service_chan = TP_TESTS_TEXT_CHANNEL_GROUP (
tp_tests_object_new_static_class (
TP_TESTS_TYPE_TEXT_CHANNEL_GROUP,
"connection", service_conn,
"object-path", chan_path,
- "detailed", detailed,
- "properties", properties,
NULL));
chan = tp_channel_new (conn, chan_path, NULL, TP_UNKNOWN_HANDLE_TYPE, 0,
&error);
@@ -273,30 +172,18 @@ run_membership_test (guint channel_number,
g_assert_no_error (error);
expecting_invalidated = FALSE;
- g_signal_connect (chan, "invalidated", (GCallback) channel_invalidated_cb,
- NULL);
+ invalidated_id = g_signal_connect (chan, "invalidated",
+ (GCallback) channel_invalidated_cb, NULL);
- test_channel_proxy (service_chan, chan, detailed, properties);
- test_invalidated_on_illegal_change (service_chan, chan, detailed, properties);
+ test_channel_proxy (service_chan, chan);
+
+ g_signal_handler_disconnect (chan, invalidated_id);
g_object_unref (chan);
g_object_unref (service_chan);
g_free (chan_path);
}
-static void
-run_membership_tests (void)
-{
- /* Run a set of sanity checks on a series of channels, with all 4
- * combinations of states of the of the Members_Changed_Detailed and
- * Properties group flags.
- */
- run_membership_test (1, FALSE, FALSE);
- run_membership_test (2, FALSE, TRUE);
- run_membership_test (3, TRUE, FALSE);
- run_membership_test (4, TRUE, TRUE);
-}
-
#define REMOVED_REASON TP_CHANNEL_GROUP_CHANGE_REASON_NO_ANSWER
#define REMOVED_KNOWN_ERROR_CODE TP_ERROR_CONNECTION_REFUSED
#define REMOVED_KNOWN_ERROR_STR TP_ERROR_STR_CONNECTION_REFUSED
@@ -328,64 +215,81 @@ check_invalidated_unknown_error_cb (TpProxy *proxy,
REMOVED_MESSAGE);
}
+static void
+run_until_members_changed (TpChannel *channel)
+{
+ GMainLoop *loop = g_main_loop_new (NULL, FALSE);
+ gulong id;
+
+ id = g_signal_connect_swapped (channel, "group-members-changed",
+ G_CALLBACK (g_main_loop_quit), loop);
+
+ g_main_loop_run (loop);
+
+ g_signal_handler_disconnect (channel, id);
+
+ g_main_loop_unref (loop);
+}
static void
check_removed_unknown_error_in_invalidated (void)
{
+ GQuark features[] = { TP_CHANNEL_FEATURE_GROUP, 0 };
gchar *chan_path;
TpTestsTextChannelGroup *service_chan;
TpChannel *chan;
TpIntset *self_handle_singleton = tp_intset_new ();
- GHashTable *details = g_hash_table_new_full (g_str_hash, g_str_equal, NULL,
- (GDestroyNotify) tp_g_value_slice_free);
gboolean invalidated = FALSE;
GError *error = NULL;
+ GHashTable *details;
- chan_path = g_strdup_printf ("%s/Channel_1_6180339887", conn_path);
+ chan_path = g_strdup_printf ("%s/Channel_1_6180339887",
+ tp_proxy_get_object_path (conn));
service_chan = TP_TESTS_TEXT_CHANNEL_GROUP (
tp_tests_object_new_static_class (
TP_TESTS_TYPE_TEXT_CHANNEL_GROUP,
"connection", service_conn,
"object-path", chan_path,
- "detailed", TRUE,
- "properties", TRUE,
NULL));
chan = tp_channel_new (conn, chan_path, NULL, TP_UNKNOWN_HANDLE_TYPE, 0,
&error);
g_assert_no_error (error);
- MYASSERT (tp_channel_run_until_ready (chan, &error, NULL), "");
- g_assert_no_error (error);
+ tp_tests_proxy_run_until_prepared (chan, features);
DEBUG ("ready!");
g_signal_connect (chan, "invalidated",
(GCallback) check_invalidated_unknown_error_cb, &invalidated);
- tp_intset_add (self_handle_singleton, self_handle);
- tp_group_mixin_change_members ((GObject *) service_chan, "hello",
- self_handle_singleton, NULL, NULL, NULL, 0,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, "hello",
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
+ "actor", G_TYPE_UINT, 0,
+ NULL);
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
+ tp_intset_add (self_handle_singleton, self_handle);
+ tp_group_mixin_change_members ((GObject *) service_chan,
+ self_handle_singleton, NULL, NULL, NULL, details);
- g_hash_table_insert (details, "change-reason",
- tp_g_value_slice_new_uint (REMOVED_REASON));
+ tp_clear_pointer (&details, g_hash_table_unref);
- g_hash_table_insert (details, "message",
- tp_g_value_slice_new_static_string (REMOVED_MESSAGE));
+ run_until_members_changed (chan);
- g_hash_table_insert (details, "error",
- tp_g_value_slice_new_static_string (REMOVED_UNKNOWN_ERROR));
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, REMOVED_MESSAGE,
+ "change-reason", G_TYPE_UINT, REMOVED_REASON,
+ "error", G_TYPE_STRING, REMOVED_UNKNOWN_ERROR,
+ NULL);
- tp_group_mixin_change_members_detailed ((GObject *) service_chan, NULL,
+ tp_group_mixin_change_members ((GObject *) service_chan, NULL,
self_handle_singleton, NULL, NULL, details);
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
+ run_until_members_changed (chan);
tp_cli_channel_call_close (chan, -1, NULL, NULL, NULL, NULL);
- g_hash_table_unref (details);
+ tp_clear_pointer (&details, g_hash_table_unref);
tp_tests_proxy_run_until_dbus_queue_processed (conn);
@@ -422,6 +326,7 @@ check_invalidated_known_error_cb (TpProxy *proxy,
static void
check_removed_known_error_in_invalidated (void)
{
+ GQuark features[] = { TP_CHANNEL_FEATURE_GROUP, 0 };
gchar *chan_path;
TpTestsTextChannelGroup *service_chan;
TpChannel *chan;
@@ -431,50 +336,52 @@ check_removed_known_error_in_invalidated (void)
gboolean invalidated = FALSE;
GError *error = NULL;
- chan_path = g_strdup_printf ("%s/Channel_1_6180339887", conn_path);
+ chan_path = g_strdup_printf ("%s/Channel_1_6180339887",
+ tp_proxy_get_object_path (conn));
service_chan = TP_TESTS_TEXT_CHANNEL_GROUP (g_object_new (
TP_TESTS_TYPE_TEXT_CHANNEL_GROUP,
"connection", service_conn,
"object-path", chan_path,
- "detailed", TRUE,
- "properties", TRUE,
NULL));
chan = tp_channel_new (conn, chan_path, NULL, TP_UNKNOWN_HANDLE_TYPE, 0,
&error);
g_assert_no_error (error);
- MYASSERT (tp_channel_run_until_ready (chan, &error, NULL), "");
- g_assert_no_error (error);
+ tp_tests_proxy_run_until_prepared (chan, features);
DEBUG ("ready!");
g_signal_connect (chan, "invalidated",
(GCallback) check_invalidated_known_error_cb, &invalidated);
- tp_intset_add (self_handle_singleton, self_handle);
- tp_group_mixin_change_members ((GObject *) service_chan, "hello",
- self_handle_singleton, NULL, NULL, NULL, 0,
- TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, "hello",
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
+ "actor", G_TYPE_UINT, 0,
+ NULL);
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
+ tp_intset_add (self_handle_singleton, self_handle);
+ tp_group_mixin_change_members ((GObject *) service_chan,
+ self_handle_singleton, NULL, NULL, NULL, details);
- g_hash_table_insert (details, "change-reason",
- tp_g_value_slice_new_uint (REMOVED_REASON));
+ tp_clear_pointer (&details, g_hash_table_unref);
- g_hash_table_insert (details, "message",
- tp_g_value_slice_new_static_string (REMOVED_MESSAGE));
+ run_until_members_changed (chan);
- g_hash_table_insert (details, "error",
- tp_g_value_slice_new_static_string (REMOVED_KNOWN_ERROR_STR));
+ details = tp_asv_new (
+ "message", G_TYPE_STRING, REMOVED_MESSAGE,
+ "change-reason", G_TYPE_UINT, REMOVED_REASON,
+ "error", G_TYPE_STRING, REMOVED_KNOWN_ERROR_STR,
+ NULL);
- tp_group_mixin_change_members_detailed ((GObject *) service_chan, NULL,
+ tp_group_mixin_change_members ((GObject *) service_chan, NULL,
self_handle_singleton, NULL, NULL, details);
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
+ run_until_members_changed (chan);
tp_cli_channel_call_close (chan, -1, NULL, NULL, NULL, NULL);
- g_hash_table_unref (details);
+ tp_clear_pointer (&details, g_hash_table_unref);
tp_tests_proxy_run_until_dbus_queue_processed (conn);
@@ -491,35 +398,15 @@ main (int argc,
char **argv)
{
TpBaseConnection *service_conn_as_base;
- TpDBusDaemon *dbus;
GError *error = NULL;
- gchar *name;
tp_tests_abort_after (10);
g_type_init ();
tp_debug_set_flags ("all");
- dbus = tp_tests_dbus_daemon_dup_or_die ();
-
- service_conn = TP_TESTS_SIMPLE_CONNECTION (tp_tests_object_new_static_class (
- TP_TESTS_TYPE_SIMPLE_CONNECTION,
- "account", "me@example.com",
- "protocol", "simple",
- NULL));
- service_conn_as_base = TP_BASE_CONNECTION (service_conn);
- MYASSERT (service_conn != NULL, "");
- MYASSERT (service_conn_as_base != NULL, "");
-
- MYASSERT (tp_base_connection_register (service_conn_as_base, "simple",
- &name, &conn_path, &error), "");
- g_assert_no_error (error);
-
- conn = tp_connection_new (dbus, name, conn_path, &error);
- MYASSERT (conn != NULL, "");
- g_assert_no_error (error);
- MYASSERT (tp_connection_run_until_ready (conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
+ tp_tests_create_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION, "me@example.com",
+ TRUE, &service_conn_as_base, &conn);
+ service_conn = TP_TESTS_SIMPLE_CONNECTION (service_conn_as_base);
contact_repo = tp_base_connection_get_handles (service_conn_as_base,
TP_HANDLE_TYPE_CONTACT);
@@ -534,7 +421,7 @@ main (int argc,
MYASSERT (tp_cli_connection_run_connect (conn, -1, &error, NULL), "");
g_assert_no_error (error);
- run_membership_tests ();
+ run_membership_test ();
check_removed_unknown_error_in_invalidated ();
check_removed_known_error_in_invalidated ();
@@ -549,9 +436,6 @@ main (int argc,
service_conn_as_base = NULL;
g_object_unref (service_conn);
- g_object_unref (dbus);
- g_free (name);
- g_free (conn_path);
return 0;
}
diff --git a/tests/dbus/client-channel-factory.c b/tests/dbus/client-channel-factory.c
deleted file mode 100644
index a3cbb26e0..000000000
--- a/tests/dbus/client-channel-factory.c
+++ /dev/null
@@ -1,271 +0,0 @@
-/* Tests of TpAutomaticProxyFactory and TpBasicProxyFactory
- *
- * Copyright © 2010 Collabora Ltd. <http://www.collabora.co.uk/>
- *
- * Copying and distribution of this file, with or without modification,
- * are permitted in any medium without royalty provided the copyright
- * notice and this notice are preserved.
- */
-
-#include "config.h"
-
-#include <string.h>
-
-#include <telepathy-glib/telepathy-glib.h>
-
-#include "tests/lib/util.h"
-#include "tests/lib/simple-conn.h"
-#include "tests/lib/stream-tube-chan.h"
-
-typedef struct {
- GMainLoop *mainloop;
- TpDBusDaemon *dbus;
-
- /* Service side objects */
- TpBaseConnection *base_connection;
- TpTestsStreamTubeChannel *tube_chan_service;
- TpHandleRepoIface *contact_repo;
-
- /* Client side objects */
- TpConnection *connection;
-
- TpClientChannelFactory *factory;
-
- GError *error /* initialized where needed */;
- gint wait;
-} Test;
-
-static void
-create_tube_service (Test *test)
-{
- gchar *chan_path;
- TpHandle handle, alf_handle;
- GType type;
-
- tp_clear_object (&test->tube_chan_service);
-
- /* Create service-side tube channel object */
- chan_path = g_strdup_printf ("%s/Channel",
- tp_proxy_get_object_path (test->connection));
-
- test->contact_repo = tp_base_connection_get_handles (test->base_connection,
- TP_HANDLE_TYPE_CONTACT);
- g_assert (test->contact_repo != NULL);
-
- handle = tp_handle_ensure (test->contact_repo, "bob", NULL, &test->error);
- type = TP_TESTS_TYPE_CONTACT_STREAM_TUBE_CHANNEL;
-
- g_assert_no_error (test->error);
-
- alf_handle = tp_handle_ensure (test->contact_repo, "alf", NULL, &test->error);
- g_assert_no_error (test->error);
-
- test->tube_chan_service = g_object_new (
- type,
- "connection", test->base_connection,
- "handle", handle,
- "requested", TRUE,
- "object-path", chan_path,
- "initiator-handle", alf_handle,
- NULL);
-
- g_free (chan_path);
-
- tp_handle_unref (test->contact_repo, handle);
-}
-
-static void
-setup (Test *test,
- gconstpointer data)
-{
- test->mainloop = g_main_loop_new (NULL, FALSE);
- test->dbus = tp_tests_dbus_daemon_dup_or_die ();
-
- test->error = NULL;
-
- /* Create (service and client sides) connection objects */
- tp_tests_create_and_connect_conn (TP_TESTS_TYPE_SIMPLE_CONNECTION,
- "me@test.com", &test->base_connection, &test->connection);
-
- create_tube_service (test);
-}
-
-static void
-teardown (Test *test,
- gconstpointer data)
-{
- g_clear_error (&test->error);
-
- tp_clear_object (&test->dbus);
- g_main_loop_unref (test->mainloop);
- test->mainloop = NULL;
-
- tp_clear_object (&test->tube_chan_service);
-
- tp_tests_connection_assert_disconnect_succeeds (test->connection);
- g_object_unref (test->connection);
- g_object_unref (test->base_connection);
-
- tp_clear_object (&test->factory);
-}
-
-static void
-test_basic_creation (Test *test,
- gconstpointer data G_GNUC_UNUSED)
-{
- test->factory = TP_CLIENT_CHANNEL_FACTORY (tp_basic_proxy_factory_new ());
-
- g_assert (TP_IS_BASIC_PROXY_FACTORY (test->factory));
- g_assert (TP_IS_CLIENT_CHANNEL_FACTORY (test->factory));
-}
-
-static void
-test_auto_creation (Test *test,
- gconstpointer data G_GNUC_UNUSED)
-{
- test->factory = TP_CLIENT_CHANNEL_FACTORY (
- tp_automatic_proxy_factory_new ());
-
- g_assert (TP_IS_AUTOMATIC_PROXY_FACTORY (test->factory));
- g_assert (TP_IS_CLIENT_CHANNEL_FACTORY (test->factory));
-}
-
-static gboolean
-array_contains_feature (GArray *features,
- const GQuark feature)
-{
- guint i;
-
- for (i = 0; i < features->len; i++)
- {
- if (g_array_index (features, GQuark, i) == feature)
- return TRUE;
- }
-
- return FALSE;
-}
-
-/* Create a proxy for a stream tube */
-static void
-test_basic_stream_tube (Test *test,
- gconstpointer data G_GNUC_UNUSED)
-{
- TpChannel *chan;
- gchar *chan_path;
- GHashTable *props;
- GArray *features;
-
- test->factory = TP_CLIENT_CHANNEL_FACTORY (tp_basic_proxy_factory_new ());
-
- g_object_get (test->tube_chan_service,
- "object-path", &chan_path,
- "channel-properties", &props,
- NULL);
-
- chan = tp_client_channel_factory_create_channel (test->factory,
- test->connection, chan_path, props, &test->error);
- g_assert_no_error (test->error);
-
- g_assert (TP_IS_CHANNEL (chan));
- g_assert (!TP_IS_STREAM_TUBE_CHANNEL (chan));
-
- features = tp_client_channel_factory_dup_channel_features (test->factory,
- chan);
- g_assert_cmpuint (features->len, ==, 1);
- g_assert (array_contains_feature (features, TP_CHANNEL_FEATURE_CORE));
-
- g_free (chan_path);
- g_hash_table_unref (props);
- g_array_unref (features);
-}
-
-static void
-test_auto_stream_tube (Test *test,
- gconstpointer data G_GNUC_UNUSED)
-{
- TpChannel *chan;
- gchar *chan_path;
- GHashTable *props;
- GArray *features;
-
- test->factory = TP_CLIENT_CHANNEL_FACTORY (
- tp_automatic_proxy_factory_new ());
-
- g_object_get (test->tube_chan_service,
- "object-path", &chan_path,
- "channel-properties", &props,
- NULL);
-
- chan = tp_client_channel_factory_create_channel (test->factory,
- test->connection, chan_path, props, &test->error);
- g_assert_no_error (test->error);
-
- g_assert (TP_IS_CHANNEL (chan));
- g_assert (TP_IS_STREAM_TUBE_CHANNEL (chan));
-
- features = tp_client_channel_factory_dup_channel_features (test->factory,
- chan);
- g_assert_cmpuint (features->len, ==, 3);
- g_assert (array_contains_feature (features, TP_CHANNEL_FEATURE_CORE));
- g_assert (array_contains_feature (features, TP_CHANNEL_FEATURE_GROUP));
- g_assert (array_contains_feature (features, TP_CHANNEL_FEATURE_PASSWORD));
-
- g_free (chan_path);
- g_hash_table_unref (props);
- g_array_unref (features);
-}
-
-static void
-test_basic_dup (Test *test,
- gconstpointer data G_GNUC_UNUSED)
-{
- TpBasicProxyFactory *fac;
-
- test->factory = TP_CLIENT_CHANNEL_FACTORY (tp_basic_proxy_factory_dup ());
- g_assert (TP_IS_BASIC_PROXY_FACTORY (test->factory));
- g_assert (TP_IS_CLIENT_CHANNEL_FACTORY (test->factory));
-
- fac = tp_basic_proxy_factory_dup ();
- g_assert ((gpointer) fac == (gpointer) test->factory);
-
- g_object_unref (fac);
-}
-
-static void
-test_auto_dup (Test *test,
- gconstpointer data G_GNUC_UNUSED)
-{
- TpAutomaticProxyFactory *fac;
-
- test->factory = TP_CLIENT_CHANNEL_FACTORY (tp_automatic_proxy_factory_dup ());
- g_assert (TP_IS_AUTOMATIC_PROXY_FACTORY (test->factory));
- g_assert (TP_IS_CLIENT_CHANNEL_FACTORY (test->factory));
-
- fac = tp_automatic_proxy_factory_dup ();
- g_assert ((gpointer) fac == (gpointer) test->factory);
-
- g_object_unref (fac);
-}
-
-int
-main (int argc,
- char **argv)
-{
- tp_tests_init (&argc, &argv);
- g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
-
- g_test_add ("/client-channel-factory/basic/creation", Test, NULL, setup,
- test_basic_creation, teardown);
- g_test_add ("/client-channel-factory/auto/creation", Test, NULL, setup,
- test_auto_creation, teardown);
- g_test_add ("/client-channel-factory/basic/stream-tube", Test, NULL, setup,
- test_basic_stream_tube, teardown);
- g_test_add ("/client-channel-factory/auto/stream-tube", Test, NULL, setup,
- test_auto_stream_tube, teardown);
- g_test_add ("/client-channel-factory/basic/dup", Test, NULL, setup,
- test_basic_dup, teardown);
- g_test_add ("/client-channel-factory/auto/dup", Test, NULL, setup,
- test_auto_dup, teardown);
-
- return g_test_run ();
-}
diff --git a/tests/dbus/client.c b/tests/dbus/client.c
index 2bde19c3e..e1da18ebc 100644
--- a/tests/dbus/client.c
+++ b/tests/dbus/client.c
@@ -58,8 +58,8 @@ test_new (Test *test,
{
test->client = tp_tests_object_new_static_class (TP_TYPE_CLIENT,
"dbus-daemon", test->dbus,
- "object-path", "/org/freedesktop/Telepathy/Client/whatever",
- "bus-name", "org.freedesktop.Telepathy.Client.whatever",
+ "object-path", "/im/telepathy1/Client/whatever",
+ "bus-name", "im.telepathy1.Client.whatever",
NULL);
g_assert (test->client != NULL);
}
diff --git a/tests/dbus/cm-message.c b/tests/dbus/cm-message.c
index 39ad3de0b..5977139e7 100644
--- a/tests/dbus/cm-message.c
+++ b/tests/dbus/cm-message.c
@@ -1,12 +1,13 @@
#include "config.h"
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include <telepathy-glib/cm-message.h>
#include "telepathy-glib/cm-message-internal.h"
#include <telepathy-glib/util-internal.h>
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/util.h"
typedef struct {
@@ -25,7 +26,7 @@ setup (Test *test,
g_type_init ();
tp_debug_set_flags ("all");
- tp_tests_create_and_connect_conn (TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ tp_tests_create_and_connect_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION,
"me@test.com", &test->base_connection, &test->connection);
test->contact_repo = tp_base_connection_get_handles (test->base_connection,
diff --git a/tests/dbus/cm.c b/tests/dbus/cm.c
index ade565cd3..c33c2867b 100644
--- a/tests/dbus/cm.c
+++ b/tests/dbus/cm.c
@@ -11,14 +11,14 @@
#include "config.h"
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include "tests/lib/echo-cm.h"
#include "tests/lib/util.h"
typedef enum {
ACTIVATE_CM = (1 << 0),
- USE_CWR = (1 << 1),
- USE_OLD_LIST = (1 << 2)
+ USE_OLD_LIST = (1 << 1)
} TestFlags;
typedef struct {
@@ -32,69 +32,6 @@ typedef struct {
GError *error /* initialized where needed */;
} Test;
-typedef TpTestsEchoConnectionManager PropertylessConnectionManager;
-typedef TpTestsEchoConnectionManagerClass PropertylessConnectionManagerClass;
-
-static void stub_properties_iface_init (gpointer iface);
-static GType propertyless_connection_manager_get_type (void);
-
-G_DEFINE_TYPE_WITH_CODE (PropertylessConnectionManager,
- propertyless_connection_manager,
- TP_TESTS_TYPE_ECHO_CONNECTION_MANAGER,
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_DBUS_PROPERTIES,
- stub_properties_iface_init))
-
-static void
-propertyless_connection_manager_class_init (
- PropertylessConnectionManagerClass *cls)
-{
-}
-
-static void
-propertyless_connection_manager_init (PropertylessConnectionManager *self)
-{
-}
-
-static void
-stub_get (TpSvcDBusProperties *iface G_GNUC_UNUSED,
- const gchar *i G_GNUC_UNUSED,
- const gchar *p G_GNUC_UNUSED,
- DBusGMethodInvocation *context)
-{
- tp_dbus_g_method_return_not_implemented (context);
-}
-
-static void
-stub_get_all (TpSvcDBusProperties *iface G_GNUC_UNUSED,
- const gchar *i G_GNUC_UNUSED,
- DBusGMethodInvocation *context)
-{
- tp_dbus_g_method_return_not_implemented (context);
-}
-
-static void
-stub_set (TpSvcDBusProperties *iface G_GNUC_UNUSED,
- const gchar *i G_GNUC_UNUSED,
- const gchar *p G_GNUC_UNUSED,
- const GValue *v G_GNUC_UNUSED,
- DBusGMethodInvocation *context)
-{
- tp_dbus_g_method_return_not_implemented (context);
-}
-
-static void
-stub_properties_iface_init (gpointer iface)
-{
- TpSvcDBusPropertiesClass *cls = iface;
-
-#define IMPLEMENT(x) \
- tp_svc_dbus_properties_implement_##x (cls, stub_##x)
- IMPLEMENT (get);
- IMPLEMENT (get_all);
- IMPLEMENT (set);
-#undef IMPLEMENT
-}
-
static void
setup (Test *test,
gconstpointer data)
@@ -732,26 +669,11 @@ test_dbus_got_info (Test *test,
}
static void
-ready_or_not (TpConnectionManager *self,
- const GError *error,
- gpointer user_data,
- GObject *weak_object G_GNUC_UNUSED)
-{
- Test *test = user_data;
-
- if (error != NULL)
- test->error = g_error_copy (error);
-
- g_main_loop_quit (test->mainloop);
-}
-
-static void
test_nothing_ready (Test *test,
gconstpointer data)
{
gchar *name;
guint info_source;
- TestFlags flags = GPOINTER_TO_INT (data);
test->error = NULL;
test->cm = tp_connection_manager_new (test->dbus, "nonexistent_cm",
@@ -761,25 +683,12 @@ test_nothing_ready (Test *test,
g_test_bug ("18291");
- if (flags & USE_CWR)
- {
- tp_connection_manager_call_when_ready (test->cm, ready_or_not,
- test, NULL, NULL);
- g_main_loop_run (test->mainloop);
- g_assert (test->error != NULL);
- g_clear_error (&test->error);
- }
- else
- {
- tp_tests_proxy_run_until_prepared_or_failed (test->cm, NULL,
- &test->error);
-
- g_assert_error (test->error, DBUS_GERROR, DBUS_GERROR_SERVICE_UNKNOWN);
- }
+ tp_tests_proxy_run_until_prepared_or_failed (test->cm, NULL,
+ &test->error);
+ g_assert_error (test->error, DBUS_GERROR, DBUS_GERROR_SERVICE_UNKNOWN);
g_assert_cmpstr (tp_connection_manager_get_name (test->cm), ==,
"nonexistent_cm");
- g_assert_cmpuint (tp_connection_manager_is_ready (test->cm), ==, FALSE);
g_assert_cmpuint (tp_proxy_is_prepared (test->cm,
TP_CONNECTION_MANAGER_FEATURE_CORE), ==, FALSE);
g_assert (tp_proxy_get_invalidated (test->cm) == NULL);
@@ -802,7 +711,6 @@ test_file_ready (Test *test,
{
gchar *name;
guint info_source;
- TestFlags flags = GPOINTER_TO_INT (data);
GList *l;
test->error = NULL;
@@ -813,21 +721,10 @@ test_file_ready (Test *test,
g_test_bug ("18291");
- if (flags & USE_CWR)
- {
- tp_connection_manager_call_when_ready (test->cm, ready_or_not,
- test, NULL, NULL);
- g_main_loop_run (test->mainloop);
- g_assert_no_error (test->error);
- }
- else
- {
- tp_tests_proxy_run_until_prepared (test->cm, NULL);
- }
+ tp_tests_proxy_run_until_prepared (test->cm, NULL);
g_assert_cmpstr (tp_connection_manager_get_name (test->cm), ==,
"spurious");
- g_assert_cmpuint (tp_connection_manager_is_ready (test->cm), ==, TRUE);
g_assert_cmpuint (tp_connection_manager_is_running (test->cm), ==, FALSE);
g_assert_cmpuint (tp_proxy_is_prepared (test->cm,
TP_CONNECTION_MANAGER_FEATURE_CORE), ==, TRUE);
@@ -856,7 +753,6 @@ test_complex_file_ready (Test *test,
{
gchar *name;
guint info_source;
- TestFlags flags = GPOINTER_TO_INT (data);
test->error = NULL;
test->cm = tp_connection_manager_new (test->dbus, "test_manager_file",
@@ -866,24 +762,13 @@ test_complex_file_ready (Test *test,
g_test_bug ("18291");
- if (flags & USE_CWR)
- {
- tp_connection_manager_call_when_ready (test->cm, ready_or_not,
- test, NULL, NULL);
- g_main_loop_run (test->mainloop);
- g_assert_no_error (test->error);
- }
- else
- {
- tp_tests_proxy_run_until_prepared (test->cm, NULL);
- }
+ tp_tests_proxy_run_until_prepared (test->cm, NULL);
g_assert_cmpstr (tp_connection_manager_get_name (test->cm), ==,
"test_manager_file");
g_assert_cmpuint (tp_proxy_is_prepared (test->cm,
TP_CONNECTION_MANAGER_FEATURE_CORE), ==, TRUE);
g_assert (tp_proxy_get_invalidated (test->cm) == NULL);
- g_assert_cmpuint (tp_connection_manager_is_ready (test->cm), ==, TRUE);
g_assert_cmpuint (tp_connection_manager_is_running (test->cm), ==, FALSE);
g_assert_cmpuint (tp_connection_manager_get_info_source (test->cm), ==,
TP_CM_INFO_SOURCE_FILE);
@@ -937,24 +822,13 @@ test_dbus_ready (Test *test,
g_test_bug ("18291");
}
- if (flags & USE_CWR)
- {
- tp_connection_manager_call_when_ready (test->cm, ready_or_not,
- test, NULL, NULL);
- g_main_loop_run (test->mainloop);
- g_assert_no_error (test->error);
- }
- else
- {
- tp_tests_proxy_run_until_prepared (test->cm, NULL);
- }
+ tp_tests_proxy_run_until_prepared (test->cm, NULL);
g_assert_cmpstr (tp_connection_manager_get_name (test->cm), ==,
"example_echo");
g_assert_cmpuint (tp_proxy_is_prepared (test->cm,
TP_CONNECTION_MANAGER_FEATURE_CORE), ==, TRUE);
g_assert (tp_proxy_get_invalidated (test->cm) == NULL);
- g_assert_cmpuint (tp_connection_manager_is_ready (test->cm), ==, TRUE);
g_assert_cmpuint (tp_connection_manager_is_running (test->cm), ==, TRUE);
g_assert_cmpuint (tp_connection_manager_get_info_source (test->cm), ==,
TP_CM_INFO_SOURCE_LIVE);
@@ -974,84 +848,6 @@ test_dbus_ready (Test *test,
}
static void
-test_dbus_fallback (Test *test,
- gconstpointer data)
-{
- gchar *name;
- guint info_source;
- const TestFlags flags = GPOINTER_TO_INT (data);
- TpBaseConnectionManager *service_cm_as_base;
- gboolean ok;
-
- /* Register a stub version of the CM that doesn't have Properties, to
- * exercise the fallback path */
- g_object_unref (test->service_cm);
- test->service_cm = NULL;
- test->service_cm = TP_TESTS_ECHO_CONNECTION_MANAGER (tp_tests_object_new_static_class (
- propertyless_connection_manager_get_type (),
- NULL));
- g_assert (test->service_cm != NULL);
- service_cm_as_base = TP_BASE_CONNECTION_MANAGER (test->service_cm);
- g_assert (service_cm_as_base != NULL);
- ok = tp_base_connection_manager_register (service_cm_as_base);
- g_assert (ok);
-
- test->error = NULL;
- test->cm = tp_connection_manager_new (test->dbus,
- TP_BASE_CONNECTION_MANAGER_GET_CLASS (test->service_cm)->cm_dbus_name,
- NULL, &test->error);
- g_assert (TP_IS_CONNECTION_MANAGER (test->cm));
- g_assert_no_error (test->error);
-
- if (flags & ACTIVATE_CM)
- {
- g_test_bug ("23524");
-
- /* The bug being tested here was caused by ListProtocols being called
- * twice on the same CM; this can be triggered by _activate()ing at
- * exactly the wrong moment. But the wrong moment involves racing an
- * idle. This triggered the assertion about 1/3 of the time on my laptop.
- * --wjt
- */
- g_idle_add (idle_activate, test->cm);
- }
- else
- {
- g_test_bug ("18291");
- }
-
- if (flags & USE_CWR)
- {
- tp_connection_manager_call_when_ready (test->cm, ready_or_not,
- test, NULL, NULL);
- g_main_loop_run (test->mainloop);
- g_assert_no_error (test->error);
- }
- else
- {
- tp_tests_proxy_run_until_prepared (test->cm, NULL);
- }
-
- g_assert_cmpstr (tp_connection_manager_get_name (test->cm), ==,
- "example_echo");
- g_assert_cmpuint (tp_proxy_is_prepared (test->cm,
- TP_CONNECTION_MANAGER_FEATURE_CORE), ==, TRUE);
- g_assert (tp_proxy_get_invalidated (test->cm) == NULL);
- g_assert_cmpuint (tp_connection_manager_is_ready (test->cm), ==, TRUE);
- g_assert_cmpuint (tp_connection_manager_is_running (test->cm), ==, TRUE);
- g_assert_cmpuint (tp_connection_manager_get_info_source (test->cm), ==,
- TP_CM_INFO_SOURCE_LIVE);
-
- g_object_get (test->cm,
- "info-source", &info_source,
- "connection-manager", &name,
- NULL);
- g_assert_cmpstr (name, ==, "example_echo");
- g_assert_cmpuint (info_source, ==, TP_CM_INFO_SOURCE_LIVE);
- g_free (name);
-}
-
-static void
on_listed_connection_managers (TpConnectionManager * const * cms,
gsize n_cms,
const GError *error,
@@ -1128,9 +924,6 @@ test_list (Test *test,
g_assert (tp_proxy_get_invalidated (test->echo) == NULL);
g_assert (tp_proxy_get_invalidated (test->spurious) == NULL);
- g_assert (tp_connection_manager_is_ready (test->echo));
- g_assert (tp_connection_manager_is_ready (test->spurious));
-
g_assert_cmpuint (tp_connection_manager_get_info_source (test->echo),
==, TP_CM_INFO_SOURCE_LIVE);
g_assert_cmpuint (tp_connection_manager_get_info_source (test->spurious),
@@ -1160,35 +953,12 @@ main (int argc,
g_test_add ("/cm/nothing", Test, GINT_TO_POINTER (0),
setup, test_nothing_ready, teardown);
- g_test_add ("/cm/nothing/cwr", Test, GINT_TO_POINTER (USE_CWR),
- setup, test_nothing_ready, teardown);
g_test_add ("/cm/file", Test, GINT_TO_POINTER (0),
setup, test_file_ready, teardown);
- g_test_add ("/cm/file/cwr", Test, GINT_TO_POINTER (USE_CWR),
- setup, test_file_ready, teardown);
g_test_add ("/cm/file/complex", Test, GINT_TO_POINTER (0), setup,
test_complex_file_ready, teardown);
- g_test_add ("/cm/file/complex/cwr", Test, GINT_TO_POINTER (USE_CWR), setup,
- test_complex_file_ready, teardown);
g_test_add ("/cm/dbus", Test, GINT_TO_POINTER (0), setup,
test_dbus_ready, teardown);
- g_test_add ("/cm/dbus/cwr", Test, GINT_TO_POINTER (USE_CWR), setup,
- test_dbus_ready, teardown);
- g_test_add ("/cm/dbus/activate", Test, GINT_TO_POINTER (ACTIVATE_CM),
- setup, test_dbus_ready, teardown);
- g_test_add ("/cm/dbus/activate/cwr", Test,
- GINT_TO_POINTER (USE_CWR|ACTIVATE_CM),
- setup, test_dbus_ready, teardown);
- g_test_add ("/cm/dbus-fallback", Test, GINT_TO_POINTER (0), setup,
- test_dbus_fallback, teardown);
- g_test_add ("/cm/dbus-fallback/cwr", Test, GINT_TO_POINTER (USE_CWR), setup,
- test_dbus_fallback, teardown);
- g_test_add ("/cm/dbus-fallback/activate", Test,
- GINT_TO_POINTER (ACTIVATE_CM),
- setup, test_dbus_fallback, teardown);
- g_test_add ("/cm/dbus-fallback/activate/cwr", Test,
- GINT_TO_POINTER (ACTIVATE_CM | USE_CWR),
- setup, test_dbus_fallback, teardown);
g_test_add ("/cm/list", Test, GINT_TO_POINTER (0),
setup, test_list, teardown);
diff --git a/tests/dbus/connection-aliasing.c b/tests/dbus/connection-aliasing.c
index 3b5e6f89d..702383b9b 100644
--- a/tests/dbus/connection-aliasing.c
+++ b/tests/dbus/connection-aliasing.c
@@ -10,6 +10,7 @@
#include "config.h"
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
@@ -114,8 +115,7 @@ teardown (Test *test,
g_assert_no_error (error);
tp_tests_connection_assert_disconnect_succeeds (conn);
-
- g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
+ tp_tests_proxy_run_until_prepared_or_failed (conn, NULL, &error);
g_assert_error (error, TP_ERROR, TP_ERROR_CANCELLED);
g_clear_error (&error);
diff --git a/tests/dbus/connection-balance.c b/tests/dbus/connection-balance.c
index 3140e404f..88f2d09b0 100644
--- a/tests/dbus/connection-balance.c
+++ b/tests/dbus/connection-balance.c
@@ -10,16 +10,19 @@
#include "config.h"
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
+#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/proxy-subclass.h>
+#include <telepathy-glib/svc-connection.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/util.h"
#define BALANCE 1234
@@ -28,15 +31,15 @@
#define MANAGE_CREDIT_URI "http://chat.badger.net/topup"
/* -- BalancedConnection -- */
-typedef TpTestsSimpleConnection BalancedConnection;
-typedef TpTestsSimpleConnectionClass BalancedConnectionClass;
+typedef TpTestsContactsConnection BalancedConnection;
+typedef TpTestsContactsConnectionClass BalancedConnectionClass;
#define TYPE_BALANCED_CONNECTION (balanced_connection_get_type ())
static GType balanced_connection_get_type (void);
G_DEFINE_TYPE_WITH_CODE (BalancedConnection,
balanced_connection,
- TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ TP_TESTS_TYPE_CONTACTS_CONNECTION,
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_BALANCE, NULL))
@@ -75,15 +78,23 @@ balanced_connection_get_property (GObject *self G_GNUC_UNUSED,
}
static void
-balanced_connection_init (BalancedConnection *self G_GNUC_UNUSED)
+balanced_connection_init (BalancedConnection *self)
{
+ static const gchar *interfaces_always_present[] = {
+ TP_IFACE_CONNECTION_INTERFACE_BALANCE,
+ NULL
+ };
+
+ /* We cannot set base_class->interfaces_always_present because that would
+ * override interfaces set in TpTestsSimpleConnection */
+ tp_base_connection_add_interfaces ((TpBaseConnection *) self,
+ interfaces_always_present);
}
static void
balanced_connection_class_init (BalancedConnectionClass *cls)
{
GObjectClass *object_class = (GObjectClass *) cls;
- TpBaseConnectionClass *base_class = TP_BASE_CONNECTION_CLASS (cls);
static TpDBusPropertiesMixinPropImpl balance_props[] = {
{ "AccountBalance", "account-balance", NULL },
@@ -91,15 +102,8 @@ balanced_connection_class_init (BalancedConnectionClass *cls)
{ NULL }
};
- static const gchar *interfaces[] = {
- TP_IFACE_CONNECTION_INTERFACE_BALANCE,
- NULL
- };
-
object_class->get_property = balanced_connection_get_property;
- base_class->interfaces_always_present = interfaces;
-
g_object_class_install_property (object_class, PROP_ACCOUNT_BALANCE,
g_param_spec_boxed ("account-balance", "", "",
TP_STRUCT_TYPE_CURRENCY_AMOUNT,
@@ -117,8 +121,8 @@ balanced_connection_class_init (BalancedConnectionClass *cls)
}
/* -- UnbalancedConnection -- */
-typedef TpTestsSimpleConnection UnbalancedConnection;
-typedef TpTestsSimpleConnectionClass UnbalancedConnectionClass;
+typedef TpTestsContactsConnection UnbalancedConnection;
+typedef TpTestsContactsConnectionClass UnbalancedConnectionClass;
#define TYPE_UNBALANCED_CONNECTION (unbalanced_connection_get_type ())
static GType unbalanced_connection_get_type (void);
@@ -194,6 +198,8 @@ setup (Test *test,
GQuark features[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 };
GType conn_type = GPOINTER_TO_SIZE (data);
+ g_print ("setup for %s\n", g_type_name (conn_type));
+
g_type_init ();
tp_debug_set_flags ("all");
test->dbus = tp_tests_dbus_daemon_dup_or_die ();
@@ -260,8 +266,7 @@ teardown (Test *test,
g_assert_no_error (error);
tp_tests_connection_assert_disconnect_succeeds (conn);
-
- g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
+ tp_tests_proxy_run_until_prepared_or_failed (conn, NULL, &error);
g_assert_error (error, TP_ERROR, TP_ERROR_CANCELLED);
g_clear_error (&error);
@@ -387,7 +392,7 @@ main (int argc,
GSIZE_TO_POINTER (TYPE_UNBALANCED_CONNECTION),
setup, test_balance_unknown, teardown);
g_test_add ("/conn/balance-unimplemented", Test,
- GSIZE_TO_POINTER (TP_TESTS_TYPE_SIMPLE_CONNECTION),
+ GSIZE_TO_POINTER (TP_TESTS_TYPE_CONTACTS_CONNECTION),
setup, test_balance_unknown, teardown);
return g_test_run ();
diff --git a/tests/dbus/connection-bug-18845.c b/tests/dbus/connection-bug-18845.c
index 88a308114..ba93635a8 100644
--- a/tests/dbus/connection-bug-18845.c
+++ b/tests/dbus/connection-bug-18845.c
@@ -10,14 +10,17 @@
#include "config.h"
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/proxy-subclass.h>
+#include "telepathy-glib/reentrants.h"
+
#include "tests/lib/myassert.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/util.h"
static GMainLoop *mainloop;
@@ -39,8 +42,6 @@ main (int argc,
TpDBusDaemon *dbus;
TpTestsSimpleConnection *service_conn;
TpBaseConnection *service_conn_as_base;
- gchar *name;
- gchar *conn_path;
GError *error = NULL;
TpConnection *conn;
DBusGProxy *proxy;
@@ -53,25 +54,9 @@ main (int argc,
mainloop = g_main_loop_new (NULL, FALSE);
dbus = tp_tests_dbus_daemon_dup_or_die ();
- service_conn = TP_TESTS_SIMPLE_CONNECTION (tp_tests_object_new_static_class (
- TP_TESTS_TYPE_SIMPLE_CONNECTION,
- "account", "me@example.com",
- "protocol", "simple",
- NULL));
- service_conn_as_base = TP_BASE_CONNECTION (service_conn);
- MYASSERT (service_conn != NULL, "");
- MYASSERT (service_conn_as_base != NULL, "");
-
- MYASSERT (tp_base_connection_register (service_conn_as_base, "simple",
- &name, &conn_path, &error), "");
- g_assert_no_error (error);
-
- conn = tp_connection_new (dbus, name, conn_path, &error);
- MYASSERT (conn != NULL, "");
- g_assert_no_error (error);
- MYASSERT (tp_connection_run_until_ready (conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
+ tp_tests_create_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION, "me@example.com",
+ TRUE, &service_conn_as_base, &conn);
+ service_conn = TP_TESTS_SIMPLE_CONNECTION (service_conn_as_base);
{
const gchar *ids[] = {
@@ -104,20 +89,17 @@ main (int argc,
/* Make a new connection proxy so that we can call Disconnect() on the
* connection.
*/
- conn = tp_connection_new (dbus, name, conn_path, &error);
+ conn = tp_connection_new (dbus, service_conn_as_base->bus_name,
+ service_conn_as_base->object_path, &error);
MYASSERT (conn != NULL, "");
g_assert_no_error (error);
- MYASSERT (tp_connection_run_until_ready (conn, TRUE, &error, NULL), "");
- g_assert_no_error (error);
+ tp_tests_proxy_run_until_prepared (conn, NULL);
tp_tests_connection_assert_disconnect_succeeds (conn);
g_object_unref (conn);
service_conn_as_base = NULL;
g_object_unref (service_conn);
- g_free (name);
- g_free (conn_path);
-
g_object_unref (dbus);
g_main_loop_unref (mainloop);
diff --git a/tests/dbus/connection-error.c b/tests/dbus/connection-error.c
index 1ade331a8..ee055d554 100644
--- a/tests/dbus/connection-error.c
+++ b/tests/dbus/connection-error.c
@@ -10,6 +10,7 @@
#include "config.h"
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
@@ -18,7 +19,7 @@
#include <telepathy-glib/util.h>
#include "tests/lib/myassert.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/util.h"
static int connection_errors;
@@ -97,12 +98,9 @@ example_com_error_quark (void)
}
typedef struct {
- TpDBusDaemon *dbus;
GMainLoop *mainloop;
TpTestsSimpleConnection *service_conn;
TpBaseConnection *service_conn_as_base;
- gchar *conn_name;
- gchar *conn_path;
TpConnection *conn;
} Test;
@@ -127,34 +125,13 @@ static void
setup (Test *test,
gconstpointer nil G_GNUC_UNUSED)
{
- GError *error = NULL;
-
global_setup ();
test->mainloop = g_main_loop_new (NULL, FALSE);
- test->dbus = tp_tests_dbus_daemon_dup_or_die ();
-
- test->service_conn = TP_TESTS_SIMPLE_CONNECTION (
- tp_tests_object_new_static_class (
- TP_TESTS_TYPE_SIMPLE_CONNECTION,
- "account", "me@example.com",
- "protocol", "simple",
- NULL));
- test->service_conn_as_base = TP_BASE_CONNECTION (test->service_conn);
- MYASSERT (test->service_conn != NULL, "");
- MYASSERT (test->service_conn_as_base != NULL, "");
-
- MYASSERT (tp_base_connection_register (test->service_conn_as_base, "simple",
- &test->conn_name, &test->conn_path, &error), "");
- g_assert_no_error (error);
-
- test->conn = tp_connection_new (test->dbus, test->conn_name, test->conn_path,
- &error);
- MYASSERT (test->conn != NULL, "");
- g_assert_no_error (error);
- MYASSERT (tp_connection_run_until_ready (test->conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
+
+ tp_tests_create_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION, "me@example.com",
+ TRUE, &test->service_conn_as_base, &test->conn);
+ test->service_conn = TP_TESTS_SIMPLE_CONNECTION (test->service_conn_as_base);
}
static void
@@ -171,9 +148,6 @@ teardown (Test *test,
test->service_conn_as_base = NULL;
g_object_unref (test->service_conn);
- g_free (test->conn_name);
- g_free (test->conn_path);
- g_object_unref (test->dbus);
g_main_loop_unref (test->mainloop);
}
@@ -183,6 +157,7 @@ test_registered_error (Test *test,
{
GError *error = NULL;
const GHashTable *asv;
+ gboolean ok;
asv = GUINT_TO_POINTER (0xDEADBEEF);
g_assert_cmpstr (tp_connection_get_detailed_error (test->conn, NULL), ==,
@@ -205,10 +180,9 @@ test_registered_error (Test *test,
g_assert_cmpuint (connection_errors, ==, 1);
- MYASSERT (!tp_connection_run_until_ready (test->conn, FALSE, &error, NULL),
- "");
-
+ ok = tp_tests_proxy_run_until_prepared_or_failed (test->conn, NULL, &error);
g_assert_error (error, example_com_error_quark (), DOMAIN_SPECIFIC_ERROR);
+ g_assert (!ok);
g_assert_cmpstr (tp_connection_get_detailed_error (test->conn, NULL), ==,
"com.example.DomainSpecificError");
@@ -241,6 +215,7 @@ test_unregistered_error (Test *test,
{
GError *error = NULL;
const GHashTable *asv;
+ gboolean ok;
connection_errors = 0;
tp_cli_connection_connect_to_connection_error (test->conn,
@@ -256,12 +231,11 @@ test_unregistered_error (Test *test,
g_assert_cmpuint (connection_errors, ==, 1);
- MYASSERT (!tp_connection_run_until_ready (test->conn, FALSE, &error, NULL),
- "");
-
+ ok = tp_tests_proxy_run_until_prepared_or_failed (test->conn, NULL, &error);
/* Because we didn't understand net.example.WTF as a GError, TpConnection
* falls back to turning the Connection_Status_Reason into a GError. */
g_assert_error (error, TP_ERROR, TP_ERROR_NETWORK_ERROR);
+ g_assert (!ok);
g_assert_cmpstr (tp_connection_get_detailed_error (test->conn, NULL), ==,
"net.example.WTF");
@@ -343,8 +317,7 @@ test_detailed_error (Test *test,
g_assert_cmpuint (connection_errors, ==, 1);
- MYASSERT (!tp_connection_run_until_ready (test->conn, FALSE, &error, NULL),
- "");
+ tp_tests_proxy_run_until_prepared_or_failed (test->conn, NULL, &error);
g_assert_error (error, example_com_error_quark (), DOMAIN_SPECIFIC_ERROR);
diff --git a/tests/dbus/connection-getinterfaces-failure.c b/tests/dbus/connection-getinterfaces-failure.c
deleted file mode 100644
index 4d3494a07..000000000
--- a/tests/dbus/connection-getinterfaces-failure.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* Regression test for https://bugs.freedesktop.org/show_bug.cgi?id=15306
- *
- * Copyright (C) 2007-2008 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright (C) 2007-2008 Nokia Corporation
- *
- * Copying and distribution of this file, with or without modification,
- * are permitted in any medium without royalty provided the copyright
- * notice and this notice are preserved.
- */
-
-#include "config.h"
-
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/debug.h>
-#include <telepathy-glib/interfaces.h>
-
-#include "tests/lib/myassert.h"
-#include "tests/lib/simple-conn.h"
-#include "tests/lib/util.h"
-
-static GType bug15306_connection_get_type (void);
-
-typedef TpTestsSimpleConnection Bug15306Connection;
-typedef TpTestsSimpleConnectionClass Bug15306ConnectionClass;
-
-static void bug15306_conn_iface_init (gpointer, gpointer);
-
-G_DEFINE_TYPE_WITH_CODE (Bug15306Connection,
- bug15306_connection,
- TP_TESTS_TYPE_SIMPLE_CONNECTION,
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION, bug15306_conn_iface_init))
-
-static void
-bug15306_connection_init (Bug15306Connection *self)
-{
-}
-
-static void
-bug15306_connection_class_init (Bug15306ConnectionClass *klass)
-{
-}
-
-static void
-bug15306_get_interfaces (TpSvcConnection *iface,
- DBusGMethodInvocation *context)
-{
- GError e = { TP_ERROR, TP_ERROR_NOT_AVAILABLE, "testing fd.o #15306" };
-
- dbus_g_method_return_error (context, &e);
-}
-
-static void
-bug15306_conn_iface_init (gpointer g_iface,
- gpointer iface_data)
-{
- TpSvcConnectionClass *klass = g_iface;
-
-#define IMPLEMENT(x) tp_svc_connection_implement_##x (klass, \
- bug15306_##x)
- IMPLEMENT (get_interfaces);
-#undef IMPLEMENT
-}
-
-static GMainLoop *mainloop;
-
-static void
-on_status_changed (TpConnection *connection,
- guint status,
- guint reason,
- gpointer user_data,
- GObject *weak_object)
-{
- MYASSERT (status == TP_CONNECTION_STATUS_DISCONNECTED, "%u", status);
-}
-
-static void
-on_shutdown_finished (TpBaseConnection *base_conn,
- gpointer user_data)
-{
- g_main_loop_quit (mainloop);
-}
-
-int
-main (int argc,
- char **argv)
-{
- TpTestsSimpleConnection *service_conn;
- TpBaseConnection *service_conn_as_base;
- TpDBusDaemon *dbus;
- TpConnection *conn;
- GError *error = NULL;
- gchar *name;
- gchar *conn_path;
-
- tp_tests_abort_after (10);
- g_type_init ();
- tp_debug_set_flags ("all");
- mainloop = g_main_loop_new (NULL, FALSE);
- dbus = tp_tests_dbus_daemon_dup_or_die ();
-
- service_conn = TP_TESTS_SIMPLE_CONNECTION (tp_tests_object_new_static_class (
- bug15306_connection_get_type (),
- "account", "me@example.com",
- "protocol", "simple",
- NULL));
- service_conn_as_base = TP_BASE_CONNECTION (service_conn);
- MYASSERT (service_conn != NULL, "");
- MYASSERT (service_conn_as_base != NULL, "");
-
- g_signal_connect (service_conn, "shutdown-finished",
- G_CALLBACK (on_shutdown_finished), NULL);
-
- MYASSERT (tp_base_connection_register (service_conn_as_base, "simple",
- &name, &conn_path, &error), "");
- g_assert_no_error (error);
-
- conn = tp_connection_new (dbus, name, conn_path, &error);
- MYASSERT (conn != NULL, "");
- g_assert_no_error (error);
-
- MYASSERT (tp_connection_run_until_ready (conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
-
- /* disconnect the service_conn */
- MYASSERT (tp_cli_connection_connect_to_status_changed (conn,
- on_status_changed, NULL, NULL, NULL, NULL), "");
- tp_tests_simple_connection_inject_disconnect (service_conn);
- g_main_loop_run (mainloop);
-
- g_object_unref (conn);
-
- service_conn_as_base = NULL;
- g_object_unref (service_conn);
- g_object_unref (dbus);
- g_main_loop_unref (mainloop);
- g_free (name);
- g_free (conn_path);
-
- return 0;
-}
diff --git a/tests/dbus/connection-handles.c b/tests/dbus/connection-handles.c
index bab685f14..f9193c0ac 100644
--- a/tests/dbus/connection-handles.c
+++ b/tests/dbus/connection-handles.c
@@ -22,7 +22,7 @@
#include "tests/lib/debug.h"
#include "tests/lib/myassert.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/util.h"
typedef struct {
@@ -64,35 +64,6 @@ requested (TpConnection *connection,
}
static void
-held (TpConnection *connection,
- TpHandleType handle_type,
- guint n_handles,
- const TpHandle *handles,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- Result *result = user_data;
-
- g_assert (result->ids == NULL);
- g_assert (result->handles == NULL);
- g_assert (result->error == NULL);
-
- if (error == NULL)
- {
- DEBUG ("got %u handles", n_handles);
- result->handles = g_array_sized_new (FALSE, FALSE, sizeof (TpHandle),
- n_handles);
- g_array_append_vals (result->handles, handles, n_handles);
- }
- else
- {
- DEBUG ("got an error");
- result->error = g_error_copy (error);
- }
-}
-
-static void
finish (gpointer r)
{
Result *result = r;
@@ -151,10 +122,9 @@ test_request_and_release (TpTestsSimpleConnection *service_conn,
"%s != %s", tp_handle_inspect (service_repo, handle), ids[i]);
}
- /* release the handles (but don't assert that it isn't a no-op) */
+ /* this used to release the handles but let's just leave this for
+ * now */
- tp_connection_unref_handles (client_conn, TP_HANDLE_TYPE_CONTACT,
- result.handles->len, (const TpHandle *) result.handles->data);
tp_tests_proxy_run_until_dbus_queue_processed (client_conn);
/* clean up */
@@ -165,130 +135,12 @@ test_request_and_release (TpTestsSimpleConnection *service_conn,
g_main_loop_unref (result.loop);
}
-/*
- * Assert that RequestHandles + HoldHandles + unref does not release the
- * handles, but a second unref does.
- */
-static void
-test_request_hold_release (TpTestsSimpleConnection *service_conn,
- TpConnection *client_conn)
-{
- Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL };
- const gchar * const ids[] = { "alice", "bob", "chris", NULL };
- TpHandleRepoIface *service_repo = tp_base_connection_get_handles (
- (TpBaseConnection *) service_conn, TP_HANDLE_TYPE_CONTACT);
- guint i;
- GArray *saved_handles;
-
- g_message (G_STRFUNC);
-
- /* request three handles */
-
- tp_connection_request_handles (client_conn, -1,
- TP_HANDLE_TYPE_CONTACT, ids, requested, &result, finish, NULL);
-
- g_main_loop_run (result.loop);
-
- g_assert_no_error (result.error);
- MYASSERT (result.ids != NULL, "");
- MYASSERT (result.handles != NULL, "");
-
- for (i = 0; i < 3; i++)
- {
- MYASSERT (result.ids[i] != NULL, " [%u]", i);
- MYASSERT (!tp_strdiff (result.ids[i], ids[i]), " [%u] %s != %s",
- i, result.ids[i], ids[i]);
- }
-
- MYASSERT (result.ids[3] == NULL, "");
-
- MYASSERT (result.handles->len == 3, ": %u != 3", result.handles->len);
-
- /* check that the service and the client agree */
-
- MYASSERT (tp_handles_are_valid (service_repo, result.handles, FALSE, NULL),
- "");
-
- for (i = 0; i < 3; i++)
- {
- TpHandle handle = g_array_index (result.handles, TpHandle, i);
-
- MYASSERT (!tp_strdiff (tp_handle_inspect (service_repo, handle), ids[i]),
- "%s != %s", tp_handle_inspect (service_repo, handle), ids[i]);
- }
-
- /* hold the handles */
-
- g_strfreev (result.ids);
- result.ids = NULL;
- saved_handles = result.handles;
- result.handles = NULL;
- g_assert (result.error == NULL);
-
- tp_connection_hold_handles (client_conn, -1,
- TP_HANDLE_TYPE_CONTACT, saved_handles->len,
- (const TpHandle *) saved_handles->data,
- held, &result, finish, NULL);
-
- g_main_loop_run (result.loop);
-
- g_assert_no_error (result.error);
- MYASSERT (result.ids == NULL, "");
- MYASSERT (result.handles != NULL, "");
-
- for (i = 0; i < 3; i++)
- {
- TpHandle want = g_array_index (saved_handles, TpHandle, i);
- TpHandle got = g_array_index (result.handles, TpHandle, i);
-
- MYASSERT (want == got, "%u != %u", want, got);
- }
-
- g_array_unref (saved_handles);
-
- /* unref the handles */
-
- tp_connection_unref_handles (client_conn, TP_HANDLE_TYPE_CONTACT,
- result.handles->len, (const TpHandle *) result.handles->data);
- tp_tests_proxy_run_until_dbus_queue_processed (client_conn);
-
- /* check that the handles have not been released */
-
- MYASSERT (tp_handles_are_valid (service_repo, result.handles, FALSE, NULL),
- "");
-
- for (i = 0; i < 3; i++)
- {
- TpHandle handle = g_array_index (result.handles, TpHandle, i);
-
- MYASSERT (!tp_strdiff (tp_handle_inspect (service_repo, handle), ids[i]),
- "%s != %s", tp_handle_inspect (service_repo, handle), ids[i]);
- }
-
- /* release the handles (but don't assert that it isn't a no-op) */
-
- tp_connection_unref_handles (client_conn, TP_HANDLE_TYPE_CONTACT,
- result.handles->len, (const TpHandle *) result.handles->data);
- tp_tests_proxy_run_until_dbus_queue_processed (client_conn);
-
- /* clean up */
-
- g_main_loop_unref (result.loop);
- g_strfreev (result.ids);
- g_array_unref (result.handles);
- g_assert (result.error == NULL);
-}
-
int
main (int argc,
char **argv)
{
- TpDBusDaemon *dbus;
TpTestsSimpleConnection *service_conn;
TpBaseConnection *service_conn_as_base;
- gchar *name;
- gchar *conn_path;
- GError *error = NULL;
TpConnection *client_conn;
/* Setup */
@@ -296,37 +148,14 @@ main (int argc,
tp_tests_abort_after (10);
g_type_init ();
tp_debug_set_flags ("all");
- dbus = tp_tests_dbus_daemon_dup_or_die ();
-
- service_conn = TP_TESTS_SIMPLE_CONNECTION (tp_tests_object_new_static_class (
- TP_TESTS_TYPE_SIMPLE_CONNECTION,
- "account", "me@example.com",
- "protocol", "simple",
- NULL));
- service_conn_as_base = TP_BASE_CONNECTION (service_conn);
- MYASSERT (service_conn != NULL, "");
- MYASSERT (service_conn_as_base != NULL, "");
-
- MYASSERT (tp_base_connection_register (service_conn_as_base, "simple",
- &name, &conn_path, &error), "");
- g_assert_no_error (error);
-
- client_conn = tp_connection_new (dbus, name, conn_path, &error);
- MYASSERT (client_conn != NULL, "");
- /* It does in fact have immortal handles, but we can't know that yet */
- g_assert (!tp_connection_has_immortal_handles (client_conn));
- g_assert_no_error (error);
- MYASSERT (tp_connection_run_until_ready (client_conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
- /* now we know */
- g_assert (tp_connection_has_immortal_handles (client_conn));
+ tp_tests_create_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION, "me@example.com",
+ TRUE, &service_conn_as_base, &client_conn);
+ service_conn = TP_TESTS_SIMPLE_CONNECTION (service_conn_as_base);
/* Tests */
test_request_and_release (service_conn, client_conn);
- test_request_hold_release (service_conn, client_conn);
/* Teardown */
@@ -334,10 +163,6 @@ main (int argc,
service_conn_as_base = NULL;
g_object_unref (service_conn);
- g_free (name);
- g_free (conn_path);
-
- g_object_unref (dbus);
return 0;
}
diff --git a/tests/dbus/connection-inject-bug16307.c b/tests/dbus/connection-inject-bug16307.c
deleted file mode 100644
index 87bd041d2..000000000
--- a/tests/dbus/connection-inject-bug16307.c
+++ /dev/null
@@ -1,86 +0,0 @@
-/* Feature test for https://bugs.freedesktop.org/show_bug.cgi?id=16307
- *
- * Copyright (C) 2007-2008 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright (C) 2007-2008 Nokia Corporation
- *
- * Copying and distribution of this file, with or without modification,
- * are permitted in any medium without royalty provided the copyright
- * notice and this notice are preserved.
- */
-
-#include "config.h"
-
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/debug.h>
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/proxy-subclass.h>
-
-#include "tests/lib/myassert.h"
-#include "tests/lib/bug16307-conn.h"
-#include "tests/lib/util.h"
-
-static GMainLoop *mainloop;
-
-typedef struct {
- gboolean ready;
- GError *error /* initialized to NULL statically */;
- GMainLoop *mainloop;
-} WhenReadyContext;
-
-int
-main (int argc,
- char **argv)
-{
- TpDBusDaemon *dbus;
- TpTestsBug16307Connection *service_conn;
- TpBaseConnection *service_conn_as_base;
- gchar *name;
- gchar *conn_path;
- GError *error = NULL;
- TpConnection *conn;
-
- tp_tests_abort_after (10);
- g_type_init ();
- tp_debug_set_flags ("all");
- mainloop = g_main_loop_new (NULL, FALSE);
- dbus = tp_tests_dbus_daemon_dup_or_die ();
-
- /* service side */
- service_conn = TP_TESTS_BUG16307_CONNECTION (
- tp_tests_object_new_static_class (
- TP_TESTS_TYPE_BUG16307_CONNECTION,
- "account", "me@example.com",
- "protocol", "simple",
- NULL));
- service_conn_as_base = TP_BASE_CONNECTION (service_conn);
- MYASSERT (service_conn != NULL, "");
- MYASSERT (service_conn_as_base != NULL, "");
-
- MYASSERT (tp_base_connection_register (service_conn_as_base, "simple",
- &name, &conn_path, &error), "");
- g_assert_no_error (error);
-
- /* client side */
- conn = tp_connection_new (dbus, name, conn_path, &error);
- MYASSERT (conn != NULL, "");
- g_assert_no_error (error);
-
- tp_tests_bug16307_connection_inject_get_status_return (service_conn);
-
- MYASSERT (tp_connection_run_until_ready (conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
-
- tp_tests_connection_assert_disconnect_succeeds (conn);
-
- service_conn_as_base = NULL;
- g_object_unref (service_conn);
- g_free (name);
- g_free (conn_path);
-
- g_object_unref (dbus);
- g_main_loop_unref (mainloop);
-
- return 0;
-}
diff --git a/tests/dbus/connection-interests.c b/tests/dbus/connection-interests.c
index c850e555c..b1d3be970 100644
--- a/tests/dbus/connection-interests.c
+++ b/tests/dbus/connection-interests.c
@@ -10,27 +10,30 @@
#include "config.h"
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/proxy-subclass.h>
+#include "telepathy-glib/reentrants.h"
+
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/util.h"
/* an almost-no-op subclass... */
-typedef TpTestsSimpleConnection InterestedConnection;
-typedef TpTestsSimpleConnectionClass InterestedConnectionClass;
+typedef TpTestsContactsConnection InterestedConnection;
+typedef TpTestsContactsConnectionClass InterestedConnectionClass;
static GType interested_connection_get_type (void);
G_DEFINE_TYPE_WITH_CODE (InterestedConnection,
interested_connection,
- TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ TP_TESTS_TYPE_CONTACTS_CONNECTION,
G_STMT_START { } G_STMT_END)
/* Lord Pearson of Rannoch: My Lords, I beg leave to ask the Question
@@ -236,8 +239,7 @@ teardown (Test *test,
g_assert_no_error (error);
tp_tests_connection_assert_disconnect_succeeds (conn);
-
- g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
+ tp_tests_proxy_run_until_prepared_or_failed (conn, NULL, &error);
g_assert_error (error, TP_ERROR, TP_ERROR_CANCELLED);
g_clear_error (&error);
diff --git a/tests/dbus/connection.c b/tests/dbus/connection.c
index fca25664c..de7575b81 100644
--- a/tests/dbus/connection.c
+++ b/tests/dbus/connection.c
@@ -10,6 +10,7 @@
#include "config.h"
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
@@ -17,7 +18,7 @@
#include <telepathy-glib/proxy-subclass.h>
#include "tests/lib/myassert.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/util.h"
typedef struct {
@@ -28,9 +29,6 @@ typedef struct {
gchar *conn_path;
TpConnection *conn;
- gboolean cwr_ready;
- GError *cwr_error /* initialized in setup */;
-
GAsyncResult *prepare_result;
} Test;
@@ -63,7 +61,7 @@ setup (Test *test,
test->service_conn = TP_TESTS_SIMPLE_CONNECTION (
tp_tests_object_new_static_class (
- TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ TP_TESTS_TYPE_CONTACTS_CONNECTION,
"account", "me@example.com",
"protocol", "simple-protocol",
NULL));
@@ -74,9 +72,6 @@ setup (Test *test,
g_assert (tp_base_connection_register (test->service_conn_as_base, "simple",
&test->conn_name, &test->conn_path, &error));
g_assert_no_error (error);
-
- test->cwr_ready = FALSE;
- test->cwr_error = NULL;
}
static void
@@ -99,8 +94,7 @@ teardown (Test *test,
g_assert_no_error (error);
tp_tests_connection_assert_disconnect_succeeds (conn);
-
- g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
+ tp_tests_proxy_run_until_prepared_or_failed (conn, NULL, &error);
g_assert_error (error, TP_ERROR, TP_ERROR_CANCELLED);
g_clear_error (&error);
@@ -114,75 +108,6 @@ teardown (Test *test,
}
static void
-test_run_until_invalid (Test *test,
- gconstpointer nil G_GNUC_UNUSED)
-{
- GError *error = NULL;
-
- test->conn = tp_connection_new (test->dbus, test->conn_name, test->conn_path,
- &error);
- g_assert (test->conn != NULL);
- g_assert_no_error (error);
- tp_proxy_invalidate ((TpProxy *) test->conn, &invalidated_for_test);
-
- MYASSERT (!tp_connection_run_until_ready (test->conn, TRUE, &error, NULL),
- "");
- g_assert (error != NULL);
- g_assert_error (error, invalidated_for_test.domain,
- invalidated_for_test.code);
- g_assert_cmpstr (error->message, ==, invalidated_for_test.message);
- g_error_free (error);
-}
-
-static void
-test_run_until_ready (Test *test,
- gconstpointer nil G_GNUC_UNUSED)
-{
- GError *error = NULL;
-
- test->conn = tp_connection_new (test->dbus, test->conn_name, test->conn_path,
- &error);
- g_assert (test->conn != NULL);
- g_assert_no_error (error);
-
- MYASSERT (tp_connection_run_until_ready (test->conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
-}
-
-static void
-conn_ready (TpConnection *connection,
- const GError *error,
- gpointer user_data)
-{
- Test *test = user_data;
-
- test->cwr_ready = TRUE;
-
- if (error == NULL)
- {
- gboolean parsed;
- gchar *proto = NULL;
- gchar *cm_name = NULL;
-
- g_message ("connection %p ready", connection);
- parsed = tp_connection_parse_object_path (connection, &proto, &cm_name);
- g_assert (parsed);
- g_assert_cmpstr (proto, ==, "simple-protocol");
- g_assert_cmpstr (cm_name, ==, "simple");
- g_free (proto);
- g_free (cm_name);
- }
- else
- {
- g_message ("connection %p invalidated: %s #%u \"%s\"", connection,
- g_quark_to_string (error->domain), error->code, error->message);
-
- test->cwr_error = g_error_copy (error);
- }
-}
-
-static void
test_prepare (Test *test,
gconstpointer nil G_GNUC_UNUSED)
{
@@ -193,6 +118,7 @@ test_prepare (Test *test,
TpCapabilities *caps;
GPtrArray *classes;
gchar *cm_name, *protocol_name;
+ gboolean parsed;
test->conn = tp_connection_new (test->dbus, test->conn_name, test->conn_path,
&error);
@@ -220,10 +146,18 @@ test_prepare (Test *test,
g_assert (tp_proxy_is_prepared (test->conn, TP_CONNECTION_FEATURE_CORE));
g_assert (!tp_proxy_is_prepared (test->conn,
TP_CONNECTION_FEATURE_CONNECTED));
- g_assert_cmpuint (tp_connection_get_self_handle (test->conn), ==, 0);
+ g_assert (tp_connection_get_self_contact (test->conn) == NULL);
g_assert_cmpint (tp_connection_get_status (test->conn, NULL), ==,
TP_CONNECTION_STATUS_DISCONNECTED);
+ parsed = tp_connection_parse_object_path (test->conn, &protocol_name,
+ &cm_name);
+ g_assert (parsed);
+ g_assert_cmpstr (protocol_name, ==, "simple-protocol");
+ g_assert_cmpstr (cm_name, ==, "simple");
+ g_free (protocol_name);
+ g_free (cm_name);
+
g_assert_cmpstr (tp_connection_get_connection_manager_name (test->conn), ==,
"simple");
g_assert_cmpstr (tp_connection_get_protocol_name (test->conn), ==,
@@ -256,7 +190,7 @@ test_prepare (Test *test,
TP_CONNECTION_FEATURE_CONNECTED));
g_assert (tp_proxy_is_prepared (test->conn,
TP_CONNECTION_FEATURE_CAPABILITIES));
- g_assert_cmpuint (tp_connection_get_self_handle (test->conn), !=, 0);
+ g_assert (TP_IS_CONTACT (tp_connection_get_self_contact (test->conn)));
g_assert_cmpint (tp_connection_get_status (test->conn, &reason), ==,
TP_CONNECTION_STATUS_CONNECTED);
g_assert_cmpint (reason, ==, TP_CONNECTION_STATUS_REASON_REQUESTED);
@@ -331,69 +265,6 @@ test_fail_to_prepare (Test *test,
g_assert (asv != NULL);
}
-static void
-test_call_when_ready (Test *test,
- gconstpointer nil G_GNUC_UNUSED)
-{
- GError *error = NULL;
-
- test->conn = tp_connection_new (test->dbus, test->conn_name, test->conn_path,
- &error);
- g_assert (test->conn != NULL);
- g_assert_no_error (error);
-
- tp_cli_connection_call_connect (test->conn, -1, NULL, NULL, NULL, NULL);
-
- tp_connection_call_when_ready (test->conn, conn_ready, test);
-
- while (!test->cwr_ready)
- g_main_context_iteration (NULL, TRUE);
-
- g_assert_no_error (test->cwr_error);
-
- /* Connection already ready here, so we are called back synchronously */
-
- test->cwr_ready = FALSE;
- test->cwr_error = NULL;
- tp_connection_call_when_ready (test->conn, conn_ready, test);
- g_assert_cmpint (test->cwr_ready, ==, TRUE);
- g_assert_no_error (test->cwr_error);
-}
-
-static void
-test_call_when_invalid (Test *test,
- gconstpointer nil G_GNUC_UNUSED)
-{
- GError *error = NULL;
-
- test->conn = tp_connection_new (test->dbus, test->conn_name, test->conn_path,
- &error);
- g_assert (test->conn != NULL);
- g_assert_no_error (error);
-
- /* Connection becomes invalid, so we are called back synchronously */
-
- tp_connection_call_when_ready (test->conn, conn_ready, test);
- tp_proxy_invalidate ((TpProxy *) test->conn, &invalidated_for_test);
- g_assert_cmpint (test->cwr_ready, ==, TRUE);
- g_assert_error (test->cwr_error, invalidated_for_test.domain,
- invalidated_for_test.code);
- g_assert_cmpstr (test->cwr_error->message, ==, invalidated_for_test.message);
- g_clear_error (&test->cwr_error);
-
- /* Connection already invalid, so we are called back synchronously */
-
- test->cwr_ready = FALSE;
- test->cwr_error = NULL;
- tp_connection_call_when_ready (test->conn, conn_ready, test);
- g_assert (test->cwr_ready);
- g_assert_error (test->cwr_error, invalidated_for_test.domain,
- invalidated_for_test.code);
- g_assert_cmpstr (test->cwr_error->message, ==, invalidated_for_test.message);
- g_error_free (test->cwr_error);
- test->cwr_error = NULL;
-}
-
int
main (int argc,
char **argv)
@@ -403,14 +274,6 @@ main (int argc,
g_test_add ("/conn/prepare", Test, NULL, setup, test_prepare, teardown);
g_test_add ("/conn/fail_to_prepare", Test, NULL, setup, test_fail_to_prepare,
teardown);
- g_test_add ("/conn/run_until_invalid", Test, NULL, setup,
- test_run_until_invalid, teardown);
- g_test_add ("/conn/run_until_ready", Test, NULL, setup,
- test_run_until_ready, teardown);
- g_test_add ("/conn/call_when_ready", Test, NULL, setup,
- test_call_when_ready, teardown);
- g_test_add ("/conn/call_when_invalid", Test, NULL, setup,
- test_call_when_invalid, teardown);
return g_test_run ();
}
diff --git a/tests/dbus/contact-list-client.c b/tests/dbus/contact-list-client.c
index 943645c36..7e8910b08 100644
--- a/tests/dbus/contact-list-client.c
+++ b/tests/dbus/contact-list-client.c
@@ -12,6 +12,7 @@
#include <string.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/message-mixin.h>
#include "examples/cm/contactlist/conn.h"
@@ -454,7 +455,7 @@ test_is_blocked (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
const gchar *id = "bill@example.com";
- TpContactFeature features[] = { TP_CONTACT_FEATURE_CONTACT_BLOCKING };
+ GQuark features[] = { TP_CONTACT_FEATURE_CONTACT_BLOCKING };
GQuark conn_features[] = { TP_CONNECTION_FEATURE_CONTACT_LIST, 0 };
tp_proxy_prepare_async (test->connection, conn_features,
@@ -477,7 +478,7 @@ test_is_blocked (Test *test,
/* Bill is already blocked in the CM */
tp_connection_get_contacts_by_id (test->connection, 1, &id,
- G_N_ELEMENTS (features), features, get_contacts_by_id_cb, test,
+ features, get_contacts_by_id_cb, test,
NULL, NULL);
test->wait = 1;
diff --git a/tests/dbus/contact-lists.c b/tests/dbus/contact-lists.c
index 49eeb672b..72fae33e7 100644
--- a/tests/dbus/contact-lists.c
+++ b/tests/dbus/contact-lists.c
@@ -10,7 +10,12 @@
#include "config.h"
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
+
+#include "telepathy-glib/reentrants.h"
#include "examples/cm/contactlist/conn.h"
#include "tests/lib/util.h"
@@ -72,13 +77,6 @@ typedef struct {
gchar *conn_path;
TpConnection *conn;
- TpChannel *publish;
- TpChannel *subscribe;
- TpChannel *stored;
- TpChannel *deny;
-
- TpChannel *group;
-
TpHandleRepoIface *contact_repo;
TpHandle sjoerd;
TpHandle helen;
@@ -107,7 +105,7 @@ test_quit_loop (gpointer p)
}
static void
-contacts_changed_with_id_cb (TpConnection *connection,
+contacts_changed_cb (TpConnection *connection,
GHashTable *changes,
GHashTable *identifiers,
GHashTable *removals,
@@ -155,63 +153,6 @@ contacts_changed_with_id_cb (TpConnection *connection,
}
static void
-contacts_changed_cb (TpConnection *connection,
- GHashTable *changes,
- const GArray *removals,
- gpointer user_data,
- GObject *weak_object G_GNUC_UNUSED)
-{
- Test *test = user_data;
- LogEntry *le;
- GHashTableIter i;
- gpointer key, value;
- TpIntset *removal_set;
-
- g_assert (g_hash_table_size (changes) > 0 || removals->len > 0);
-
- /* We should have had a ContactsChangedByID signal immediately before this
- * signal */
- g_assert_cmpuint (test->log->len, >, 0);
-
- le = g_ptr_array_index (test->log, test->log->len - 1);
- g_assert_cmpuint (le->type, ==, CONTACTS_CHANGED);
-
- /* The changes should all have been the same as in the previous signal */
- g_assert_cmpuint (g_hash_table_size (changes), ==,
- g_hash_table_size (le->contacts_changed));
-
- g_hash_table_iter_init (&i, changes);
- while (g_hash_table_iter_next (&i, &key, &value))
- {
- GValueArray *existing = g_hash_table_lookup (le->contacts_changed, key);
- GValueArray *emitted = value;
- guint existing_sub, existing_pub, emitted_sub, emitted_pub;
- const gchar *existing_req, *emitted_req;
-
- g_assert (existing != NULL);
-
- tp_value_array_unpack (existing, 3, &existing_sub, &existing_pub,
- &existing_req);
- tp_value_array_unpack (emitted, 3, &emitted_sub, &emitted_pub,
- &emitted_req);
-
- g_assert_cmpuint (existing_sub, ==, emitted_sub);
- g_assert_cmpuint (existing_pub, ==, emitted_pub);
- g_assert_cmpstr (existing_req, ==, emitted_req);
- }
-
- removal_set = tp_intset_from_array (removals);
-
- if (!tp_intset_is_equal (removal_set, le->contacts_removed))
- g_error ("Removals from ContactsChangedById (%s) != "
- "Removals from ContactsChanged (%s)",
- tp_intset_dump (le->contacts_removed),
- tp_intset_dump (removal_set));
-
- tp_intset_destroy (removal_set);
-}
-
-static void
groups_changed_cb (TpConnection *connection,
const GArray *contacts,
const gchar **groups_added,
@@ -381,9 +322,6 @@ setup (Test *test,
test->log = g_ptr_array_new ();
maybe_queue_disconnect (
- tp_cli_connection_interface_contact_list_connect_to_contacts_changed_with_id (
- test->conn, contacts_changed_with_id_cb, test, NULL, NULL, NULL));
- maybe_queue_disconnect (
tp_cli_connection_interface_contact_list_connect_to_contacts_changed (
test->conn, contacts_changed_cb, test, NULL, NULL, NULL));
maybe_queue_disconnect (
@@ -464,11 +402,6 @@ teardown (Test *test,
tp_handle_unref (test->contact_repo, test->ninja);
tp_handle_unref (test->contact_repo, test->canceller);
- tp_clear_object (&test->publish);
- tp_clear_object (&test->subscribe);
- tp_clear_object (&test->stored);
- tp_clear_object (&test->group);
-
/* make a new TpConnection just to disconnect the underlying Connection,
* so we don't leak it */
conn = tp_connection_new (test->dbus, test->conn_name, test->conn_path,
@@ -476,7 +409,7 @@ teardown (Test *test,
g_assert (conn != NULL);
g_assert_no_error (error);
tp_tests_connection_assert_disconnect_succeeds (conn);
- g_assert (!tp_connection_run_until_ready (conn, FALSE, &error, NULL));
+ tp_tests_proxy_run_until_prepared_or_failed (conn, NULL, &error);
g_assert_error (error, TP_ERROR, TP_ERROR_CANCELLED);
g_clear_error (&error);
@@ -485,39 +418,6 @@ teardown (Test *test,
teardown_pre_connect (test, data);
}
-static TpChannel *
-test_ensure_channel (Test *test,
- guint channel_type,
- const gchar *id)
-{
- GError *error = NULL;
- GHashTable *asv, *props;
- gchar *path;
- TpChannel *ret;
-
- asv = tp_asv_new (
- TP_PROP_CHANNEL_CHANNEL_TYPE,
- G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_CONTACT_LIST,
- TP_PROP_CHANNEL_TARGET_HANDLE_TYPE,
- G_TYPE_UINT, channel_type,
- TP_PROP_CHANNEL_TARGET_ID,
- G_TYPE_STRING, id,
- NULL);
- tp_cli_connection_interface_requests_run_ensure_channel (test->conn, -1,
- asv, NULL, &path, &props, &error, NULL);
- g_assert_no_error (error);
- ret = tp_channel_new_from_properties (test->conn, path, props,
- &error);
- g_assert (ret != NULL);
- g_assert_no_error (error);
- g_free (path);
- g_hash_table_unref (props);
- g_hash_table_unref (asv);
-
- tp_tests_proxy_run_until_prepared (ret, NULL);
- return ret;
-}
-
static void
test_assert_one_contact_changed (Test *test,
guint index,
@@ -677,76 +577,6 @@ test_nothing (Test *test,
}
static void
-test_initial_channels (Test *test,
- gconstpointer nil G_GNUC_UNUSED)
-{
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
- test->subscribe = test_ensure_channel (test, TP_HANDLE_TYPE_LIST,
- "subscribe");
- test->stored = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "stored");
- test->deny = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "deny");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->publish)), ==, 4);
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_local_pending (test->publish)),
- ==, 2);
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_remote_pending (test->publish)),
- ==, 0);
- g_assert (tp_intset_is_member (tp_channel_group_get_members (test->publish),
- test->sjoerd));
- g_assert (tp_intset_is_member (
- tp_channel_group_get_local_pending (test->publish),
- test->wim));
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->subscribe)), ==, 4);
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_local_pending (test->subscribe)),
- ==, 0);
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_remote_pending (test->subscribe)),
- ==, 2);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->subscribe),
- test->sjoerd));
- g_assert (tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->helen));
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->stored)), ==, 8);
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_local_pending (test->stored)),
- ==, 0);
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_remote_pending (test->stored)),
- ==, 0);
- g_assert (tp_intset_is_member (tp_channel_group_get_members (test->stored),
- test->sjoerd));
-
- g_assert (!tp_intset_is_member (tp_channel_group_get_members (test->publish),
- test->ninja));
- g_assert (!tp_intset_is_member (tp_channel_group_get_members (
- test->subscribe),
- test->ninja));
- g_assert (!tp_intset_is_member (tp_channel_group_get_members (test->stored),
- test->ninja));
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->deny)), ==, 2);
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_local_pending (test->deny)),
- ==, 0);
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_remote_pending (test->deny)),
- ==, 0);
- g_assert (tp_intset_is_member (tp_channel_group_get_members (test->deny),
- test->bill));
-}
-
-static void
test_properties (Test *test,
gconstpointer nil G_GNUC_UNUSED)
{
@@ -778,9 +608,6 @@ test_properties (Test *test,
g_assert (G_VALUE_HOLDS (tp_asv_lookup (asv, "Groups"), G_TYPE_STRV));
g_hash_table_unref (asv);
- /* this has the side-effect of waiting for the contact list to be received */
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
-
tp_cli_dbus_properties_run_get_all (test->conn, -1,
TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST, &asv, &error, NULL);
g_assert_no_error (error);
@@ -909,7 +736,7 @@ test_assert_contact_state (Test *test,
NULL };
tp_connection_get_contact_attributes (test->conn, -1,
- 1, &handle, interfaces, FALSE, contact_attrs_cb,
+ 1, &handle, interfaces, contact_attrs_cb,
test, test_quit_loop, NULL);
g_main_loop_run (test->main_loop);
@@ -923,8 +750,13 @@ static void
test_contacts (Test *test,
gconstpointer nil G_GNUC_UNUSED)
{
+ GValue *state = NULL;
+
/* ensure the contact list has been received */
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
+ tp_cli_dbus_properties_run_get (test->conn, -1,
+ TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST, "ContactListState",
+ &state, NULL, NULL);
+ g_assert_cmpuint (g_value_get_uint (state), ==, TP_CONTACT_LIST_STATE_SUCCESS);
test_assert_contact_state (test, test->sjoerd,
TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_YES, NULL, "Cambridge");
@@ -948,7 +780,7 @@ test_contact_list_attrs (Test *test,
NULL };
tp_connection_get_contact_list_attributes (test->conn, -1,
- interfaces, FALSE, contact_attrs_cb, test, test_quit_loop, NULL);
+ interfaces, contact_attrs_cb, test, test_quit_loop, NULL);
g_main_loop_run (test->main_loop);
test_assert_contact_list_attrs (test, test->sjoerd,
@@ -1002,7 +834,7 @@ test_contact_blocking_attrs (Test *test,
tp_connection_get_contact_attributes (test->conn, -1,
G_N_ELEMENTS (handles), handles,
- interfaces, FALSE, contact_attrs_cb, test, test_quit_loop, NULL);
+ interfaces, contact_attrs_cb, test, test_quit_loop, NULL);
g_main_loop_run (test->main_loop);
test_assert_contact_blocking_attrs (test, test->sjoerd, FALSE);
@@ -1015,37 +847,18 @@ test_accept_publish_request (Test *test,
{
GError *error = NULL;
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_local_pending (test->publish)),
- ==, 2);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_local_pending (test->publish),
- test->wim));
+ test_assert_contact_state (test, test->wim,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_ASK,
+ "I'm more metal than you!", NULL);
g_array_append_val (test->arr, test->wim);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_add_members (test->publish,
- -1, test->arr, "", &error, NULL);
- else
- tp_cli_connection_interface_contact_list_run_authorize_publication (
- test->conn, -1, test->arr, &error, NULL);
-
+ tp_cli_connection_interface_contact_list_run_authorize_publication (
+ test->conn, -1, test->arr, &error, NULL);
g_assert_no_error (error);
/* by the time the method returns, we should have had the
* change-notification, too */
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_local_pending (test->publish)),
- ==, 1);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->wim));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_local_pending (test->publish),
- test->wim));
g_assert_cmpuint (test->log->len, ==, 1);
test_assert_one_contact_changed (test, 0, test->wim, TP_SUBSCRIPTION_STATE_NO,
@@ -1060,23 +873,13 @@ test_reject_publish_request (Test *test,
{
GError *error = NULL;
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
-
- g_assert (tp_intset_is_member (
- tp_channel_group_get_local_pending (test->publish),
- test->wim));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->wim));
+ test_assert_contact_state (test, test->wim,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_ASK,
+ "I'm more metal than you!", NULL);
g_array_append_val (test->arr, test->wim);
- if (!tp_strdiff (mode, "old"))
- {
- tp_cli_channel_interface_group_run_remove_members (test->publish,
- -1, test->arr, "", &error, NULL);
- }
- else if (!tp_strdiff (mode, "unpublish"))
+ if (!tp_strdiff (mode, "unpublish"))
{
/* directly equivalent, but in practice people won't do this */
tp_cli_connection_interface_contact_list_run_unpublish (
@@ -1094,15 +897,6 @@ test_reject_publish_request (Test *test,
/* by the time the method returns, we should have had the
* removal-notification, too */
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_local_pending (test->publish)),
- ==, 1);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->wim));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_local_pending (test->publish),
- test->wim));
g_assert_cmpuint (test->log->len, ==, 1);
@@ -1124,84 +918,46 @@ test_add_to_publish_pre_approve (Test *test,
* in the new contact list manager the method "succeeds" anyway, and
* any subsequent subscription request succeeds instantly. */
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
- test->stored = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "stored");
- test->subscribe = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "subscribe");
-
g_array_append_val (test->arr, test->ninja);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_local_pending (test->publish),
- test->ninja));
-
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_add_members (test->publish,
- -1, test->arr, "", &error, NULL);
- else
- tp_cli_connection_interface_contact_list_run_authorize_publication (
- test->conn, -1, test->arr, &error, NULL);
+ test_assert_contact_state (test, test->ninja,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO,
+ NULL, NULL);
+ tp_cli_connection_interface_contact_list_run_authorize_publication (
+ test->conn, -1, test->arr, &error, NULL);
g_assert_no_error (error);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_local_pending (test->publish),
- test->ninja));
+ test_assert_contact_state (test, test->ninja,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO,
+ NULL, NULL);
/* the example CM's fake contacts accept requests that contain "please" */
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_add_members (test->subscribe,
- -1, test->arr, "Please may I see your presence?", &error, NULL);
- else
- tp_cli_connection_interface_contact_list_run_request_subscription (
- test->conn, -1, test->arr, "Please may I see your presence?", &error,
- NULL);
-
+ tp_cli_connection_interface_contact_list_run_request_subscription (
+ test->conn, -1, test->arr, "Please may I see your presence?", &error,
+ NULL);
g_assert_no_error (error);
/* by the time the method returns, we should have had the
* change-notification, too */
- g_assert (tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->ninja));
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->stored),
- test->ninja));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->stored),
- test->ninja));
+ g_assert_cmpuint (test->log->len, ==, 1);
+ test_assert_one_contact_changed (test, 0, test->ninja, TP_SUBSCRIPTION_STATE_ASK,
+ TP_SUBSCRIPTION_STATE_NO, "");
/* after a short delay, the contact accepts our request */
- while (tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->ninja))
+ while (test->log->len < 2)
g_main_context_iteration (NULL, TRUE);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->subscribe),
- test->ninja));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->ninja));
+ g_assert_cmpuint (test->log->len, ==, 2);
+ test_assert_one_contact_changed (test, 1, test->ninja, TP_SUBSCRIPTION_STATE_YES,
+ TP_SUBSCRIPTION_STATE_NO, "");
/* the contact also requests our presence after a short delay - we
* pre-approved, so they go straight to full membership */
- while (!tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->ninja) || test->log->len < 3)
+ while (test->log->len < 3)
g_main_context_iteration (NULL, TRUE);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->ninja));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_local_pending (test->publish),
- test->ninja));
-
g_assert_cmpuint (test->log->len, ==, 3);
- test_assert_one_contact_changed (test, 0, test->ninja, TP_SUBSCRIPTION_STATE_ASK,
- TP_SUBSCRIPTION_STATE_NO, "");
- test_assert_one_contact_changed (test, 1, test->ninja, TP_SUBSCRIPTION_STATE_YES,
- TP_SUBSCRIPTION_STATE_NO, "");
test_assert_one_contact_changed (test, 2, test->ninja, TP_SUBSCRIPTION_STATE_YES,
TP_SUBSCRIPTION_STATE_YES, "");
@@ -1218,30 +974,19 @@ test_add_to_publish_no_op (Test *test,
/* Adding a member to the publish channel when they're already there is
* valid. */
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
-
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->sjoerd));
+ test_assert_contact_state (test, test->sjoerd,
+ TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_YES, NULL, "Cambridge");
g_array_append_val (test->arr, test->sjoerd);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_add_members (test->publish,
- -1, test->arr, "", &error, NULL);
- else
- tp_cli_connection_interface_contact_list_run_authorize_publication (
- test->conn, -1, test->arr, &error, NULL);
-
+ tp_cli_connection_interface_contact_list_run_authorize_publication (
+ test->conn, -1, test->arr, &error, NULL);
g_assert_no_error (error);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->sjoerd));
-
- g_assert_cmpuint (test->log->len, ==, 0);
test_assert_contact_state (test, test->sjoerd,
TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_YES, NULL, "Cambridge");
+
+ g_assert_cmpuint (test->log->len, ==, 0);
}
static void
@@ -1250,55 +995,29 @@ test_remove_from_publish (Test *test,
{
GError *error = NULL;
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->publish)),
- ==, 4);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->sjoerd));
+ test_assert_contact_state (test, test->sjoerd,
+ TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_YES, NULL, "Cambridge");
g_array_append_val (test->arr, test->sjoerd);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_remove_members (test->publish,
- -1, test->arr, "", &error, NULL);
- else
- tp_cli_connection_interface_contact_list_run_unpublish (
- test->conn, -1, test->arr, &error, NULL);
-
+ tp_cli_connection_interface_contact_list_run_unpublish (
+ test->conn, -1, test->arr, &error, NULL);
g_assert_no_error (error);
/* by the time the method returns, we should have had the
* removal-notification, too */
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->sjoerd));
+ g_assert_cmpuint (test->log->len, ==, 1);
+ test_assert_one_contact_changed (test, 0, test->sjoerd,
+ TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_NO, "");
/* the contact re-requests our presence after a short delay */
- while (!tp_intset_is_member (
- tp_channel_group_get_local_pending (test->publish),
- test->sjoerd) ||
- test->log->len < 2)
+ while (test->log->len < 2)
g_main_context_iteration (NULL, TRUE);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->sjoerd));
- g_assert (tp_intset_is_member (
- tp_channel_group_get_local_pending (test->publish),
- test->sjoerd));
-
g_assert_cmpuint (test->log->len, ==, 2);
- test_assert_one_contact_changed (test, 0, test->sjoerd,
- TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_NO, "");
test_assert_one_contact_changed (test, 1, test->sjoerd,
TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_ASK,
"May I see your presence, please?");
- test_assert_contact_state (test, test->sjoerd,
- TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_ASK,
- "May I see your presence, please?", "Cambridge");
}
static void
@@ -1307,24 +1026,14 @@ test_remove_from_publish_no_op (Test *test,
{
GError *error = NULL;
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->publish)),
- ==, 4);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->ninja));
+ test_assert_contact_state (test, test->ninja,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO,
+ NULL, NULL);
g_array_append_val (test->arr, test->ninja);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_remove_members (test->publish,
- -1, test->arr, "", &error, NULL);
- else
- tp_cli_connection_interface_contact_list_run_unpublish (
- test->conn, -1, test->arr, &error, NULL);
-
+ tp_cli_connection_interface_contact_list_run_unpublish (
+ test->conn, -1, test->arr, &error, NULL);
g_assert_no_error (error);
g_assert_cmpuint (test->log->len, ==, 0);
@@ -1338,19 +1047,9 @@ test_cancelled_publish_request (Test *test,
{
GError *error = NULL;
- test->subscribe = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "subscribe");
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
- test->stored = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "stored");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->subscribe)),
- ==, 4);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->subscribe),
- test->canceller));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->canceller));
+ test_assert_contact_state (test, test->canceller,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO,
+ NULL, NULL);
/* the example CM's fake contacts accept requests that contain "please" */
g_array_append_val (test->arr, test->canceller);
@@ -1362,19 +1061,9 @@ test_cancelled_publish_request (Test *test,
/* It starts off the same as test_accept_subscribe_request, but because
* we're using an identifier with special significance, the contact cancels
* the request immediately after */
- while (tp_intset_is_member (
- tp_channel_group_get_local_pending (test->publish),
- test->canceller) ||
- test->log->len < 4)
+ while (test->log->len < 4)
g_main_context_iteration (NULL, TRUE);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->canceller));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_local_pending (test->publish),
- test->canceller));
-
g_assert_cmpuint (test->log->len, ==, 4);
test_assert_one_contact_changed (test, 0, test->canceller,
TP_SUBSCRIPTION_STATE_ASK, TP_SUBSCRIPTION_STATE_NO, "");
@@ -1392,8 +1081,7 @@ test_cancelled_publish_request (Test *test,
test_clear_log (test);
/* We can acknowledge the cancellation with Unpublish() or
- * RemoveContacts(). We can't use the old API here, because in the old API,
- * the contact has already vanished from the Group */
+ * RemoveContacts(). */
if (!tp_strdiff (mode, "remove-after"))
tp_cli_connection_interface_contact_list_run_remove_contacts (test->conn,
-1, test->arr, &error, NULL);
@@ -1418,61 +1106,26 @@ test_add_to_stored (Test *test,
gconstpointer mode)
{
GError *error = NULL;
+ GHashTable *table = g_hash_table_new (NULL, NULL);
- test->stored = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "stored");
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
- test->subscribe = test_ensure_channel (test, TP_HANDLE_TYPE_LIST,
- "subscribe");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->stored)),
- ==, 8);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->stored),
- test->ninja));
-
- g_array_append_val (test->arr, test->ninja);
-
- if (!tp_strdiff (mode, "old"))
- {
- tp_cli_channel_interface_group_run_add_members (test->stored,
- -1, test->arr, "", &error, NULL);
- }
- else
- {
- /* there's no specific API for adding contacts to stored (it's not a
- * very useful action in general), but setting an alias has it as a
- * side-effect */
- GHashTable *table = g_hash_table_new (NULL, NULL);
-
- g_hash_table_insert (table, GUINT_TO_POINTER (test->ninja),
- "The Wee Ninja");
- tp_cli_connection_interface_aliasing_run_set_aliases (test->conn,
- -1, table, &error, NULL);
- g_hash_table_unref (table);
- }
+ /* there's no specific API for adding contacts to stored (it's not a
+ * very useful action in general), but setting an alias has it as a
+ * side-effect */
+ g_hash_table_insert (table, GUINT_TO_POINTER (test->ninja),
+ "The Wee Ninja");
+ tp_cli_connection_interface_aliasing_run_set_aliases (test->conn,
+ -1, table, &error, NULL);
+ g_hash_table_unref (table);
g_assert_no_error (error);
/* by the time the method returns, we should have had the
* change-notification, too */
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->stored)),
- ==, 9);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->stored),
- test->ninja));
-
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->subscribe),
- test->ninja));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->ninja));
g_assert_cmpuint (test->log->len, ==, 1);
test_assert_one_contact_changed (test, 0, test->ninja,
TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, "");
+
test_assert_contact_state (test, test->ninja,
TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
}
@@ -1482,36 +1135,17 @@ test_add_to_stored_no_op (Test *test,
gconstpointer mode)
{
GError *error = NULL;
+ GHashTable *table = g_hash_table_new (NULL, NULL);
- test->stored = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "stored");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->stored)),
- ==, 8);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->stored),
- test->sjoerd));
+ /* there's no specific API for adding contacts to stored (it's not a
+ * very useful action in general), but setting an alias has it as a
+ * side-effect */
- g_array_append_val (test->arr, test->sjoerd);
-
- if (!tp_strdiff (mode, "old"))
- {
- tp_cli_channel_interface_group_run_add_members (test->stored,
- -1, test->arr, "", &error, NULL);
- }
- else
- {
- /* there's no specific API for adding contacts to stored (it's not a
- * very useful action in general), but setting an alias has it as a
- * side-effect */
- GHashTable *table = g_hash_table_new (NULL, NULL);
-
- g_hash_table_insert (table, GUINT_TO_POINTER (test->sjoerd),
- "Sjoerd");
- tp_cli_connection_interface_aliasing_run_set_aliases (test->conn,
- -1, table, &error, NULL);
- g_hash_table_unref (table);
- }
+ g_hash_table_insert (table, GUINT_TO_POINTER (test->sjoerd),
+ "Sjoerd");
+ tp_cli_connection_interface_aliasing_run_set_aliases (test->conn,
+ -1, table, &error, NULL);
+ g_hash_table_unref (table);
g_assert_no_error (error);
@@ -1526,40 +1160,18 @@ test_remove_from_stored (Test *test,
{
GError *error = NULL;
- test->stored = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "stored");
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
- test->subscribe = test_ensure_channel (test, TP_HANDLE_TYPE_LIST,
- "subscribe");
-
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->stored),
- test->sjoerd));
-
g_array_append_val (test->arr, test->sjoerd);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_remove_members (test->stored,
- -1, test->arr, "", &error, NULL);
- else
- tp_cli_connection_interface_contact_list_run_remove_contacts (test->conn,
- -1, test->arr, &error, NULL);
+ tp_cli_connection_interface_contact_list_run_remove_contacts (test->conn,
+ -1, test->arr, &error, NULL);
g_assert_no_error (error);
/* by the time the method returns, we should have had the
* removal-notification, too */
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->stored),
- test->sjoerd));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->subscribe),
- test->sjoerd));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->sjoerd));
-
g_assert_cmpuint (test->log->len, ==, 1);
test_assert_one_contact_removed (test, 0, test->sjoerd);
+
test_assert_contact_state (test, test->sjoerd,
TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
}
@@ -1570,23 +1182,10 @@ test_remove_from_stored_no_op (Test *test,
{
GError *error = NULL;
- test->stored = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "stored");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->stored)),
- ==, 8);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->stored),
- test->ninja));
-
g_array_append_val (test->arr, test->ninja);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_remove_members (test->stored,
- -1, test->arr, "", &error, NULL);
- else
- tp_cli_connection_interface_contact_list_run_remove_contacts (test->conn,
- -1, test->arr, &error, NULL);
+ tp_cli_connection_interface_contact_list_run_remove_contacts (test->conn,
+ -1, test->arr, &error, NULL);
g_assert_no_error (error);
@@ -1601,80 +1200,40 @@ test_accept_subscribe_request (Test *test,
{
GError *error = NULL;
- test->subscribe = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "subscribe");
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
- test->stored = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "stored");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->subscribe)),
- ==, 4);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->subscribe),
- test->ninja));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->ninja));
+ test_assert_contact_state (test, test->ninja,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
/* the example CM's fake contacts accept requests that contain "please" */
g_array_append_val (test->arr, test->ninja);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_add_members (test->subscribe,
- -1, test->arr, "Please may I see your presence?", &error, NULL);
- else
- tp_cli_connection_interface_contact_list_run_request_subscription (
- test->conn, -1, test->arr, "Please may I see your presence?",
- &error, NULL);
-
+ tp_cli_connection_interface_contact_list_run_request_subscription (
+ test->conn, -1, test->arr, "Please may I see your presence?",
+ &error, NULL);
g_assert_no_error (error);
/* by the time the method returns, we should have had the
* change-notification, too */
- g_assert (tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->ninja));
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->stored),
- test->ninja));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->stored),
- test->ninja));
+ g_assert_cmpuint (test->log->len, ==, 1);
+ test_assert_one_contact_changed (test, 0, test->ninja,
+ TP_SUBSCRIPTION_STATE_ASK, TP_SUBSCRIPTION_STATE_NO, "");
/* after a short delay, the contact accepts our request */
- while (tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->ninja))
+ while (test->log->len < 2)
g_main_context_iteration (NULL, TRUE);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->subscribe),
- test->ninja));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->ninja));
+ g_assert_cmpuint (test->log->len, ==, 2);
+ test_assert_one_contact_changed (test, 1, test->ninja,
+ TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_NO, "");
/* the contact also requests our presence after a short delay */
- while (!tp_intset_is_member (
- tp_channel_group_get_local_pending (test->publish),
- test->ninja) ||
- test->log->len < 3)
+ while (test->log->len < 3)
g_main_context_iteration (NULL, TRUE);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->ninja));
- g_assert (tp_intset_is_member (
- tp_channel_group_get_local_pending (test->publish),
- test->ninja));
-
g_assert_cmpuint (test->log->len, ==, 3);
- test_assert_one_contact_changed (test, 0, test->ninja,
- TP_SUBSCRIPTION_STATE_ASK, TP_SUBSCRIPTION_STATE_NO, "");
- test_assert_one_contact_changed (test, 1, test->ninja,
- TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_NO, "");
test_assert_one_contact_changed (test, 2, test->ninja,
TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_ASK,
"May I see your presence, please?");
+
test_assert_contact_state (test, test->ninja,
TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_ASK,
"May I see your presence, please?", NULL);
@@ -1686,72 +1245,32 @@ test_reject_subscribe_request (Test *test,
{
GError *error = NULL;
- test->subscribe = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "subscribe");
- test->stored = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "stored");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->subscribe)),
- ==, 4);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->subscribe),
- test->ninja));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->ninja));
+ test_assert_contact_state (test, test->ninja,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
/* the example CM's fake contacts reject requests that don't contain
* "please" */
g_array_append_val (test->arr, test->ninja);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_add_members (test->subscribe,
- -1, test->arr, "I demand to see your presence?", &error, NULL);
- else
- tp_cli_connection_interface_contact_list_run_request_subscription (
- test->conn, -1, test->arr, "I demand to see your presence?",
- &error, NULL);
-
+ tp_cli_connection_interface_contact_list_run_request_subscription (
+ test->conn, -1, test->arr, "I demand to see your presence?",
+ &error, NULL);
g_assert_no_error (error);
/* by the time the method returns, we should have had the
* change-notification, too */
- g_assert (tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->ninja));
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->stored),
- test->ninja));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->stored),
- test->ninja));
+ g_assert_cmpuint (test->log->len, ==, 1);
+ test_assert_one_contact_changed (test, 0, test->ninja,
+ TP_SUBSCRIPTION_STATE_ASK, TP_SUBSCRIPTION_STATE_NO, "");
/* after a short delay, the contact rejects our request. Say please! */
- while (tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->ninja) ||
- test->log->len < 2)
+ while (test->log->len < 2)
g_main_context_iteration (NULL, TRUE);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->subscribe),
- test->ninja));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->ninja));
-
- /* the ninja is still on the stored list */
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->stored),
- test->ninja));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->stored),
- test->ninja));
-
g_assert_cmpuint (test->log->len, ==, 2);
- test_assert_one_contact_changed (test, 0, test->ninja,
- TP_SUBSCRIPTION_STATE_ASK, TP_SUBSCRIPTION_STATE_NO, "");
test_assert_one_contact_changed (test, 1, test->ninja,
TP_SUBSCRIPTION_STATE_REMOVED_REMOTELY, TP_SUBSCRIPTION_STATE_NO, "");
+
test_assert_contact_state (test, test->ninja,
TP_SUBSCRIPTION_STATE_REMOVED_REMOTELY, TP_SUBSCRIPTION_STATE_NO, NULL,
NULL);
@@ -1759,8 +1278,7 @@ test_reject_subscribe_request (Test *test,
test_clear_log (test);
/* We can acknowledge the failure to subscribe with Unsubscribe() or
- * RemoveContacts(). We can't use the old API here, because in the old API,
- * the contact has already vanished from the Group */
+ * RemoveContacts(). */
if (!tp_strdiff (mode, "remove-after"))
tp_cli_connection_interface_contact_list_run_remove_contacts (test->conn,
-1, test->arr, &error, NULL);
@@ -1787,39 +1305,21 @@ test_remove_from_subscribe (Test *test,
{
GError *error = NULL;
- test->subscribe = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "subscribe");
- test->stored = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "stored");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->subscribe)),
- ==, 4);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->subscribe),
- test->sjoerd));
+ test_assert_contact_state (test, test->sjoerd,
+ TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_YES, NULL, "Cambridge");
g_array_append_val (test->arr, test->sjoerd);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_remove_members (test->subscribe,
- -1, test->arr, "", &error, NULL);
- else
- tp_cli_connection_interface_contact_list_run_unsubscribe (
- test->conn, -1, test->arr, &error, NULL);
-
+ tp_cli_connection_interface_contact_list_run_unsubscribe (
+ test->conn, -1, test->arr, &error, NULL);
g_assert_no_error (error);
/* by the time the method returns, we should have had the
* removal-notification, too */
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->subscribe),
- test->sjoerd));
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->stored),
- test->sjoerd));
-
g_assert_cmpuint (test->log->len, ==, 1);
test_assert_one_contact_changed (test, 0, test->sjoerd,
TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_YES, "");
+
test_assert_contact_state (test, test->sjoerd,
TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_YES, NULL, "Cambridge");
}
@@ -1830,42 +1330,21 @@ test_remove_from_subscribe_pending (Test *test,
{
GError *error = NULL;
- test->subscribe = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "subscribe");
- test->stored = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "stored");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_remote_pending (test->subscribe)),
- ==, 2);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->helen));
+ test_assert_contact_state (test, test->helen,
+ TP_SUBSCRIPTION_STATE_ASK, TP_SUBSCRIPTION_STATE_NO, NULL, "Cambridge");
g_array_append_val (test->arr, test->helen);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_remove_members (test->subscribe,
- -1, test->arr, "", &error, NULL);
- else
- tp_cli_connection_interface_contact_list_run_unsubscribe (
- test->conn, -1, test->arr, &error, NULL);
-
+ tp_cli_connection_interface_contact_list_run_unsubscribe (
+ test->conn, -1, test->arr, &error, NULL);
g_assert_no_error (error);
/* by the time the method returns, we should have had the
* removal-notification, too */
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->subscribe),
- test->helen));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_remote_pending (test->subscribe),
- test->helen));
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->stored),
- test->helen));
-
g_assert_cmpuint (test->log->len, ==, 1);
test_assert_one_contact_changed (test, 0, test->helen,
TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, "");
+
test_assert_contact_state (test, test->helen,
TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, "Cambridge");
}
@@ -1876,24 +1355,13 @@ test_remove_from_subscribe_no_op (Test *test,
{
GError *error = NULL;
- test->subscribe = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "subscribe");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->subscribe)),
- ==, 4);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->subscribe),
- test->ninja));
+ test_assert_contact_state (test, test->ninja,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
g_array_append_val (test->arr, test->ninja);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_remove_members (test->subscribe,
- -1, test->arr, "", &error, NULL);
- else
- tp_cli_connection_interface_contact_list_run_unsubscribe (
- test->conn, -1, test->arr, &error, NULL);
-
+ tp_cli_connection_interface_contact_list_run_unsubscribe (
+ test->conn, -1, test->arr, &error, NULL);
g_assert_no_error (error);
g_assert_cmpuint (test->log->len, ==, 0);
@@ -1909,50 +1377,17 @@ test_add_to_group (Test *test,
LogEntry *le;
guint i;
- test->group = test_ensure_channel (test, TP_HANDLE_TYPE_GROUP,
- "Cambridge");
- test->stored = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "stored");
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
- test->subscribe = test_ensure_channel (test, TP_HANDLE_TYPE_LIST,
- "subscribe");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->group)),
- ==, 4);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->ninja));
+ test_assert_contact_state (test, test->ninja,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
g_array_append_val (test->arr, test->ninja);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_add_members (test->group,
- -1, test->arr, "", &error, NULL);
- else
- tp_cli_connection_interface_contact_groups_run_add_to_group (test->conn,
- -1, "Cambridge", test->arr, &error, NULL);
-
+ tp_cli_connection_interface_contact_groups_run_add_to_group (test->conn,
+ -1, "Cambridge", test->arr, &error, NULL);
g_assert_no_error (error);
/* by the time the method returns, we should have had the
* change-notification, too */
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->group)),
- ==, 5);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->ninja));
-
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->stored),
- test->ninja));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->subscribe),
- test->ninja));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->publish),
- test->ninja));
-
g_assert_cmpuint (test->log->len, ==, 2);
le = g_ptr_array_index (test->log, 0);
@@ -1983,22 +1418,13 @@ test_add_to_group_no_op (Test *test,
{
GError *error = NULL;
- test->group = test_ensure_channel (test, TP_HANDLE_TYPE_GROUP,
- "Cambridge");
-
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->sjoerd));
+ test_assert_contact_state (test, test->sjoerd,
+ TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_YES, NULL, "Cambridge");
g_array_append_val (test->arr, test->sjoerd);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_add_members (test->group,
- -1, test->arr, "", &error, NULL);
- else
- tp_cli_connection_interface_contact_groups_run_add_to_group (test->conn,
- -1, "Cambridge", test->arr, &error, NULL);
-
+ tp_cli_connection_interface_contact_groups_run_add_to_group (test->conn,
+ -1, "Cambridge", test->arr, &error, NULL);
g_assert_no_error (error);
g_assert_cmpuint (test->log->len, ==, 0);
@@ -2012,32 +1438,21 @@ test_remove_from_group (Test *test,
{
GError *error = NULL;
- test->group = test_ensure_channel (test, TP_HANDLE_TYPE_GROUP,
- "Cambridge");
-
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->sjoerd));
+ test_assert_contact_state (test, test->sjoerd,
+ TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_YES, NULL, "Cambridge");
g_array_append_val (test->arr, test->sjoerd);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_remove_members (test->group,
- -1, test->arr, "", &error, NULL);
- else
- tp_cli_connection_interface_contact_groups_run_remove_from_group (
- test->conn, -1, "Cambridge", test->arr, &error, NULL);
+ tp_cli_connection_interface_contact_groups_run_remove_from_group (
+ test->conn, -1, "Cambridge", test->arr, &error, NULL);
g_assert_no_error (error);
/* by the time the method returns, we should have had the
* removal-notification, too */
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->sjoerd));
-
g_assert_cmpuint (test->log->len, ==, 1);
test_assert_one_group_left (test, 0, test->sjoerd, "Cambridge");
+
test_assert_contact_state (test, test->sjoerd,
TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_YES, NULL, NULL);
}
@@ -2048,21 +1463,13 @@ test_remove_from_group_no_op (Test *test,
{
GError *error = NULL;
- test->group = test_ensure_channel (test, TP_HANDLE_TYPE_GROUP,
- "Cambridge");
-
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->ninja));
+ test_assert_contact_state (test, test->ninja,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
g_array_append_val (test->arr, test->ninja);
- if (!tp_strdiff (mode, "old"))
- tp_cli_channel_interface_group_run_remove_members (test->group,
- -1, test->arr, "", &error, NULL);
- else
- tp_cli_connection_interface_contact_groups_run_remove_from_group (
- test->conn, -1, "Cambridge", test->arr, &error, NULL);
+ tp_cli_connection_interface_contact_groups_run_remove_from_group (
+ test->conn, -1, "Cambridge", test->arr, &error, NULL);
g_assert_no_error (error);
@@ -2076,65 +1483,22 @@ test_remove_group (Test *test,
gconstpointer mode)
{
GError *error = NULL;
+ LogEntry *le;
- test->group = test_ensure_channel (test, TP_HANDLE_TYPE_GROUP,
- "Cambridge");
-
- g_assert (!tp_intset_is_empty (
- tp_channel_group_get_members (test->group)));
-
- if (!tp_strdiff (mode, "old"))
- {
- /* The old API can't remove non-empty groups... */
- tp_cli_channel_run_close (test->group, -1, &error, NULL);
- g_assert_error (error, TP_ERROR, TP_ERROR_NOT_AVAILABLE);
-
- g_assert_cmpuint (test->log->len, ==, 0);
- }
- else
- {
- /* ... but the new API can */
- LogEntry *le;
-
- tp_cli_connection_interface_contact_groups_run_remove_group (test->conn,
- -1, "Cambridge", &error, NULL);
- g_assert_no_error (error);
-
- g_assert (tp_proxy_get_invalidated (test->group) != NULL);
- g_assert_cmpuint (test->log->len, ==, 2);
- test_assert_one_group_removed (test, 0, "Cambridge");
-
- le = g_ptr_array_index (test->log, 1);
- g_assert_cmpint (le->type, ==, GROUPS_CHANGED);
- g_assert_cmpuint (le->contacts->len, ==, 4);
- g_assert (le->groups_added == NULL || le->groups_added[0] == NULL);
- g_assert (le->groups_removed != NULL);
- g_assert_cmpstr (le->groups_removed[0], ==, "Cambridge");
- g_assert_cmpstr (le->groups_removed[1], ==, NULL);
- }
-}
-
-static void
-test_remove_group_empty (Test *test,
- gconstpointer mode)
-{
- GError *error = NULL;
-
- g_assert_cmpuint (test->log->len, ==, 0);
- test->group = test_ensure_channel (test, TP_HANDLE_TYPE_GROUP,
- "people who understand const in C");
-
- g_assert_cmpuint (test->log->len, ==, 1);
- test_assert_one_group_created (test, 0, "people who understand const in C");
-
- g_assert (tp_intset_is_empty (
- tp_channel_group_get_members (test->group)));
-
- tp_cli_channel_run_close (test->group, -1, &error, NULL);
+ tp_cli_connection_interface_contact_groups_run_remove_group (test->conn,
+ -1, "Cambridge", &error, NULL);
g_assert_no_error (error);
g_assert_cmpuint (test->log->len, ==, 2);
- test_assert_one_group_removed (test, 1, "people who understand const in C");
+ test_assert_one_group_removed (test, 0, "Cambridge");
+
+ le = g_ptr_array_index (test->log, 1);
+ g_assert_cmpint (le->type, ==, GROUPS_CHANGED);
+ g_assert_cmpuint (le->contacts->len, ==, 4);
+ g_assert (le->groups_added == NULL || le->groups_added[0] == NULL);
+ g_assert (le->groups_removed != NULL);
+ g_assert_cmpstr (le->groups_removed[0], ==, "Cambridge");
+ g_assert_cmpstr (le->groups_removed[1], ==, NULL);
}
static void
@@ -2145,33 +1509,18 @@ test_set_contact_groups (Test *test,
LogEntry *le;
const gchar *montreal_strv[] = { "Montreal", NULL };
- test->group = test_ensure_channel (test, TP_HANDLE_TYPE_GROUP,
- "Cambridge");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->group)),
- ==, 4);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->sjoerd));
+ test_assert_contact_state (test, test->sjoerd,
+ TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_YES, NULL, "Cambridge");
g_array_append_val (test->arr, test->sjoerd);
g_array_append_val (test->arr, test->wim);
tp_cli_connection_interface_contact_groups_run_set_contact_groups (
test->conn, -1, test->sjoerd, montreal_strv, &error, NULL);
-
g_assert_no_error (error);
/* by the time the method returns, we should have had the
* change-notification, too */
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->group)),
- ==, 3);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->sjoerd));
-
g_assert_cmpuint (test->log->len, ==, 1);
le = g_ptr_array_index (test->log, 0);
@@ -2193,30 +1542,15 @@ test_set_contact_groups_no_op (Test *test,
GError *error = NULL;
const gchar *cambridge_strv[] = { "Cambridge", NULL };
- test->group = test_ensure_channel (test, TP_HANDLE_TYPE_GROUP,
- "Cambridge");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->group)),
- ==, 4);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->sjoerd));
-
- g_array_append_val (test->arr, test->sjoerd);
- g_array_append_val (test->arr, test->wim);
+ test_assert_contact_state (test, test->sjoerd,
+ TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_YES, NULL, "Cambridge");
tp_cli_connection_interface_contact_groups_run_set_contact_groups (
test->conn, -1, test->sjoerd, cambridge_strv, &error, NULL);
-
g_assert_no_error (error);
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->group)),
- ==, 4);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->sjoerd));
+ test_assert_contact_state (test, test->sjoerd,
+ TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_YES, NULL, "Cambridge");
g_assert_cmpuint (test->log->len, ==, 0);
}
@@ -2228,21 +1562,13 @@ test_set_group_members (Test *test,
GError *error = NULL;
LogEntry *le;
- test->group = test_ensure_channel (test, TP_HANDLE_TYPE_GROUP,
- "Cambridge");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->group)),
- ==, 4);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->sjoerd));
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->helen));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->wim));
+ test_assert_contact_state (test, test->sjoerd,
+ TP_SUBSCRIPTION_STATE_YES, TP_SUBSCRIPTION_STATE_YES, NULL, "Cambridge");
+ test_assert_contact_state (test, test->wim,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_ASK,
+ "I'm more metal than you!", NULL);
+ test_assert_contact_state (test, test->helen,
+ TP_SUBSCRIPTION_STATE_ASK, TP_SUBSCRIPTION_STATE_NO, NULL, "Cambridge");
g_array_append_val (test->arr, test->sjoerd);
g_array_append_val (test->arr, test->wim);
@@ -2254,19 +1580,6 @@ test_set_group_members (Test *test,
/* by the time the method returns, we should have had the
* change-notification, too */
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->group)),
- ==, 2);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->wim));
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->sjoerd));
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->group),
- test->helen));
-
g_assert_cmpuint (test->log->len, ==, 2);
/* Wim was added */
@@ -2289,18 +1602,10 @@ test_rename_group (Test *test,
LogEntry *le;
GError *error = NULL;
- test->group = test_ensure_channel (test, TP_HANDLE_TYPE_GROUP,
- "Cambridge");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->group)),
- ==, 4);
-
tp_cli_connection_interface_contact_groups_run_rename_group (test->conn,
-1, "Cambridge", "Grantabrugge", &error, NULL);
g_assert_no_error (error);
- g_assert (tp_proxy_get_invalidated (test->group) != NULL);
g_assert_cmpuint (test->log->len, ==, 4);
le = g_ptr_array_index (test->log, 0);
@@ -2363,15 +1668,8 @@ block_contacts (Test *test,
{
GError *error = NULL;
- test->deny = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "deny");
- test->stored = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "stored");
-
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->deny)),
- ==, 2);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->deny),
- test->ninja));
+ test_assert_contact_state (test, test->ninja,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
g_array_append_val (test->arr, test->ninja);
func (test, &error);
@@ -2380,16 +1678,6 @@ block_contacts (Test *test,
/* by the time the method returns, we should have had the
* change-notification, on both the deny channel and the ContactBlocking
* connection interface */
- g_assert_cmpuint (
- tp_intset_size (tp_channel_group_get_members (test->deny)),
- ==, 3);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->deny),
- test->ninja));
-
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->stored),
- test->ninja));
test_assert_contact_state (test, test->ninja,
TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
@@ -2404,19 +1692,15 @@ block_contacts_no_op (Test *test,
{
GError *error = NULL;
- test->deny = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "deny");
-
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->deny),
- test->bill));
+ /* test_request_blocked_contacts checks that test->bill is indeed
+ * blocked. */
+ test_assert_contact_state (test, test->bill,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
g_array_append_val (test->arr, test->bill);
func (test, &error);
g_assert_no_error (error);
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->deny),
- test->bill));
test_assert_contact_state (test, test->bill,
TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
@@ -2430,14 +1714,10 @@ unblock_contacts (Test *test,
{
GError *error = NULL;
- test->deny = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "deny");
- test->publish = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "publish");
- test->subscribe = test_ensure_channel (test, TP_HANDLE_TYPE_LIST,
- "subscribe");
-
- g_assert (tp_intset_is_member (
- tp_channel_group_get_members (test->deny),
- test->bill));
+ /* test_request_blocked_contacts checks that test->bill is indeed
+ * blocked. */
+ test_assert_contact_state (test, test->bill,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
g_array_append_val (test->arr, test->bill);
func (test, &error);
@@ -2445,15 +1725,12 @@ unblock_contacts (Test *test,
/* by the time the method returns, we should have had the
* removal-notification, too */
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->deny),
- test->bill));
- test_assert_contact_state (test, test->bill,
- TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
-
g_assert_cmpuint (test->log->len, ==, 1);
test_assert_one_contact_unblocked (test, 0, test->bill,
tp_handle_inspect (test->contact_repo, test->bill));
+
+ test_assert_contact_state (test, test->bill,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
}
static void
@@ -2462,18 +1739,15 @@ unblock_contacts_no_op (Test *test,
{
GError *error = NULL;
- test->deny = test_ensure_channel (test, TP_HANDLE_TYPE_LIST, "deny");
-
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->deny),
- test->ninja));
+ /* test_request_blocked_contacts checks that test->ninja is not
+ * blocked. */
+ test_assert_contact_state (test, test->ninja,
+ TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
g_array_append_val (test->arr, test->ninja);
func (test, &error);
g_assert_no_error (error);
- g_assert (!tp_intset_is_member (
- tp_channel_group_get_members (test->deny),
- test->ninja));
+
test_assert_contact_state (test, test->ninja,
TP_SUBSCRIPTION_STATE_NO, TP_SUBSCRIPTION_STATE_NO, NULL, NULL);
@@ -2482,50 +1756,6 @@ unblock_contacts_no_op (Test *test,
}
static void
-add_to_deny (Test *test,
- GError **error)
-{
- tp_cli_channel_interface_group_run_add_members (test->deny,
- -1, test->arr, "", error, NULL);
-}
-
-static void
-test_add_to_deny (Test *test,
- gconstpointer nil G_GNUC_UNUSED)
-{
- block_contacts (test, add_to_deny);
-}
-
-static void
-test_add_to_deny_no_op (Test *test,
- gconstpointer nil G_GNUC_UNUSED)
-{
- block_contacts_no_op (test, add_to_deny);
-}
-
-static void
-remove_from_deny (Test *test,
- GError **error)
-{
- tp_cli_channel_interface_group_run_remove_members (test->deny,
- -1, test->arr, "", error, NULL);
-}
-
-static void
-test_remove_from_deny (Test *test,
- gconstpointer nil G_GNUC_UNUSED)
-{
- unblock_contacts (test, remove_from_deny);
-}
-
-static void
-test_remove_from_deny_no_op (Test *test,
- gconstpointer nil G_GNUC_UNUSED)
-{
- unblock_contacts_no_op (test, remove_from_deny);
-}
-
-static void
test_request_blocked_contacts (Test *test,
gconstpointer nil G_GNUC_UNUSED)
{
@@ -2687,8 +1917,6 @@ main (int argc,
g_test_add ("/contact-lists/nothing",
Test, NULL, setup, test_nothing, teardown);
- g_test_add ("/contact-lists/initial-channels",
- Test, NULL, setup, test_initial_channels, teardown);
g_test_add ("/contact-lists/properties",
Test, NULL, setup, test_properties, teardown);
g_test_add ("/contact-lists/contacts",
@@ -2713,19 +1941,6 @@ main (int argc,
g_test_add ("/contact-lists/remove-from-publish/no-op",
Test, NULL, setup, test_remove_from_publish_no_op, teardown);
- g_test_add ("/contact-lists/accept-publish-request/old",
- Test, "old", setup, test_accept_publish_request, teardown);
- g_test_add ("/contact-lists/reject-publish-request/old",
- Test, "old", setup, test_reject_publish_request, teardown);
- g_test_add ("/contact-lists/add-to-publish/pre-approve/old",
- Test, "old", setup, test_add_to_publish_pre_approve, teardown);
- g_test_add ("/contact-lists/add-to-publish/no-op/old",
- Test, "old", setup, test_add_to_publish_no_op, teardown);
- g_test_add ("/contact-lists/remove-from-publish/old",
- Test, "old", setup, test_remove_from_publish, teardown);
- g_test_add ("/contact-lists/remove-from-publish/no-op/old",
- Test, "old", setup, test_remove_from_publish_no_op, teardown);
-
g_test_add ("/contact-lists/cancelled-publish-request",
Test, NULL, setup, test_cancelled_publish_request, teardown);
g_test_add ("/contact-lists/cancelled-publish-request",
@@ -2740,15 +1955,6 @@ main (int argc,
g_test_add ("/contact-lists/remove-from-stored/no-op",
Test, NULL, setup, test_remove_from_stored_no_op, teardown);
- g_test_add ("/contact-lists/add-to-stored/old",
- Test, "old", setup, test_add_to_stored, teardown);
- g_test_add ("/contact-lists/add-to-stored/no-op/old",
- Test, "old", setup, test_add_to_stored_no_op, teardown);
- g_test_add ("/contact-lists/remove-from-stored/old",
- Test, "old", setup, test_remove_from_stored, teardown);
- g_test_add ("/contact-lists/remove-from-stored/no-op/old",
- Test, "old", setup, test_remove_from_stored_no_op, teardown);
-
g_test_add ("/contact-lists/accept-subscribe-request",
Test, NULL, setup, test_accept_subscribe_request, teardown);
g_test_add ("/contact-lists/reject-subscribe-request",
@@ -2760,17 +1966,6 @@ main (int argc,
g_test_add ("/contact-lists/remove-from-subscribe/no-op",
Test, NULL, setup, test_remove_from_subscribe_no_op, teardown);
- g_test_add ("/contact-lists/accept-subscribe-request/old",
- Test, "old", setup, test_accept_subscribe_request, teardown);
- g_test_add ("/contact-lists/reject-subscribe-request/old",
- Test, "old", setup, test_reject_subscribe_request, teardown);
- g_test_add ("/contact-lists/remove-from-subscribe/old",
- Test, "old", setup, test_remove_from_subscribe, teardown);
- g_test_add ("/contact-lists/remove-from-subscribe/pending/old",
- Test, "old", setup, test_remove_from_subscribe_pending, teardown);
- g_test_add ("/contact-lists/remove-from-subscribe/no-op/old",
- Test, "old", setup, test_remove_from_subscribe_no_op, teardown);
-
g_test_add ("/contact-lists/reject-subscribe-request/remove-after",
Test, "remove-after", setup, test_reject_subscribe_request, teardown);
@@ -2784,21 +1979,9 @@ main (int argc,
Test, NULL, setup, test_remove_from_group_no_op, teardown);
g_test_add ("/contact-lists/remove-group",
Test, NULL, setup, test_remove_group, teardown);
- g_test_add ("/contact-lists/remove-group/empty",
- Test, NULL, setup, test_remove_group_empty, teardown);
-
- g_test_add ("/contact-lists/add-to-group/old",
- Test, "old", setup, test_add_to_group, teardown);
- g_test_add ("/contact-lists/add-to-group/no-op/old",
- Test, "old", setup, test_add_to_group_no_op, teardown);
- g_test_add ("/contact-lists/remove-from-group/old",
- Test, "old", setup, test_remove_from_group, teardown);
- g_test_add ("/contact-lists/remove-from-group/no-op/old",
- Test, "old", setup, test_remove_from_group_no_op, teardown);
- g_test_add ("/contact-lists/remove-group/old",
- Test, "old", setup, test_remove_group, teardown);
- g_test_add ("/contact-lists/remove-group/empty/old",
- Test, "old", setup, test_remove_group_empty, teardown);
+
+ /* there's no way to create an empty group with the ContactGroup
+ * API. */
g_test_add ("/contact-lists/set_contact_groups",
Test, NULL, setup, test_set_contact_groups, teardown);
@@ -2814,15 +1997,6 @@ main (int argc,
g_test_add ("/contact-lists/rename_group/overwrite",
Test, NULL, setup, test_rename_group_overwrite, teardown);
- g_test_add ("/contact-lists/add-to-deny",
- Test, NULL, setup, test_add_to_deny, teardown);
- g_test_add ("/contact-lists/add-to-deny/no-op",
- Test, NULL, setup, test_add_to_deny_no_op, teardown);
- g_test_add ("/contact-lists/remove-from-deny",
- Test, NULL, setup, test_remove_from_deny, teardown);
- g_test_add ("/contact-lists/remove-from-deny/no-op",
- Test, NULL, setup, test_remove_from_deny_no_op, teardown);
-
g_test_add ("/contact-lists/request-blocked-contacts",
Test, NULL, setup, test_request_blocked_contacts, teardown);
g_test_add ("/contact-lists/request-blocked-contacts-before-connect",
diff --git a/tests/dbus/contacts-bug-19101.c b/tests/dbus/contacts-bug-19101.c
index 77474e15e..e13a04cce 100644
--- a/tests/dbus/contacts-bug-19101.c
+++ b/tests/dbus/contacts-bug-19101.c
@@ -111,7 +111,7 @@ test_by_id (TpConnection *client_conn)
tp_connection_get_contacts_by_id (client_conn,
2, ids,
- 0, NULL,
+ NULL,
by_id_cb,
&result, finish, NULL);
@@ -135,12 +135,8 @@ int
main (int argc,
char **argv)
{
- TpDBusDaemon *dbus;
TpTestsContactsConnection *service_conn;
TpBaseConnection *service_conn_as_base;
- gchar *name;
- gchar *conn_path;
- GError *error = NULL;
TpConnection *client_conn;
/* Setup */
@@ -148,30 +144,10 @@ main (int argc,
tp_tests_abort_after (10);
g_type_init ();
tp_debug_set_flags ("all");
- dbus = tp_tests_dbus_daemon_dup_or_die ();
-
- DEBUG ("a");
- service_conn = TP_TESTS_CONTACTS_CONNECTION (
- tp_tests_object_new_static_class (
- TP_TESTS_TYPE_BUG19101_CONNECTION,
- "account", "me@example.com",
- "protocol", "simple",
- NULL));
- DEBUG ("b");
- service_conn_as_base = TP_BASE_CONNECTION (service_conn);
- MYASSERT (service_conn != NULL, "");
- MYASSERT (service_conn_as_base != NULL, "");
-
- MYASSERT (tp_base_connection_register (service_conn_as_base, "simple",
- &name, &conn_path, &error), "");
- g_assert_no_error (error);
-
- client_conn = tp_connection_new (dbus, name, conn_path, &error);
- MYASSERT (client_conn != NULL, "");
- g_assert_no_error (error);
- MYASSERT (tp_connection_run_until_ready (client_conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
+
+ tp_tests_create_conn (TP_TESTS_TYPE_BUG19101_CONNECTION, "me@example.com",
+ TRUE, &service_conn_as_base, &client_conn);
+ service_conn = TP_TESTS_CONTACTS_CONNECTION (service_conn_as_base);
/* Tests */
@@ -184,10 +160,6 @@ main (int argc,
service_conn_as_base = NULL;
g_object_unref (service_conn);
- g_free (name);
- g_free (conn_path);
-
- g_object_unref (dbus);
return 0;
}
diff --git a/tests/dbus/contacts-mixin.c b/tests/dbus/contacts-mixin.c
index 5e286c3df..0f410a8ed 100644
--- a/tests/dbus/contacts-mixin.c
+++ b/tests/dbus/contacts-mixin.c
@@ -10,11 +10,14 @@
#include "config.h"
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/interfaces.h>
+#include "telepathy-glib/reentrants.h"
+
#include "tests/lib/contacts-conn.h"
#include "tests/lib/debug.h"
#include "tests/lib/myassert.h"
@@ -32,7 +35,7 @@ test_no_features (TpTestsContactsConnection *service_conn,
g_message (G_STRFUNC);
MYASSERT (tp_cli_connection_interface_contacts_run_get_contact_attributes (
- client_conn, -1, handles, NULL, FALSE, &contacts, &error, NULL), "");
+ client_conn, -1, handles, NULL, &contacts, &error, NULL), "");
g_assert_no_error (error);
g_assert_cmpuint (g_hash_table_size (contacts), ==, 3);
@@ -68,7 +71,7 @@ test_features (TpTestsContactsConnection *service_conn,
const gchar *interfaces[] = { TP_IFACE_CONNECTION,
TP_IFACE_CONNECTION_INTERFACE_ALIASING,
TP_IFACE_CONNECTION_INTERFACE_AVATARS,
- TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
+ TP_IFACE_CONNECTION_INTERFACE_PRESENCE,
NULL };
GError *error = NULL;
GHashTable *contacts;
@@ -77,7 +80,7 @@ test_features (TpTestsContactsConnection *service_conn,
g_message (G_STRFUNC);
MYASSERT (tp_cli_connection_interface_contacts_run_get_contact_attributes (
- client_conn, -1, handles, interfaces, FALSE, &contacts, &error, NULL),
+ client_conn, -1, handles, interfaces, &contacts, &error, NULL),
"");
g_assert_no_error (error);
g_assert_cmpuint (g_hash_table_size (contacts), ==, 3);
@@ -134,12 +137,8 @@ int
main (int argc,
char **argv)
{
- TpDBusDaemon *dbus;
TpTestsContactsConnection *service_conn;
TpBaseConnection *service_conn_as_base;
- gchar *name;
- gchar *conn_path;
- GError *error = NULL;
TpConnection *client_conn;
GArray *handles = g_array_sized_new (FALSE, FALSE, sizeof (guint), 3);
static const gchar * const ids[] = { "alice", "bob", "chris" };
@@ -160,30 +159,13 @@ main (int argc,
tp_tests_abort_after (10);
g_type_init ();
tp_debug_set_flags ("all");
- dbus = tp_tests_dbus_daemon_dup_or_die ();
-
- service_conn = TP_TESTS_CONTACTS_CONNECTION (
- tp_tests_object_new_static_class (
- TP_TESTS_TYPE_CONTACTS_CONNECTION,
- "account", "me@example.com",
- "protocol", "simple",
- NULL));
- service_conn_as_base = TP_BASE_CONNECTION (service_conn);
- MYASSERT (service_conn != NULL, "");
- MYASSERT (service_conn_as_base != NULL, "");
- service_repo = tp_base_connection_get_handles (
- (TpBaseConnection *) service_conn, TP_HANDLE_TYPE_CONTACT);
-
- MYASSERT (tp_base_connection_register (service_conn_as_base, "simple",
- &name, &conn_path, &error), "");
- g_assert_no_error (error);
- client_conn = tp_connection_new (dbus, name, conn_path, &error);
- MYASSERT (client_conn != NULL, "");
- g_assert_no_error (error);
- MYASSERT (tp_connection_run_until_ready (client_conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
+ tp_tests_create_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION, "me@example.com",
+ TRUE, &service_conn_as_base, &client_conn);
+ service_conn = TP_TESTS_CONTACTS_CONNECTION (service_conn_as_base);
+
+ service_repo = tp_base_connection_get_handles (service_conn_as_base,
+ TP_HANDLE_TYPE_CONTACT);
/* Set up some contacts */
@@ -212,10 +194,6 @@ main (int argc,
service_conn_as_base = NULL;
g_object_unref (service_conn);
- g_free (name);
- g_free (conn_path);
-
- g_object_unref (dbus);
g_array_unref (handles);
return 0;
diff --git a/tests/dbus/contacts-slow-path.c b/tests/dbus/contacts-slow-path.c
deleted file mode 100644
index fa4b454e2..000000000
--- a/tests/dbus/contacts-slow-path.c
+++ /dev/null
@@ -1,1300 +0,0 @@
-/* Feature test for TpContact creation using a connection which doesn't
- * support Contacts.
- * Those tests are not updated any more as Contacts is now mandatory.
- *
- * Copyright (C) 2008 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright (C) 2008 Nokia Corporation
- *
- * Copying and distribution of this file, with or without modification,
- * are permitted in any medium without royalty provided the copyright
- * notice and this notice are preserved.
- */
-
-#include "config.h"
-
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/contact.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/debug.h>
-
-#include "tests/lib/contacts-conn.h"
-#include "tests/lib/debug.h"
-#include "tests/lib/myassert.h"
-#include "tests/lib/util.h"
-
-typedef struct {
- GMainLoop *loop;
- GError *error /* initialized to 0 */;
- GPtrArray *contacts;
- GArray *invalid;
- gchar **good_ids;
- GHashTable *bad_ids;
-} Result;
-
-typedef struct {
- Result result;
- TpBaseConnection *base_connection;
- TpTestsContactsConnection *legacy_service_conn;
- TpConnection *legacy_client_conn;
- TpHandleRepoIface *service_repo;
-} Fixture;
-
-static void
-reset_result (Result *result)
-{
- tp_clear_pointer (&result->invalid, g_array_unref);
- if (result->contacts != NULL)
- g_ptr_array_foreach (result->contacts, (GFunc) g_object_unref, NULL);
- tp_clear_pointer (&result->contacts, g_ptr_array_unref);
- tp_clear_pointer (&result->good_ids, g_strfreev);
- tp_clear_pointer (&result->bad_ids, g_hash_table_unref);
- g_clear_error (&result->error);
-}
-
-static void
-by_handle_cb (TpConnection *connection,
- guint n_contacts,
- TpContact * const *contacts,
- guint n_invalid,
- const TpHandle *invalid,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- Result *result = user_data;
-
- g_assert (result->invalid == NULL);
- g_assert (result->contacts == NULL);
- g_assert (result->error == NULL);
- g_assert (result->good_ids == NULL);
- g_assert (result->bad_ids == NULL);
-
- if (error == NULL)
- {
- guint i;
-
- DEBUG ("got %u contacts and %u invalid", n_contacts, n_invalid);
-
- result->invalid = g_array_sized_new (FALSE, FALSE, sizeof (TpHandle),
- n_invalid);
- g_array_append_vals (result->invalid, invalid, n_invalid);
-
- result->contacts = g_ptr_array_sized_new (n_contacts);
-
- for (i = 0; i < n_contacts; i++)
- {
- TpContact *contact = contacts[i];
-
- DEBUG ("contact #%u: %p", i, contact);
- DEBUG ("contact #%u alias: %s", i, tp_contact_get_alias (contact));
- DEBUG ("contact #%u avatar token: %s", i,
- tp_contact_get_avatar_token (contact));
- DEBUG ("contact #%u presence type: %u", i,
- tp_contact_get_presence_type (contact));
- DEBUG ("contact #%u presence status: %s", i,
- tp_contact_get_presence_status (contact));
- DEBUG ("contact #%u presence message: %s", i,
- tp_contact_get_presence_message (contact));
- g_ptr_array_add (result->contacts, g_object_ref (contact));
- }
- }
- else
- {
- DEBUG ("got an error: %s %u: %s", g_quark_to_string (error->domain),
- error->code, error->message);
- result->error = g_error_copy (error);
- }
-}
-
-static void
-finish (gpointer r)
-{
- Result *result = r;
-
- g_main_loop_quit (result->loop);
-}
-
-static void
-test_by_handle (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- TpTestsContactsConnection *service_conn = f->legacy_service_conn;
- TpConnection *client_conn = f->legacy_client_conn;
- Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL };
- TpHandle handles[5] = { 0, 0, 0, 0, 0 };
- TpHandleRepoIface *service_repo = tp_base_connection_get_handles (
- (TpBaseConnection *) service_conn, TP_HANDLE_TYPE_CONTACT);
- TpContact *contacts[4];
- gpointer weak_pointers[4];
- guint i;
-
- g_message (G_STRFUNC);
-
- /* arrange for some handles to exist */
- handles[0] = tp_handle_ensure (service_repo, "alice", NULL, NULL);
- MYASSERT (handles[0] != 0, "");
- handles[1] = tp_handle_ensure (service_repo, "bob", NULL, NULL);
- MYASSERT (handles[1] != 0, "");
- /* randomly guess at a handle that shouldn't exist */
- handles[2] = 31337;
- MYASSERT (!tp_handle_is_valid (service_repo, 31337, NULL), "");
- /* another valid handle */
- handles[3] = tp_handle_ensure (service_repo, "chris", NULL, NULL);
- MYASSERT (handles[3] != 0, "");
- /* another invalid handle */
- handles[4] = 12345;
- MYASSERT (!tp_handle_is_valid (service_repo, 12345, NULL), "");
-
- /* Make a request for the following 5 contacts:
- * - alice
- * - bob
- * - invalid handle 31337
- * - chris
- * - invalid handle 12345
- */
- tp_connection_get_contacts_by_handle (client_conn,
- 5, handles,
- 0, NULL,
- by_handle_cb,
- &result, finish, NULL);
-
- g_main_loop_run (result.loop);
-
- MYASSERT (result.contacts->len == 3, ": %u", result.contacts->len);
- MYASSERT (result.invalid->len == 2, ": %u", result.invalid->len);
- g_assert_no_error (result.error);
-
- MYASSERT (g_ptr_array_index (result.contacts, 0) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 1) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 2) != NULL, "");
- contacts[0] = g_ptr_array_index (result.contacts, 0);
- g_assert_cmpuint (tp_contact_get_handle (contacts[0]), ==, handles[0]);
- g_assert_cmpstr (tp_contact_get_identifier (contacts[0]), ==, "alice");
- contacts[1] = g_ptr_array_index (result.contacts, 1);
- g_assert_cmpuint (tp_contact_get_handle (contacts[1]), ==, handles[1]);
- g_assert_cmpstr (tp_contact_get_identifier (contacts[1]), ==, "bob");
- contacts[3] = g_ptr_array_index (result.contacts, 2);
- g_assert_cmpuint (tp_contact_get_handle (contacts[3]), ==, handles[3]);
- g_assert_cmpstr (tp_contact_get_identifier (contacts[3]), ==, "chris");
-
- /* clean up before doing the second request */
- g_array_unref (result.invalid);
- result.invalid = NULL;
- g_ptr_array_unref (result.contacts);
- result.contacts = NULL;
- g_assert (result.error == NULL);
-
- /* Replace one of the invalid handles with a valid one */
- handles[2] = tp_handle_ensure (service_repo, "dora", NULL, NULL);
- MYASSERT (handles[2] != 0, "");
-
- /* Make a request for the following 4 contacts:
- * - alice (TpContact exists)
- * - bob (TpContact exists)
- * - dora (TpContact needs to be created)
- * - chris (TpContact exists)
- */
- tp_connection_get_contacts_by_handle (client_conn,
- 4, handles,
- 0, NULL,
- by_handle_cb,
- &result, finish, NULL);
-
- g_main_loop_run (result.loop);
-
- /* assert that we got the same contacts back */
-
- MYASSERT (result.contacts->len == 4, ": %u", result.contacts->len);
- MYASSERT (result.invalid->len == 0, ": %u", result.invalid->len);
- g_assert_no_error (result.error);
-
- /* 0, 1 and 3 we already have a reference to */
- MYASSERT (g_ptr_array_index (result.contacts, 0) == contacts[0], "");
- g_object_unref (g_ptr_array_index (result.contacts, 0));
- MYASSERT (g_ptr_array_index (result.contacts, 1) == contacts[1], "");
- g_object_unref (g_ptr_array_index (result.contacts, 1));
- MYASSERT (g_ptr_array_index (result.contacts, 3) == contacts[3], "");
- g_object_unref (g_ptr_array_index (result.contacts, 3));
-
- /* 2 we don't */
- contacts[2] = g_ptr_array_index (result.contacts, 2);
- g_assert_cmpuint (tp_contact_get_handle (contacts[2]), ==, handles[2]);
- g_assert_cmpstr (tp_contact_get_identifier (contacts[2]), ==, "dora");
-
- /* clean up refs to contacts and assert that they aren't leaked */
-
- for (i = 0; i < 4; i++)
- {
- weak_pointers[i] = contacts[i];
- g_object_add_weak_pointer ((GObject *) contacts[i],weak_pointers +i);
- }
-
- for (i = 0; i < 4; i++)
- {
- g_object_unref (contacts[i]);
- MYASSERT (weak_pointers[i] == NULL, ": %u", i);
- }
-
- /* wait for ReleaseHandles to run */
- tp_tests_proxy_run_until_dbus_queue_processed (client_conn);
-
- /* unref all the handles we created service-side */
- tp_handle_unref (service_repo, handles[0]);
- tp_handle_unref (service_repo, handles[1]);
- tp_handle_unref (service_repo, handles[2]);
- tp_handle_unref (service_repo, handles[3]);
-
- /* remaining cleanup */
- g_main_loop_unref (result.loop);
- g_array_unref (result.invalid);
- g_ptr_array_unref (result.contacts);
- g_assert (result.error == NULL);
-}
-
-static void
-test_no_features (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- TpTestsContactsConnection *service_conn = f->legacy_service_conn;
- TpConnection *client_conn = f->legacy_client_conn;
- Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL };
- const gchar * const ids[] = { "alice", "bob", "chris" };
- TpHandle handles[3] = { 0, 0, 0 };
- TpHandleRepoIface *service_repo = tp_base_connection_get_handles (
- (TpBaseConnection *) service_conn, TP_HANDLE_TYPE_CONTACT);
- TpContact *contacts[3];
- guint i;
-
- g_message (G_STRFUNC);
-
- for (i = 0; i < 3; i++)
- handles[i] = tp_handle_ensure (service_repo, ids[i], NULL, NULL);
-
- tp_connection_get_contacts_by_handle (client_conn,
- 3, handles,
- 0, NULL,
- by_handle_cb,
- &result, finish, NULL);
-
- g_main_loop_run (result.loop);
-
- MYASSERT (result.contacts->len == 3, ": %u", result.contacts->len);
- MYASSERT (result.invalid->len == 0, ": %u", result.invalid->len);
- g_assert_no_error (result.error);
-
- MYASSERT (g_ptr_array_index (result.contacts, 0) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 1) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 2) != NULL, "");
-
- for (i = 0; i < 3; i++)
- contacts[i] = g_ptr_array_index (result.contacts, i);
-
- for (i = 0; i < 3; i++)
- {
- MYASSERT (tp_contact_get_connection (contacts[i]) == client_conn, "");
- g_assert_cmpuint (tp_contact_get_handle (contacts[i]), ==, handles[i]);
- g_assert_cmpstr (tp_contact_get_identifier (contacts[i]), ==, ids[i]);
- g_assert_cmpstr (tp_contact_get_alias (contacts[i]), ==,
- tp_contact_get_identifier (contacts[i]));
- MYASSERT (tp_contact_get_avatar_token (contacts[i]) == NULL,
- ": %s", tp_contact_get_avatar_token (contacts[i]));
- g_assert_cmpuint (tp_contact_get_presence_type (contacts[i]), ==,
- TP_CONNECTION_PRESENCE_TYPE_UNSET);
- g_assert_cmpstr (tp_contact_get_presence_status (contacts[i]), ==, "");
- g_assert_cmpstr (tp_contact_get_presence_message (contacts[i]), ==, "");
- MYASSERT (!tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_ALIAS), "");
- MYASSERT (!tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_AVATAR_TOKEN), "");
- MYASSERT (!tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_PRESENCE), "");
- MYASSERT (!tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_LOCATION), "");
- }
-
- for (i = 0; i < 3; i++)
- {
- g_object_unref (contacts[i]);
- tp_tests_proxy_run_until_dbus_queue_processed (client_conn);
- tp_handle_unref (service_repo, handles[i]);
- }
-
- /* remaining cleanup */
- g_main_loop_unref (result.loop);
- g_array_unref (result.invalid);
- g_ptr_array_unref (result.contacts);
- g_assert (result.error == NULL);
-}
-
-static void
-upgrade_cb (TpConnection *connection,
- guint n_contacts,
- TpContact * const *contacts,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- Result *result = user_data;
-
- g_assert (result->invalid == NULL);
- g_assert (result->contacts == NULL);
- g_assert (result->error == NULL);
- g_assert (result->good_ids == NULL);
- g_assert (result->bad_ids == NULL);
-
- if (error == NULL)
- {
- guint i;
-
- DEBUG ("got %u contacts", n_contacts);
-
- result->contacts = g_ptr_array_sized_new (n_contacts);
-
- for (i = 0; i < n_contacts; i++)
- {
- TpContact *contact = contacts[i];
-
- DEBUG ("contact #%u: %p", i, contact);
- DEBUG ("contact #%u alias: %s", i, tp_contact_get_alias (contact));
- DEBUG ("contact #%u avatar token: %s", i,
- tp_contact_get_avatar_token (contact));
- DEBUG ("contact #%u presence type: %u", i,
- tp_contact_get_presence_type (contact));
- DEBUG ("contact #%u presence status: %s", i,
- tp_contact_get_presence_status (contact));
- DEBUG ("contact #%u presence message: %s", i,
- tp_contact_get_presence_message (contact));
- g_ptr_array_add (result->contacts, g_object_ref (contact));
- }
- }
- else
- {
- DEBUG ("got an error: %s %u: %s", g_quark_to_string (error->domain),
- error->code, error->message);
- result->error = g_error_copy (error);
- }
-}
-
-static void
-test_upgrade (Fixture *f,
- gconstpointer mode)
-{
- TpTestsContactsConnection *service_conn = f->legacy_service_conn;
- TpConnection *client_conn = f->legacy_client_conn;
- Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL };
- TpHandle handles[] = { 0, 0, 0 };
- static const gchar * const ids[] = { "alice", "bob", "chris" };
- static const gchar * const aliases[] = { "Alice in Wonderland",
- "Bob the Builder", "Christopher Robin" };
- static const gchar * const tokens[] = { "aaaaa", "bbbbb", "ccccc" };
- static TpTestsContactsConnectionPresenceStatusIndex statuses[] = {
- TP_TESTS_CONTACTS_CONNECTION_STATUS_AVAILABLE,
- TP_TESTS_CONTACTS_CONNECTION_STATUS_BUSY,
- TP_TESTS_CONTACTS_CONNECTION_STATUS_AWAY };
- static const gchar * const messages[] = { "", "Fixing it",
- "GON OUT BACKSON" };
- TpHandleRepoIface *service_repo = tp_base_connection_get_handles (
- (TpBaseConnection *) service_conn, TP_HANDLE_TYPE_CONTACT);
- TpContact *contacts[3];
- TpContactFeature features[] = { TP_CONTACT_FEATURE_ALIAS,
- TP_CONTACT_FEATURE_AVATAR_TOKEN, TP_CONTACT_FEATURE_PRESENCE };
- guint i;
-
- g_message (G_STRFUNC);
-
- for (i = 0; i < 3; i++)
- handles[i] = tp_handle_ensure (service_repo, ids[i], NULL, NULL);
-
- tp_tests_contacts_connection_change_aliases (service_conn, 3, handles,
- aliases);
- tp_tests_contacts_connection_change_presences (service_conn, 3, handles,
- statuses, messages);
- tp_tests_contacts_connection_change_avatar_tokens (service_conn, 3, handles,
- tokens);
-
- tp_connection_get_contacts_by_handle (client_conn,
- 3, handles,
- 0, NULL,
- by_handle_cb,
- &result, finish, NULL);
-
- g_main_loop_run (result.loop);
-
- MYASSERT (result.contacts->len == 3, ": %u", result.contacts->len);
- MYASSERT (result.invalid->len == 0, ": %u", result.invalid->len);
- g_assert_no_error (result.error);
-
- MYASSERT (g_ptr_array_index (result.contacts, 0) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 1) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 2) != NULL, "");
-
- for (i = 0; i < 3; i++)
- contacts[i] = g_ptr_array_index (result.contacts, i);
-
- for (i = 0; i < 3; i++)
- {
- MYASSERT (tp_contact_get_connection (contacts[i]) == client_conn, "");
- g_assert_cmpuint (tp_contact_get_handle (contacts[i]), ==, handles[i]);
- g_assert_cmpstr (tp_contact_get_identifier (contacts[i]), ==, ids[i]);
- g_assert_cmpstr (tp_contact_get_alias (contacts[i]), ==,
- tp_contact_get_identifier (contacts[i]));
- MYASSERT (tp_contact_get_avatar_token (contacts[i]) == NULL,
- ": %s", tp_contact_get_avatar_token (contacts[i]));
- g_assert_cmpuint (tp_contact_get_presence_type (contacts[i]), ==,
- TP_CONNECTION_PRESENCE_TYPE_UNSET);
- g_assert_cmpstr (tp_contact_get_presence_status (contacts[i]), ==, "");
- g_assert_cmpstr (tp_contact_get_presence_message (contacts[i]), ==, "");
- MYASSERT (!tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_ALIAS), "");
- MYASSERT (!tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_AVATAR_TOKEN), "");
- MYASSERT (!tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_PRESENCE), "");
- MYASSERT (!tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_LOCATION), "");
- }
-
- /* clean up before doing the second request */
- g_array_unref (result.invalid);
- result.invalid = NULL;
- g_ptr_array_unref (result.contacts);
- result.contacts = NULL;
- g_assert (result.error == NULL);
-
- if (!tp_strdiff (mode, "old"))
- {
- tp_connection_upgrade_contacts (client_conn,
- 3, contacts,
- G_N_ELEMENTS (features), features,
- upgrade_cb,
- &result, finish, NULL);
-
- g_main_loop_run (result.loop);
- }
- else
- {
- GAsyncResult *res = NULL;
-
- tp_connection_upgrade_contacts_async (client_conn,
- 3, contacts,
- G_N_ELEMENTS (features), features,
- tp_tests_result_ready_cb, &res);
- tp_tests_run_until_result (&res);
-
- tp_connection_upgrade_contacts_finish (client_conn, res,
- &result.contacts, &result.error);
- }
-
- MYASSERT (result.contacts->len == 3, ": %u", result.contacts->len);
- MYASSERT (result.invalid == NULL, "");
- g_assert_no_error (result.error);
-
- for (i = 0; i < 3; i++)
- {
- MYASSERT (g_ptr_array_index (result.contacts, 0) == contacts[0], "");
- g_object_unref (g_ptr_array_index (result.contacts, i));
- }
-
- for (i = 0; i < 3; i++)
- {
- g_assert_cmpuint (tp_contact_get_handle (contacts[i]), ==, handles[i]);
- g_assert_cmpstr (tp_contact_get_identifier (contacts[i]), ==, ids[i]);
-
- MYASSERT (tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_ALIAS), "");
- g_assert_cmpstr (tp_contact_get_alias (contacts[i]), ==, aliases[i]);
-
- MYASSERT (tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_AVATAR_TOKEN), "");
- g_assert_cmpstr (tp_contact_get_avatar_token (contacts[i]), ==,
- tokens[i]);
-
- MYASSERT (tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_PRESENCE), "");
- g_assert_cmpstr (tp_contact_get_presence_message (contacts[i]), ==,
- messages[i]);
-
- MYASSERT (!tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_LOCATION), "");
- }
-
- g_assert_cmpuint (tp_contact_get_presence_type (contacts[0]), ==,
- TP_CONNECTION_PRESENCE_TYPE_AVAILABLE);
- g_assert_cmpstr (tp_contact_get_presence_status (contacts[0]), ==,
- "available");
- g_assert_cmpuint (tp_contact_get_presence_type (contacts[1]), ==,
- TP_CONNECTION_PRESENCE_TYPE_BUSY);
- g_assert_cmpstr (tp_contact_get_presence_status (contacts[1]), ==, "busy");
- g_assert_cmpuint (tp_contact_get_presence_type (contacts[2]), ==,
- TP_CONNECTION_PRESENCE_TYPE_AWAY);
- g_assert_cmpstr (tp_contact_get_presence_status (contacts[2]), ==, "away");
-
- for (i = 0; i < 3; i++)
- {
- g_object_unref (contacts[i]);
- tp_tests_proxy_run_until_dbus_queue_processed (client_conn);
- tp_handle_unref (service_repo, handles[i]);
- }
-
- /* remaining cleanup */
- g_main_loop_unref (result.loop);
- g_ptr_array_unref (result.contacts);
- g_assert (result.invalid == NULL);
- g_assert (result.error == NULL);
-}
-
-typedef struct
-{
- gboolean alias_changed;
- gboolean avatar_token_changed;
- gboolean presence_type_changed;
- gboolean presence_status_changed;
- gboolean presence_msg_changed;
-} notify_ctx;
-
-static void
-notify_ctx_init (notify_ctx *ctx)
-{
- ctx->alias_changed = FALSE;
- ctx->avatar_token_changed = FALSE;
- ctx->presence_type_changed = FALSE;
- ctx->presence_status_changed = FALSE;
- ctx->presence_msg_changed = FALSE;
-}
-
-static gboolean
-notify_ctx_is_fully_changed (notify_ctx *ctx)
-{
- return ctx->alias_changed && ctx->avatar_token_changed &&
- ctx->presence_type_changed && ctx->presence_status_changed &&
- ctx->presence_msg_changed;
-}
-
-static gboolean
-notify_ctx_is_changed (notify_ctx *ctx)
-{
- return ctx->alias_changed || ctx->avatar_token_changed ||
- ctx->presence_type_changed || ctx->presence_status_changed ||
- ctx->presence_msg_changed;
-}
-
-static void
-contact_notify_cb (TpContact *contact,
- GParamSpec *param,
- notify_ctx *ctx)
-{
- if (!tp_strdiff (param->name, "alias"))
- ctx->alias_changed = TRUE;
- else if (!tp_strdiff (param->name, "avatar-token"))
- ctx->avatar_token_changed = TRUE;
- else if (!tp_strdiff (param->name, "presence-type"))
- ctx->presence_type_changed = TRUE;
- else if (!tp_strdiff (param->name, "presence-status"))
- ctx->presence_status_changed = TRUE;
- else if (!tp_strdiff (param->name, "presence-message"))
- ctx->presence_msg_changed = TRUE;
-}
-
-static void
-test_features (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- TpTestsContactsConnection *service_conn = f->legacy_service_conn;
- TpConnection *client_conn = f->legacy_client_conn;
- Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL };
- TpHandle handles[] = { 0, 0, 0 };
- static const gchar * const ids[] = { "alice", "bob", "chris" };
- static const gchar * const aliases[] = { "Alice in Wonderland",
- "Bob the Builder", "Christopher Robin" };
- static const gchar * const tokens[] = { "aaaaa", "bbbbb", "ccccc" };
- static TpTestsContactsConnectionPresenceStatusIndex statuses[] = {
- TP_TESTS_CONTACTS_CONNECTION_STATUS_AVAILABLE,
- TP_TESTS_CONTACTS_CONNECTION_STATUS_BUSY,
- TP_TESTS_CONTACTS_CONNECTION_STATUS_AWAY };
- static const gchar * const messages[] = { "", "Fixing it",
- "GON OUT BACKSON" };
- static const gchar * const new_aliases[] = { "Alice [at a tea party]",
- "Bob the Plumber" };
- static const gchar * const new_tokens[] = { "AAAA", "BBBB" };
- static TpTestsContactsConnectionPresenceStatusIndex new_statuses[] = {
- TP_TESTS_CONTACTS_CONNECTION_STATUS_AWAY,
- TP_TESTS_CONTACTS_CONNECTION_STATUS_AVAILABLE };
- static const gchar * const new_messages[] = { "At the Mad Hatter's",
- "It'll cost you" };
- TpHandleRepoIface *service_repo = tp_base_connection_get_handles (
- (TpBaseConnection *) service_conn, TP_HANDLE_TYPE_CONTACT);
- TpContact *contacts[3];
- TpContactFeature features[] = { TP_CONTACT_FEATURE_ALIAS,
- TP_CONTACT_FEATURE_AVATAR_TOKEN, TP_CONTACT_FEATURE_PRESENCE };
- guint i;
- struct {
- TpConnection *connection;
- TpHandle handle;
- gchar *identifier;
- gchar *alias;
- gchar *avatar_token;
- TpConnectionPresenceType presence_type;
- gchar *presence_status;
- gchar *presence_message;
- } from_gobject;
- notify_ctx notify_ctx_alice, notify_ctx_chris;
-
- g_message (G_STRFUNC);
-
- for (i = 0; i < 3; i++)
- handles[i] = tp_handle_ensure (service_repo, ids[i], NULL, NULL);
-
- tp_tests_contacts_connection_change_aliases (service_conn, 3, handles,
- aliases);
- tp_tests_contacts_connection_change_presences (service_conn, 3, handles,
- statuses, messages);
- tp_tests_contacts_connection_change_avatar_tokens (service_conn, 3, handles,
- tokens);
-
- tp_connection_get_contacts_by_handle (client_conn,
- 3, handles,
- G_N_ELEMENTS (features), features,
- by_handle_cb,
- &result, finish, NULL);
-
- g_main_loop_run (result.loop);
-
- MYASSERT (result.contacts->len == 3, ": %u", result.contacts->len);
- MYASSERT (result.invalid->len == 0, ": %u", result.invalid->len);
- g_assert_no_error (result.error);
-
- MYASSERT (g_ptr_array_index (result.contacts, 0) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 1) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 2) != NULL, "");
-
- for (i = 0; i < 3; i++)
- contacts[i] = g_ptr_array_index (result.contacts, i);
-
- for (i = 0; i < 3; i++)
- {
- g_assert_cmpuint (tp_contact_get_handle (contacts[i]), ==, handles[i]);
- g_assert_cmpstr (tp_contact_get_identifier (contacts[i]), ==, ids[i]);
-
- MYASSERT (tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_ALIAS), "");
- g_assert_cmpstr (tp_contact_get_alias (contacts[i]), ==, aliases[i]);
-
- MYASSERT (tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_AVATAR_TOKEN), "");
- g_assert_cmpstr (tp_contact_get_avatar_token (contacts[i]), ==,
- tokens[i]);
-
- MYASSERT (tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_PRESENCE), "");
- g_assert_cmpstr (tp_contact_get_presence_message (contacts[i]), ==,
- messages[i]);
-
- MYASSERT (!tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_LOCATION), "");
- }
-
- g_assert_cmpuint (tp_contact_get_presence_type (contacts[0]), ==,
- TP_CONNECTION_PRESENCE_TYPE_AVAILABLE);
- g_assert_cmpstr (tp_contact_get_presence_status (contacts[0]), ==,
- "available");
- g_assert_cmpuint (tp_contact_get_presence_type (contacts[1]), ==,
- TP_CONNECTION_PRESENCE_TYPE_BUSY);
- g_assert_cmpstr (tp_contact_get_presence_status (contacts[1]), ==,
- "busy");
- g_assert_cmpuint (tp_contact_get_presence_type (contacts[2]), ==,
- TP_CONNECTION_PRESENCE_TYPE_AWAY);
- g_assert_cmpstr (tp_contact_get_presence_status (contacts[2]), ==,
- "away");
-
- /* exercise GObject properties in a basic way */
- g_object_get (contacts[0],
- "connection", &from_gobject.connection,
- "handle", &from_gobject.handle,
- "identifier", &from_gobject.identifier,
- "alias", &from_gobject.alias,
- "avatar-token", &from_gobject.avatar_token,
- "presence-type", &from_gobject.presence_type,
- "presence-status", &from_gobject.presence_status,
- "presence-message", &from_gobject.presence_message,
- NULL);
- MYASSERT (from_gobject.connection == client_conn, "");
- g_assert_cmpuint (from_gobject.handle, ==, handles[0]);
- g_assert_cmpstr (from_gobject.identifier, ==, "alice");
- g_assert_cmpstr (from_gobject.alias, ==, "Alice in Wonderland");
- g_assert_cmpstr (from_gobject.avatar_token, ==, "aaaaa");
- g_assert_cmpuint (from_gobject.presence_type, ==,
- TP_CONNECTION_PRESENCE_TYPE_AVAILABLE);
- g_assert_cmpstr (from_gobject.presence_status, ==, "available");
- g_assert_cmpstr (from_gobject.presence_message, ==, "");
- g_object_unref (from_gobject.connection);
- g_free (from_gobject.identifier);
- g_free (from_gobject.alias);
- g_free (from_gobject.avatar_token);
- g_free (from_gobject.presence_status);
- g_free (from_gobject.presence_message);
-
- notify_ctx_init (&notify_ctx_alice);
- g_signal_connect (contacts[0], "notify",
- G_CALLBACK (contact_notify_cb), &notify_ctx_alice);
-
- notify_ctx_init (&notify_ctx_chris);
- g_signal_connect (contacts[2], "notify",
- G_CALLBACK (contact_notify_cb), &notify_ctx_chris);
-
- /* Change Alice and Bob's contact info, leave Chris as-is */
- tp_tests_contacts_connection_change_aliases (service_conn, 2, handles,
- new_aliases);
- tp_tests_contacts_connection_change_presences (service_conn, 2, handles,
- new_statuses, new_messages);
- tp_tests_contacts_connection_change_avatar_tokens (service_conn, 2, handles,
- new_tokens);
- tp_tests_proxy_run_until_dbus_queue_processed (client_conn);
-
- g_assert (notify_ctx_is_fully_changed (&notify_ctx_alice));
- g_assert (!notify_ctx_is_changed (&notify_ctx_chris));
-
- for (i = 0; i < 2; i++)
- {
- g_assert_cmpuint (tp_contact_get_handle (contacts[i]), ==, handles[i]);
- g_assert_cmpstr (tp_contact_get_identifier (contacts[i]), ==,
- ids[i]);
-
- MYASSERT (tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_ALIAS), "");
- g_assert_cmpstr (tp_contact_get_alias (contacts[i]), ==,
- new_aliases[i]);
-
- MYASSERT (tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_AVATAR_TOKEN), "");
- g_assert_cmpstr (tp_contact_get_avatar_token (contacts[i]), ==,
- new_tokens[i]);
-
- MYASSERT (tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_PRESENCE), "");
- g_assert_cmpstr (tp_contact_get_presence_message (contacts[i]), ==,
- new_messages[i]);
-
- MYASSERT (!tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_LOCATION), "");
- }
-
- g_assert_cmpuint (tp_contact_get_presence_type (contacts[0]), ==,
- TP_CONNECTION_PRESENCE_TYPE_AWAY);
- g_assert_cmpstr (tp_contact_get_presence_status (contacts[0]), ==,
- "away");
- g_assert_cmpuint (tp_contact_get_presence_type (contacts[1]), ==,
- TP_CONNECTION_PRESENCE_TYPE_AVAILABLE);
- g_assert_cmpstr (tp_contact_get_presence_status (contacts[1]), ==,
- "available");
-
- for (i = 0; i < 3; i++)
- {
- g_object_unref (contacts[i]);
- tp_tests_proxy_run_until_dbus_queue_processed (client_conn);
- tp_handle_unref (service_repo, handles[i]);
- }
-
- /* remaining cleanup */
- g_main_loop_unref (result.loop);
- g_array_unref (result.invalid);
- g_ptr_array_unref (result.contacts);
- g_assert (result.error == NULL);
-}
-
-static void
-by_id_cb (TpConnection *connection,
- guint n_contacts,
- TpContact * const *contacts,
- const gchar * const *good_ids,
- GHashTable *bad_ids,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
-{
- Result *result = user_data;
-
- g_assert (result->invalid == NULL);
- g_assert (result->contacts == NULL);
- g_assert (result->error == NULL);
- g_assert (result->good_ids == NULL);
- g_assert (result->bad_ids == NULL);
-
- if (error == NULL)
- {
- GHashTableIter iter;
- gpointer key, value;
- guint i;
-
- DEBUG ("got %u contacts and %u bad IDs", n_contacts,
- g_hash_table_size (bad_ids));
-
- result->bad_ids = g_hash_table_new_full (g_str_hash, g_str_equal,
- g_free, (GDestroyNotify) g_error_free);
- tp_g_hash_table_update (result->bad_ids, bad_ids,
- (GBoxedCopyFunc) g_strdup, (GBoxedCopyFunc) g_error_copy);
-
- g_hash_table_iter_init (&iter, result->bad_ids);
-
- while (g_hash_table_iter_next (&iter, &key, &value))
- {
- gchar *id = key;
- GError *e = value;
-
- DEBUG ("bad ID %s: %s %u: %s", id, g_quark_to_string (e->domain),
- e->code, e->message);
- }
-
- result->good_ids = g_strdupv ((GStrv) good_ids);
-
- result->contacts = g_ptr_array_sized_new (n_contacts);
-
- for (i = 0; i < n_contacts; i++)
- {
- TpContact *contact = contacts[i];
-
- DEBUG ("contact #%u: %p", i, contact);
- DEBUG ("contact #%u we asked for ID %s", i, good_ids[i]);
- DEBUG ("contact #%u we got ID %s", i,
- tp_contact_get_identifier (contact));
- DEBUG ("contact #%u alias: %s", i, tp_contact_get_alias (contact));
- DEBUG ("contact #%u avatar token: %s", i,
- tp_contact_get_avatar_token (contact));
- DEBUG ("contact #%u presence type: %u", i,
- tp_contact_get_presence_type (contact));
- DEBUG ("contact #%u presence status: %s", i,
- tp_contact_get_presence_status (contact));
- DEBUG ("contact #%u presence message: %s", i,
- tp_contact_get_presence_message (contact));
- g_ptr_array_add (result->contacts, g_object_ref (contact));
- }
- }
- else
- {
- DEBUG ("got an error: %s %u: %s", g_quark_to_string (error->domain),
- error->code, error->message);
- result->error = g_error_copy (error);
- }
-}
-
-static void
-test_by_id (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- TpConnection *client_conn = f->legacy_client_conn;
- Result result = { g_main_loop_new (NULL, FALSE) };
- static const gchar * const ids[] = { "Alice", "Bob", "Not valid", "Chris",
- "not valid either", NULL };
- TpContact *contacts[3];
- guint i;
- GError *e /* no initialization needed */;
-
- g_message ("%s: all bad (fd.o #19688)", G_STRFUNC);
-
- tp_connection_get_contacts_by_id (client_conn,
- 1, ids + 2,
- 0, NULL,
- by_id_cb,
- &result, finish, NULL);
-
- g_main_loop_run (result.loop);
-
- MYASSERT (result.contacts->len == 0, ": %u", result.contacts->len);
- MYASSERT (g_hash_table_size (result.bad_ids) == 1, ": %u",
- g_hash_table_size (result.bad_ids));
- g_assert_no_error (result.error);
-
- e = g_hash_table_lookup (result.bad_ids, "Not valid");
- MYASSERT (e != NULL, "");
-
- g_ptr_array_unref (result.contacts);
- result.contacts = NULL;
- g_strfreev (result.good_ids);
- result.good_ids = NULL;
- g_hash_table_unref (result.bad_ids);
- result.bad_ids = NULL;
-
- g_message ("%s: all good", G_STRFUNC);
-
- tp_connection_get_contacts_by_id (client_conn,
- 2, ids,
- 0, NULL,
- by_id_cb,
- &result, finish, NULL);
-
- g_main_loop_run (result.loop);
-
- MYASSERT (result.contacts->len == 2, ": %u", result.contacts->len);
- MYASSERT (g_hash_table_size (result.bad_ids) == 0, ": %u",
- g_hash_table_size (result.bad_ids));
- g_assert_no_error (result.error);
-
- MYASSERT (g_ptr_array_index (result.contacts, 0) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 1) != NULL, "");
- contacts[0] = g_ptr_array_index (result.contacts, 0);
- g_assert_cmpstr (result.good_ids[0], ==, "Alice");
- g_assert_cmpstr (tp_contact_get_identifier (contacts[0]), ==, "alice");
- contacts[1] = g_ptr_array_index (result.contacts, 1);
- g_assert_cmpstr (result.good_ids[1], ==, "Bob");
- g_assert_cmpstr (tp_contact_get_identifier (contacts[1]), ==, "bob");
-
- for (i = 0; i < 2; i++)
- {
- g_object_unref (contacts[i]);
- }
-
- g_ptr_array_unref (result.contacts);
- result.contacts = NULL;
- g_strfreev (result.good_ids);
- result.good_ids = NULL;
- g_hash_table_unref (result.bad_ids);
- result.bad_ids = NULL;
-
- g_message ("%s: not all good", G_STRFUNC);
-
- tp_connection_get_contacts_by_id (client_conn,
- 5, ids,
- 0, NULL,
- by_id_cb,
- &result, finish, NULL);
-
- g_main_loop_run (result.loop);
-
- MYASSERT (result.contacts->len == 3, ": %u", result.contacts->len);
- MYASSERT (g_hash_table_size (result.bad_ids) == 2, ": %u",
- g_hash_table_size (result.bad_ids));
- g_assert_no_error (result.error);
-
- e = g_hash_table_lookup (result.bad_ids, "Not valid");
- MYASSERT (e != NULL, "");
-
- e = g_hash_table_lookup (result.bad_ids, "not valid either");
- MYASSERT (e != NULL, "");
-
- MYASSERT (g_ptr_array_index (result.contacts, 0) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 1) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 2) != NULL, "");
- contacts[0] = g_ptr_array_index (result.contacts, 0);
- g_assert_cmpstr (result.good_ids[0], ==, "Alice");
- g_assert_cmpstr (tp_contact_get_identifier (contacts[0]), ==, "alice");
- contacts[1] = g_ptr_array_index (result.contacts, 1);
- g_assert_cmpstr (result.good_ids[1], ==, "Bob");
- g_assert_cmpstr (tp_contact_get_identifier (contacts[1]), ==, "bob");
- contacts[2] = g_ptr_array_index (result.contacts, 2);
- g_assert_cmpstr (result.good_ids[2], ==, "Chris");
- g_assert_cmpstr (tp_contact_get_identifier (contacts[2]), ==, "chris");
-
- /* clean up refs to contacts */
-
- for (i = 0; i < 3; i++)
- {
- g_object_unref (contacts[i]);
- }
-
- /* wait for ReleaseHandles to run */
- tp_tests_proxy_run_until_dbus_queue_processed (client_conn);
-
- /* remaining cleanup */
- g_main_loop_unref (result.loop);
-
- g_ptr_array_unref (result.contacts);
- result.contacts = NULL;
- g_strfreev (result.good_ids);
- result.good_ids = NULL;
- g_hash_table_unref (result.bad_ids);
- result.bad_ids = NULL;
-}
-
-static void
-test_one_by_id (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- GAsyncResult *result = NULL;
- GError *error = NULL;
- TpContact *contact;
-
- tp_connection_dup_contact_by_id_async (f->legacy_client_conn,
- "Alice", 0, NULL, tp_tests_result_ready_cb, &result);
- tp_tests_run_until_result (&result);
- contact = tp_connection_dup_contact_by_id_finish (f->legacy_client_conn,
- result, &error);
-
- g_assert_no_error (error);
- g_assert (TP_IS_CONTACT (contact));
- g_assert_cmpstr (tp_contact_get_identifier (contact), ==, "alice");
-
- g_clear_object (&result);
- g_clear_object (&contact);
-}
-
-static void
-test_by_handle_again (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL };
- TpHandle handle;
- TpHandleRepoIface *service_repo = tp_base_connection_get_handles (
- f->base_connection, TP_HANDLE_TYPE_CONTACT);
- TpContact *contact;
- gpointer weak_pointer;
- const gchar *alias = "Alice in Wonderland";
- TpContactFeature feature = TP_CONTACT_FEATURE_ALIAS;
- gboolean ok;
-
- g_test_bug ("25181");
-
- handle = tp_handle_ensure (service_repo, "alice", NULL, NULL);
- g_assert_cmpuint (handle, !=, 0);
- tp_tests_contacts_connection_change_aliases (f->legacy_service_conn, 1,
- &handle, &alias);
-
- tp_connection_get_contacts_by_handle (f->legacy_client_conn,
- 1, &handle,
- 1, &feature,
- by_handle_cb,
- &result, finish, NULL);
- g_main_loop_run (result.loop);
- g_assert_cmpuint (result.contacts->len, ==, 1);
- g_assert_cmpuint (result.invalid->len, ==, 0);
- g_assert_no_error (result.error);
-
- g_assert (g_ptr_array_index (result.contacts, 0) != NULL);
- contact = g_object_ref (g_ptr_array_index (result.contacts, 0));
- g_assert_cmpuint (tp_contact_get_handle (contact), ==, handle);
- g_assert_cmpstr (tp_contact_get_identifier (contact), ==, "alice");
- g_assert_cmpstr (tp_contact_get_alias (contact), ==, "Alice in Wonderland");
-
- /* clean up before doing the second request */
- reset_result (&result);
- g_assert (result.error == NULL);
-
- /* silently remove the object from D-Bus, so that if the second request
- * makes any D-Bus calls, it will fail (but the client conn isn't
- * invalidated) */
- tp_dbus_daemon_unregister_object (
- tp_base_connection_get_dbus_daemon (f->base_connection),
- f->base_connection);
- /* check that that worked */
- ok = tp_cli_connection_run_get_self_handle (f->legacy_client_conn, -1, NULL,
- &result.error, NULL);
- g_assert_error (result.error, DBUS_GERROR, DBUS_GERROR_UNKNOWN_METHOD);
- g_assert (!ok);
- g_clear_error (&result.error);
-
- tp_connection_get_contacts_by_handle (f->legacy_client_conn,
- 1, &handle,
- 1, &feature,
- by_handle_cb,
- &result, finish, NULL);
- g_main_loop_run (result.loop);
- g_assert_cmpuint (result.contacts->len, ==, 1);
- g_assert_cmpuint (result.invalid->len, ==, 0);
- g_assert_no_error (result.error);
-
- g_assert (g_ptr_array_index (result.contacts, 0) == contact);
- g_assert_cmpstr (tp_contact_get_alias (contact), ==, "Alice in Wonderland");
-
- /* OK, put it back so teardown() can use it */
- tp_dbus_daemon_register_object (
- tp_base_connection_get_dbus_daemon (f->base_connection),
- f->base_connection->object_path, f->base_connection);
- /* check that *that* worked */
- ok = tp_cli_connection_run_get_self_handle (f->legacy_client_conn, -1, NULL,
- &result.error, NULL);
- g_assert_no_error (result.error);
- g_assert (ok);
-
- g_assert (result.error == NULL);
- reset_result (&result);
-
- weak_pointer = contact;
- g_object_add_weak_pointer ((GObject *) contact, &weak_pointer);
- g_object_unref (contact);
- g_assert (weak_pointer == NULL);
-
- tp_tests_proxy_run_until_dbus_queue_processed (f->legacy_client_conn);
- g_main_loop_unref (result.loop);
-}
-
-static void
-test_by_handle_upgrade (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL };
- TpHandle handle;
- TpHandleRepoIface *service_repo = tp_base_connection_get_handles (
- f->base_connection, TP_HANDLE_TYPE_CONTACT);
- TpContact *contact;
- gpointer weak_pointer;
- const gchar *alias = "Alice in Wonderland";
- TpContactFeature feature = TP_CONTACT_FEATURE_ALIAS;
-
- g_test_bug ("32191");
-
- handle = tp_handle_ensure (service_repo, "alice", NULL, NULL);
- g_assert_cmpuint (handle, !=, 0);
- tp_tests_contacts_connection_change_aliases (f->legacy_service_conn,
- 1, &handle, &alias);
-
- tp_connection_get_contacts_by_handle (f->legacy_client_conn,
- 1, &handle,
- 0, NULL,
- by_handle_cb,
- &result, finish, NULL);
- g_main_loop_run (result.loop);
- g_assert_cmpuint (result.contacts->len, ==, 1);
- g_assert_cmpuint (result.invalid->len, ==, 0);
- g_assert_no_error (result.error);
-
- g_assert (g_ptr_array_index (result.contacts, 0) != NULL);
- contact = g_object_ref (g_ptr_array_index (result.contacts, 0));
- g_assert_cmpuint (tp_contact_get_handle (contact), ==, handle);
- g_assert_cmpstr (tp_contact_get_identifier (contact), ==, "alice");
- /* fallback alias is still in effect */
- g_assert_cmpstr (tp_contact_get_alias (contact), ==, "alice");
-
- /* clean up before doing the second request */
- reset_result (&result);
- g_assert (result.error == NULL);
-
- /* the second request enables the Alias feature, so it must make more D-Bus
- * round trips */
- tp_connection_get_contacts_by_handle (f->legacy_client_conn,
- 1, &handle,
- 1, &feature,
- by_handle_cb,
- &result, finish, NULL);
- g_main_loop_run (result.loop);
- g_assert_cmpuint (result.contacts->len, ==, 1);
- g_assert_cmpuint (result.invalid->len, ==, 0);
- g_assert_no_error (result.error);
-
- g_assert (g_ptr_array_index (result.contacts, 0) == contact);
- g_assert_cmpstr (tp_contact_get_alias (contact), ==, "Alice in Wonderland");
-
- g_assert (result.error == NULL);
- reset_result (&result);
-
- weak_pointer = contact;
- g_object_add_weak_pointer ((GObject *) contact, &weak_pointer);
- g_object_unref (contact);
- g_assert (weak_pointer == NULL);
-
- tp_tests_proxy_run_until_dbus_queue_processed (f->legacy_client_conn);
- g_main_loop_unref (result.loop);
-}
-
-static void
-test_dup_if_possible (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- TpHandle alice_handle, bob_handle;
- TpContact *alice;
- TpContact *contact;
-
- alice_handle = tp_handle_ensure (f->service_repo, "alice", NULL, NULL);
- g_assert_cmpuint (alice_handle, !=, 0);
- bob_handle = tp_handle_ensure (f->service_repo, "bob", NULL, NULL);
- g_assert_cmpuint (bob_handle, !=, 0);
-
- tp_connection_get_contacts_by_handle (f->legacy_client_conn,
- 1, &alice_handle,
- 0, NULL,
- by_handle_cb,
- &f->result, finish, NULL);
- g_main_loop_run (f->result.loop);
- g_assert_cmpuint (f->result.contacts->len, ==, 1);
- g_assert_cmpuint (f->result.invalid->len, ==, 0);
- g_assert_no_error (f->result.error);
-
- g_assert (g_ptr_array_index (f->result.contacts, 0) != NULL);
- alice = g_object_ref (g_ptr_array_index (f->result.contacts, 0));
- g_assert_cmpuint (tp_contact_get_handle (alice), ==, alice_handle);
- g_assert_cmpstr (tp_contact_get_identifier (alice), ==, "alice");
-
- reset_result (&f->result);
-
- /* we already have a cached TpContact for Alice, so we can get another
- * copy of it synchronously */
-
- contact = tp_connection_dup_contact_if_possible (f->legacy_client_conn,
- alice_handle, "alice");
- g_assert (contact == alice);
- g_object_unref (contact);
-
- contact = tp_connection_dup_contact_if_possible (f->legacy_client_conn,
- alice_handle, NULL);
- g_assert (contact == alice);
- g_object_unref (contact);
-
- /* because this connection pretends not to have immortal handles, we can't
- * reliably get a contact for Bob synchronously, even if we supply his
- * identifier */
-
- contact = tp_connection_dup_contact_if_possible (f->legacy_client_conn,
- bob_handle, "bob");
- g_assert (contact == NULL);
-
- contact = tp_connection_dup_contact_if_possible (f->legacy_client_conn,
- bob_handle, NULL);
- g_assert (contact == NULL);
-}
-
-static void
-setup (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- tp_tests_create_and_connect_conn (TP_TESTS_TYPE_LEGACY_CONTACTS_CONNECTION,
- "me@test.com", &f->base_connection, &f->legacy_client_conn);
-
- f->legacy_service_conn = g_object_ref (TP_TESTS_CONTACTS_CONNECTION (
- f->base_connection));
- f->service_repo = tp_base_connection_get_handles (f->base_connection,
- TP_HANDLE_TYPE_CONTACT);
- f->result.loop = g_main_loop_new (NULL, FALSE);
-}
-
-static void
-teardown (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- if (f->legacy_client_conn != NULL)
- tp_tests_connection_assert_disconnect_succeeds (f->legacy_client_conn);
-
- f->service_repo = NULL;
- tp_clear_object (&f->legacy_client_conn);
- tp_clear_object (&f->legacy_service_conn);
- tp_clear_object (&f->base_connection);
- reset_result (&f->result);
- tp_clear_pointer (&f->result.loop, g_main_loop_unref);
-}
-
-int
-main (int argc,
- char **argv)
-{
- tp_tests_init (&argc, &argv);
- g_test_bug_base ("http://bugs.freedesktop.org/show_bug.cgi?id=");
-
- g_test_add ("/contacts-slow-path/by-handle", Fixture, NULL, setup,
- test_by_handle, teardown);
- g_test_add ("/contacts-slow-path/no-features", Fixture, NULL, setup,
- test_no_features, teardown);
- g_test_add ("/contacts-slow-path/features", Fixture, NULL, setup,
- test_features, teardown);
- g_test_add ("/contacts-slow-path/upgrade/old", Fixture, "old", setup,
- test_upgrade, teardown);
- g_test_add ("/contacts-slow-path/upgrade", Fixture, "async", setup,
- test_upgrade, teardown);
- g_test_add ("/contacts-slow-path/by-id", Fixture, NULL, setup,
- test_by_id, teardown);
- g_test_add ("/contacts-slow-path/by-handle-again", Fixture, NULL, setup,
- test_by_handle_again, teardown);
- g_test_add ("/contacts-slow-path/by-handle-upgrade", Fixture, NULL, setup,
- test_by_handle_upgrade, teardown);
- g_test_add ("/contacts-slow-path/dup-if-possible", Fixture, NULL, setup,
- test_dup_if_possible, teardown);
- g_test_add ("/contacts-slow-path/one-by-id", Fixture, NULL, setup,
- test_one_by_id, teardown);
-
- return g_test_run ();
-}
diff --git a/tests/dbus/contacts.c b/tests/dbus/contacts.c
index b35e007d3..ee1186311 100644
--- a/tests/dbus/contacts.c
+++ b/tests/dbus/contacts.c
@@ -25,10 +25,15 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/contact.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
+
+#include "telepathy-glib/reentrants.h"
#include "tests/lib/contacts-conn.h"
#include "tests/lib/broken-client-types-conn.h"
@@ -53,37 +58,15 @@ typedef struct {
typedef struct {
Result result;
TpBaseConnection *base_connection;
- TpBaseConnection *legacy_base_connection;
- TpBaseConnection *no_requests_base_connection;
TpTestsContactsConnection *service_conn;
TpHandleRepoIface *service_repo;
TpConnection *client_conn;
- TpConnection *legacy_client_conn;
- TpConnection *no_requests_client_conn;
+ GArray *all_contact_features;
} Fixture;
/* We only really actively test TP_CONTACT_FEATURE_ALIAS, but preparing any
* of these once should be enough, assuming that the CM is not broken.
*/
-static TpContactFeature all_contact_features[] = {
- TP_CONTACT_FEATURE_ALIAS,
- TP_CONTACT_FEATURE_AVATAR_TOKEN,
- TP_CONTACT_FEATURE_PRESENCE,
- TP_CONTACT_FEATURE_LOCATION,
- TP_CONTACT_FEATURE_CAPABILITIES,
- TP_CONTACT_FEATURE_AVATAR_DATA,
- TP_CONTACT_FEATURE_CONTACT_INFO,
- TP_CONTACT_FEATURE_CLIENT_TYPES,
- TP_CONTACT_FEATURE_SUBSCRIPTION_STATES,
- TP_CONTACT_FEATURE_CONTACT_GROUPS,
- TP_CONTACT_FEATURE_CONTACT_BLOCKING
-};
-
-/* If people add new features, they should add them to this test. We could
- * generate the list dynamically but this seems less brittle.
- */
-G_STATIC_ASSERT (G_N_ELEMENTS (all_contact_features) == TP_NUM_CONTACT_FEATURES);
-
static void
by_handle_cb (TpConnection *connection,
@@ -312,11 +295,12 @@ test_contact_info (Fixture *f,
gconstpointer unused G_GNUC_UNUSED)
{
TpTestsContactsConnection *service_conn = f->service_conn;
+ TpBaseConnection *service_conn_base = (TpBaseConnection *) service_conn;
TpConnection *client_conn = f->client_conn;
Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL };
TpHandleRepoIface *service_repo = tp_base_connection_get_handles (
(TpBaseConnection *) service_conn, TP_HANDLE_TYPE_CONTACT);
- TpContactFeature features[] = { TP_CONTACT_FEATURE_CONTACT_INFO };
+ GQuark features[] = { TP_CONTACT_FEATURE_CONTACT_INFO, 0 };
TpContact *contact;
TpHandle handle;
const gchar *field_value[] = { "Foo", NULL };
@@ -351,10 +335,10 @@ test_contact_info (Fixture *f,
/* ... but first, get the SelfHandle contact without any features (regression
* test for a related bug, fd.o #32191) */
- handle = tp_connection_get_self_handle (client_conn);
+ handle = tp_base_connection_get_self_handle (service_conn_base);
tp_connection_get_contacts_by_handle (client_conn,
1, &handle,
- 0, NULL,
+ NULL,
by_handle_cb,
&result, finish, NULL);
g_main_loop_run (result.loop);
@@ -367,10 +351,10 @@ test_contact_info (Fixture *f,
g_main_loop_run (result.loop);
g_assert_no_error (result.error);
- handle = tp_connection_get_self_handle (client_conn);
+ handle = tp_base_connection_get_self_handle (service_conn_base);
tp_connection_get_contacts_by_handle (client_conn,
1, &handle,
- G_N_ELEMENTS (features), features,
+ features,
by_handle_cb,
&result, finish, NULL);
g_main_loop_run (result.loop);
@@ -386,7 +370,7 @@ test_contact_info (Fixture *f,
handle = tp_handle_ensure (service_repo, "info-test-3", NULL, NULL);
tp_connection_get_contacts_by_handle (client_conn,
1, &handle,
- G_N_ELEMENTS (features), features,
+ features,
by_handle_cb,
&result, finish, NULL);
g_main_loop_run (result.loop);
@@ -412,7 +396,7 @@ test_contact_info (Fixture *f,
tp_connection_get_contacts_by_handle (client_conn,
1, &handle,
- 0, NULL,
+ NULL,
by_handle_cb,
&result, finish, NULL);
g_main_loop_run (result.loop);
@@ -435,7 +419,7 @@ test_contact_info (Fixture *f,
handle = tp_handle_ensure (service_repo, "info-test-5", NULL, NULL);
tp_connection_get_contacts_by_handle (client_conn,
1, &handle,
- 0, NULL,
+ NULL,
by_handle_cb,
&result, finish, NULL);
g_main_loop_run (result.loop);
@@ -457,7 +441,7 @@ test_contact_info (Fixture *f,
handle = tp_handle_ensure (service_repo, "info-test-6", NULL, NULL);
tp_connection_get_contacts_by_handle (client_conn,
1, &handle,
- 0, NULL,
+ NULL,
by_handle_cb,
&result, finish, NULL);
g_main_loop_run (result.loop);
@@ -541,7 +525,7 @@ create_contact_with_fake_avatar (TpTestsContactsConnection *service_conn,
Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL };
TpHandleRepoIface *service_repo = tp_base_connection_get_handles (
(TpBaseConnection *) service_conn, TP_HANDLE_TYPE_CONTACT);
- TpContactFeature feature;
+ GQuark features[] = { TP_CONTACT_FEATURE_AVATAR_DATA, 0 };
const gchar avatar_data[] = "fake-avatar-data";
const gchar avatar_token[] = "fake-avatar-token";
const gchar avatar_mime_type[] = "fake-avatar-mime-type";
@@ -558,13 +542,13 @@ create_contact_with_fake_avatar (TpTestsContactsConnection *service_conn,
avatar_mime_type, avatar_token);
if (request_avatar)
- feature = TP_CONTACT_FEATURE_AVATAR_DATA;
+ features[0] = TP_CONTACT_FEATURE_AVATAR_DATA;
else
- feature = TP_CONTACT_FEATURE_AVATAR_TOKEN;
+ features[0] = TP_CONTACT_FEATURE_AVATAR_TOKEN;
tp_connection_get_contacts_by_handle (client_conn,
1, &handle,
- 1, &feature,
+ features,
by_handle_cb,
&result, finish, NULL);
g_main_loop_run (result.loop);
@@ -779,7 +763,7 @@ test_by_handle (Fixture *f,
*/
tp_connection_get_contacts_by_handle (client_conn,
5, handles,
- 0, NULL,
+ NULL,
by_handle_cb,
&result, finish, NULL);
@@ -818,7 +802,7 @@ test_by_handle (Fixture *f,
*/
tp_connection_get_contacts_by_handle (client_conn,
4, handles,
- 0, NULL,
+ NULL,
by_handle_cb,
&result, finish, NULL);
@@ -883,7 +867,7 @@ make_the_connection_disappear (Fixture *f)
tp_base_connection_get_dbus_daemon (f->base_connection),
f->base_connection);
/* check that that worked */
- ok = tp_cli_connection_run_get_self_handle (f->client_conn, -1, NULL,
+ ok = tp_cli_connection_run_connect (f->client_conn, -1,
&error, NULL);
g_assert_error (error, DBUS_GERROR, DBUS_GERROR_UNKNOWN_METHOD);
g_assert (!ok);
@@ -903,7 +887,7 @@ put_the_connection_back (Fixture *f)
tp_base_connection_get_dbus_daemon (f->base_connection),
f->base_connection->object_path, f->base_connection);
/* check that *that* worked */
- ok = tp_cli_connection_run_get_self_handle (f->client_conn, -1, NULL,
+ ok = tp_cli_connection_run_connect (f->client_conn, -1,
&error, NULL);
g_assert_no_error (error);
g_assert (ok);
@@ -955,7 +939,7 @@ test_by_handle_again (Fixture *f,
tp_connection_get_contacts_by_handle (f->client_conn,
1, &handle,
- G_N_ELEMENTS (all_contact_features), all_contact_features,
+ (const GQuark *) f->all_contact_features->data,
by_handle_cb,
&result, finish, NULL);
g_main_loop_run (result.loop);
@@ -977,7 +961,7 @@ test_by_handle_again (Fixture *f,
tp_connection_get_contacts_by_handle (f->client_conn,
1, &handle,
- G_N_ELEMENTS (all_contact_features), all_contact_features,
+ (const GQuark *) f->all_contact_features->data,
by_handle_cb,
&result, finish, NULL);
g_main_loop_run (result.loop);
@@ -1013,7 +997,7 @@ test_by_handle_upgrade (Fixture *f,
TpContact *contact;
gpointer weak_pointer;
const gchar *alias = "Alice in Wonderland";
- TpContactFeature feature = TP_CONTACT_FEATURE_ALIAS;
+ GQuark features[] = { TP_CONTACT_FEATURE_ALIAS, 0 };
g_test_bug ("32191");
@@ -1024,7 +1008,7 @@ test_by_handle_upgrade (Fixture *f,
tp_connection_get_contacts_by_handle (f->client_conn,
1, &handle,
- 0, NULL,
+ NULL,
by_handle_cb,
&result, finish, NULL);
g_main_loop_run (result.loop);
@@ -1047,7 +1031,7 @@ test_by_handle_upgrade (Fixture *f,
* round trips */
tp_connection_get_contacts_by_handle (f->client_conn,
1, &handle,
- 1, &feature,
+ features,
by_handle_cb,
&result, finish, NULL);
g_main_loop_run (result.loop);
@@ -1091,7 +1075,7 @@ test_no_features (Fixture *f,
tp_connection_get_contacts_by_handle (client_conn,
3, handles,
- 0, NULL,
+ NULL,
by_handle_cb,
&result, finish, NULL);
@@ -1295,9 +1279,9 @@ test_upgrade (Fixture *f,
TpHandleRepoIface *service_repo = tp_base_connection_get_handles (
(TpBaseConnection *) service_conn, TP_HANDLE_TYPE_CONTACT);
TpContact *contacts[3];
- TpContactFeature features[] = { TP_CONTACT_FEATURE_ALIAS,
+ GQuark features[] = { TP_CONTACT_FEATURE_ALIAS,
TP_CONTACT_FEATURE_AVATAR_TOKEN, TP_CONTACT_FEATURE_PRESENCE,
- TP_CONTACT_FEATURE_LOCATION, TP_CONTACT_FEATURE_CAPABILITIES };
+ TP_CONTACT_FEATURE_LOCATION, TP_CONTACT_FEATURE_CAPABILITIES, 0 };
guint i;
g_message (G_STRFUNC);
@@ -1320,7 +1304,7 @@ test_upgrade (Fixture *f,
tp_connection_get_contacts_by_handle (client_conn,
3, handles,
- 0, NULL,
+ NULL,
by_handle_cb,
&result, finish, NULL);
@@ -1371,7 +1355,7 @@ test_upgrade (Fixture *f,
tp_connection_upgrade_contacts (client_conn,
3, contacts,
- G_N_ELEMENTS (features), features,
+ features,
upgrade_cb,
&result, finish, NULL);
@@ -1463,7 +1447,7 @@ test_upgrade_noop (Fixture *f,
handle = get_handle_with_no_caps (f, "test-upgrade-noop");
tp_connection_get_contacts_by_handle (f->client_conn,
1, &handle,
- G_N_ELEMENTS (all_contact_features), all_contact_features,
+ (const GQuark *) f->all_contact_features->data,
by_handle_cb,
&result, finish, NULL);
g_main_loop_run (result.loop);
@@ -1476,7 +1460,7 @@ test_upgrade_noop (Fixture *f,
make_the_connection_disappear (f);
tp_connection_upgrade_contacts (f->client_conn,
1, &contact,
- G_N_ELEMENTS (all_contact_features), all_contact_features,
+ (const GQuark *) f->all_contact_features->data,
upgrade_cb,
&result, finish, NULL);
g_main_loop_run (result.loop);
@@ -1618,9 +1602,9 @@ test_features (Fixture *f,
TpHandleRepoIface *service_repo = tp_base_connection_get_handles (
(TpBaseConnection *) service_conn, TP_HANDLE_TYPE_CONTACT);
TpContact *contacts[3];
- TpContactFeature features[] = { TP_CONTACT_FEATURE_ALIAS,
+ GQuark features[] = { TP_CONTACT_FEATURE_ALIAS,
TP_CONTACT_FEATURE_AVATAR_TOKEN, TP_CONTACT_FEATURE_PRESENCE,
- TP_CONTACT_FEATURE_LOCATION, TP_CONTACT_FEATURE_CAPABILITIES };
+ TP_CONTACT_FEATURE_LOCATION, TP_CONTACT_FEATURE_CAPABILITIES, 0 };
guint i;
struct {
TpConnection *connection;
@@ -1658,7 +1642,7 @@ test_features (Fixture *f,
tp_connection_get_contacts_by_handle (client_conn,
3, handles,
- G_N_ELEMENTS (features), features,
+ features,
by_handle_cb,
&result, finish, NULL);
@@ -1951,7 +1935,7 @@ test_by_id (Fixture *f,
tp_connection_get_contacts_by_id (client_conn,
1, ids + 2,
- 0, NULL,
+ NULL,
by_id_cb,
&result, finish, NULL);
@@ -1971,7 +1955,7 @@ test_by_id (Fixture *f,
tp_connection_get_contacts_by_id (client_conn,
2, ids,
- 0, NULL,
+ NULL,
by_id_cb,
&result, finish, NULL);
@@ -1997,7 +1981,7 @@ test_by_id (Fixture *f,
tp_connection_get_contacts_by_id (client_conn,
5, ids,
- 0, NULL,
+ NULL,
by_id_cb,
&result, finish, NULL);
@@ -2037,127 +2021,6 @@ test_by_id (Fixture *f,
static void
-test_capabilities_without_contact_caps (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- TpConnection *client_conn = f->legacy_client_conn;
- Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL };
- TpHandle handles[] = { 0, 0, 0 };
- static const gchar * const ids[] = { "alice", "bob", "chris" };
- TpHandleRepoIface *service_repo = tp_base_connection_get_handles (
- f->legacy_base_connection, TP_HANDLE_TYPE_CONTACT);
- TpContact *contacts[3];
- guint i;
- TpContactFeature features[] = { TP_CONTACT_FEATURE_CAPABILITIES };
-
- g_message (G_STRFUNC);
-
- for (i = 0; i < 3; i++)
- handles[i] = tp_handle_ensure (service_repo, ids[i], NULL, NULL);
-
- tp_connection_get_contacts_by_handle (client_conn,
- 3, handles,
- G_N_ELEMENTS (features), features,
- by_handle_cb,
- &result, finish, NULL);
-
- g_main_loop_run (result.loop);
-
- MYASSERT (result.contacts->len == 3, ": %u", result.contacts->len);
- MYASSERT (result.invalid->len == 0, ": %u", result.invalid->len);
- g_assert_no_error (result.error);
-
- MYASSERT (g_ptr_array_index (result.contacts, 0) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 1) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 2) != NULL, "");
-
- for (i = 0; i < 3; i++)
- contacts[i] = g_ptr_array_index (result.contacts, i);
-
- for (i = 0; i < 3; i++)
- {
- TpCapabilities *caps;
-
- g_assert_cmpuint (tp_contact_get_handle (contacts[i]), ==, handles[i]);
- g_assert_cmpstr (tp_contact_get_identifier (contacts[i]), ==,
- ids[i]);
-
- MYASSERT (tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_CAPABILITIES), "");
-
- caps = tp_contact_get_capabilities (contacts[i]);
- MYASSERT (caps != NULL, "");
- MYASSERT (!tp_capabilities_is_specific_to_contact (caps), "");
- MYASSERT (!tp_capabilities_supports_text_chats (caps), " contact %u", i);
- MYASSERT (!tp_capabilities_supports_text_chatrooms (caps),
- " contact %u", i);
- }
-
- g_assert (result.error == NULL);
- reset_result (&result);
- g_main_loop_unref (result.loop);
-}
-
-
-static void
-test_prepare_contact_caps_without_request (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- TpConnection *client_conn = f->no_requests_client_conn;
- Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL };
- TpHandle handles[] = { 0, 0, 0 };
- static const gchar * const ids[] = { "alice", "bob", "chris" };
- TpHandleRepoIface *service_repo = tp_base_connection_get_handles (
- f->no_requests_base_connection, TP_HANDLE_TYPE_CONTACT);
- TpContact *contacts[3];
- guint i;
- TpContactFeature features[] = { TP_CONTACT_FEATURE_CAPABILITIES };
-
- g_test_bug ("27686");
-
- for (i = 0; i < 3; i++)
- handles[i] = tp_handle_ensure (service_repo, ids[i], NULL, NULL);
-
- tp_connection_get_contacts_by_handle (client_conn,
- 3, handles,
- G_N_ELEMENTS (features), features,
- by_handle_cb,
- &result, finish, NULL);
-
- g_main_loop_run (result.loop);
-
- MYASSERT (result.contacts->len == 3, ": %u", result.contacts->len);
- MYASSERT (result.invalid->len == 0, ": %u", result.invalid->len);
- g_assert_no_error (result.error);
-
- MYASSERT (g_ptr_array_index (result.contacts, 0) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 1) != NULL, "");
- MYASSERT (g_ptr_array_index (result.contacts, 2) != NULL, "");
-
- for (i = 0; i < 3; i++)
- contacts[i] = g_ptr_array_index (result.contacts, i);
-
- for (i = 0; i < 3; i++)
- {
- TpCapabilities *caps;
-
- g_assert_cmpuint (tp_contact_get_handle (contacts[i]), ==, handles[i]);
- g_assert_cmpstr (tp_contact_get_identifier (contacts[i]), ==,
- ids[i]);
-
- MYASSERT (!tp_contact_has_feature (contacts[i],
- TP_CONTACT_FEATURE_CAPABILITIES), "");
-
- caps = tp_contact_get_capabilities (contacts[i]);
- MYASSERT (caps == NULL, "");
- }
-
- g_assert (result.error == NULL);
- reset_result (&result);
- g_main_loop_unref (result.loop);
-}
-
-static void
test_dup_if_possible (Fixture *f,
gconstpointer unused G_GNUC_UNUSED)
{
@@ -2172,7 +2035,7 @@ test_dup_if_possible (Fixture *f,
tp_connection_get_contacts_by_handle (f->client_conn,
1, &alice_handle,
- 0, NULL,
+ NULL,
by_handle_cb,
&f->result, finish, NULL);
g_main_loop_run (f->result.loop);
@@ -2250,7 +2113,7 @@ test_subscription_states (Fixture *f,
TpHandle alice_handle;
TpContact *alice;
TpTestsContactListManager *manager;
- TpContactFeature features[] = { TP_CONTACT_FEATURE_SUBSCRIPTION_STATES };
+ GQuark features[] = { TP_CONTACT_FEATURE_SUBSCRIPTION_STATES, 0 };
SubscriptionStates states = { TP_SUBSCRIPTION_STATE_NO,
TP_SUBSCRIPTION_STATE_NO, "", f->result.loop };
@@ -2262,7 +2125,7 @@ test_subscription_states (Fixture *f,
tp_connection_get_contacts_by_handle (f->client_conn,
1, &alice_handle,
- G_N_ELEMENTS (features), features,
+ features,
by_handle_cb,
&f->result, finish, NULL);
g_main_loop_run (f->result.loop);
@@ -2342,7 +2205,7 @@ test_contact_groups (Fixture *f,
TpHandle alice_handle;
TpContact *alice;
TpTestsContactListManager *manager;
- TpContactFeature features[] = { TP_CONTACT_FEATURE_CONTACT_GROUPS };
+ GQuark features[] = { TP_CONTACT_FEATURE_CONTACT_GROUPS, 0 };
ContactGroups data;
data.groups = g_ptr_array_new ();
@@ -2356,7 +2219,7 @@ test_contact_groups (Fixture *f,
tp_connection_get_contacts_by_handle (f->client_conn,
1, &alice_handle,
- G_N_ELEMENTS (features), features,
+ features,
by_handle_cb,
&f->result, finish, NULL);
g_main_loop_run (f->result.loop);
@@ -2424,7 +2287,7 @@ test_no_location (Fixture *f,
TpHandle handle;
TpContact *contact;
gpointer weak_pointer;
- TpContactFeature feature = TP_CONTACT_FEATURE_LOCATION;
+ GQuark features[] = { TP_CONTACT_FEATURE_LOCATION, 0 };
GHashTable *norway = tp_asv_new ("country", G_TYPE_STRING, "Norway", NULL);
notify_ctx notify_ctx_alice;
@@ -2435,7 +2298,7 @@ test_no_location (Fixture *f,
tp_connection_get_contacts_by_handle (f->client_conn,
1, &handle,
- 1, &feature,
+ features,
by_handle_cb,
&f->result, finish, NULL);
g_main_loop_run (f->result.loop);
@@ -2455,7 +2318,7 @@ test_no_location (Fixture *f,
make_the_connection_disappear (f);
tp_connection_get_contacts_by_handle (f->client_conn,
1, &handle,
- 1, &feature,
+ features,
by_handle_cb,
&f->result, finish, NULL);
g_main_loop_run (f->result.loop);
@@ -2499,7 +2362,7 @@ test_no_location (Fixture *f,
tp_connection_get_contacts_by_handle (f->client_conn,
1, &handle,
- 0, NULL,
+ NULL,
by_handle_cb,
&f->result, finish, NULL);
g_main_loop_run (f->result.loop);
@@ -2517,7 +2380,7 @@ test_no_location (Fixture *f,
tp_connection_upgrade_contacts (f->client_conn,
1, &contact,
- 1, &feature,
+ features,
upgrade_cb,
&f->result, finish, NULL);
g_main_loop_run (f->result.loop);
@@ -2559,15 +2422,15 @@ test_superfluous_attributes (Fixture *f,
TpHandle handle;
TpContact *contact;
const gchar * const *client_types;
- TpContactFeature client_types_feature = TP_CONTACT_FEATURE_CLIENT_TYPES;
- TpContactFeature presence_feature = TP_CONTACT_FEATURE_PRESENCE;
+ GQuark client_types_features[] = { TP_CONTACT_FEATURE_CLIENT_TYPES, 0 };
+ GQuark presence_features[] = { TP_CONTACT_FEATURE_PRESENCE, 0 };
g_assert (TP_TESTS_IS_BROKEN_CLIENT_TYPES_CONNECTION (f->service_conn));
handle = tp_handle_ensure (f->service_repo, "helge", NULL, NULL);
g_assert_cmpuint (handle, !=, 0);
- /* We ask for ClientTypes; the CM is broken and adds SimplePresence
+ /* We ask for ClientTypes; the CM is broken and adds Presence
* information to the reply... it also omits the /client-types attribute from
* the reply, which, since the spec says “Omitted from the result if the
* contact's client types are not known.” leaves us in the exciting position
@@ -2577,7 +2440,7 @@ test_superfluous_attributes (Fixture *f,
*/
tp_connection_get_contacts_by_handle (f->client_conn,
1, &handle,
- 1, &client_types_feature,
+ client_types_features,
by_handle_cb,
&f->result, finish, NULL);
g_main_loop_run (f->result.loop);
@@ -2623,7 +2486,7 @@ test_superfluous_attributes (Fixture *f,
make_the_connection_disappear (f);
tp_connection_get_contacts_by_handle (f->client_conn,
1, &handle,
- 1, &presence_feature,
+ presence_features,
by_handle_cb,
&f->result, finish, NULL);
g_main_loop_run (f->result.loop);
@@ -2656,7 +2519,7 @@ test_contact_list (Fixture *f,
const GQuark conn_features[] = { TP_CONNECTION_FEATURE_CONTACT_LIST, 0 };
Result result = { g_main_loop_new (NULL, FALSE), NULL, NULL, NULL };
TpTestsContactListManager *manager;
- TpSimpleClientFactory *factory;
+ TpClientFactory *factory;
const gchar *id = "contact-list-id";
const gchar *alias = "Contact List Alias";
const gchar *message = "I'm your best friend";
@@ -2684,9 +2547,9 @@ test_contact_list (Fixture *f,
/* Tell connection's factory contact features we want */
factory = tp_proxy_get_factory (f->client_conn);
- tp_simple_client_factory_add_contact_features_varargs (factory,
+ tp_client_factory_add_contact_features_varargs (factory,
TP_CONTACT_FEATURE_ALIAS,
- TP_CONTACT_FEATURE_INVALID);
+ 0);
/* Now put it online and wait for contact list state move to success */
g_signal_connect (f->client_conn, "contact-list-changed",
@@ -2716,169 +2579,18 @@ test_contact_list (Fixture *f,
g_ptr_array_unref (contacts);
}
-typedef struct
-{
- Fixture *f;
- GMainLoop *loop;
- gboolean expecting_signal;
- gboolean got_stored;
- gboolean got_publish;
- gboolean got_subscribe;
-} MembersChangedClosure;
-
-static void
-channel_prepared_cb (GObject *source_object,
- GAsyncResult *res,
- gpointer user_data)
-{
- TpChannel *channel = TP_CHANNEL (source_object);
- MembersChangedClosure *closure = user_data;
- const gchar *identifier;
- GError *error = NULL;
-
- tp_proxy_prepare_finish (channel, res, &error);
- g_assert_no_error (error);
-
- g_assert (closure->expecting_signal);
-
- /* We expect to just get the stored, publish and subscribe lists exactly
- * once */
- identifier = tp_channel_get_identifier (channel);
- if (g_strcmp0 (identifier, "stored") == 0)
- {
- g_assert (!closure->got_stored);
- closure->got_stored = TRUE;
- }
- else if (g_strcmp0 (identifier, "publish") == 0)
- {
- g_assert (!closure->got_publish);
- closure->got_publish = TRUE;
- }
- else if (g_strcmp0 (identifier, "subscribe") == 0)
- {
- g_assert (!closure->got_subscribe);
- closure->got_subscribe = TRUE;
- }
- else
- {
- g_assert_not_reached ();
- }
-
- if (closure->got_stored && closure->got_publish && closure->got_subscribe)
- g_main_loop_quit (closure->loop);
-}
-
-static DBusHandlerResult
-message_filter (DBusConnection *connection,
- DBusMessage *msg,
- gpointer user_data)
-{
- MembersChangedClosure *closure = user_data;
-
- if (dbus_message_is_signal (msg, TP_IFACE_CHANNEL_INTERFACE_GROUP,
- "MembersChanged"))
- {
- TpChannel *channel;
- DBusMessageIter iter, sub_iter;
- gint type;
- dbus_int32_t *added;
- gint n_added;
-
- channel = tp_channel_new (closure->f->client_conn,
- dbus_message_get_path (msg), TP_IFACE_CHANNEL_INTERFACE_GROUP,
- TP_HANDLE_TYPE_LIST, 0, NULL);
- tp_proxy_prepare_async (channel, NULL, channel_prepared_cb, closure);
-
- /* Extract the number of added handles */
- dbus_message_iter_init (msg, &iter);
- dbus_message_iter_next (&iter); /* Skipe the message */
- type = dbus_message_iter_get_arg_type (&iter);
- g_assert_cmpint (type, ==, DBUS_TYPE_ARRAY);
- dbus_message_iter_recurse (&iter, &sub_iter);
- type = dbus_message_iter_get_arg_type (&sub_iter);
- g_assert_cmpint (type, ==, DBUS_TYPE_UINT32);
- dbus_message_iter_get_fixed_array (&sub_iter, &added, &n_added);
-
- /* Bob, Alice and Carol == 3 */
- g_assert_cmpint (n_added, ==, 3);
- }
-
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-}
-
-static void
-test_initial_contact_list (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- const GQuark conn_features[] = { TP_CONNECTION_FEATURE_CONTACT_LIST, 0 };
- TpTestsContactListManager *manager;
- MembersChangedClosure closure;
- DBusConnection *dbus_connection;
- TpHandle alice;
- const gchar *alice_id = "alice";
- TpHandle bob_carol[2];
- const gchar *bob_id = "bob";
- const gchar *carol_id = "carol";
-
- manager = tp_tests_contacts_connection_get_contact_list_manager (
- f->service_conn);
-
- /* We use a filter to be sure not to miss the initial MembersChanged
- * signals */
- closure.f = f;
- closure.loop = g_main_loop_new (NULL, FALSE);
- closure.got_stored = FALSE;
- closure.got_publish = FALSE;
- closure.got_subscribe = FALSE;
- /* No signal is expected until after we connect */
- closure.expecting_signal = FALSE;
-
- dbus_connection = dbus_g_connection_get_connection (
- tp_proxy_get_dbus_connection (TP_PROXY (f->client_conn)));
- dbus_connection_ref (dbus_connection);
- dbus_connection_add_filter (dbus_connection, message_filter, &closure, NULL);
- dbus_bus_add_match (dbus_connection, MEMBERS_CHANGED_MATCH_RULE, NULL);
-
- /* Connection is OFFLINE initially */
- tp_tests_proxy_run_until_prepared (f->client_conn, conn_features);
- g_assert_cmpint (tp_connection_get_contact_list_state (f->client_conn), ==,
- TP_CONTACT_LIST_STATE_NONE);
-
- /* Add contacts in our initial roster CM-side */
- alice = tp_handle_ensure (f->service_repo, alice_id, NULL, NULL);
- tp_tests_contact_list_manager_add_initial_contacts (manager, 1, &alice);
-
- bob_carol[0] = tp_handle_ensure (f->service_repo, bob_id, NULL, NULL);
- bob_carol[1] = tp_handle_ensure (f->service_repo, carol_id, NULL, NULL);
- tp_tests_contact_list_manager_add_initial_contacts (manager, 2, bob_carol);
-
- /* Now put it online and wait for the contact list state to move to
- * success */
- closure.expecting_signal = TRUE;
- tp_cli_connection_call_connect (f->client_conn, -1,
- NULL, NULL, NULL, NULL);
-
- g_main_loop_run (closure.loop);
-
- dbus_bus_remove_match (dbus_connection, MEMBERS_CHANGED_MATCH_RULE, NULL);
- dbus_connection_remove_filter (dbus_connection, message_filter, &closure);
- dbus_connection_unref (dbus_connection);
-
- g_main_loop_unref (closure.loop);
-}
-
static void
test_self_contact (Fixture *f,
gconstpointer unused G_GNUC_UNUSED)
{
const GQuark conn_features[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 };
- TpSimpleClientFactory *factory;
+ TpClientFactory *factory;
TpContact *contact;
factory = tp_proxy_get_factory (f->client_conn);
- tp_simple_client_factory_add_contact_features_varargs (factory,
+ tp_client_factory_add_contact_features_varargs (factory,
TP_CONTACT_FEATURE_ALIAS,
- TP_CONTACT_FEATURE_INVALID);
+ 0);
tp_cli_connection_call_connect (f->client_conn, -1, NULL, NULL, NULL, NULL);
tp_tests_proxy_run_until_prepared (f->client_conn, conn_features);
@@ -2893,19 +2605,33 @@ setup_internal (Fixture *f,
gboolean connect,
gconstpointer user_data)
{
+/* TODO: we should assert that when people add new TpContact features
+ * they're added to this list and tested; this was easier with
+ * TpContactFeature... */
+ const GQuark features[] = {
+ TP_CONTACT_FEATURE_ALIAS,
+ TP_CONTACT_FEATURE_AVATAR_TOKEN,
+ TP_CONTACT_FEATURE_PRESENCE,
+ TP_CONTACT_FEATURE_LOCATION,
+ TP_CONTACT_FEATURE_CAPABILITIES,
+ TP_CONTACT_FEATURE_AVATAR_DATA,
+ TP_CONTACT_FEATURE_CONTACT_INFO,
+ TP_CONTACT_FEATURE_CLIENT_TYPES,
+ TP_CONTACT_FEATURE_SUBSCRIPTION_STATES,
+ TP_CONTACT_FEATURE_CONTACT_GROUPS,
+ TP_CONTACT_FEATURE_CONTACT_BLOCKING,
+ };
+
+ f->all_contact_features = g_array_new (TRUE, FALSE, sizeof (GQuark));
+ g_array_append_vals (f->all_contact_features,
+ features, G_N_ELEMENTS (features));
+
tp_tests_create_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION,
"me@test.com", connect, &f->base_connection, &f->client_conn);
f->service_conn = TP_TESTS_CONTACTS_CONNECTION (f->base_connection);
g_object_ref (f->service_conn);
- tp_tests_create_conn (TP_TESTS_TYPE_LEGACY_CONTACTS_CONNECTION,
- "me2@test.com", connect, &f->legacy_base_connection, &f->legacy_client_conn);
-
- tp_tests_create_conn (TP_TESTS_TYPE_NO_REQUESTS_CONNECTION,
- "me3@test.com", connect, &f->no_requests_base_connection,
- &f->no_requests_client_conn);
-
f->service_repo = tp_base_connection_get_handles (f->base_connection,
TP_HANDLE_TYPE_CONTACT);
f->result.loop = g_main_loop_new (NULL, FALSE);
@@ -2932,25 +2658,14 @@ teardown (Fixture *f,
if (f->client_conn != NULL)
tp_tests_connection_assert_disconnect_succeeds (f->client_conn);
+ if (f->all_contact_features != NULL)
+ g_array_unref (f->all_contact_features);
+
tp_clear_object (&f->client_conn);
f->service_repo = NULL;
tp_clear_object (&f->service_conn);
tp_clear_object (&f->base_connection);
- if (f->legacy_client_conn != NULL)
- tp_tests_connection_assert_disconnect_succeeds (f->legacy_client_conn);
-
- tp_clear_object (&f->legacy_client_conn);
- tp_clear_object (&f->legacy_base_connection);
-
- if (f->no_requests_client_conn != NULL)
- {
- tp_tests_connection_assert_disconnect_succeeds (
- f->no_requests_client_conn);
- }
-
- tp_clear_object (&f->no_requests_client_conn);
- tp_clear_object (&f->no_requests_base_connection);
reset_result (&f->result);
tp_clear_pointer (&f->result.loop, g_main_loop_unref);
}
@@ -2991,16 +2706,6 @@ main (int argc,
ADD (dup_if_possible);
ADD (subscription_states);
ADD (contact_groups);
-
- /* test if TpContact fallbacks to connection's capabilities if
- * ContactCapabilities is not implemented. */
- ADD (capabilities_without_contact_caps);
-
- /* test if TP_CONTACT_FEATURE_CAPABILITIES is prepared but with
- * an empty set of capabilities if the connection doesn't support
- * ContactCapabilities and Requests. */
- ADD (prepare_contact_caps_without_request);
-
ADD (no_location);
g_test_add ("/contacts/superfluous-attributes", Fixture, NULL,
@@ -3010,9 +2715,6 @@ main (int argc,
g_test_add ("/contacts/contact-list", Fixture, NULL,
setup_no_connect, test_contact_list, teardown);
- g_test_add ("/contacts/initial-contact-list", Fixture, NULL,
- setup_no_connect, test_initial_contact_list, teardown);
-
g_test_add ("/contacts/self-contact", Fixture, NULL,
setup_no_connect, test_self_contact, teardown);
diff --git a/tests/dbus/dbus-installed/services/spurious.service b/tests/dbus/dbus-installed/services/spurious.service
index d0d70aa04..f7488c681 100644
--- a/tests/dbus/dbus-installed/services/spurious.service
+++ b/tests/dbus/dbus-installed/services/spurious.service
@@ -1,3 +1,3 @@
[D-BUS Service]
-Name=org.freedesktop.Telepathy.ConnectionManager.spurious
+Name=im.telepathy1.ConnectionManager.spurious
Exec=/bin/false
diff --git a/tests/dbus/dbus-tube.c b/tests/dbus/dbus-tube.c
index 71f47849a..7d2a5a9ac 100644
--- a/tests/dbus/dbus-tube.c
+++ b/tests/dbus/dbus-tube.c
@@ -17,7 +17,7 @@
#include <telepathy-glib/dbus.h>
#include "tests/lib/util.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/dbus-tube-chan.h"
typedef struct {
@@ -52,7 +52,7 @@ setup (Test *test,
test->error = NULL;
/* Create (service and client sides) connection objects */
- tp_tests_create_and_connect_conn (TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ tp_tests_create_and_connect_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION,
"me@test.com", &test->base_connection, &test->connection);
}
@@ -87,7 +87,7 @@ create_tube_service (Test *test,
TpHandle handle, alf_handle;
GHashTable *props;
GType type;
- TpSimpleClientFactory *factory;
+ TpClientFactory *factory;
/* If previous tube is still preparing, refs are kept on it. We want it to be
* destroyed now otherwise it will get reused by the factory. */
@@ -138,7 +138,7 @@ create_tube_service (Test *test,
g_object_get (test->tube_chan_service, "channel-properties", &props, NULL);
factory = tp_proxy_get_factory (test->connection);
- test->tube = (TpDBusTubeChannel *) tp_simple_client_factory_ensure_channel (
+ test->tube = (TpDBusTubeChannel *) tp_client_factory_ensure_channel (
factory, test->connection, chan_path, props, &test->error);
g_assert (TP_IS_DBUS_TUBE_CHANNEL (test->tube));
diff --git a/tests/dbus/dbus-uninstalled/services/spurious.service b/tests/dbus/dbus-uninstalled/services/spurious.service
index d0d70aa04..f7488c681 100644
--- a/tests/dbus/dbus-uninstalled/services/spurious.service
+++ b/tests/dbus/dbus-uninstalled/services/spurious.service
@@ -1,3 +1,3 @@
[D-BUS Service]
-Name=org.freedesktop.Telepathy.ConnectionManager.spurious
+Name=im.telepathy1.ConnectionManager.spurious
Exec=/bin/false
diff --git a/tests/dbus/dbus.c b/tests/dbus/dbus.c
index 3772856a0..ead31dd2b 100644
--- a/tests/dbus/dbus.c
+++ b/tests/dbus/dbus.c
@@ -6,6 +6,8 @@
#include <telepathy-glib/debug.h>
#include <telepathy-glib/util.h>
+#include "telepathy-glib/reentrants.h"
+
#include "tests/lib/util.h"
static void
@@ -123,7 +125,6 @@ test_properties (void)
g_assert_cmpstr (bus_name, ==, "org.freedesktop.DBus");
g_assert (dbus_conn != NULL);
- g_assert (dbus_conn == tp_get_bus ());
g_free (bus_name);
g_free (object_path);
diff --git a/tests/dbus/disconnection.c b/tests/dbus/disconnection.c
index bfa55cb2b..fdfd9d8a2 100644
--- a/tests/dbus/disconnection.c
+++ b/tests/dbus/disconnection.c
@@ -1,5 +1,6 @@
#include "config.h"
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/errors.h>
@@ -75,16 +76,6 @@ requested_name (TpDBusDaemon *proxy,
}
static void
-prop_changed (TpProxy *proxy,
- const GPtrArray *properties,
- gpointer user_data,
- GObject *weak_object)
-{
- g_error ("prop_changed called - a signal connection which should have "
- "failed has succeeded. Args: proxy=%p user_data=%p", proxy, user_data);
-}
-
-static void
dummy_noc (TpDBusDaemon *proxy,
const gchar *name,
const gchar *old,
@@ -200,16 +191,6 @@ main (int argc,
destroy_user_data, (GObject *) z, &error_out);
g_assert_no_error (error_out);
- /* assert that connecting to a signal on an interface we don't have fails */
- freed = FALSE;
- tp_cli_properties_interface_connect_to_properties_changed (a, prop_changed,
- &freed, set_freed, NULL, &error_out);
- MYASSERT (freed, "");
- MYASSERT (error_out != NULL, "");
- MYASSERT (error_out->code == TP_DBUS_ERROR_NO_INTERFACE, "");
- g_error_free (error_out);
- error_out = NULL;
-
/* b gets its signal connection cancelled because stub is
* destroyed */
stub = tp_tests_object_new_static_class (tp_tests_stub_object_get_type (),
diff --git a/tests/dbus/example-no-protocols.c b/tests/dbus/example-no-protocols.c
index 4a076f5e6..92b4d1636 100644
--- a/tests/dbus/example-no-protocols.c
+++ b/tests/dbus/example-no-protocols.c
@@ -1,10 +1,15 @@
#include "config.h"
#include <glib-object.h>
+#include <telepathy-glib/cli-connection.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/connection-manager.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/defs.h>
#include <telepathy-glib/errors.h>
+#include <telepathy-glib/interfaces.h>
+
+#include "telepathy-glib/reentrants.h"
#include "tests/lib/util.h"
diff --git a/tests/dbus/file-transfer-channel.c b/tests/dbus/file-transfer-channel.c
index 3a167f763..cfd8053a9 100644
--- a/tests/dbus/file-transfer-channel.c
+++ b/tests/dbus/file-transfer-channel.c
@@ -20,7 +20,7 @@
#include "tests/lib/util.h"
#include "tests/lib/debug.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/file-transfer-chan.h"
#include "tests/lib/stream-tube-chan.h"
@@ -241,7 +241,7 @@ setup (Test *test,
test->error = NULL;
/* Create (service and client sides) connection objects */
- tp_tests_create_and_connect_conn (TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ tp_tests_create_and_connect_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION,
"me@test.com", &test->base_connection, &test->connection);
}
diff --git a/tests/dbus/finalized-in-invalidated-handler.c b/tests/dbus/finalized-in-invalidated-handler.c
index 03f7d6635..fcea63e92 100644
--- a/tests/dbus/finalized-in-invalidated-handler.c
+++ b/tests/dbus/finalized-in-invalidated-handler.c
@@ -17,7 +17,7 @@
#include <telepathy-glib/interfaces.h>
#include "tests/lib/myassert.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/textchan-null.h"
#include "tests/lib/util.h"
@@ -74,12 +74,9 @@ main (int argc,
TpBaseConnection *service_conn_as_base;
TpHandleRepoIface *contact_repo;
TpTestsTextChannelNull *service_chan;
- TpDBusDaemon *dbus;
TpConnection *conn;
TpChannel *chan;
GError *error = NULL;
- gchar *name;
- gchar *conn_path;
gchar *chan_path;
TpHandle handle;
@@ -87,31 +84,14 @@ main (int argc,
g_type_init ();
tp_debug_set_flags ("all");
mainloop = g_main_loop_new (NULL, FALSE);
- dbus = tp_tests_dbus_daemon_dup_or_die ();
- service_conn = TP_TESTS_SIMPLE_CONNECTION (tp_tests_object_new_static_class (
- TP_TESTS_TYPE_SIMPLE_CONNECTION,
- "account", "me@example.com",
- "protocol", "simple",
- NULL));
- service_conn_as_base = TP_BASE_CONNECTION (service_conn);
- MYASSERT (service_conn != NULL, "");
- MYASSERT (service_conn_as_base != NULL, "");
+ tp_tests_create_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION, "me@example.com",
+ TRUE, &service_conn_as_base, &conn);
+ service_conn = TP_TESTS_SIMPLE_CONNECTION (service_conn_as_base);
g_signal_connect (service_conn, "shutdown-finished",
G_CALLBACK (on_shutdown_finished), NULL);
- MYASSERT (tp_base_connection_register (service_conn_as_base, "simple",
- &name, &conn_path, &error), "");
- g_assert_no_error (error);
-
- conn = tp_connection_new (dbus, name, conn_path, &error);
- MYASSERT (conn != NULL, "");
- g_assert_no_error (error);
-
- MYASSERT (tp_connection_run_until_ready (conn, TRUE, &error, NULL), "");
- g_assert_no_error (error);
-
/* Paste on a channel */
contact_repo = tp_base_connection_get_handles (service_conn_as_base,
@@ -120,10 +100,11 @@ main (int argc,
handle = tp_handle_ensure (contact_repo, "them@example.org", NULL, &error);
g_assert_no_error (error);
- chan_path = g_strdup_printf ("%s/Channel", conn_path);
+ chan_path = g_strdup_printf ("%s/Channel",
+ tp_proxy_get_object_path (conn));
service_chan = TP_TESTS_TEXT_CHANNEL_NULL (tp_tests_object_new_static_class (
- TP_TESTS_TYPE_TEXT_CHANNEL_NULL,
+ TP_TESTS_TYPE_PROPS_TEXT_CHANNEL,
"connection", service_conn,
"object-path", chan_path,
"handle", handle,
@@ -133,8 +114,7 @@ main (int argc,
TP_HANDLE_TYPE_CONTACT, handle, &error);
g_assert_no_error (error);
- tp_channel_run_until_ready (chan, &error, NULL);
- g_assert_no_error (error);
+ tp_tests_proxy_run_until_prepared (chan, NULL);
g_signal_connect (chan, "invalidated", G_CALLBACK (on_invalidated),
&chan);
@@ -152,10 +132,7 @@ main (int argc,
g_object_unref (service_chan);
service_conn_as_base = NULL;
g_object_unref (service_conn);
- g_object_unref (dbus);
g_main_loop_unref (mainloop);
- g_free (name);
- g_free (conn_path);
g_free (chan_path);
return 0;
diff --git a/tests/dbus/group-mixin.c b/tests/dbus/group-mixin.c
index 0b7a0a3a4..6a218c119 100644
--- a/tests/dbus/group-mixin.c
+++ b/tests/dbus/group-mixin.c
@@ -11,6 +11,8 @@
#include "config.h"
#include <telepathy-glib/channel.h>
+#include <telepathy-glib/cli-channel.h>
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
@@ -18,8 +20,10 @@
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/proxy-subclass.h>
+#include "telepathy-glib/reentrants.h"
+
#include "tests/lib/myassert.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/textchan-group.h"
#include "tests/lib/util.h"
@@ -31,12 +35,11 @@ TpChannel *chan = NULL;
TpHandleRepoIface *contact_repo;
TpHandle self_handle, camel, camel2;
-typedef void (*diff_checker) (const GArray *added, const GArray *removed,
- const GArray *local_pending, const GArray *remote_pending,
+typedef void (*diff_checker) (const GPtrArray *added, const GPtrArray *removed,
+ const GPtrArray *local_pending, const GPtrArray *remote_pending,
const GHashTable *details);
static gboolean expecting_members_changed = FALSE;
-static gboolean expecting_members_changed_detailed = FALSE;
static const gchar *expected_message;
static TpHandle expected_actor;
static TpChannelGroupChangeReason expected_reason;
@@ -49,7 +52,6 @@ expect_signals (const gchar *message,
diff_checker check_diffs)
{
expecting_members_changed = TRUE;
- expecting_members_changed_detailed = TRUE;
expected_message = message;
expected_actor = actor;
@@ -60,7 +62,7 @@ expect_signals (const gchar *message,
static gboolean
outstanding_signals (void)
{
- return (expecting_members_changed || expecting_members_changed_detailed);
+ return expecting_members_changed;
}
static void
@@ -72,69 +74,39 @@ wait_for_outstanding_signals (void)
static void
on_members_changed (TpChannel *proxy,
- const gchar *arg_Message,
- const GArray *arg_Added,
- const GArray *arg_Removed,
- const GArray *arg_Local_Pending,
- const GArray *arg_Remote_Pending,
- guint arg_Actor,
- guint arg_Reason,
- gpointer user_data,
- GObject *weak_object)
-{
- MYASSERT (expecting_members_changed, ": got unexpected MembersChanged");
- expecting_members_changed = FALSE;
-
- g_assert_cmpstr (arg_Message, ==, expected_message);
- g_assert_cmpuint (arg_Actor, ==, expected_actor);
- g_assert_cmpuint (arg_Reason, ==, expected_reason);
-
- expected_diffs (arg_Added, arg_Removed, arg_Local_Pending,
- arg_Remote_Pending, NULL);
-
- if (!outstanding_signals ())
- g_main_loop_quit (mainloop);
-}
-
-static void
-on_members_changed_detailed (TpChannel *proxy,
- const GArray *arg_Added,
- const GArray *arg_Removed,
- const GArray *arg_Local_Pending,
- const GArray *arg_Remote_Pending,
- GHashTable *arg_Details,
- gpointer user_data,
- GObject *weak_object)
+ GPtrArray *added,
+ GPtrArray *removed,
+ GPtrArray *local_pending,
+ GPtrArray *remote_pending,
+ TpContact *actor,
+ GHashTable *details,
+ gpointer user_data)
{
const gchar *message;
- TpHandle actor;
TpChannelGroupChangeReason reason;
gboolean valid;
- MYASSERT (expecting_members_changed_detailed,
- ": got unexpected MembersChangedDetailed");
- expecting_members_changed_detailed = FALSE;
+ MYASSERT (expecting_members_changed,
+ ": got unexpected MembersChanged");
+ expecting_members_changed = FALSE;
- message = tp_asv_get_string (arg_Details, "message");
+ message = tp_asv_get_string (details, "message");
if (message == NULL)
message = "";
g_assert_cmpstr (message, ==, expected_message);
- actor = tp_asv_get_uint32 (arg_Details, "actor", &valid);
- if (valid)
+ if (actor != NULL)
{
- g_assert_cmpuint (actor, ==, expected_actor);
+ g_assert_cmpuint (tp_contact_get_handle (actor), ==, expected_actor);
}
else
{
g_assert_cmpuint (expected_actor, ==, 0);
- MYASSERT (tp_asv_lookup (arg_Details, "actor") == NULL,
- ": wanted an actor, not an imposter");
}
- reason = tp_asv_get_uint32 (arg_Details, "change-reason", &valid);
+ reason = tp_asv_get_uint32 (details, "change-reason", &valid);
if (valid)
{
g_assert_cmpuint (reason, ==, expected_reason);
@@ -143,12 +115,12 @@ on_members_changed_detailed (TpChannel *proxy,
{
g_assert_cmpuint (expected_reason, ==,
TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
- MYASSERT (tp_asv_lookup (arg_Details, "reason") == NULL,
+ MYASSERT (tp_asv_lookup (details, "reason") == NULL,
": utterly unreasonable");
}
- expected_diffs (arg_Added, arg_Removed, arg_Local_Pending,
- arg_Remote_Pending, arg_Details);
+ expected_diffs (added, removed, local_pending,
+ remote_pending, details);
if (!outstanding_signals ())
g_main_loop_quit (mainloop);
@@ -186,10 +158,7 @@ check_initial_properties (void)
flags = tp_asv_get_uint32 (props, "GroupFlags", &valid);
MYASSERT (flags, ": GroupFlags property should be defined");
- g_assert_cmpuint (flags, ==,
- TP_CHANNEL_GROUP_FLAG_PROPERTIES |
- TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED |
- TP_CHANNEL_GROUP_FLAG_CAN_ADD);
+ g_assert_cmpuint (flags, ==, TP_CHANNEL_GROUP_FLAG_CAN_ADD);
g_hash_table_unref (props);
}
@@ -223,13 +192,13 @@ details_contains_ids_for (const GHashTable *details,
}
static void
-self_added_to_lp (const GArray *added,
- const GArray *removed,
- const GArray *local_pending,
- const GArray *remote_pending,
+self_added_to_lp (const GPtrArray *added,
+ const GPtrArray *removed,
+ const GPtrArray *local_pending,
+ const GPtrArray *remote_pending,
const GHashTable *details)
{
- TpHandle h;
+ TpContact *c;
TpHandle hs[] = { self_handle, 0 };
MYASSERT (added->len == 0, ": no new added to members");
@@ -238,26 +207,26 @@ self_added_to_lp (const GArray *added,
MYASSERT (local_pending->len == 1, ": one local pending...");
/* ...which is us */
- h = g_array_index (local_pending, TpHandle, 0);
- g_assert_cmpuint (h, ==, self_handle);
+ c = g_ptr_array_index (local_pending, 0);
+ g_assert_cmpuint (tp_contact_get_handle (c), ==, self_handle);
details_contains_ids_for (details, hs);
}
static void
-self_added_to_members (const GArray *added,
- const GArray *removed,
- const GArray *local_pending,
- const GArray *remote_pending,
+self_added_to_members (const GPtrArray *added,
+ const GPtrArray *removed,
+ const GPtrArray *local_pending,
+ const GPtrArray *remote_pending,
const GHashTable *details)
{
- TpHandle h;
+ TpContact *c;
TpHandle hs[] = { self_handle, 0 };
MYASSERT (added->len == 1, ": one added");
- h = g_array_index (added, TpHandle, 0);
- g_assert_cmpuint (h, ==, self_handle);
+ c = g_ptr_array_index (added, 0);
+ g_assert_cmpuint (tp_contact_get_handle (c), ==, self_handle);
MYASSERT (removed->len == 0, ": no-one removed");
MYASSERT (local_pending->len == 0, ": no new local pending");
@@ -274,17 +243,22 @@ check_incoming_invitation (void)
/* We get an invitation to the channel */
{
TpIntset *add_local_pending = tp_intset_new ();
+ GHashTable *details = tp_asv_new (
+ "message", G_TYPE_STRING, "HELLO THAR",
+ "actor", G_TYPE_UINT, 0,
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_INVITED,
+ NULL);
tp_intset_add (add_local_pending, self_handle);
expect_signals ("HELLO THAR", 0, TP_CHANNEL_GROUP_CHANGE_REASON_INVITED,
self_added_to_lp);
- tp_group_mixin_change_members ((GObject *) service_chan, "HELLO THAR", NULL,
- NULL, add_local_pending, NULL, 0,
- TP_CHANNEL_GROUP_CHANGE_REASON_INVITED);
+ tp_group_mixin_change_members ((GObject *) service_chan, NULL,
+ NULL, add_local_pending, NULL, details);
wait_for_outstanding_signals ();
MYASSERT (!outstanding_signals (),
- ": MembersChanged and MembersChangedDetailed should have fired once");
+ ": MembersChanged should have fired once");
+ g_hash_table_unref (details);
tp_intset_destroy (add_local_pending);
}
@@ -302,26 +276,26 @@ check_incoming_invitation (void)
g_assert_no_error (error);
wait_for_outstanding_signals ();
MYASSERT (!outstanding_signals (),
- ": MembersChanged and MembersChangedDetailed should have fired once");
+ ": MembersChanged should have fired once");
g_array_unref (contacts);
}
}
static void
-camel_added (const GArray *added,
- const GArray *removed,
- const GArray *local_pending,
- const GArray *remote_pending,
+camel_added (const GPtrArray *added,
+ const GPtrArray *removed,
+ const GPtrArray *local_pending,
+ const GPtrArray *remote_pending,
const GHashTable *details)
{
- TpHandle h;
+ TpContact *c;
TpHandle hs[] = { camel, 0 };
MYASSERT (added->len == 1, ": one added");
- h = g_array_index (added, TpHandle, 0);
- g_assert_cmpuint (h, ==, camel);
+ c = g_ptr_array_index (added, 0);
+ g_assert_cmpuint (tp_contact_get_handle (c), ==, camel);
details_contains_ids_for (details, hs);
@@ -331,20 +305,20 @@ camel_added (const GArray *added,
}
static void
-camel2_added (const GArray *added,
- const GArray *removed,
- const GArray *local_pending,
- const GArray *remote_pending,
+camel2_added (const GPtrArray *added,
+ const GPtrArray *removed,
+ const GPtrArray *local_pending,
+ const GPtrArray *remote_pending,
const GHashTable *details)
{
- TpHandle h;
+ TpContact *c;
/* camel is the actor */
TpHandle hs[] = { camel, camel2, 0 };
MYASSERT (added->len == 1, ": one added");
- h = g_array_index (added, TpHandle, 0);
- g_assert_cmpuint (h, ==, camel2);
+ c = g_ptr_array_index (added, 0);
+ g_assert_cmpuint (tp_contact_get_handle (c), ==, camel2);
details_contains_ids_for (details, hs);
@@ -354,13 +328,13 @@ camel2_added (const GArray *added,
}
static void
-camel_removed (const GArray *added,
- const GArray *removed,
- const GArray *local_pending,
- const GArray *remote_pending,
+camel_removed (const GPtrArray *added,
+ const GPtrArray *removed,
+ const GPtrArray *local_pending,
+ const GPtrArray *remote_pending,
const GHashTable *details)
{
- TpHandle h;
+ TpContact *c;
/* camel2 is the actor. camel shouldn't be in the ids, because they were
* removed and the spec says that you can leave those out, and we want
* tp-glib's automatic construction of contact-ids to work in the #ubuntu
@@ -370,8 +344,8 @@ camel_removed (const GArray *added,
MYASSERT (removed->len == 1, ": one removed");
- h = g_array_index (removed, TpHandle, 0);
- g_assert_cmpuint (h, ==, camel);
+ c = g_ptr_array_index (removed, 0);
+ g_assert_cmpuint (tp_contact_get_handle (c), ==, camel);
MYASSERT (added->len == 0, ": no-one added");
MYASSERT (local_pending->len == 0, ": no new local pending");
@@ -383,21 +357,32 @@ camel_removed (const GArray *added,
static void
in_the_desert (void)
{
+ TpIntset *expected_members;
+
+ expected_members = tp_intset_new ();
+ tp_intset_add (expected_members, self_handle);
+
camel = tp_handle_ensure (contact_repo, "camel", NULL, NULL);
camel2 = tp_handle_ensure (contact_repo, "camel2", NULL, NULL);
/* A camel is approaching */
{
TpIntset *add = tp_intset_new ();
+ GHashTable *details = tp_asv_new (
+ "message", G_TYPE_STRING, "",
+ "actor", G_TYPE_UINT, camel,
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
+ NULL);
tp_intset_add (add, camel);
+ tp_intset_add (expected_members, camel);
expect_signals ("", camel, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
camel_added);
- tp_group_mixin_change_members ((GObject *) service_chan, NULL, add, NULL,
- NULL, NULL, camel, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+ tp_group_mixin_change_members ((GObject *) service_chan, add, NULL,
+ NULL, NULL, details);
wait_for_outstanding_signals ();
MYASSERT (!outstanding_signals (),
- ": MembersChanged and MembersChangedDetailed should have fired once");
+ ": MembersChanged should have fired once");
tp_intset_destroy (add);
}
@@ -409,16 +394,17 @@ in_the_desert (void)
NULL, (GDestroyNotify) tp_g_value_slice_free);
tp_intset_add (add, camel2);
+ tp_intset_add (expected_members, camel2);
g_hash_table_insert (details, "actor", tp_g_value_slice_new_uint (camel));
expect_signals ("", camel, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
camel2_added);
- tp_group_mixin_change_members_detailed ((GObject *) service_chan, add,
+ tp_group_mixin_change_members ((GObject *) service_chan, add,
NULL, NULL, NULL, details);
wait_for_outstanding_signals ();
MYASSERT (!outstanding_signals (),
- ": MembersChanged and MembersChangedDetailed should have fired once");
+ ": MembersChanged should have fired once");
tp_intset_destroy (add);
g_hash_table_unref (details);
@@ -430,6 +416,7 @@ in_the_desert (void)
NULL, (GDestroyNotify) tp_g_value_slice_free);
tp_intset_add (del, camel);
+ tp_intset_remove (expected_members, camel);
g_hash_table_insert (details, "actor", tp_g_value_slice_new_uint (camel2));
@@ -450,11 +437,11 @@ in_the_desert (void)
/* Check that all the right information was extracted from the dict. */
expect_signals ("*ptooey*", camel2,
TP_CHANNEL_GROUP_CHANGE_REASON_KICKED, camel_removed);
- tp_group_mixin_change_members_detailed ((GObject *) service_chan, NULL,
+ tp_group_mixin_change_members ((GObject *) service_chan, NULL,
del, NULL, NULL, details);
wait_for_outstanding_signals ();
MYASSERT (!outstanding_signals (),
- ": MembersChanged and MembersChangedDetailed should have fired once");
+ ": MembersChanged should have fired once");
tp_intset_destroy (del);
g_hash_table_unref (details);
@@ -462,48 +449,39 @@ in_the_desert (void)
/* We and the second camel should be left in the channel */
{
- const TpIntset *members = tp_channel_group_get_members (chan);
GArray *service_members;
- TpHandle a, b;
+ TpIntset *service_members_intset;
- g_assert_cmpuint (tp_intset_size (members), ==, 2);
- MYASSERT (tp_intset_is_member (members, self_handle), "");
- MYASSERT (tp_intset_is_member (members, camel2), ": what a pity");
+ tp_tests_channel_assert_expect_members (chan, expected_members);
/* And let's check that the group mixin agrees, in case that's just the
* client binding being wrong.
*/
tp_group_mixin_get_members ((GObject *) service_chan, &service_members,
NULL);
- g_assert_cmpuint (service_members->len, ==, 2);
- a = g_array_index (service_members, TpHandle, 0);
- b = g_array_index (service_members, TpHandle, 1);
- MYASSERT (a != b, "");
- MYASSERT (a == self_handle || b == self_handle, "");
- MYASSERT (a == camel2 || b == camel2, "");
+ service_members_intset = tp_intset_from_array (service_members);
+ g_assert (tp_intset_is_equal (service_members_intset, expected_members));
g_array_unref (service_members);
+ tp_intset_destroy (service_members_intset);
}
tp_handle_unref (contact_repo, camel);
tp_handle_unref (contact_repo, camel2);
+ tp_intset_destroy (expected_members);
}
static void
test_group_mixin (void)
{
- GError *error = NULL;
-
- MYASSERT (tp_channel_run_until_ready (chan, &error, NULL), "");
- g_assert_no_error (error);
+ GQuark features[] = { TP_CHANNEL_FEATURE_GROUP, 0 };
+ tp_tests_proxy_run_until_prepared (chan, features);
MYASSERT (tp_proxy_has_interface (chan, TP_IFACE_CHANNEL_INTERFACE_GROUP),
"");
- tp_cli_channel_interface_group_connect_to_members_changed (chan,
- on_members_changed, NULL, NULL, NULL, NULL);
- tp_cli_channel_interface_group_connect_to_members_changed_detailed (chan,
- on_members_changed_detailed, NULL, NULL, NULL, NULL);
+ g_signal_connect (chan, "group-members-changed",
+ G_CALLBACK (on_members_changed), NULL);
check_initial_properties ();
@@ -518,52 +496,31 @@ main (int argc,
{
TpTestsSimpleConnection *service_conn;
TpBaseConnection *service_conn_as_base;
- TpDBusDaemon *dbus;
TpConnection *conn;
GError *error = NULL;
- gchar *name;
- gchar *conn_path;
gchar *chan_path;
tp_tests_abort_after (10);
g_type_init ();
tp_debug_set_flags ("all");
- dbus = tp_tests_dbus_daemon_dup_or_die ();
- service_conn = TP_TESTS_SIMPLE_CONNECTION (tp_tests_object_new_static_class (
- TP_TESTS_TYPE_SIMPLE_CONNECTION,
- "account", "me@example.com",
- "protocol", "simple",
- NULL));
- service_conn_as_base = TP_BASE_CONNECTION (service_conn);
- MYASSERT (service_conn != NULL, "");
- MYASSERT (service_conn_as_base != NULL, "");
-
- MYASSERT (tp_base_connection_register (service_conn_as_base, "simple",
- &name, &conn_path, &error), "");
- g_assert_no_error (error);
-
- conn = tp_connection_new (dbus, name, conn_path, &error);
- MYASSERT (conn != NULL, "");
- g_assert_no_error (error);
-
- MYASSERT (tp_connection_run_until_ready (conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
+ tp_tests_create_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION, "me@example.com",
+ TRUE, &service_conn_as_base, &conn);
+ service_conn = TP_TESTS_SIMPLE_CONNECTION (service_conn_as_base);
contact_repo = tp_base_connection_get_handles (service_conn_as_base,
TP_HANDLE_TYPE_CONTACT);
MYASSERT (contact_repo != NULL, "");
self_handle = tp_handle_ensure (contact_repo, "me@example.com", NULL, NULL);
- chan_path = g_strdup_printf ("%s/Channel", conn_path);
+ chan_path = g_strdup_printf ("%s/Channel",
+ tp_proxy_get_object_path (conn));
service_chan = TP_TESTS_TEXT_CHANNEL_GROUP (
tp_tests_object_new_static_class (
TP_TESTS_TYPE_TEXT_CHANNEL_GROUP,
"connection", service_conn,
"object-path", chan_path,
- "detailed", TRUE,
NULL));
mainloop = g_main_loop_new (NULL, FALSE);
@@ -575,8 +532,7 @@ main (int argc,
&error);
g_assert_no_error (error);
- MYASSERT (tp_channel_run_until_ready (chan, &error, NULL), "");
- g_assert_no_error (error);
+ tp_tests_proxy_run_until_prepared (chan, NULL);
test_group_mixin ();
@@ -593,9 +549,6 @@ main (int argc,
service_conn_as_base = NULL;
g_object_unref (service_conn);
- g_object_unref (dbus);
- g_free (name);
- g_free (conn_path);
g_free (chan_path);
return 0;
diff --git a/tests/dbus/invalidated-while-invoking-signals.c b/tests/dbus/invalidated-while-invoking-signals.c
index 93606449d..5143254a6 100644
--- a/tests/dbus/invalidated-while-invoking-signals.c
+++ b/tests/dbus/invalidated-while-invoking-signals.c
@@ -11,12 +11,13 @@
#include "config.h"
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
#include "tests/lib/myassert.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/util.h"
static GMainLoop *mainloop;
@@ -71,7 +72,7 @@ main (int argc,
dbus = tp_tests_dbus_daemon_dup_or_die ();
service = TP_TESTS_SIMPLE_CONNECTION (tp_tests_object_new_static_class (
- TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ TP_TESTS_TYPE_CONTACTS_CONNECTION,
"account", "me@example.com",
"protocol", "simple",
NULL));
@@ -90,8 +91,8 @@ main (int argc,
MYASSERT (client != NULL, "");
g_assert_no_error (error);
- MYASSERT (tp_connection_run_until_ready (client, TRUE, &error, NULL), "");
- g_assert_no_error (error);
+ tp_cli_connection_call_connect (client, -1, NULL, NULL, NULL, NULL);
+ tp_tests_proxy_run_until_prepared (client, NULL);
MYASSERT (tp_cli_connection_connect_to_status_changed (client,
on_status_changed, &client, NULL, NULL, NULL), "");
diff --git a/tests/dbus/message-mixin.c b/tests/dbus/message-mixin.c
index 7f526ec19..d862b2f2f 100644
--- a/tests/dbus/message-mixin.c
+++ b/tests/dbus/message-mixin.c
@@ -11,73 +11,28 @@
#include "config.h"
#include <telepathy-glib/channel.h>
+#include <telepathy-glib/cli-channel.h>
+#include <telepathy-glib/cli-connection.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
+#include "telepathy-glib/reentrants.h"
+
#include "examples/cm/echo-message-parts/connection-manager.h"
#include "examples/cm/echo-message-parts/chan.h"
#include "examples/cm/echo-message-parts/conn.h"
#include "tests/lib/myassert.h"
#include "tests/lib/util.h"
-static guint received_count = 0;
-static guint last_received_id = 0;
-static guint last_received_sender = 0;
-static guint last_received_type = 0;
-static guint last_received_flags = 0;
-static gchar *last_received_text = NULL;
-
-static guint sent_count = 0;
-static guint last_sent_type = 0;
-static gchar *last_sent_text = NULL;
-
-static void
-on_sent (TpChannel *chan,
- guint timestamp,
- guint type,
- const gchar *text,
- gpointer data,
- GObject *object)
-{
- g_print ("%p: Sent: time %u, type %u, text '%s'\n",
- chan, timestamp, type, text);
-
- sent_count++;
- last_sent_type = type;
- g_free (last_sent_text);
- last_sent_text = g_strdup (text);
-}
-
-static void
-on_received (TpChannel *chan,
- guint id,
- guint timestamp,
- guint sender,
- guint type,
- guint flags,
- const gchar *text,
- gpointer data,
- GObject *object)
-{
- g_print ("%p: Received #%u: time %u, sender %u, type %u, flags %u, "
- "text '%s'\n", chan, id, timestamp, sender, type, flags, text);
-
- received_count++;
- last_received_id = id;
- last_received_sender = sender;
- last_received_type = type;
- last_received_flags = flags;
- g_free (last_received_text);
- last_received_text = g_strdup (text);
-}
-
static guint message_received_count = 0;
static guint last_message_received_sender = 0;
static guint last_message_received_type = 0;
static guint last_message_received_n_parts = 0;
+static guint last_message_received_id = 0;
static guint message_sent_count = 0;
static guint last_message_sent_type = 0;
@@ -99,18 +54,6 @@ print_part (gpointer k,
}
static void
-print_part_content (gpointer k,
- gpointer v,
- gpointer d)
-{
- guint part_number = GPOINTER_TO_UINT (k);
- gchar *contents = g_strdup_value_contents (v);
-
- g_print (" %u: %s\n", part_number, contents);
- g_free (contents);
-}
-
-static void
on_message_received (TpChannel *chan,
const GPtrArray *parts,
gpointer data,
@@ -143,6 +86,7 @@ on_message_received (TpChannel *chan,
last_message_received_type = type;
last_message_received_sender = sender;
last_message_received_n_parts = parts->len;
+ last_message_received_id = id;
}
static void
@@ -217,6 +161,7 @@ main (int argc,
TpHandle handle;
gboolean ok;
GHashTable *parameters;
+ GQuark connected_feature[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 };
tp_tests_abort_after (10);
g_type_init ();
@@ -252,9 +197,8 @@ main (int argc,
MYASSERT (conn != NULL, "");
g_assert_no_error (error);
- MYASSERT (tp_connection_run_until_ready (conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
+ tp_cli_connection_call_connect (conn, -1, NULL, NULL, NULL, NULL);
+ tp_tests_proxy_run_until_prepared (conn, connected_feature);
{
GHashTable *properties = NULL;
@@ -292,23 +236,17 @@ main (int argc,
g_assert_no_error (error);
g_hash_table_unref (parameters);
- tp_channel_run_until_ready (chan, &error, NULL);
- g_assert_no_error (error);
+ tp_tests_proxy_run_until_prepared (chan, NULL);
handle = tp_channel_get_handle (chan, NULL);
- MYASSERT (tp_cli_channel_type_text_connect_to_received (chan, on_received,
- NULL, NULL, NULL, NULL) != NULL, "");
- MYASSERT (tp_cli_channel_type_text_connect_to_sent (chan, on_sent,
- NULL, NULL, NULL, NULL) != NULL, "");
-
MYASSERT (
- tp_cli_channel_interface_messages_connect_to_message_received (chan,
+ tp_cli_channel_type_text_connect_to_message_received (chan,
on_message_received, NULL, NULL, NULL, NULL) != NULL, "");
- MYASSERT (tp_cli_channel_interface_messages_connect_to_message_sent (
+ MYASSERT (tp_cli_channel_type_text_connect_to_message_sent (
chan, on_message_sent, NULL, NULL, NULL, NULL) != NULL, "");
MYASSERT (
- tp_cli_channel_interface_messages_connect_to_pending_messages_removed (
+ tp_cli_channel_type_text_connect_to_pending_messages_removed (
chan, on_messages_removed, NULL, NULL, NULL, NULL) != NULL, "");
/* Get the initial properties */
@@ -321,7 +259,7 @@ main (int argc,
GHashTable *properties = NULL;
tp_cli_dbus_properties_run_get_all (chan, -1,
- TP_IFACE_CHANNEL_INTERFACE_MESSAGES, &properties, &error, NULL);
+ TP_IFACE_CHANNEL_TYPE_TEXT, &properties, &error, NULL);
g_assert_no_error (error);
g_print ("\n\n==== Examining properties ====\n\n");
@@ -365,162 +303,17 @@ main (int argc,
g_hash_table_unref (properties);
}
- /* Send three messages using the old Text API:
- *
- * (normal) Hello, world!
- * (action) /me drinks coffee
- * (notice) Printer on fire
- *
- * Verify that for each of them, we get a Sent signal in the old Text
- * API, and a Received signal for the echo; also a MessageSent signal
- * in the new Messages API, and a MessageReceived signal for the echo.
- */
-
- g_print ("\n\n==== Starting test: NORMAL ====\n");
-
- sent_count = 0;
- received_count = 0;
- message_sent_count = 0;
- message_received_count = 0;
- tp_cli_channel_type_text_run_send (chan, -1,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL, "Hello, world!",
- &error, NULL);
- /* wait for pending events to be delivered */
- while (received_count < 1 || message_received_count < 1)
- g_main_context_iteration (NULL, TRUE);
-
- g_assert_no_error (error);
- MYASSERT (sent_count == 1, ": %u != 1", sent_count);
- MYASSERT (received_count == 1, ": %u != 1", received_count);
- MYASSERT (last_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- ": %u != NORMAL", last_sent_type);
- MYASSERT (!tp_strdiff (last_sent_text, "Hello, world!"),
- ": '%s' != '%s'", last_sent_text, "Hello, world!");
- MYASSERT (last_received_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- ": %u != NORMAL", last_received_type);
- MYASSERT (last_received_flags == 0, ": %u != 0", last_received_flags);
- MYASSERT (last_received_sender == handle,
- ": %u != %u", last_received_sender, handle);
- MYASSERT (!tp_strdiff (last_received_text, "Hello, world!"),
- ": '%s'", last_received_text);
- MYASSERT (message_sent_count == 1, ": %u != 1", message_sent_count);
- MYASSERT (message_received_count == 1, ": %u != 1", message_received_count);
- MYASSERT (last_message_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- ": %u != NORMAL", last_message_sent_type);
- g_assert_cmpuint (last_message_sent_sender, ==,
- tp_connection_get_self_handle (conn));
- g_assert_cmpstr (last_message_sent_sender_id, ==, "me@example.com");
- MYASSERT (last_message_sent_n_parts == 2,
- ": %u != 2", last_message_sent_n_parts);
- MYASSERT (last_message_received_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- ": %u != NORMAL", last_message_received_type);
- MYASSERT (last_message_received_sender == handle,
- ": %u != %u", last_message_received_sender, handle);
- MYASSERT (last_message_received_n_parts == 2,
- ": %u != 2", last_message_received_n_parts);
-
- g_print ("\n\n==== Starting test: ACTION ====\n");
-
- sent_count = 0;
- received_count = 0;
- message_sent_count = 0;
- message_received_count = 0;
- tp_cli_channel_type_text_run_send (chan, -1,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION, "drinks coffee",
- &error, NULL);
- /* wait for pending events to be delivered */
- while (received_count < 1 || message_received_count < 1)
- g_main_context_iteration (NULL, TRUE);
-
- g_assert_no_error (error);
- MYASSERT (sent_count == 1, ": %u != 1", sent_count);
- MYASSERT (received_count == 1, ": %u != 1", received_count);
- MYASSERT (last_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
- ": %u != ACTION", last_sent_type);
- MYASSERT (!tp_strdiff (last_sent_text, "drinks coffee"),
- ": '%s' != '%s'", last_sent_text, "drinks coffee");
- MYASSERT (last_received_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
- ": %u != ACTION", last_received_type);
- MYASSERT (last_received_flags == 0, ": %u != 0", last_received_flags);
- MYASSERT (last_received_sender == handle,
- ": %u != %u", last_received_sender, handle);
- MYASSERT (!tp_strdiff (last_received_text,
- "drinks coffee"),
- ": '%s'", last_received_text);
- MYASSERT (message_sent_count == 1, ": %u != 1", message_sent_count);
- MYASSERT (message_received_count == 1, ": %u != 1", message_received_count);
- MYASSERT (last_message_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
- ": %u != ACTION", last_message_sent_type);
- g_assert_cmpuint (last_message_sent_sender, ==,
- tp_connection_get_self_handle (conn));
- g_assert_cmpstr (last_message_sent_sender_id, ==, "me@example.com");
- MYASSERT (last_message_sent_n_parts == 2,
- ": %u != 2", last_message_sent_n_parts);
- MYASSERT (last_message_received_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
- ": %u != ACTION", last_message_received_type);
- MYASSERT (last_message_received_sender == handle,
- ": %u != %u", last_message_received_sender, handle);
- MYASSERT (last_message_received_n_parts == 2,
- ": %u != 2", last_message_received_n_parts);
-
- g_print ("\n\n==== Starting test: NOTICE ====\n");
-
- sent_count = 0;
- received_count = 0;
- message_sent_count = 0;
- message_received_count = 0;
- tp_cli_channel_type_text_run_send (chan, -1,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE, "Printer on fire",
- &error, NULL);
- /* wait for pending events to be delivered */
- while (received_count < 1 || message_received_count < 1)
- g_main_context_iteration (NULL, TRUE);
-
- g_assert_no_error (error);
- MYASSERT (sent_count == 1, ": %u != 1", sent_count);
- MYASSERT (received_count == 1, ": %u != 1", received_count);
- MYASSERT (last_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE,
- ": %u != NOTICE", last_sent_type);
- MYASSERT (!tp_strdiff (last_sent_text, "Printer on fire"),
- ": '%s' != '%s'", last_sent_text, "Printer on fire");
- MYASSERT (last_received_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE,
- ": %u != NOTICE", last_received_type);
- MYASSERT (last_received_flags == 0, ": %u != 0", last_received_flags);
- MYASSERT (last_received_sender == handle,
- ": %u != %u", last_received_sender, handle);
- MYASSERT (!tp_strdiff (last_received_text,
- "Printer on fire"),
- ": '%s'", last_received_text);
- MYASSERT (message_sent_count == 1, ": %u != 1", message_sent_count);
- MYASSERT (message_received_count == 1, ": %u != 1", message_received_count);
- MYASSERT (last_message_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE,
- ": %u != NOTICE", last_message_sent_type);
- g_assert_cmpuint (last_message_sent_sender, ==,
- tp_connection_get_self_handle (conn));
- g_assert_cmpstr (last_message_sent_sender_id, ==, "me@example.com");
- MYASSERT (last_message_sent_n_parts == 2,
- ": %u != 2", last_message_sent_n_parts);
- MYASSERT (last_message_received_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE,
- ": %u != NOTICE", last_message_received_type);
- MYASSERT (last_message_received_sender == handle,
- ": %u != %u", last_message_received_sender, handle);
- MYASSERT (last_message_received_n_parts == 2,
- ": %u != 2", last_message_received_n_parts);
-
g_print ("\n\n==== Starting test: lolcat ====\n");
- /* Send a multi-part message using the Messages API.
+ /* Send a multi-part message
*
- * Again, verify that we get a Sent signal in the old Text
- * API, and a Received signal for the echo; also a MessageSent signal
- * in the new Messages API, and a MessageReceived signal for the echo.
+ * Verify that we get a MessageSent signal for said message, and a
+ * MessageReceived signal for the echo.
*
* Because this message contains an image, we must set the
* Channel_Text_Message_Flag_Non_Text_Content.
*/
- sent_count = 0;
- received_count = 0;
message_sent_count = 0;
message_received_count = 0;
@@ -533,7 +326,6 @@ main (int argc,
GPtrArray *send_parts = g_ptr_array_sized_new (3);
GHashTable *part;
guint i;
- gchar *token = NULL;
/* Empty headers part */
part = tp_asv_new (NULL, NULL);
@@ -564,16 +356,14 @@ main (int argc,
14, "\xff\xd8\xff\xe0\x00\x10JFIF\x00..."));
g_ptr_array_add (send_parts, part);
- tp_cli_channel_interface_messages_run_send_message (chan, -1,
- send_parts, 0 /* flags */, &token, &error, NULL);
- g_assert_no_error (error);
+ tp_cli_channel_type_text_call_send_message (chan, -1,
+ send_parts, 0 /* flags */, NULL, NULL, NULL, NULL);
/* wait for pending events to be delivered */
- while (received_count < 1 || message_received_count < 1)
+ while (message_received_count < 1)
g_main_context_iteration (NULL, TRUE);
- g_print ("Sent message, got token '%s'\n", token);
- g_free (token);
+ g_print ("Sent message\n");
for (i = 0; i < send_parts->len; i++)
g_hash_table_unref (g_ptr_array_index (send_parts, i));
@@ -581,25 +371,10 @@ main (int argc,
g_ptr_array_unref (send_parts);
}
- MYASSERT (sent_count == 1, ": %u != 1", sent_count);
- MYASSERT (received_count == 1, ": %u != 1", received_count);
- MYASSERT (last_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- ": %u != NORMAL", last_sent_type);
- MYASSERT (!tp_strdiff (last_sent_text, EXPECTED_TEXT),
- ": '%s' != '%s'", last_sent_text, EXPECTED_TEXT);
- MYASSERT (last_received_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- ": %u != NORMAL", last_received_type);
- MYASSERT (last_received_flags ==
- TP_CHANNEL_TEXT_MESSAGE_FLAG_NON_TEXT_CONTENT,
- ": %u != NON_TEXT_CONTENT", last_received_flags);
- MYASSERT (last_received_sender == handle,
- ": %u != %u", last_received_sender, handle);
- MYASSERT (!tp_strdiff (last_received_text, EXPECTED_TEXT),
- ": '%s'", last_received_text);
MYASSERT (message_sent_count == 1, ": %u != 1", message_sent_count);
MYASSERT (message_received_count == 1, ": %u != 1", message_received_count);
g_assert_cmpuint (last_message_sent_sender, ==,
- tp_connection_get_self_handle (conn));
+ tp_contact_get_handle (tp_connection_get_self_contact (conn)));
g_assert_cmpstr (last_message_sent_sender_id, ==, "me@example.com");
MYASSERT (last_message_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
": %u != NORMAL", last_message_sent_type);
@@ -616,8 +391,6 @@ main (int argc,
/* This time, the non-text content has an alternative. */
- sent_count = 0;
- received_count = 0;
message_sent_count = 0;
message_received_count = 0;
@@ -630,7 +403,6 @@ main (int argc,
GPtrArray *send_parts = g_ptr_array_sized_new (3);
GHashTable *part;
guint i;
- gchar *token = NULL;
/* Empty headers part */
part = tp_asv_new (NULL, NULL);
@@ -673,16 +445,14 @@ main (int argc,
12, "\x89PNG\x0d\x0a\x1a\x0a\x00..."));
g_ptr_array_add (send_parts, part);
- tp_cli_channel_interface_messages_run_send_message (chan, -1,
- send_parts, 0 /* flags */, &token, &error, NULL);
- g_assert_no_error (error);
+ tp_cli_channel_type_text_call_send_message (chan, -1,
+ send_parts, 0 /* flags */, NULL, NULL, NULL, NULL);
/* wait for pending events to be delivered */
- while (received_count < 1 || message_received_count < 1)
+ while (message_received_count < 1)
g_main_context_iteration (NULL, TRUE);
- g_print ("Sent message, got token '%s'\n", token);
- g_free (token);
+ g_print ("Sent message\n");
for (i = 0; i < send_parts->len; i++)
g_hash_table_unref (g_ptr_array_index (send_parts, i));
@@ -690,27 +460,12 @@ main (int argc,
g_ptr_array_unref (send_parts);
}
- MYASSERT (sent_count == 1, ": %u != 1", sent_count);
- MYASSERT (received_count == 1, ": %u != 1", received_count);
- MYASSERT (last_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- ": %u != NORMAL", last_sent_type);
- MYASSERT (!tp_strdiff (last_sent_text, EXPECTED_TEXT),
- ": '%s' != '%s'", last_sent_text, EXPECTED_TEXT);
- MYASSERT (last_received_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- ": %u != NORMAL", last_received_type);
- MYASSERT (last_received_flags ==
- TP_CHANNEL_TEXT_MESSAGE_FLAG_NON_TEXT_CONTENT,
- ": %u != NON_TEXT_CONTENT", last_received_flags);
- MYASSERT (last_received_sender == handle,
- ": %u != %u", last_received_sender, handle);
- MYASSERT (!tp_strdiff (last_received_text, EXPECTED_TEXT),
- ": '%s'", last_received_text);
MYASSERT (message_sent_count == 1, ": %u != 1", message_sent_count);
MYASSERT (message_received_count == 1, ": %u != 1", message_received_count);
MYASSERT (last_message_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
": %u != NORMAL", last_message_sent_type);
g_assert_cmpuint (last_message_sent_sender, ==,
- tp_connection_get_self_handle (conn));
+ tp_contact_get_handle (tp_connection_get_self_contact (conn)));
g_assert_cmpstr (last_message_sent_sender_id, ==, "me@example.com");
MYASSERT (last_message_sent_n_parts == 5,
": %u != 5", last_message_sent_n_parts);
@@ -728,8 +483,6 @@ main (int argc,
* concatenate.
*/
- sent_count = 0;
- received_count = 0;
message_sent_count = 0;
message_received_count = 0;
@@ -742,7 +495,6 @@ main (int argc,
GPtrArray *send_parts = g_ptr_array_sized_new (3);
GHashTable *part;
guint i;
- gchar *token = NULL;
/* Empty headers part */
part = tp_asv_new (NULL, NULL);
@@ -766,16 +518,14 @@ main (int argc,
NULL);
g_ptr_array_add (send_parts, part);
- tp_cli_channel_interface_messages_run_send_message (chan, -1,
- send_parts, 0 /* flags */, &token, &error, NULL);
- g_assert_no_error (error);
+ tp_cli_channel_type_text_call_send_message (chan, -1,
+ send_parts, 0 /* flags */, NULL, NULL, NULL, NULL);
/* wait for pending events to be delivered */
- while (received_count < 1 || message_received_count < 1)
+ while (message_received_count < 1)
g_main_context_iteration (NULL, TRUE);
- g_print ("Sent message, got token '%s'\n", token);
- g_free (token);
+ g_print ("Sent message\n");
for (i = 0; i < send_parts->len; i++)
g_hash_table_unref (g_ptr_array_index (send_parts, i));
@@ -783,25 +533,12 @@ main (int argc,
g_ptr_array_unref (send_parts);
}
- MYASSERT (sent_count == 1, ": %u != 1", sent_count);
- MYASSERT (received_count == 1, ": %u != 1", received_count);
- MYASSERT (last_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- ": %u != NORMAL", last_sent_type);
- MYASSERT (!tp_strdiff (last_sent_text, EXPECTED_TEXT),
- ": '%s' != '%s'", last_sent_text, EXPECTED_TEXT);
- MYASSERT (last_received_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- ": %u != NORMAL", last_received_type);
- MYASSERT (last_received_flags == 0, ": %u != 0", last_received_flags);
- MYASSERT (last_received_sender == handle,
- ": %u != %u", last_received_sender, handle);
- MYASSERT (!tp_strdiff (last_received_text, EXPECTED_TEXT),
- ": '%s'", last_received_text);
MYASSERT (message_sent_count == 1, ": %u != 1", message_sent_count);
MYASSERT (message_received_count == 1, ": %u != 1", message_received_count);
MYASSERT (last_message_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
": %u != NORMAL", last_message_sent_type);
g_assert_cmpuint (last_message_sent_sender, ==,
- tp_connection_get_self_handle (conn));
+ tp_contact_get_handle (tp_connection_get_self_contact (conn)));
g_assert_cmpstr (last_message_sent_sender_id, ==, "me@example.com");
MYASSERT (last_message_sent_n_parts == 4,
": %u != 4", last_message_sent_n_parts);
@@ -819,8 +556,6 @@ main (int argc,
* so the old Text API picks the "best" (first) one.
*/
- sent_count = 0;
- received_count = 0;
message_sent_count = 0;
message_received_count = 0;
@@ -831,7 +566,6 @@ main (int argc,
GPtrArray *send_parts = g_ptr_array_sized_new (3);
GHashTable *part;
guint i;
- gchar *token = NULL;
/* Empty headers part */
part = tp_asv_new (NULL, NULL);
@@ -863,16 +597,14 @@ main (int argc,
NULL);
g_ptr_array_add (send_parts, part);
- tp_cli_channel_interface_messages_run_send_message (chan, -1,
- send_parts, 0 /* flags */, &token, &error, NULL);
- g_assert_no_error (error);
+ tp_cli_channel_type_text_call_send_message (chan, -1,
+ send_parts, 0 /* flags */, NULL, NULL, NULL, NULL);
/* wait for pending events to be delivered */
- while (received_count < 1 || message_received_count < 1)
+ while (message_received_count < 1)
g_main_context_iteration (NULL, TRUE);
- g_print ("Sent message, got token '%s'\n", token);
- g_free (token);
+ g_print ("Sent message\n");
for (i = 0; i < send_parts->len; i++)
g_hash_table_unref (g_ptr_array_index (send_parts, i));
@@ -880,19 +612,6 @@ main (int argc,
g_ptr_array_unref (send_parts);
}
- MYASSERT (sent_count == 1, ": %u != 1", sent_count);
- MYASSERT (received_count == 1, ": %u != 1", received_count);
- MYASSERT (last_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- ": %u != NORMAL", last_sent_type);
- MYASSERT (!tp_strdiff (last_sent_text, EXPECTED_TEXT),
- ": '%s' != '%s'", last_sent_text, EXPECTED_TEXT);
- MYASSERT (last_received_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- ": %u != NORMAL", last_received_type);
- MYASSERT (last_received_flags == 0, ": %u != 0", last_received_flags);
- MYASSERT (last_received_sender == handle,
- ": %u != %u", last_received_sender, handle);
- MYASSERT (!tp_strdiff (last_received_text, EXPECTED_TEXT),
- ": '%s'", last_received_text);
MYASSERT (message_sent_count == 1, ": %u != 1", message_sent_count);
MYASSERT (message_received_count == 1, ": %u != 1", message_received_count);
MYASSERT (last_message_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
@@ -906,54 +625,18 @@ main (int argc,
MYASSERT (last_message_received_n_parts == 4,
": %u != 4", last_message_received_n_parts);
- g_print ("\n\n==== Getting partial content of last message ====\n");
-
- {
- GArray *part_numbers = g_array_sized_new (FALSE, FALSE, sizeof (guint),
- 2);
- GHashTable *ret;
- guint i;
-
- i = 2;
- g_array_append_val (part_numbers, i);
- i = 1;
- g_array_append_val (part_numbers, i);
-
- tp_cli_channel_interface_messages_run_get_pending_message_content (chan,
- -1, last_received_id, part_numbers, &ret, &error, NULL);
- g_assert_no_error (error);
-
- MYASSERT (g_hash_table_size (ret) == 2, ": %u",
- g_hash_table_size (ret));
-
- g_hash_table_foreach (ret, print_part_content, NULL);
- g_hash_table_unref (ret);
-
- i = 47;
- g_array_append_val (part_numbers, i);
-
- tp_cli_channel_interface_messages_run_get_pending_message_content (chan,
- -1, last_received_id, part_numbers, &ret, &error, NULL);
- MYASSERT (error != NULL, "");
- g_print ("Testing out-of-range part number: correctly got error %s\n",
- error->message);
- g_error_free (error);
- error = NULL;
-
- g_array_unref (part_numbers);
- }
-
g_print ("\n\n==== Listing messages ====\n");
{
- GPtrArray *messages;
+ GValue *value = NULL;
- tp_cli_channel_type_text_run_list_pending_messages (chan, -1,
- FALSE, &messages, &error, NULL);
+ tp_cli_dbus_properties_run_get (chan, -1, TP_IFACE_CHANNEL_TYPE_TEXT,
+ "PendingMessages", &value, &error, NULL);
g_assert_no_error (error);
g_print ("Freeing\n");
- g_boxed_free (TP_ARRAY_TYPE_PENDING_TEXT_MESSAGE_LIST, messages);
+ g_value_unset (value);
+ g_free (value);
}
g_print ("\n\n==== Acknowledging messages using a wrong ID ====\n");
@@ -964,7 +647,7 @@ main (int argc,
* IDs are increasing integers) */
guint bad_id = 31337;
- g_array_append_val (ids, last_received_id);
+ g_array_append_val (ids, last_message_received_id);
g_array_append_val (ids, bad_id);
MYASSERT (
@@ -981,7 +664,8 @@ main (int argc,
g_array_unref (ids);
/* The test "Acknowledging one message", will fail if the
- * last_received_id was acknowledged despite the error */
+ * last_message_received_id was acknowledged despite the
+ * error */
}
g_print ("\n\n==== Getting properties again ====\n");
@@ -994,7 +678,7 @@ main (int argc,
guint i;
tp_cli_dbus_properties_run_get_all (chan, -1,
- TP_IFACE_CHANNEL_INTERFACE_MESSAGES, &properties, &error, NULL);
+ TP_IFACE_CHANNEL_TYPE_TEXT, &properties, &error, NULL);
g_assert_no_error (error);
g_print ("\n\n==== Examining properties ====\n\n");
@@ -1021,7 +705,7 @@ main (int argc,
!= NULL, "");
MYASSERT (G_VALUE_HOLDS_BOXED (value), "");
messages = g_value_get_boxed (value);
- MYASSERT (messages->len == 7, ": %u", messages->len);
+ MYASSERT (messages->len == 4, ": %u", messages->len);
for (i = 0; i < messages->len; i++)
{
@@ -1051,8 +735,8 @@ main (int argc,
*/
GArray *msgid = g_array_sized_new (FALSE, FALSE, sizeof (guint), 2);
- g_array_append_val (msgid, last_received_id);
- g_array_append_val (msgid, last_received_id);
+ g_array_append_val (msgid, last_message_received_id);
+ g_array_append_val (msgid, last_message_received_id);
tp_cli_channel_type_text_run_acknowledge_pending_messages (chan, -1,
msgid, &error, NULL);
@@ -1061,35 +745,28 @@ main (int argc,
g_array_unref (msgid);
}
- g_print ("\n\n==== Acknowledging all remaining messages using deprecated "
- "API ====\n");
-
- {
- GPtrArray *messages;
-
- tp_cli_channel_type_text_run_list_pending_messages (chan, -1,
- TRUE, &messages, &error, NULL);
- g_assert_no_error (error);
-
- g_print ("Freeing\n");
- g_boxed_free (TP_ARRAY_TYPE_PENDING_TEXT_MESSAGE_LIST, messages);
- }
-
g_print ("\n\n==== Closing channel ====\n");
{
+ GValue *value = NULL;
GPtrArray *channels;
- MYASSERT (tp_cli_channel_run_close (chan, -1, &error, NULL), "");
+ MYASSERT (tp_cli_channel_interface_destroyable_run_destroy (chan,
+ -1, &error, NULL), "");
g_assert_no_error (error);
MYASSERT (tp_proxy_get_invalidated (chan) != NULL, "");
/* assert that the channel has really gone */
- MYASSERT (tp_cli_connection_run_list_channels (conn, -1,
- &channels, &error, NULL), "");
+ MYASSERT (tp_cli_dbus_properties_run_get (conn, -1,
+ TP_IFACE_CONNECTION_INTERFACE_REQUESTS, "Channels",
+ &value, &error, NULL), "");
g_assert_no_error (error);
+
+ channels = g_value_get_boxed (value);
MYASSERT (channels->len == 0, "%u != 0", channels->len);
- g_boxed_free (TP_ARRAY_TYPE_CHANNEL_INFO_LIST, channels);
+
+ g_value_unset (value);
+ g_free (value);
}
g_print ("\n\n==== End of tests ====\n");
@@ -1104,8 +781,6 @@ main (int argc,
g_free (conn_path);
g_free (chan_path);
- g_free (last_sent_text);
- g_free (last_received_text);
g_free (last_message_sent_token);
g_free (last_message_sent_sender_id);
diff --git a/tests/dbus/params-cm.c b/tests/dbus/params-cm.c
index 9a4a6bb75..d8be8ebd0 100644
--- a/tests/dbus/params-cm.c
+++ b/tests/dbus/params-cm.c
@@ -21,6 +21,8 @@
#include "config.h"
#include <telepathy-glib/channel.h>
+#include <telepathy-glib/cli-connection.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/connection-manager.h>
#include <telepathy-glib/debug.h>
@@ -28,6 +30,8 @@
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/util.h>
+#include "telepathy-glib/reentrants.h"
+
#include "tests/lib/util.h"
#include "tests/lib/params-cm.h"
@@ -326,20 +330,6 @@ test_unwelcome (Test *test,
g_hash_table_unref (parameters);
}
-static void
-test_get_parameters_bad_proto (Test *test,
- gconstpointer data G_GNUC_UNUSED)
-{
- GPtrArray *out = NULL;
-
- tp_cli_connection_manager_run_get_parameters (test->cm, -1,
- "not-example", &out, &test->error, NULL);
- g_assert (out == NULL);
- g_assert (test->error != NULL);
- g_assert_cmpint (test->error->code, ==, TP_ERROR_NOT_IMPLEMENTED);
- g_clear_error (&test->error);
-}
-
int
main (int argc,
char **argv)
@@ -359,8 +349,6 @@ main (int argc,
teardown);
g_test_add ("/params-cm/unwelcome", Test, NULL, setup, test_unwelcome,
teardown);
- g_test_add ("/params-cm/get-parameters-bad-proto", Test, NULL, setup,
- test_get_parameters_bad_proto, teardown);
return g_test_run ();
}
diff --git a/tests/dbus/properties.c b/tests/dbus/properties.c
index a458c7c3a..eb94bf2ea 100644
--- a/tests/dbus/properties.c
+++ b/tests/dbus/properties.c
@@ -5,6 +5,7 @@
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/dbus-properties-mixin.h>
#include <telepathy-glib/debug.h>
@@ -12,6 +13,8 @@
#include <telepathy-glib/svc-generic.h>
#include <telepathy-glib/util.h>
+#include "telepathy-glib/reentrants.h"
+
#include "_gen/svc.h"
#include "tests/lib/util.h"
diff --git a/tests/dbus/protocol-objects.c b/tests/dbus/protocol-objects.c
index 1645751d5..053803b08 100644
--- a/tests/dbus/protocol-objects.c
+++ b/tests/dbus/protocol-objects.c
@@ -11,6 +11,9 @@
#include <telepathy-glib/protocol.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
+
+#include "telepathy-glib/reentrants.h"
#include "tests/lib/echo-cm.h"
diff --git a/tests/dbus/proxy-preparation.c b/tests/dbus/proxy-preparation.c
index 7d7638fd5..8730e82ab 100644
--- a/tests/dbus/proxy-preparation.c
+++ b/tests/dbus/proxy-preparation.c
@@ -9,11 +9,12 @@
#include "config.h"
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/telepathy-glib.h>
#include "tests/lib/util.h"
#include "tests/lib/simple-account.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/my-conn-proxy.h"
typedef struct {
@@ -41,7 +42,7 @@ setup (Test *test,
test->error = NULL;
/* Create (service and client sides) connection objects */
- tp_tests_create_and_connect_conn (TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ tp_tests_create_and_connect_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION,
"me@test.com", &test->base_connection, &test->connection);
test->my_conn = g_object_new (TP_TESTS_TYPE_MY_CONN_PROXY,
@@ -305,7 +306,7 @@ recreate_connection (Test *test)
disconnect_and_destroy_conn (test);
test->base_connection = tp_tests_object_new_static_class (
- TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ TP_TESTS_TYPE_CONTACTS_CONNECTION,
"account", "me@test.com",
"protocol", "simple",
NULL);
diff --git a/tests/dbus/room-list.c b/tests/dbus/room-list.c
index 0b1be2232..3d068f6a9 100644
--- a/tests/dbus/room-list.c
+++ b/tests/dbus/room-list.c
@@ -12,6 +12,7 @@
#include <string.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include "tests/lib/contacts-conn.h"
#include "tests/lib/util.h"
diff --git a/tests/dbus/self-handle.c b/tests/dbus/self-handle.c
index 7d348e733..d43b21526 100644
--- a/tests/dbus/self-handle.c
+++ b/tests/dbus/self-handle.c
@@ -10,6 +10,7 @@
#include "config.h"
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
@@ -42,10 +43,9 @@ setup (Fixture *f,
f->dbus = tp_tests_dbus_daemon_dup_or_die ();
f->service_conn = TP_TESTS_SIMPLE_CONNECTION (
- tp_tests_object_new_static_class (TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ tp_tests_object_new_static_class (TP_TESTS_TYPE_CONTACTS_CONNECTION,
"account", "me@example.com",
"protocol", "simple",
- "break-0192-properties", TRUE,
NULL));
f->service_conn_as_base = TP_BASE_CONNECTION (f->service_conn);
g_object_ref (f->service_conn_as_base);
@@ -70,13 +70,12 @@ static void
setup_and_connect (Fixture *f,
gconstpointer unused G_GNUC_UNUSED)
{
- gboolean ok;
+ GQuark connected_feature[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 };
setup (f, unused);
- ok = tp_connection_run_until_ready (f->client_conn, TRUE, &f->error, NULL);
- g_assert_no_error (f->error);
- g_assert (ok);
+ tp_cli_connection_call_connect (f->client_conn, -1, NULL, NULL, NULL, NULL);
+ tp_tests_proxy_run_until_prepared (f->client_conn, connected_feature);
}
/* we'll get more arguments, but just ignore them */
@@ -92,12 +91,9 @@ static void
test_self_handle (Fixture *f,
gconstpointer unused G_GNUC_UNUSED)
{
- TpHandle handle;
TpContact *before, *after;
- guint handle_times = 0, contact_times = 0;
+ guint contact_times = 0;
- g_signal_connect_swapped (f->client_conn, "notify::self-handle",
- G_CALLBACK (swapped_counter_cb), &handle_times);
g_signal_connect_swapped (f->client_conn, "notify::self-contact",
G_CALLBACK (swapped_counter_cb), &contact_times);
@@ -105,19 +101,13 @@ test_self_handle (Fixture *f,
tp_base_connection_get_self_handle (f->service_conn_as_base)), ==,
"me@example.com");
- g_assert_cmpuint (tp_connection_get_self_handle (f->client_conn), ==,
- tp_base_connection_get_self_handle (f->service_conn_as_base));
-
g_object_get (f->client_conn,
- "self-handle", &handle,
"self-contact", &before,
NULL);
- g_assert_cmpuint (handle, ==,
+ g_assert_cmpuint (tp_contact_get_handle (before), ==,
tp_base_connection_get_self_handle (f->service_conn_as_base));
- g_assert_cmpuint (tp_contact_get_handle (before), ==, handle);
g_assert_cmpstr (tp_contact_get_identifier (before), ==, "me@example.com");
- g_assert_cmpuint (handle_times, ==, 0);
g_assert_cmpuint (contact_times, ==, 0);
/* similar to /nick in IRC */
@@ -125,27 +115,21 @@ test_self_handle (Fixture *f,
"myself@example.org");
tp_tests_proxy_run_until_dbus_queue_processed (f->client_conn);
- while (handle_times < 1 || contact_times < 1)
+ while (contact_times < 1)
g_main_context_iteration (NULL, TRUE);
- g_assert_cmpuint (handle_times, ==, 1);
g_assert_cmpuint (contact_times, ==, 1);
g_assert_cmpstr (tp_handle_inspect (f->contact_repo,
tp_base_connection_get_self_handle (f->service_conn_as_base)), ==,
"myself@example.org");
- g_assert_cmpuint (tp_connection_get_self_handle (f->client_conn), ==,
- tp_base_connection_get_self_handle (f->service_conn_as_base));
-
g_object_get (f->client_conn,
- "self-handle", &handle,
"self-contact", &after,
NULL);
g_assert (before != after);
- g_assert_cmpuint (handle, ==,
+ g_assert_cmpuint (tp_contact_get_handle (after), ==,
tp_base_connection_get_self_handle (f->service_conn_as_base));
- g_assert_cmpuint (tp_contact_get_handle (after), ==, handle);
g_assert_cmpstr (tp_contact_get_identifier (after), ==,
"myself@example.org");
@@ -157,14 +141,11 @@ static void
test_change_early (Fixture *f,
gconstpointer unused G_GNUC_UNUSED)
{
- TpHandle handle;
TpContact *after;
- guint handle_times = 0, contact_times = 0;
+ guint contact_times = 0;
gboolean ok;
GQuark features[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 };
- g_signal_connect_swapped (f->client_conn, "notify::self-handle",
- G_CALLBACK (swapped_counter_cb), &handle_times);
g_signal_connect_swapped (f->client_conn, "notify::self-contact",
G_CALLBACK (swapped_counter_cb), &contact_times);
@@ -199,19 +180,13 @@ test_change_early (Fixture *f,
g_assert (ok);
/* the self-handle and self-contact change once during connection */
- g_assert_cmpuint (handle_times, ==, 1);
g_assert_cmpuint (contact_times, ==, 1);
- g_assert_cmpuint (tp_connection_get_self_handle (f->client_conn), ==,
- tp_base_connection_get_self_handle (f->service_conn_as_base));
-
g_object_get (f->client_conn,
- "self-handle", &handle,
"self-contact", &after,
NULL);
- g_assert_cmpuint (handle, ==,
+ g_assert_cmpuint (tp_contact_get_handle (after), ==,
tp_base_connection_get_self_handle (f->service_conn_as_base));
- g_assert_cmpuint (tp_contact_get_handle (after), ==, handle);
g_assert_cmpstr (tp_contact_get_identifier (after), ==,
"myself@example.org");
@@ -219,111 +194,6 @@ test_change_early (Fixture *f,
}
static void
-test_change_inconveniently (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- TpHandle handle;
- TpContact *after;
- guint handle_times = 0, contact_times = 0, got_self_handle_times = 0;
- gboolean ok;
- GQuark features[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 };
-
- g_signal_connect_swapped (f->client_conn, "notify::self-handle",
- G_CALLBACK (swapped_counter_cb), &handle_times);
- g_signal_connect_swapped (f->client_conn, "notify::self-contact",
- G_CALLBACK (swapped_counter_cb), &contact_times);
- g_signal_connect_swapped (f->service_conn, "got-self-handle",
- G_CALLBACK (swapped_counter_cb), &got_self_handle_times);
-
- tp_proxy_prepare_async (f->client_conn, features, tp_tests_result_ready_cb,
- &f->result);
- g_assert (f->result == NULL);
-
- /* act as though someone else called Connect */
- tp_base_connection_change_status (f->service_conn_as_base,
- TP_CONNECTION_STATUS_CONNECTING,
- TP_CONNECTION_STATUS_REASON_REQUESTED);
- tp_tests_simple_connection_set_identifier (f->service_conn,
- "me@example.com");
- g_assert_cmpstr (tp_handle_inspect (f->contact_repo,
- tp_base_connection_get_self_handle (f->service_conn_as_base)), ==,
- "me@example.com");
- tp_base_connection_change_status (f->service_conn_as_base,
- TP_CONNECTION_STATUS_CONNECTED,
- TP_CONNECTION_STATUS_REASON_REQUESTED);
-
- /* run the main loop until just after GetSelfHandle is processed, to make
- * sure the client first saw the old self handle */
- while (got_self_handle_times == 0)
- g_main_context_iteration (NULL, TRUE);
-
- tp_tests_simple_connection_set_identifier (f->service_conn,
- "myself@example.org");
- g_assert_cmpstr (tp_handle_inspect (f->contact_repo,
- tp_base_connection_get_self_handle (f->service_conn_as_base)), ==,
- "myself@example.org");
-
- /* now run the main loop and let the client catch up */
- tp_tests_run_until_result (&f->result);
- ok = tp_proxy_prepare_finish (f->client_conn, f->result, &f->error);
- g_assert_no_error (f->error);
- g_assert (ok);
-
- /* the self-handle and self-contact change once during connection */
- g_assert_cmpuint (handle_times, ==, 1);
- g_assert_cmpuint (contact_times, ==, 1);
-
- g_assert_cmpuint (tp_connection_get_self_handle (f->client_conn), ==,
- tp_base_connection_get_self_handle (f->service_conn_as_base));
-
- g_object_get (f->client_conn,
- "self-handle", &handle,
- "self-contact", &after,
- NULL);
- g_assert_cmpuint (handle, ==,
- tp_base_connection_get_self_handle (f->service_conn_as_base));
- g_assert_cmpuint (tp_contact_get_handle (after), ==, handle);
- g_assert_cmpstr (tp_contact_get_identifier (after), ==,
- "myself@example.org");
-
- g_object_unref (after);
-}
-
-static void
-test_self_handle_fails (Fixture *f,
- gconstpointer unused G_GNUC_UNUSED)
-{
- GQuark features[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 };
- gboolean ok;
-
- tp_proxy_prepare_async (f->client_conn, features, tp_tests_result_ready_cb,
- &f->result);
- g_assert (f->result == NULL);
-
- tp_tests_simple_connection_set_identifier (f->service_conn,
- "me@example.com");
- tp_tests_simple_connection_set_get_self_handle_error (f->service_conn,
- TP_ERROR, TP_ERROR_CONFUSED, "totally wasted");
- tp_base_connection_change_status (f->service_conn_as_base,
- TP_CONNECTION_STATUS_CONNECTED,
- TP_CONNECTION_STATUS_REASON_REQUESTED);
-
- /* now run the main loop and let the client catch up */
- tp_tests_run_until_result (&f->result);
- ok = tp_proxy_prepare_finish (f->client_conn, f->result, &f->error);
- g_assert_error (f->error, TP_ERROR, TP_ERROR_CONFUSED);
- g_assert (!ok);
- g_clear_error (&f->error);
-
- g_assert_error (tp_proxy_get_invalidated (f->client_conn), TP_ERROR,
- TP_ERROR_CONFUSED);
-
- /* don't want to Disconnect during teardown - it'll just fail */
- tp_tests_simple_connection_inject_disconnect (f->service_conn);
- tp_clear_object (&f->client_conn);
-}
-
-static void
teardown (Fixture *f,
gconstpointer unused G_GNUC_UNUSED)
{
@@ -353,10 +223,6 @@ main (int argc,
test_self_handle, teardown);
g_test_add ("/self-handle/change-early", Fixture, NULL, setup,
test_change_early, teardown);
- g_test_add ("/self-handle/change-inconveniently", Fixture, NULL, setup,
- test_change_inconveniently, teardown);
- g_test_add ("/self-handle/fails", Fixture, NULL, setup,
- test_self_handle_fails, teardown);
return g_test_run ();
}
diff --git a/tests/dbus/self-presence.c b/tests/dbus/self-presence.c
index c9ed4730a..f8b0e220b 100644
--- a/tests/dbus/self-presence.c
+++ b/tests/dbus/self-presence.c
@@ -10,20 +10,23 @@
#include "config.h"
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/reentrants.h>
+
#include "tests/lib/contacts-conn.h"
#include "tests/lib/debug.h"
#include "tests/lib/myassert.h"
#include "tests/lib/util.h"
static void
-test_simple_presence (TpTestsContactsConnection *service_conn,
- TpConnection *client_conn)
+test_presence (TpTestsContactsConnection *service_conn,
+ TpConnection *client_conn)
{
GError *error = NULL;
GValue *value = NULL;
@@ -31,13 +34,13 @@ test_simple_presence (TpTestsContactsConnection *service_conn,
GValueArray *spec;
MYASSERT (tp_cli_dbus_properties_run_get (client_conn, -1,
- TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE, "Statuses",
+ TP_IFACE_CONNECTION_INTERFACE_PRESENCE, "Statuses",
&value, &error, NULL), "");
g_assert_no_error (error);
- MYASSERT (G_VALUE_TYPE (value) == TP_HASH_TYPE_SIMPLE_STATUS_SPEC_MAP,
+ MYASSERT (G_VALUE_TYPE (value) == TP_HASH_TYPE_STATUS_SPEC_MAP,
": %s != %s", G_VALUE_TYPE_NAME (value),
- g_type_name (TP_HASH_TYPE_SIMPLE_STATUS_SPEC_MAP));
+ g_type_name (TP_HASH_TYPE_STATUS_SPEC_MAP));
statuses = g_value_get_boxed (value);
@@ -83,21 +86,21 @@ test_simple_presence (TpTestsContactsConnection *service_conn,
g_value_unset (value);
g_free (value);
- MYASSERT (!tp_cli_connection_interface_simple_presence_run_set_presence (
+ MYASSERT (!tp_cli_connection_interface_presence_run_set_presence (
client_conn, -1, "offline", "", &error, NULL), "");
g_assert_cmpstr (g_quark_to_string (error->domain), ==,
g_quark_to_string (TP_ERROR));
g_error_free (error);
error = NULL;
- MYASSERT (tp_cli_connection_interface_simple_presence_run_set_presence (
+ MYASSERT (tp_cli_connection_interface_presence_run_set_presence (
client_conn, -1, "available", "Here I am", &error, NULL), "");
g_assert_no_error (error);
value = NULL;
MYASSERT (tp_cli_dbus_properties_run_get (client_conn, -1,
- TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
+ TP_IFACE_CONNECTION_INTERFACE_PRESENCE,
"MaximumStatusMessageLength",
&value, &error, NULL), "");
g_assert_no_error (error);
@@ -112,113 +115,6 @@ test_simple_presence (TpTestsContactsConnection *service_conn,
g_free (value);
}
-static void
-test_complex_presence (TpTestsContactsConnection *service_conn,
- TpConnection *client_conn)
-{
- GHashTable *statuses = NULL;
- GValueArray *spec;
- GHashTable *params;
- GError *error = NULL;
- GHashTable *monster;
-
- MYASSERT (tp_cli_connection_interface_presence_run_get_statuses (
- client_conn, -1, &statuses, &error, NULL), "");
- g_assert_no_error (error);
-
- spec = g_hash_table_lookup (statuses, "available");
- MYASSERT (spec != NULL, "");
- g_assert_cmpuint (g_value_get_uint (spec->values + 0), ==,
- TP_CONNECTION_PRESENCE_TYPE_AVAILABLE);
- MYASSERT (g_value_get_boolean (spec->values + 1), ""); /* can set on self */
- MYASSERT (g_value_get_boolean (spec->values + 2), ""); /* exclusive */
- params = g_value_get_boxed (spec->values + 3);
- MYASSERT (params != NULL, "");
- g_assert_cmpuint (g_hash_table_size (params), ==, 1);
- g_assert_cmpstr (
- (const gchar *) g_hash_table_lookup (params, "message"), ==, "s");
-
- spec = g_hash_table_lookup (statuses, "away");
- MYASSERT (spec != NULL, "");
- g_assert_cmpuint (g_value_get_uint (spec->values + 0), ==,
- TP_CONNECTION_PRESENCE_TYPE_AWAY);
- MYASSERT (g_value_get_boolean (spec->values + 1), ""); /* can set on self */
- MYASSERT (g_value_get_boolean (spec->values + 2), ""); /* exclusive */
- params = g_value_get_boxed (spec->values + 3);
- MYASSERT (params != NULL, "");
- g_assert_cmpuint (g_hash_table_size (params), ==, 1);
- g_assert_cmpstr (
- (const gchar *) g_hash_table_lookup (params, "message"), ==, "s");
-
- spec = g_hash_table_lookup (statuses, "busy");
- MYASSERT (spec != NULL, "");
- g_assert_cmpuint (g_value_get_uint (spec->values + 0), ==,
- TP_CONNECTION_PRESENCE_TYPE_BUSY);
- MYASSERT (g_value_get_boolean (spec->values + 1), ""); /* can set on self */
- MYASSERT (g_value_get_boolean (spec->values + 2), ""); /* exclusive */
- params = g_value_get_boxed (spec->values + 3);
- MYASSERT (params != NULL, "");
- g_assert_cmpuint (g_hash_table_size (params), ==, 1);
- g_assert_cmpstr (
- (const gchar *) g_hash_table_lookup (params, "message"), ==, "s");
-
- spec = g_hash_table_lookup (statuses, "offline");
- MYASSERT (spec != NULL, "");
- g_assert_cmpuint (g_value_get_uint (spec->values + 0), ==,
- TP_CONNECTION_PRESENCE_TYPE_OFFLINE);
- MYASSERT (!g_value_get_boolean (spec->values + 1), ""); /* can set on self */
- MYASSERT (g_value_get_boolean (spec->values + 2), ""); /* exclusive */
- params = g_value_get_boxed (spec->values + 3);
- MYASSERT (params != NULL, "");
- g_assert_cmpuint (g_hash_table_size (params), ==, 0);
-
- spec = g_hash_table_lookup (statuses, "error");
- MYASSERT (spec != NULL, "");
- g_assert_cmpuint (g_value_get_uint (spec->values + 0), ==,
- TP_CONNECTION_PRESENCE_TYPE_ERROR);
- MYASSERT (!g_value_get_boolean (spec->values + 1), ""); /* can set on self */
- MYASSERT (g_value_get_boolean (spec->values + 2), ""); /* exclusive */
- params = g_value_get_boxed (spec->values + 3);
- MYASSERT (params != NULL, "");
- g_assert_cmpuint (g_hash_table_size (params), ==, 0);
-
- spec = g_hash_table_lookup (statuses, "unknown");
- MYASSERT (spec != NULL, "");
- g_assert_cmpuint (g_value_get_uint (spec->values + 0), ==,
- TP_CONNECTION_PRESENCE_TYPE_UNKNOWN);
- MYASSERT (!g_value_get_boolean (spec->values + 1), ""); /* can set on self */
- MYASSERT (g_value_get_boolean (spec->values + 2), ""); /* exclusive */
- params = g_value_get_boxed (spec->values + 3);
- MYASSERT (params != NULL, "");
- g_assert_cmpuint (g_hash_table_size (params), ==, 0);
-
- monster = g_hash_table_new (g_str_hash, g_str_equal);
- params = g_hash_table_new (g_str_hash, g_str_equal);
-
- g_hash_table_insert (monster, "offline", params);
-
- MYASSERT (!tp_cli_connection_interface_presence_run_set_status (
- client_conn, -1, monster, &error, NULL), "");
- g_assert_cmpstr (g_quark_to_string (error->domain), ==,
- g_quark_to_string (TP_ERROR));
- g_error_free (error);
- error = NULL;
-
- g_hash_table_remove (monster, "offline");
- g_hash_table_insert (monster, "available", params);
-
- MYASSERT (tp_cli_connection_interface_presence_run_set_status (
- client_conn, -1, monster, &error, NULL), "");
- g_assert_no_error (error);
-
- g_hash_table_unref (params);
- params = NULL;
- g_hash_table_unref (monster);
- monster = NULL;
- g_hash_table_unref (statuses);
- statuses = NULL;
-}
-
int
main (int argc,
char **argv)
@@ -232,6 +128,8 @@ main (int argc,
TpConnection *client_conn;
guint status;
gchar **interfaces;
+ GValue *value = NULL;
+ GQuark connected_feature[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 };
/* Setup */
@@ -259,9 +157,10 @@ main (int argc,
g_assert_no_error (error);
/* Assert that GetInterfaces succeeds before we're CONNECTED */
- MYASSERT (tp_cli_connection_run_get_interfaces (client_conn, -1, &interfaces,
- &error, NULL), "");
+ MYASSERT (tp_cli_dbus_properties_run_get (client_conn, -1,
+ TP_IFACE_CONNECTION, "Interfaces", &value, &error, NULL), "");
g_assert_no_error (error);
+ interfaces = g_value_get_boxed (value);
MYASSERT (tp_strv_contains ((const gchar * const *) interfaces,
TP_IFACE_CONNECTION_INTERFACE_ALIASING), "");
MYASSERT (tp_strv_contains ((const gchar * const *) interfaces,
@@ -271,22 +170,24 @@ main (int argc,
MYASSERT (tp_strv_contains ((const gchar * const *) interfaces,
TP_IFACE_CONNECTION_INTERFACE_PRESENCE), "");
MYASSERT (tp_strv_contains ((const gchar * const *) interfaces,
- TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE), "");
- g_strfreev (interfaces);
+ TP_IFACE_CONNECTION_INTERFACE_PRESENCE), "");
+ g_value_unset (value);
+ tp_clear_pointer (&value, g_free);
- MYASSERT (tp_cli_connection_run_get_status (client_conn, -1, &status,
- &error, NULL), "");
- g_assert_cmpuint (status, ==, (guint) TP_CONNECTION_STATUS_DISCONNECTED);
+ MYASSERT (tp_cli_dbus_properties_run_get (client_conn, -1,
+ TP_IFACE_CONNECTION, "Status", &value, &error, NULL), "");
g_assert_no_error (error);
+ status = g_value_get_uint (value);
+ g_assert_cmpuint (status, ==, (guint) TP_CONNECTION_STATUS_DISCONNECTED);
+ g_value_unset (value);
+ g_free (value);
- MYASSERT (tp_connection_run_until_ready (client_conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
+ tp_cli_connection_call_connect (client_conn, -1, NULL, NULL, NULL, NULL);
+ tp_tests_proxy_run_until_prepared (client_conn, connected_feature);
/* Tests */
- test_simple_presence (service_conn, client_conn);
- test_complex_presence (service_conn, client_conn);
+ test_presence (service_conn, client_conn);
/* Teardown */
diff --git a/tests/dbus/simple-approver.c b/tests/dbus/simple-approver.c
index 62d50f565..bd75b558f 100644
--- a/tests/dbus/simple-approver.c
+++ b/tests/dbus/simple-approver.c
@@ -10,15 +10,18 @@
#include "config.h"
#include <telepathy-glib/simple-approver.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/client.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/defs.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/proxy-subclass.h>
#include "tests/lib/util.h"
#include "tests/lib/simple-account.h"
#include "tests/lib/simple-channel-dispatch-operation.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/textchan-null.h"
typedef struct {
@@ -74,13 +77,14 @@ setup (Test *test,
g_assert (test->account_manager != NULL);
/* Create client-side Account object */
- test->account = tp_account_manager_ensure_account (test->account_manager,
- ACCOUNT_PATH);
+ test->account = tp_client_factory_ensure_account (
+ tp_proxy_get_factory (test->account_manager), ACCOUNT_PATH, NULL,
+ &test->error);
+ g_assert_no_error (test->error);
g_assert (test->account != NULL);
- g_object_ref (test->account);
/* Create (service and client sides) connection objects */
- tp_tests_create_and_connect_conn (TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ tp_tests_create_and_connect_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION,
"me@test.com", &test->base_connection, &test->connection);
/* Create service-side text channel object */
@@ -96,7 +100,7 @@ setup (Test *test,
test->text_chan_service = TP_TESTS_TEXT_CHANNEL_NULL (
tp_tests_object_new_static_class (
- TP_TESTS_TYPE_TEXT_CHANNEL_NULL,
+ TP_TESTS_TYPE_PROPS_TEXT_CHANNEL,
"connection", test->base_connection,
"object-path", chan_path,
"handle", handle,
diff --git a/tests/dbus/simple-handler.c b/tests/dbus/simple-handler.c
index 69a69baf5..43e269e6a 100644
--- a/tests/dbus/simple-handler.c
+++ b/tests/dbus/simple-handler.c
@@ -10,14 +10,18 @@
#include "config.h"
#include <telepathy-glib/simple-handler.h>
+#include <telepathy-glib/cli-channel.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/client.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/defs.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/proxy-subclass.h>
#include "tests/lib/util.h"
#include "tests/lib/simple-account.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/textchan-null.h"
typedef struct {
@@ -71,7 +75,7 @@ setup (Test *test,
g_assert (test->account != NULL);
/* Create (service and client sides) connection objects */
- tp_tests_create_and_connect_conn (TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ tp_tests_create_and_connect_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION,
"me@test.com", &test->base_connection, &test->connection);
/* Create service-side text channel object */
@@ -87,7 +91,7 @@ setup (Test *test,
test->text_chan_service = TP_TESTS_TEXT_CHANNEL_NULL (
tp_tests_object_new_static_class (
- TP_TESTS_TYPE_TEXT_CHANNEL_NULL,
+ TP_TESTS_TYPE_PROPS_TEXT_CHANNEL,
"connection", test->base_connection,
"object-path", chan_path,
"handle", handle,
diff --git a/tests/dbus/simple-observer.c b/tests/dbus/simple-observer.c
index 522667603..294fda25b 100644
--- a/tests/dbus/simple-observer.c
+++ b/tests/dbus/simple-observer.c
@@ -10,14 +10,17 @@
#include "config.h"
#include <telepathy-glib/simple-observer.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/client.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/defs.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/proxy-subclass.h>
#include "tests/lib/util.h"
#include "tests/lib/simple-account.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/textchan-null.h"
typedef struct {
@@ -71,7 +74,7 @@ setup (Test *test,
g_assert (test->account != NULL);
/* Create (service and client sides) connection objects */
- tp_tests_create_and_connect_conn (TP_TESTS_TYPE_SIMPLE_CONNECTION, "me@test.com",
+ tp_tests_create_and_connect_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION, "me@test.com",
&test->base_connection, &test->connection);
/* Create service-side text channel object */
@@ -87,7 +90,7 @@ setup (Test *test,
test->text_chan_service = TP_TESTS_TEXT_CHANNEL_NULL (
tp_tests_object_new_static_class (
- TP_TESTS_TYPE_TEXT_CHANNEL_NULL,
+ TP_TESTS_TYPE_PROPS_TEXT_CHANNEL,
"connection", test->base_connection,
"object-path", chan_path,
"handle", handle,
diff --git a/tests/dbus/stream-tube.c b/tests/dbus/stream-tube.c
index f5b46b915..a24954c72 100644
--- a/tests/dbus/stream-tube.c
+++ b/tests/dbus/stream-tube.c
@@ -17,7 +17,7 @@
#include <telepathy-glib/dbus.h>
#include "tests/lib/util.h"
-#include "tests/lib/simple-conn.h"
+#include "tests/lib/contacts-conn.h"
#include "tests/lib/stream-tube-chan.h"
#ifdef HAVE_GIO_UNIX
@@ -88,7 +88,7 @@ setup (Test *test,
test->error = NULL;
/* Create (service and client sides) connection objects */
- tp_tests_create_and_connect_conn (TP_TESTS_TYPE_SIMPLE_CONNECTION,
+ tp_tests_create_and_connect_conn (TP_TESTS_TYPE_CONTACTS_CONNECTION,
"me@test.com", &test->base_connection, &test->connection);
}
diff --git a/tests/dbus/telepathy/managers/test_manager_file.manager b/tests/dbus/telepathy/managers/test_manager_file.manager
index 426ad4a7e..9ffc0e5b4 100644
--- a/tests/dbus/telepathy/managers/test_manager_file.manager
+++ b/tests/dbus/telepathy/managers/test_manager_file.manager
@@ -11,8 +11,8 @@ param-server-list = as
default-account = foo@default
default-port = 1234
default-server-list = foo;bar;
-Interfaces=org.freedesktop.Telepathy.Protocol.Interface.Avatars;
-ConnectionInterfaces=org.freedesktop.Telepathy.Connection.Interface.Requests;org.freedesktop.Telepathy.Connection.Interface.Contacts;
+Interfaces=im.telepathy1.Protocol.Interface.Avatars1;
+ConnectionInterfaces=im.telepathy1.Connection.Interface.Requests;im.telepathy1.Connection.Interface.Contacts;
RequestableChannelClasses=1-1-text;
VCardField=x-telepathy-tests
EnglishName=Regression tests
@@ -27,9 +27,9 @@ MaximumAvatarWidth=96
MaximumAvatarBytes=37748736
[1-1-text]
-org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Text
-org.freedesktop.Telepathy.Channel.TargetHandleType u=1
-allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;
+im.telepathy1.Channel.ChannelType s=im.telepathy1.Channel.Type.Text
+im.telepathy1.Channel.TargetHandleType u=1
+allowed=im.telepathy1.Channel.TargetHandle;im.telepathy1.Channel.TargetID;
[Protocol bar]
param-account = s required
diff --git a/tests/dbus/text-channel.c b/tests/dbus/text-channel.c
index dd4253ca1..91a65a4ca 100644
--- a/tests/dbus/text-channel.c
+++ b/tests/dbus/text-channel.c
@@ -11,8 +11,10 @@
#include <string.h>
+#include <telepathy-glib/cli-channel.h>
#include <telepathy-glib/telepathy-glib.h>
#include <telepathy-glib/message-mixin.h>
+#include <telepathy-glib/svc-channel.h>
#include "examples/cm/echo-message-parts/chan.h"
@@ -271,14 +273,9 @@ send_message_cb (GObject *source,
static void
on_received (TpChannel *chan,
- guint id,
- guint timestamp,
- guint sender,
- guint type,
- guint flags,
- const gchar *text,
+ const GPtrArray *message,
gpointer user_data,
- GObject *object)
+ GObject *weak_object)
{
Test *test = user_data;
@@ -298,8 +295,8 @@ test_pending_messages (Test *test,
TpContact *sender;
/* connect on the Received sig to check if the message has been received */
- tp_cli_channel_type_text_connect_to_received (TP_CHANNEL (test->channel),
- on_received, test, NULL, NULL, NULL);
+ tp_cli_channel_type_text_connect_to_message_received (
+ TP_CHANNEL (test->channel), on_received, test, NULL, NULL, NULL);
/* Send a first message */
msg = tp_client_message_new_text (TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
@@ -349,7 +346,7 @@ test_pending_messages (Test *test,
msg = messages->data;
g_assert (TP_IS_SIGNALLED_MESSAGE (msg));
- text = tp_message_to_text (msg, NULL);
+ text = tp_message_to_text (msg);
g_assert_cmpstr (text, ==, "Badger");
g_free (text);
sender = tp_signalled_message_get_sender (msg);
@@ -360,7 +357,7 @@ test_pending_messages (Test *test,
msg = messages->next->data;
g_assert (TP_IS_SIGNALLED_MESSAGE (msg));
- text = tp_message_to_text (msg, NULL);
+ text = tp_message_to_text (msg);
g_assert_cmpstr (text, ==, "Snake");
g_free (text);
sender = tp_signalled_message_get_sender (msg);
@@ -414,7 +411,7 @@ test_message_received (Test *test,
g_main_loop_run (test->mainloop);
g_assert_no_error (test->error);
- text = tp_message_to_text (test->received_msg, NULL);
+ text = tp_message_to_text (test->received_msg);
g_assert_cmpstr (text, ==, "Snake");
g_free (text);
@@ -614,7 +611,7 @@ test_message_sent (Test *test,
g_assert_no_error (test->error);
g_assert (TP_IS_SIGNALLED_MESSAGE (test->sent_msg));
- text = tp_message_to_text (test->sent_msg, NULL);
+ text = tp_message_to_text (test->sent_msg);
g_assert_cmpstr (text, ==, "Badger");
g_free (text);
@@ -829,7 +826,7 @@ test_pending_messages_with_no_sender_id (Test *test,
g_assert (sender != NULL);
g_assert_cmpstr (tp_contact_get_identifier (sender), ==, "bob");
- text = tp_message_to_text ((TpMessage *) signalled_message, NULL);
+ text = tp_message_to_text ((TpMessage *) signalled_message);
g_assert_cmpstr (text, ==, "hi mum");
g_free (text);
@@ -841,7 +838,7 @@ test_sender_prepared (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
GQuark features[] = { TP_TEXT_CHANNEL_FEATURE_INCOMING_MESSAGES, 0 };
- TpSimpleClientFactory *factory;
+ TpClientFactory *factory;
TpHandle admin;
TpContact *sender;
TpMessage *msg;
@@ -867,9 +864,9 @@ test_sender_prepared (Test *test,
/* Now ask to prepare ALIAS, on next msg it will be prepared */
factory = tp_proxy_get_factory (test->connection);
- tp_simple_client_factory_add_contact_features_varargs (factory,
+ tp_client_factory_add_contact_features_varargs (factory,
TP_CONTACT_FEATURE_ALIAS,
- TP_CONTACT_FEATURE_INVALID);
+ 0);
msg = tp_cm_message_new_text (test->base_connection, admin,
TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
@@ -911,7 +908,7 @@ test_sent_with_no_sender (Test *test,
g_signal_connect (test->channel, "message-sent",
G_CALLBACK (message_sent_cb), test);
- tp_svc_channel_interface_messages_emit_message_sent (test->chan_service,
+ tp_svc_channel_type_text_emit_message_sent (test->chan_service,
parts, 0, "this-is-a-token");
g_main_loop_run (test->mainloop);
@@ -956,7 +953,7 @@ test_receive_muc_delivery (Test *test,
tp_asv_set_string (header, "delivery-token", "delivery_token");
tp_asv_set_uint32 (header, "delivery-status", TP_DELIVERY_STATUS_DELIVERED);
- tp_svc_channel_interface_messages_emit_message_received (test->chan_service,
+ tp_svc_channel_type_text_emit_message_received (test->chan_service,
parts);
test->wait = 1;
@@ -1000,7 +997,6 @@ test_chat_state (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
GQuark features[] = {
- TP_CHANNEL_FEATURE_CONTACTS,
TP_TEXT_CHANNEL_FEATURE_CHAT_STATES,
0 };
TpContact *contact;
@@ -1021,13 +1017,13 @@ test_chat_state (Test *test,
tp_text_channel_set_chat_state_async (test->channel, -1,
set_chat_state_cb, test);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
g_clear_error (&test->error);
tp_text_channel_set_chat_state_async (test->channel,
TP_CHANNEL_CHAT_STATE_GONE, set_chat_state_cb, test);
g_main_loop_run (test->mainloop);
- g_assert_error (test->error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT);
+ g_assert_error (test->error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT);
g_clear_error (&test->error);
/* Now set a valid chat state and verify self contact has that state */
diff --git a/tests/dbus/text-mixin.c b/tests/dbus/text-mixin.c
deleted file mode 100644
index b4f494e10..000000000
--- a/tests/dbus/text-mixin.c
+++ /dev/null
@@ -1,325 +0,0 @@
-/* Basic test for the text mixin and the echo example CM.
- *
- * Copyright (C) 2007-2008 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright (C) 2007-2008 Nokia Corporation
- *
- * Copying and distribution of this file, with or without modification,
- * are permitted in any medium without royalty provided the copyright
- * notice and this notice are preserved.
- */
-
-#include "config.h"
-
-#include <telepathy-glib/channel.h>
-#include <telepathy-glib/connection.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/debug.h>
-#include <telepathy-glib/gtypes.h>
-#include <telepathy-glib/interfaces.h>
-
-#include "tests/lib/echo-chan.h"
-#include "tests/lib/echo-conn.h"
-#include "tests/lib/myassert.h"
-#include "tests/lib/util.h"
-
-static guint received_count = 0;
-static guint last_received_id = 0;
-static guint last_received_sender = 0;
-static guint last_received_type = 0;
-static guint last_received_flags = 0;
-static gchar *last_received_text = NULL;
-
-static guint sent_count = 0;
-static guint last_sent_type = 0;
-static gchar *last_sent_text = NULL;
-
-static void
-on_sent (TpChannel *chan,
- guint timestamp,
- guint type,
- const gchar *text,
- gpointer data,
- GObject *object)
-{
- g_message ("%p: Sent: time %u, type %u, text '%s'",
- chan, timestamp, type, text);
-
- sent_count++;
- last_sent_type = type;
- g_free (last_sent_text);
- last_sent_text = g_strdup (text);
-}
-
-static void
-on_received (TpChannel *chan,
- guint id,
- guint timestamp,
- guint sender,
- guint type,
- guint flags,
- const gchar *text,
- gpointer data,
- GObject *object)
-{
- TpHandleRepoIface *contact_repo = data;
-
- g_message ("%p: Received #%u: time %u, sender %u '%s', type %u, flags %u, "
- "text '%s'", chan, id, timestamp, sender,
- tp_handle_inspect (contact_repo, sender), type, flags, text);
-
- received_count++;
- last_received_id = id;
- last_received_sender = sender;
- last_received_type = type;
- last_received_flags = flags;
- g_free (last_received_text);
- last_received_text = g_strdup (text);
-}
-
-int
-main (int argc,
- char **argv)
-{
- TpTestsEchoConnection *service_conn;
- TpBaseConnection *service_conn_as_base;
- TpHandleRepoIface *contact_repo;
- TpTestsEchoChannel *service_chan;
- TpDBusDaemon *dbus;
- TpConnection *conn;
- TpChannel *chan;
- GError *error = NULL;
- gchar *name;
- gchar *conn_path;
- gchar *chan_path;
- TpHandle handle;
-
- tp_tests_abort_after (10);
- g_type_init ();
- /* tp_debug_set_flags ("all"); */
- dbus = tp_tests_dbus_daemon_dup_or_die ();
-
- service_conn = TP_TESTS_ECHO_CONNECTION (tp_tests_object_new_static_class (
- TP_TESTS_TYPE_ECHO_CONNECTION,
- "account", "me@example.com",
- "protocol", "example",
- NULL));
- service_conn_as_base = TP_BASE_CONNECTION (service_conn);
- MYASSERT (service_conn != NULL, "");
- MYASSERT (service_conn_as_base != NULL, "");
-
- MYASSERT (tp_base_connection_register (service_conn_as_base, "example",
- &name, &conn_path, &error), "");
- g_assert_no_error (error);
-
- conn = tp_connection_new (dbus, name, conn_path, &error);
- MYASSERT (conn != NULL, "");
- g_assert_no_error (error);
-
- MYASSERT (tp_connection_run_until_ready (conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
-
- contact_repo = tp_base_connection_get_handles (service_conn_as_base,
- TP_HANDLE_TYPE_CONTACT);
- MYASSERT (contact_repo != NULL, "");
-
- handle = tp_handle_ensure (contact_repo, "them@example.org", NULL, &error);
- g_assert_no_error (error);
-
- /* FIXME: exercise RequestChannel rather than just pasting on a channel */
-
- chan_path = g_strdup_printf ("%s/Channel", conn_path);
-
- service_chan = TP_TESTS_ECHO_CHANNEL (tp_tests_object_new_static_class (
- TP_TESTS_TYPE_ECHO_CHANNEL,
- "connection", service_conn,
- "object-path", chan_path,
- "handle", handle,
- NULL));
-
- chan = tp_channel_new (conn, chan_path, TP_IFACE_CHANNEL_TYPE_TEXT,
- TP_HANDLE_TYPE_CONTACT, handle, &error);
- g_assert_no_error (error);
-
- tp_channel_run_until_ready (chan, &error, NULL);
- g_assert_no_error (error);
-
- MYASSERT (tp_cli_channel_type_text_connect_to_received (chan, on_received,
- g_object_ref (contact_repo), g_object_unref, NULL, NULL) != NULL, "");
- MYASSERT (tp_cli_channel_type_text_connect_to_sent (chan, on_sent,
- NULL, NULL, NULL, NULL) != NULL, "");
-
- sent_count = 0;
- received_count = 0;
- tp_cli_channel_type_text_run_send (chan, -1,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL, "Hello, world!",
- &error, NULL);
- g_assert_no_error (error);
-
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
- MYASSERT (sent_count == 1, ": %u != 1", sent_count);
- MYASSERT (received_count == 1, ": %u != 1", received_count);
- MYASSERT (last_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- ": %u != NORMAL", last_sent_type);
- MYASSERT (!tp_strdiff (last_sent_text, "Hello, world!"),
- "'%s' != '%s'", last_sent_text, "Hello, world!");
- MYASSERT (last_received_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- ": %u != NORMAL", last_received_type);
- MYASSERT (last_received_flags == 0, ": %u != 0", last_received_flags);
- MYASSERT (last_received_sender == handle,
- ": %u != %u", last_received_sender, handle);
- MYASSERT (!tp_strdiff (last_received_text, "You said: Hello, world!"),
- "'%s'", last_received_text);
-
- sent_count = 0;
- received_count = 0;
- tp_cli_channel_type_text_run_send (chan, -1,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION, "drinks coffee",
- &error, NULL);
- g_assert_no_error (error);
-
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
- MYASSERT (sent_count == 1, ": %u != 1", sent_count);
- MYASSERT (received_count == 1, ": %u != 1", received_count);
- MYASSERT (last_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
- ": %u != ACTION", last_sent_type);
- MYASSERT (!tp_strdiff (last_sent_text, "drinks coffee"),
- ": '%s' != '%s'", last_sent_text, "drinks coffee");
- MYASSERT (last_received_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
- ": %u != ACTION", last_received_type);
- MYASSERT (last_received_flags == 0, ": %u != 0", last_received_flags);
- MYASSERT (last_received_sender == handle,
- ": %u != %u", last_received_sender, handle);
- MYASSERT (!tp_strdiff (last_received_text,
- "notices that the user drinks coffee"),
- ": '%s'", last_received_text);
-
- sent_count = 0;
- received_count = 0;
- tp_cli_channel_type_text_run_send (chan, -1,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE, "Printer on fire",
- &error, NULL);
- g_assert_no_error (error);
-
- tp_tests_proxy_run_until_dbus_queue_processed (conn);
- MYASSERT (sent_count == 1, ": %u != 1", sent_count);
- MYASSERT (received_count == 1, ": %u != 1", received_count);
- MYASSERT (last_sent_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE,
- ": %u != NOTICE", last_sent_type);
- MYASSERT (!tp_strdiff (last_sent_text, "Printer on fire"),
- ": '%s' != '%s'", last_sent_text, "Printer on fire");
- MYASSERT (last_received_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE,
- ": %u != NOTICE", last_received_type);
- MYASSERT (last_received_flags == 0, ": %u != 0", last_received_flags);
- MYASSERT (last_received_sender == handle,
- ": %u != %u", last_received_sender, handle);
- MYASSERT (!tp_strdiff (last_received_text,
- "You sent a notice: Printer on fire"),
- ": '%s'", last_received_text);
-
- g_print ("\n\n==== Listing messages ====\n");
-
- {
- GPtrArray *messages;
-
- tp_cli_channel_type_text_run_list_pending_messages (chan, -1,
- FALSE, &messages, &error, NULL);
- g_assert_no_error (error);
-
- g_print ("Freeing\n");
- g_boxed_free (TP_ARRAY_TYPE_PENDING_TEXT_MESSAGE_LIST, messages);
- }
-
- g_print ("\n\n==== Acknowledging messages using a wrong ID ====\n");
-
- {
- GArray *ids = g_array_sized_new (FALSE, FALSE, sizeof (guint), 2);
- /* we assume this ID won't be valid (implementation detail: message
- * IDs are increasing integers) */
- guint bad_id = 31337;
-
- g_array_append_val (ids, last_received_id);
- g_array_append_val (ids, bad_id);
-
- MYASSERT (
- !tp_cli_channel_type_text_run_acknowledge_pending_messages (chan, -1,
- ids, &error, NULL),
- "");
- MYASSERT (error != NULL, "");
- MYASSERT (error->domain == TP_ERROR, "%s",
- g_quark_to_string (error->domain));
- MYASSERT (error->code == TP_ERROR_INVALID_ARGUMENT, "%u", error->code);
- g_error_free (error);
- error = NULL;
-
- g_array_unref (ids);
-
- /* The next test, "Acknowledging one message", will fail if the
- * last_received_id was acknowledged despite the error */
- }
-
- g_print ("\n\n==== Acknowledging one message ====\n");
-
- {
- GArray *ids = g_array_sized_new (FALSE, FALSE, sizeof (guint), 1);
-
- g_array_append_val (ids, last_received_id);
-
- tp_cli_channel_type_text_run_acknowledge_pending_messages (chan, -1,
- ids, &error, NULL);
- g_assert_no_error (error);
-
- g_array_unref (ids);
- }
-
- g_print ("\n\n==== Acknowledging all remaining messages using deprecated "
- "API ====\n");
-
- {
- GPtrArray *messages;
-
- tp_cli_channel_type_text_run_list_pending_messages (chan, -1,
- TRUE, &messages, &error, NULL);
- g_assert_no_error (error);
-
- g_print ("Freeing\n");
- g_boxed_free (TP_ARRAY_TYPE_PENDING_TEXT_MESSAGE_LIST, messages);
- }
-
- g_print ("\n\n==== Closing channel ====\n");
-
- {
- gboolean dead;
-
- MYASSERT (tp_cli_channel_run_close (chan, -1, &error, NULL), "");
- g_assert_no_error (error);
- MYASSERT (tp_proxy_get_invalidated (chan) != NULL, "");
-
- g_object_get (service_chan,
- "channel-destroyed", &dead,
- NULL);
-
- MYASSERT (dead, "");
- }
-
- g_print ("\n\n==== End of tests ====\n");
-
- tp_tests_connection_assert_disconnect_succeeds (conn);
-
- tp_handle_unref (contact_repo, handle);
- g_object_unref (chan);
- g_object_unref (conn);
- g_object_unref (service_chan);
-
- service_conn_as_base = NULL;
- g_object_unref (service_conn);
- g_object_unref (dbus);
- g_free (name);
- g_free (conn_path);
- g_free (chan_path);
-
- g_free (last_sent_text);
- g_free (last_received_text);
-
- return 0;
-}
diff --git a/tests/dbus/text-respawn.c b/tests/dbus/text-respawn.c
index 1cc8113bc..2faf1bde5 100644
--- a/tests/dbus/text-respawn.c
+++ b/tests/dbus/text-respawn.c
@@ -11,12 +11,15 @@
#include "config.h"
#include <telepathy-glib/channel.h>
+#include <telepathy-glib/cli-channel.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/reentrants.h>
+
#include "tests/lib/echo-chan.h"
#include "tests/lib/echo-conn.h"
#include "tests/lib/myassert.h"
@@ -24,10 +27,10 @@
static guint received_count = 0;
static guint last_received_id = 0;
-static guint last_received_time = 0;
+static gint64 last_received_time = 0;
static guint last_received_sender = 0;
static guint last_received_type = 0;
-static guint last_received_flags = 0;
+static gboolean last_received_rescued = FALSE;
static gchar *last_received_text = NULL;
static guint sent_count = 0;
@@ -36,13 +39,25 @@ static gchar *last_sent_text = NULL;
static void
on_sent (TpChannel *chan,
- guint timestamp,
- guint type,
- const gchar *text,
- gpointer data,
- GObject *object)
+ const GPtrArray *message,
+ guint flags,
+ const gchar *message_token,
+ gpointer user_data,
+ GObject *weak_object)
{
- g_message ("%p: Sent: time %u, type %u, text '%s'",
+ GHashTable *header, *body;
+ gint64 timestamp;
+ guint type;
+ const gchar *text;
+
+ header = g_ptr_array_index (message, 0);
+ timestamp = tp_asv_get_int64 (header, "message-sent", NULL);
+ type = tp_asv_get_uint32 (header, "message-type", NULL);
+
+ body = g_ptr_array_index (message, 1);
+ text = tp_asv_get_string (body, "content");
+
+ g_message ("%p: Sent: time %" G_GINT64_FORMAT ", type %u, text '%s'",
chan, timestamp, type, text);
sent_count++;
@@ -53,31 +68,67 @@ on_sent (TpChannel *chan,
static void
on_received (TpChannel *chan,
- guint id,
- guint timestamp,
- guint sender,
- guint type,
- guint flags,
- const gchar *text,
- gpointer data,
- GObject *object)
+ const GPtrArray *message,
+ gpointer user_data,
+ GObject *weak_object)
{
- TpHandleRepoIface *contact_repo = data;
-
- g_message ("%p: Received #%u: time %u, sender %u '%s', type %u, flags %u, "
+ TpHandleRepoIface *contact_repo = user_data;
+
+ GHashTable *header, *body;
+ guint id;
+ gint64 timestamp;
+ TpHandle sender;
+ guint type;
+ gboolean rescued;
+ const gchar *text;
+
+ header = g_ptr_array_index (message, 0);
+ id = tp_asv_get_uint32 (header, "message-pending-id", NULL);
+ timestamp = tp_asv_get_int64 (header, "message-sent", NULL);
+ sender = tp_asv_get_uint32 (header, "message-sender", NULL);
+ type = tp_asv_get_uint32 (header, "message-type", NULL);
+ rescued = tp_asv_get_boolean (header, "rescued", NULL);
+
+ body = g_ptr_array_index (message, 1);
+ text = tp_asv_get_string (body, "content");
+
+ g_message ("%p: Received #%u: time %" G_GINT64_FORMAT ", sender %u '%s', type %u, rescued %s, "
"text '%s'", chan, id, timestamp, sender,
- tp_handle_inspect (contact_repo, sender), type, flags, text);
+ tp_handle_inspect (contact_repo, sender), type,
+ rescued ? "yes" : "no", text);
received_count++;
last_received_id = id;
last_received_time = timestamp;
last_received_sender = sender;
last_received_type = type;
- last_received_flags = flags;
+ last_received_rescued = rescued;
g_free (last_received_text);
last_received_text = g_strdup (text);
}
+static GPtrArray *
+build_message (TpChannelTextMessageType type,
+ const gchar *content)
+{
+ GPtrArray *out;
+ GHashTable *header, *body;
+
+ header = tp_asv_new (
+ "message-type", G_TYPE_UINT, type,
+ NULL);
+
+ body = tp_asv_new (
+ "content", G_TYPE_STRING, content,
+ NULL);
+
+ out = g_ptr_array_new_full (2, (GDestroyNotify) g_hash_table_unref);
+ g_ptr_array_add (out, header);
+ g_ptr_array_add (out, body);
+
+ return out;
+}
+
int
main (int argc,
char **argv)
@@ -86,40 +137,20 @@ main (int argc,
TpBaseConnection *service_conn_as_base;
TpHandleRepoIface *contact_repo;
TpTestsEchoChannel *service_chan;
- TpDBusDaemon *dbus;
TpConnection *conn;
TpChannel *chan;
GError *error = NULL;
- gchar *name;
- gchar *conn_path;
gchar *chan_path;
TpHandle handle;
+ GPtrArray *message;
tp_tests_abort_after (10);
g_type_init ();
/* tp_debug_set_flags ("all"); */
- dbus = tp_tests_dbus_daemon_dup_or_die ();
- service_conn = TP_TESTS_ECHO_CONNECTION (tp_tests_object_new_static_class (
- TP_TESTS_TYPE_ECHO_CONNECTION,
- "account", "me@example.com",
- "protocol", "example",
- NULL));
- service_conn_as_base = TP_BASE_CONNECTION (service_conn);
- MYASSERT (service_conn != NULL, "");
- MYASSERT (service_conn_as_base != NULL, "");
-
- MYASSERT (tp_base_connection_register (service_conn_as_base, "example",
- &name, &conn_path, &error), "");
- g_assert_no_error (error);
-
- conn = tp_connection_new (dbus, name, conn_path, &error);
- MYASSERT (conn != NULL, "");
- g_assert_no_error (error);
-
- MYASSERT (tp_connection_run_until_ready (conn, TRUE, &error, NULL),
- "");
- g_assert_no_error (error);
+ tp_tests_create_conn (TP_TESTS_TYPE_ECHO_CONNECTION, "me@example.com",
+ TRUE, &service_conn_as_base, &conn);
+ service_conn = TP_TESTS_ECHO_CONNECTION (service_conn_as_base);
contact_repo = tp_base_connection_get_handles (service_conn_as_base,
TP_HANDLE_TYPE_CONTACT);
@@ -130,7 +161,8 @@ main (int argc,
/* FIXME: exercise RequestChannel rather than just pasting on a channel */
- chan_path = g_strdup_printf ("%s/Channel", conn_path);
+ chan_path = g_strdup_printf ("%s/Channel",
+ tp_proxy_get_object_path (conn));
service_chan = TP_TESTS_ECHO_CHANNEL (tp_tests_object_new_static_class (
TP_TESTS_TYPE_ECHO_CHANNEL,
@@ -143,19 +175,20 @@ main (int argc,
TP_HANDLE_TYPE_CONTACT, handle, &error);
g_assert_no_error (error);
- tp_channel_run_until_ready (chan, &error, NULL);
- g_assert_no_error (error);
+ tp_tests_proxy_run_until_prepared (chan, NULL);
- MYASSERT (tp_cli_channel_type_text_connect_to_received (chan, on_received,
+ MYASSERT (tp_cli_channel_type_text_connect_to_message_received (chan, on_received,
g_object_ref (contact_repo), g_object_unref, NULL, NULL) != NULL, "");
- MYASSERT (tp_cli_channel_type_text_connect_to_sent (chan, on_sent,
+ MYASSERT (tp_cli_channel_type_text_connect_to_message_sent (chan, on_sent,
NULL, NULL, NULL, NULL) != NULL, "");
sent_count = 0;
received_count = 0;
- tp_cli_channel_type_text_run_send (chan, -1,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL, "Hello, world!",
- &error, NULL);
+ message = build_message (TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
+ "Hello, world!");
+ tp_cli_channel_type_text_run_send_message (chan, -1,
+ message, 0, NULL, &error, NULL);
+ g_ptr_array_unref (message);
g_assert_no_error (error);
tp_tests_proxy_run_until_dbus_queue_processed (conn);
@@ -167,7 +200,8 @@ main (int argc,
"'%s' != '%s'", last_sent_text, "Hello, world!");
MYASSERT (last_received_type == TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
": %u != NORMAL", last_received_type);
- MYASSERT (last_received_flags == 0, ": %u != 0", last_received_flags);
+ MYASSERT (last_received_rescued == FALSE, ": %s != FALSE",
+ last_received_rescued ? "TRUE" : "FALSE");
MYASSERT (last_received_sender == handle,
": %u != %u", last_received_sender, handle);
MYASSERT (!tp_strdiff (last_received_text, "You said: Hello, world!"),
@@ -200,36 +234,45 @@ main (int argc,
TP_HANDLE_TYPE_CONTACT, handle, &error);
g_assert_no_error (error);
- tp_channel_run_until_ready (chan, &error, NULL);
- g_assert_no_error (error);
+ tp_tests_proxy_run_until_prepared (chan, NULL);
g_print ("\n\n==== Listing messages ====\n");
{
- GPtrArray *messages;
- GValueArray *structure;
-
- tp_cli_channel_type_text_run_list_pending_messages (chan, -1,
- FALSE, &messages, &error, NULL);
+ GValue *value;
+ GPtrArray *messages, *parts;
+ GHashTable *header;
+ GHashTable *body;
+
+ tp_cli_dbus_properties_run_get (chan, -1,
+ TP_IFACE_CHANNEL_TYPE_TEXT, "PendingMessages", &value,
+ &error, NULL);
g_assert_no_error (error);
+ messages = g_value_get_boxed (value);
g_assert_cmpuint (messages->len, ==, 1);
- structure = g_ptr_array_index (messages, 0);
- g_assert_cmpuint (g_value_get_uint (structure->values + 0), ==,
+
+ parts = g_ptr_array_index (messages, 0);
+ g_assert_cmpuint (parts->len, ==, 2);
+
+ header = g_ptr_array_index (parts, 0);
+ body = g_ptr_array_index (parts, 1);
+
+ g_assert_cmpuint (tp_asv_get_uint32 (header, "pending-message-id", NULL), ==,
last_received_id);
- g_assert_cmpuint (g_value_get_uint (structure->values + 1), ==,
+ g_assert_cmpuint (tp_asv_get_int64 (header, "message-sent", NULL), ==,
last_received_time);
- g_assert_cmpuint (g_value_get_uint (structure->values + 2), ==,
+ g_assert_cmpuint (tp_asv_get_uint32 (header, "message-sender", NULL), ==,
handle);
- g_assert_cmpuint (g_value_get_uint (structure->values + 3), ==,
+ g_assert_cmpuint (tp_asv_get_uint32 (header, "message-type", NULL), ==,
TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL);
- g_assert_cmpuint (g_value_get_uint (structure->values + 4), ==,
- TP_CHANNEL_TEXT_MESSAGE_FLAG_RESCUED);
- g_assert_cmpstr (g_value_get_string (structure->values + 5), ==,
+ g_assert_cmpuint (tp_asv_get_boolean (header, "rescued", NULL), ==,
+ TRUE);
+ g_assert_cmpstr (tp_asv_get_string (body, "content"), ==,
"You said: Hello, world!");
- g_print ("Freeing\n");
- g_boxed_free (TP_ARRAY_TYPE_PENDING_TEXT_MESSAGE_LIST, messages);
+ g_value_unset (value);
+ g_free (value);
}
g_print ("\n\n==== Destroying channel ====\n");
@@ -260,9 +303,6 @@ main (int argc,
service_conn_as_base = NULL;
g_object_unref (service_conn);
- g_object_unref (dbus);
- g_free (name);
- g_free (conn_path);
g_free (chan_path);
g_free (last_sent_text);
diff --git a/tests/dbus/unsupported-interface.c b/tests/dbus/unsupported-interface.c
index e459e6206..954ea3893 100644
--- a/tests/dbus/unsupported-interface.c
+++ b/tests/dbus/unsupported-interface.c
@@ -10,12 +10,15 @@
#include "config.h"
+#include <telepathy-glib/cli-connection.h>
#include <telepathy-glib/connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/debug.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/util.h>
+#include "telepathy-glib/reentrants.h"
+
#include "tests/lib/contacts-conn.h"
#include "tests/lib/util.h"
@@ -142,8 +145,7 @@ inbox_url_cb (TpConnection *conn,
Fixture *f = user_data;
g_assert_no_error (f->error);
- /* Unsupported interfaces are signalled by a re-entrant callback in 0.x */
- g_assert (f->reentrant);
+ g_assert (!f->reentrant);
g_assert (!f->freed);
if (error != NULL)
@@ -164,14 +166,14 @@ test_unsupported_async (Fixture *f,
f->conn, -1, inbox_url_cb, f, pretend_to_free, NULL);
f->reentrant = FALSE;
- /* Unsupported interfaces are signalled by a re-entrant callback in 0.x */
- g_assert (call == NULL);
- g_assert (f->freed);
+ g_assert (call != NULL);
+ g_assert (!f->freed);
while (f->wait)
g_main_context_iteration (NULL, TRUE);
g_assert_error (f->error, TP_DBUS_ERRORS, TP_DBUS_ERROR_NO_INTERFACE);
+ g_assert (f->freed);
}
static void
diff --git a/tests/enums.c b/tests/enums.c
index 17ec4b46c..6c147dfb8 100644
--- a/tests/enums.c
+++ b/tests/enums.c
@@ -18,24 +18,6 @@
#include "tests/lib/util.h"
static void
-test_tp_contact_feature (void)
-{
- GEnumClass *klass;
-
- g_type_init ();
-
- klass = g_type_class_ref (TP_TYPE_CONTACT_FEATURE);
-
- g_assert (klass != NULL);
- g_assert (G_IS_ENUM_CLASS (klass));
-
- g_assert_cmpint (klass->n_values, ==, TP_NUM_CONTACT_FEATURES);
-
- g_type_class_unref (klass);
-}
-
-
-static void
test_tp_dbus_error (void)
{
GEnumClass *klass;
@@ -57,7 +39,6 @@ main (int argc,
{
g_test_init (&argc, &argv, NULL);
- g_test_add_func ("/enums/tp-contact-feature", test_tp_contact_feature);
g_test_add_func ("/enums/tp-dbus-error", test_tp_dbus_error);
return g_test_run ();
diff --git a/tests/intset.c b/tests/intset.c
index f92af36a0..3af65712b 100644
--- a/tests/intset.c
+++ b/tests/intset.c
@@ -5,29 +5,6 @@
#include <telepathy-glib/util.h>
static void
-iterate_in_order (TpIntset *set)
-{
- TpIntsetIter iter;
- guint n = 0;
- gint64 prev = (guint) -1;
-
- tp_intset_iter_init (&iter, set);
-
- while (tp_intset_iter_next (&iter))
- {
- g_assert (tp_intset_is_member (set, iter.element));
-
- if (prev != (guint) -1)
- g_assert_cmpuint (iter.element, >, prev);
-
- prev = iter.element;
- n++;
- }
-
- g_assert_cmpuint (n, ==, tp_intset_size (set));
-}
-
-static void
iterate_fast (TpIntset *set)
{
TpIntsetFastIter iter;
@@ -49,7 +26,6 @@ static void
test_iteration (TpIntset *set)
{
iterate_fast (set);
- iterate_in_order (set);
}
int main (int argc, char **argv)
diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am
index 445089670..75b8c005a 100644
--- a/tests/lib/Makefile.am
+++ b/tests/lib/Makefile.am
@@ -1,10 +1,11 @@
# It's necessary to distinguish between modules that link to
-# libtelepathy-glib.la (normally a shared library, containing a copy of
-# libtelepathy-glib-internal.la) and libtelepathy-glib-internal.la (a static
-# convenience library). Under -Bsymbolic, you can't safely link both.
+# libtelepathy-glib-1.la (normally a shared library, containing a copy of
+# libtelepathy-glib-main-internal.la) and libtelepathy-glib-main-internal.la
+# itself (a static convenience library). Under -Bsymbolic, you can't safely
+# link both.
#
-# You can either link to libtp-glib-tests.la and libtelepathy-glib.la,
-# or to libtp-glib-tests-internal.la and libtelepathy-glib-internal.la.
+# You can either link to libtp-glib-tests.la and libtelepathy-glib-1.la,
+# or to libtp-glib-tests-internal.la and libtelepathy-glib-main-internal.la.
# Do not mix the versions.
#
# See https://bugs.freedesktop.org/show_bug.cgi?id=39183
@@ -16,8 +17,6 @@ noinst_LTLIBRARIES = \
libtp_glib_tests_la_SOURCES = \
bug-19101-conn.c \
bug-19101-conn.h \
- bug16307-conn.c \
- bug16307-conn.h \
broken-client-types-conn.c \
broken-client-types-conn.h \
contacts-conn.c \
@@ -33,8 +32,6 @@ libtp_glib_tests_la_SOURCES = \
echo-cm.c \
echo-conn.h \
echo-conn.c \
- echo-channel-manager-conn.h \
- echo-channel-manager-conn.c \
echo-im-manager.h \
echo-im-manager.c \
file-transfer-chan.h \
@@ -98,9 +95,15 @@ AM_LDFLAGS = \
libtp_glib_tests_internal_la_LIBADD = \
$(DBUS_LIBS) \
$(GLIB_LIBS) \
- $(top_builddir)/telepathy-glib/libtelepathy-glib-internal.la
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-main-internal.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
+ $(NULL)
libtp_glib_tests_la_LIBADD = \
$(DBUS_LIBS) \
$(GLIB_LIBS) \
- $(top_builddir)/telepathy-glib/libtelepathy-glib.la
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-dbus.la \
+ $(top_builddir)/telepathy-glib/libtelepathy-glib-1-core.la \
+ $(NULL)
diff --git a/tests/lib/broken-client-types-conn.c b/tests/lib/broken-client-types-conn.c
index c73898c32..6859fe1ec 100644
--- a/tests/lib/broken-client-types-conn.c
+++ b/tests/lib/broken-client-types-conn.c
@@ -14,6 +14,7 @@
#include "broken-client-types-conn.h"
#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/svc-connection.h>
G_DEFINE_TYPE_WITH_CODE (TpTestsBrokenClientTypesConnection,
tp_tests_broken_client_types_connection,
@@ -39,7 +40,7 @@ broken_fill_client_types (
for (i = 0; i < contacts->len; i++)
{
TpHandle handle = g_array_index (contacts, guint, i);
- /* Muahaha. Actually we add SimplePresence information. */
+ /* Muahaha. Actually we add Presence information. */
GValueArray *presence = tp_value_array_build (3,
G_TYPE_UINT, TP_CONNECTION_PRESENCE_TYPE_AVAILABLE,
G_TYPE_STRING, "available",
@@ -48,7 +49,7 @@ broken_fill_client_types (
tp_contacts_mixin_set_contact_attribute (attributes,
handle,
- TP_TOKEN_CONNECTION_INTERFACE_SIMPLE_PRESENCE_PRESENCE,
+ TP_TOKEN_CONNECTION_INTERFACE_PRESENCE_PRESENCE,
tp_g_value_slice_new_take_boxed (G_TYPE_VALUE_ARRAY, presence));
}
}
diff --git a/tests/lib/bug-19101-conn.c b/tests/lib/bug-19101-conn.c
index e13b39745..aae34468e 100644
--- a/tests/lib/bug-19101-conn.c
+++ b/tests/lib/bug-19101-conn.c
@@ -14,6 +14,7 @@
#include "bug-19101-conn.h"
#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/svc-connection.h>
#include "debug.h"
@@ -43,7 +44,6 @@ tp_tests_bug19101_connection_get_contact_attributes (
TpSvcConnectionInterfaceContacts *iface,
const GArray *handles,
const char **interfaces,
- gboolean hold,
DBusGMethodInvocation *context)
{
TpBaseConnection *base_conn = TP_BASE_CONNECTION (iface);
@@ -61,7 +61,7 @@ tp_tests_bug19101_connection_get_contact_attributes (
/* strictly speaking this should hold the handles on behalf of the
* sending process, but handles are immortal now anyway... */
result = tp_contacts_mixin_get_contact_attributes ((GObject *) iface,
- handles, interfaces, assumed_interfaces, NULL);
+ handles, interfaces, assumed_interfaces);
goto finally;
}
diff --git a/tests/lib/bug16307-conn.c b/tests/lib/bug16307-conn.c
deleted file mode 100644
index 3320bd389..000000000
--- a/tests/lib/bug16307-conn.c
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * bug16307-conn.c - connection that reproduces the #15307 bug
- *
- * Copyright (C) 2007-2008 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright (C) 2007-2008 Nokia Corporation
- *
- * Copying and distribution of this file, with or without modification,
- * are permitted in any medium without royalty provided the copyright
- * notice and this notice are preserved.
- */
-
-#include "config.h"
-
-#include "bug16307-conn.h"
-
-#include <dbus/dbus-glib.h>
-
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/errors.h>
-#include <telepathy-glib/gtypes.h>
-#include <telepathy-glib/handle-repo-dynamic.h>
-#include <telepathy-glib/util.h>
-
-static void service_iface_init (gpointer, gpointer);
-
-G_DEFINE_TYPE_WITH_CODE (TpTestsBug16307Connection,
- tp_tests_bug16307_connection,
- TP_TESTS_TYPE_SIMPLE_CONNECTION,
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION,
- service_iface_init);
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_ALIASING,
- NULL);
- );
-
-/* type definition stuff */
-
-enum
-{
- SIGNAL_GET_STATUS_RECEIVED,
- N_SIGNALS
-};
-
-static guint signals[N_SIGNALS] = {0};
-
-struct _TpTestsBug16307ConnectionPrivate
-{
- /* In a real connection manager, the underlying implementation start
- * connecting, then go to state CONNECTED when finished. Here there isn't
- * actually a connection, so the connection process is fake and the time
- * when it connects is, for this test purpose, when the D-Bus method GetStatus
- * is called.
- *
- * Also, the GetStatus D-Bus reply is delayed until
- * tp_tests_bug16307_connection_inject_get_status_return() is called
- */
- DBusGMethodInvocation *get_status_invocation;
-};
-
-static void
-tp_tests_bug16307_connection_init (TpTestsBug16307Connection *self)
-{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
- TP_TESTS_TYPE_BUG16307_CONNECTION, TpTestsBug16307ConnectionPrivate);
-}
-
-static void
-finalize (GObject *object)
-{
- G_OBJECT_CLASS (tp_tests_bug16307_connection_parent_class)->finalize (object);
-}
-
-static gboolean
-pretend_connected (gpointer data)
-{
- TpTestsBug16307Connection *self = TP_TESTS_BUG16307_CONNECTION (data);
- TpBaseConnection *conn = (TpBaseConnection *) self;
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (conn,
- TP_HANDLE_TYPE_CONTACT);
- gchar *account;
-
- g_object_get (self, "account", &account, NULL);
-
- conn->self_handle = tp_handle_ensure (contact_repo, account,
- NULL, NULL);
-
- g_free (account);
-
- tp_base_connection_change_status (conn, TP_CONNECTION_STATUS_CONNECTED,
- TP_CONNECTION_STATUS_REASON_REQUESTED);
-
- return FALSE;
-}
-
-void
-tp_tests_bug16307_connection_inject_get_status_return (TpTestsBug16307Connection *self)
-{
- TpBaseConnection *self_base = TP_BASE_CONNECTION (self);
- DBusGMethodInvocation *context;
- gulong get_signal_id;
-
- /* if we don't have a pending get_status yet, wait for it */
- if (self->priv->get_status_invocation == NULL)
- {
- GMainLoop *loop = g_main_loop_new (NULL, FALSE);
-
- get_signal_id = g_signal_connect_swapped (self, "get-status-received",
- G_CALLBACK (g_main_loop_quit), loop);
-
- g_main_loop_run (loop);
-
- g_signal_handler_disconnect (self, get_signal_id);
-
- g_main_loop_unref (loop);
- }
-
- context = self->priv->get_status_invocation;
- g_assert (context != NULL);
-
- if (self_base->status == TP_INTERNAL_CONNECTION_STATUS_NEW)
- {
- tp_svc_connection_return_from_get_status (
- context, TP_CONNECTION_STATUS_DISCONNECTED);
- }
- else
- {
- tp_svc_connection_return_from_get_status (
- context, self_base->status);
- }
-
- self->priv->get_status_invocation = NULL;
-}
-
-static gboolean
-start_connecting (TpBaseConnection *conn,
- GError **error)
-{
- tp_base_connection_change_status (conn, TP_CONNECTION_STATUS_CONNECTING,
- TP_CONNECTION_STATUS_REASON_REQUESTED);
-
- return TRUE;
-}
-
-static void
-tp_tests_bug16307_connection_class_init (TpTestsBug16307ConnectionClass *klass)
-{
- TpBaseConnectionClass *base_class =
- (TpBaseConnectionClass *) klass;
- GObjectClass *object_class = (GObjectClass *) klass;
- static const gchar *interfaces_always_present[] = {
- TP_IFACE_CONNECTION_INTERFACE_ALIASING,
- TP_IFACE_CONNECTION_INTERFACE_CAPABILITIES,
- TP_IFACE_CONNECTION_INTERFACE_PRESENCE,
- TP_IFACE_CONNECTION_INTERFACE_AVATARS,
- NULL };
- static TpDBusPropertiesMixinPropImpl connection_properties[] = {
- { "Status", "dbus-status-except-i-broke-it", NULL },
- { NULL }
- };
-
- object_class->finalize = finalize;
- g_type_class_add_private (klass, sizeof (TpTestsBug16307ConnectionPrivate));
-
- base_class->start_connecting = start_connecting;
-
- base_class->interfaces_always_present = interfaces_always_present;
-
- signals[SIGNAL_GET_STATUS_RECEIVED] = g_signal_new ("get-status-received",
- G_OBJECT_CLASS_TYPE (klass),
- G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
- 0,
- NULL, NULL, NULL,
- G_TYPE_NONE, 0);
-
- /* break the Connection D-Bus properties implementation, so that we always
- * cause the slower introspection codepath (the one that actually calls
- * GetStatus) in TpConnection to be invoked */
- tp_dbus_properties_mixin_implement_interface (object_class,
- TP_IFACE_QUARK_CONNECTION,
- NULL, NULL, connection_properties);
-}
-
-/**
- * tp_tests_bug16307_connection_get_status
- *
- * Implements D-Bus method GetStatus
- * on interface org.freedesktop.Telepathy.Connection
- */
-static void
-tp_tests_bug16307_connection_get_status (TpSvcConnection *iface,
- DBusGMethodInvocation *context)
-{
- TpBaseConnection *self_base = TP_BASE_CONNECTION (iface);
- TpTestsBug16307Connection *self = TP_TESTS_BUG16307_CONNECTION (iface);
-
- /* auto-connect on get_status */
- if ((self_base->status == TP_INTERNAL_CONNECTION_STATUS_NEW ||
- self_base->status == TP_CONNECTION_STATUS_DISCONNECTED))
- {
- pretend_connected (self);
- }
-
- /* D-Bus return call later */
- g_assert (self->priv->get_status_invocation == NULL);
- g_assert (context != NULL);
- self->priv->get_status_invocation = context;
-
- g_signal_emit (self, signals[SIGNAL_GET_STATUS_RECEIVED], 0);
-}
-
-
-static void
-service_iface_init (gpointer g_iface, gpointer iface_data)
-{
- TpSvcConnectionClass *klass = g_iface;
-
-#define IMPLEMENT(prefix,x) tp_svc_connection_implement_##x (klass, \
- tp_tests_bug16307_connection_##prefix##x)
- IMPLEMENT(,get_status);
-#undef IMPLEMENT
-}
-
diff --git a/tests/lib/bug16307-conn.h b/tests/lib/bug16307-conn.h
deleted file mode 100644
index 678ba4582..000000000
--- a/tests/lib/bug16307-conn.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * bug16307-conn.h - header for a connection that reproduces the #15307 bug
- *
- * Copyright (C) 2007-2008 Collabora Ltd. <http://www.collabora.co.uk/>
- * Copyright (C) 2007-2008 Nokia Corporation
- *
- * Copying and distribution of this file, with or without modification,
- * are permitted in any medium without royalty provided the copyright
- * notice and this notice are preserved.
- */
-
-#ifndef __TP_TESTS_BUG16307_CONN_H__
-#define __TP_TESTS_BUG16307_CONN_H__
-
-#include <glib-object.h>
-#include <telepathy-glib/base-connection.h>
-
-#include "simple-conn.h"
-
-G_BEGIN_DECLS
-
-typedef struct _TpTestsBug16307Connection TpTestsBug16307Connection;
-typedef struct _TpTestsBug16307ConnectionClass TpTestsBug16307ConnectionClass;
-typedef struct _TpTestsBug16307ConnectionPrivate TpTestsBug16307ConnectionPrivate;
-
-struct _TpTestsBug16307ConnectionClass {
- TpTestsSimpleConnectionClass parent_class;
-};
-
-struct _TpTestsBug16307Connection {
- TpTestsSimpleConnection parent;
-
- TpTestsBug16307ConnectionPrivate *priv;
-};
-
-GType tp_tests_bug16307_connection_get_type (void);
-
-/* TYPE MACROS */
-#define TP_TESTS_TYPE_BUG16307_CONNECTION \
- (tp_tests_bug16307_connection_get_type ())
-#define TP_TESTS_BUG16307_CONNECTION(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TP_TESTS_TYPE_BUG16307_CONNECTION, \
- TpTestsBug16307Connection))
-#define TP_TESTS_BUG16307_CONNECTION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TP_TESTS_TYPE_BUG16307_CONNECTION, \
- TpTestsBug16307ConnectionClass))
-#define TP_TESTS_BUG16307_IS_CONNECTION(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj), TP_TESTS_TYPE_BUG16307_CONNECTION))
-#define TP_TESTS_BUG16307_IS_CONNECTION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE((klass), TP_TESTS_TYPE_BUG16307_CONNECTION))
-#define TP_TESTS_BUG16307_CONNECTION_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TESTS_TYPE_BUG16307_CONNECTION, \
- TpTestsBug16307ConnectionClass))
-
-/* Cause "network events", for debugging/testing */
-
-void tp_tests_bug16307_connection_inject_get_status_return (TpTestsBug16307Connection *self);
-
-G_END_DECLS
-
-#endif /* #ifndef __TP_TESTS_BUG16307_CONN_H__ */
diff --git a/tests/lib/contact-list-manager.c b/tests/lib/contact-list-manager.c
index 6d0128219..f3188abd3 100644
--- a/tests/lib/contact-list-manager.c
+++ b/tests/lib/contact-list-manager.c
@@ -26,8 +26,7 @@ struct _TpTestsContactListManagerPrivate
GHashTable *contact_details;
TpHandleRepoIface *contact_repo;
- TpHandleRepoIface *group_repo;
- TpHandleSet *groups;
+ GHashTable *groups;
};
static void contact_groups_iface_init (TpContactGroupListInterface *iface);
@@ -49,7 +48,7 @@ typedef struct {
TpSubscriptionState subscribe;
TpSubscriptionState publish;
gchar *publish_request;
- TpHandleSet *groups;
+ GHashTable *groups;
TpHandle handle;
TpHandleRepoIface *contact_repo;
@@ -61,7 +60,7 @@ contact_detail_destroy (gpointer p)
ContactDetails *d = p;
g_free (d->publish_request);
- tp_handle_set_destroy (d->groups);
+ g_hash_table_unref (d->groups);
g_slice_free (ContactDetails, d);
}
@@ -86,7 +85,7 @@ ensure_contact (TpTestsContactListManager *self,
d->subscribe = TP_SUBSCRIPTION_STATE_NO;
d->publish = TP_SUBSCRIPTION_STATE_NO;
d->publish_request = NULL;
- d->groups = tp_handle_set_new (self->priv->group_repo);
+ d->groups = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
d->handle = handle;
d->contact_repo = self->priv->contact_repo;
@@ -117,7 +116,7 @@ close_all (TpTestsContactListManager *self)
self->priv->status_changed_id = 0;
}
tp_clear_pointer (&self->priv->contact_details, g_hash_table_unref);
- tp_clear_pointer (&self->priv->groups, tp_handle_set_destroy);
+ tp_clear_pointer (&self->priv->groups, g_hash_table_unref);
}
static void
@@ -197,16 +196,15 @@ contact_list_dup_groups (TpBaseContactList *base)
if (self->priv->groups != NULL)
{
- TpIntsetFastIter iter;
- TpHandle group;
+ GHashTableIter iter;
+ gpointer name;
- ret = g_ptr_array_sized_new (tp_handle_set_size (self->priv->groups) + 1);
+ ret = g_ptr_array_sized_new (g_hash_table_size (self->priv->groups) + 1);
- tp_intset_fast_iter_init (&iter, tp_handle_set_peek (self->priv->groups));
- while (tp_intset_fast_iter_next (&iter, &group))
+ g_hash_table_iter_init (&iter, self->priv->groups);
+ while (g_hash_table_iter_next (&iter, &name, NULL))
{
- g_ptr_array_add (ret, g_strdup (tp_handle_inspect (
- self->priv->group_repo, group)));
+ g_ptr_array_add (ret, g_strdup (name));
}
}
else
@@ -229,16 +227,15 @@ contact_list_dup_contact_groups (TpBaseContactList *base,
if (d != NULL && d->groups != NULL)
{
- TpIntsetFastIter iter;
- TpHandle group;
+ GHashTableIter iter;
+ gpointer name;
- ret = g_ptr_array_sized_new (tp_handle_set_size (d->groups) + 1);
+ ret = g_ptr_array_sized_new (g_hash_table_size (d->groups) + 1);
- tp_intset_fast_iter_init (&iter, tp_handle_set_peek (d->groups));
- while (tp_intset_fast_iter_next (&iter, &group))
+ g_hash_table_iter_init (&iter, d->groups);
+ while (g_hash_table_iter_next (&iter, &name, NULL))
{
- g_ptr_array_add (ret, g_strdup (tp_handle_inspect (
- self->priv->group_repo, group)));
+ g_ptr_array_add (ret, g_strdup (name));
}
}
else
@@ -256,14 +253,13 @@ contact_list_dup_group_members (TpBaseContactList *base,
const gchar *group)
{
TpTestsContactListManager *self = TP_TESTS_CONTACT_LIST_MANAGER (base);
- TpHandleSet *set;
- TpHandle group_handle;
GHashTableIter iter;
gpointer k, v;
+ TpHandleSet *set;
set = tp_handle_set_new (self->priv->contact_repo);
- group_handle = tp_handle_lookup (self->priv->group_repo, group, NULL, NULL);
- if (G_UNLIKELY (group_handle == 0))
+
+ if (G_UNLIKELY (g_hash_table_lookup (self->priv->groups, group) == NULL))
{
/* clearly it doesn't have members */
return set;
@@ -275,13 +271,31 @@ contact_list_dup_group_members (TpBaseContactList *base,
ContactDetails *d = v;
if (d->groups != NULL &&
- tp_handle_set_is_member (d->groups, group_handle))
+ g_hash_table_lookup (d->groups, group) != NULL)
tp_handle_set_add (set, GPOINTER_TO_UINT (k));
}
return set;
}
+static GPtrArray *
+group_difference (GHashTable *left,
+ GHashTable *right)
+{
+ GHashTableIter iter;
+ GPtrArray *set = g_ptr_array_sized_new (g_hash_table_size (left));
+ gpointer name;
+
+ g_hash_table_iter_init (&iter, left);
+ while (g_hash_table_iter_next (&iter, &name, NULL))
+ {
+ if (g_hash_table_lookup (right, name) == NULL)
+ g_ptr_array_add (set, name);
+ }
+
+ return set;
+}
+
static void
contact_list_set_contact_groups_async (TpBaseContactList *base,
TpHandle contact,
@@ -292,25 +306,24 @@ contact_list_set_contact_groups_async (TpBaseContactList *base,
{
TpTestsContactListManager *self = TP_TESTS_CONTACT_LIST_MANAGER (base);
ContactDetails *d;
- TpIntset *set, *added_set, *removed_set;
- GPtrArray *added_names, *removed_names;
+ GHashTable *tmp;
+ GPtrArray *added, *removed;
GPtrArray *new_groups;
- TpIntsetFastIter iter;
- TpHandle group_handle;
guint i;
d = ensure_contact (self, contact);
new_groups = g_ptr_array_new ();
- set = tp_intset_new ();
+ /* make a hash table so we only have one difference function */
+ tmp = g_hash_table_new (g_str_hash, g_str_equal);
for (i = 0; i < n; i++)
{
- group_handle = tp_handle_ensure (self->priv->group_repo, names[i], NULL, NULL);
- tp_intset_add (set, group_handle);
+ g_hash_table_insert (tmp, (gpointer) names[i], GUINT_TO_POINTER (1));
- if (!tp_handle_set_is_member (self->priv->groups, group_handle))
+ if (g_hash_table_lookup (self->priv->groups, names[i]) == NULL)
{
- tp_handle_set_add (self->priv->groups, group_handle);
+ g_hash_table_insert (self->priv->groups, g_strdup (names[i]),
+ GUINT_TO_POINTER (1));
g_ptr_array_add (new_groups, (gchar *) names[i]);
}
}
@@ -321,42 +334,30 @@ contact_list_set_contact_groups_async (TpBaseContactList *base,
(const gchar * const *) new_groups->pdata, new_groups->len);
}
- added_set = tp_intset_difference (set, tp_handle_set_peek (d->groups));
- added_names = g_ptr_array_sized_new (tp_intset_size (added_set));
- tp_intset_fast_iter_init (&iter, added_set);
- while (tp_intset_fast_iter_next (&iter, &group_handle))
- {
- g_ptr_array_add (added_names, (gchar *) tp_handle_inspect (
- self->priv->group_repo, group_handle));
- }
- tp_intset_destroy (added_set);
+ /* see which groups were added and which were removed */
+ added = group_difference (tmp, d->groups);
+ removed = group_difference (d->groups, tmp);
- removed_set = tp_intset_difference (tp_handle_set_peek (d->groups), set);
- removed_names = g_ptr_array_sized_new (tp_intset_size (removed_set));
- tp_intset_fast_iter_init (&iter, removed_set);
- while (tp_intset_fast_iter_next (&iter, &group_handle))
- {
- g_ptr_array_add (removed_names, (gchar *) tp_handle_inspect (
- self->priv->group_repo, group_handle));
- }
- tp_intset_destroy (removed_set);
+ g_hash_table_unref (tmp);
- tp_handle_set_destroy (d->groups);
- d->groups = tp_handle_set_new_from_intset (self->priv->group_repo, set);
- tp_intset_destroy (set);
+ /* update the list of groups the contact thinks it has */
+ g_hash_table_remove_all (d->groups);
+ for (i = 0; i < n; i++)
+ g_hash_table_insert (d->groups, g_strdup (names[i]), GUINT_TO_POINTER (1));
- if (added_names->len > 0 || removed_names->len > 0)
+ /* signal the change */
+ if (added->len > 0 || removed->len > 0)
{
tp_base_contact_list_one_contact_groups_changed (base, contact,
- (const gchar * const *) added_names->pdata, added_names->len,
- (const gchar * const *) removed_names->pdata, removed_names->len);
+ (const gchar * const *) added->pdata, added->len,
+ (const gchar * const *) removed->pdata, removed->len);
}
tp_simple_async_report_success_in_idle ((GObject *) self, callback,
user_data, contact_list_set_contact_groups_async);
- g_ptr_array_unref (added_names);
- g_ptr_array_unref (removed_names);
+ g_ptr_array_unref (added);
+ g_ptr_array_unref (removed);
g_ptr_array_unref (new_groups);
}
@@ -551,9 +552,8 @@ constructed (GObject *object)
self->priv->contact_repo = tp_base_connection_get_handles (self->priv->conn,
TP_HANDLE_TYPE_CONTACT);
- self->priv->group_repo = tp_base_connection_get_handles (self->priv->conn,
- TP_HANDLE_TYPE_GROUP);
- self->priv->groups = tp_handle_set_new (self->priv->group_repo);
+ self->priv->groups = g_hash_table_new_full (g_str_hash, g_str_equal,
+ g_free, NULL);
}
static void
@@ -606,19 +606,17 @@ tp_tests_contact_list_manager_add_to_group (TpTestsContactListManager *self,
{
TpBaseContactList *base = TP_BASE_CONTACT_LIST (self);
ContactDetails *d = ensure_contact (self, member);
- TpHandle group_handle;
- group_handle = tp_handle_ensure (self->priv->group_repo,
- group_name, NULL, NULL);
+ g_hash_table_insert (d->groups, g_strdup (group_name), GUINT_TO_POINTER (1));
- if (!tp_handle_set_is_member (self->priv->groups, group_handle))
+ if (g_hash_table_lookup (self->priv->groups, group_name) == NULL)
{
- tp_handle_set_add (self->priv->groups, group_handle);
+ g_hash_table_insert (self->priv->groups, g_strdup (group_name),
+ GUINT_TO_POINTER (1));
tp_base_contact_list_groups_created ((TpBaseContactList *) self,
&group_name, 1);
}
- tp_handle_set_add (d->groups, group_handle);
tp_base_contact_list_one_contact_groups_changed (base, member,
&group_name, 1, NULL, 0);
}
@@ -629,14 +627,12 @@ tp_tests_contact_list_manager_remove_from_group (TpTestsContactListManager *self
{
TpBaseContactList *base = TP_BASE_CONTACT_LIST (self);
ContactDetails *d = lookup_contact (self, member);
- TpHandle group_handle;
if (d == NULL)
return;
- group_handle = tp_handle_ensure (self->priv->group_repo, group_name, NULL, NULL);
+ g_hash_table_remove (d->groups, group_name);
- tp_handle_set_remove (d->groups, group_handle);
tp_base_contact_list_one_contact_groups_changed (base, member,
NULL, 0, &group_name, 1);
}
diff --git a/tests/lib/contacts-conn.c b/tests/lib/contacts-conn.c
index ea974bf93..f47feefa8 100644
--- a/tests/lib/contacts-conn.c
+++ b/tests/lib/contacts-conn.c
@@ -20,14 +20,13 @@
#include <telepathy-glib/errors.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/handle-repo-dynamic.h>
+#include <telepathy-glib/svc-connection.h>
#include <telepathy-glib/util.h>
#include "debug.h"
static void init_aliasing (gpointer, gpointer);
static void init_avatars (gpointer, gpointer);
-static void init_location (gpointer, gpointer);
-static void init_contact_caps (gpointer, gpointer);
static void init_contact_info (gpointer, gpointer);
static void conn_avatars_properties_getter (GObject *object, GQuark interface,
GQuark name, GValue *value, gpointer getter_data);
@@ -41,13 +40,9 @@ G_DEFINE_TYPE_WITH_CODE (TpTestsContactsConnection,
init_avatars);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_PRESENCE,
tp_presence_mixin_iface_init);
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
- tp_presence_mixin_simple_presence_iface_init)
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_LOCATION,
- init_location)
+ G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_LOCATION, NULL)
G_IMPLEMENT_INTERFACE (
- TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_CAPABILITIES,
- init_contact_caps)
+ TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_CAPABILITIES, NULL)
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACT_INFO,
init_contact_info)
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION_INTERFACE_CONTACTS,
@@ -148,6 +143,20 @@ free_rcc_list (GPtrArray *rccs)
static void
tp_tests_contacts_connection_init (TpTestsContactsConnection *self)
{
+ static const gchar *interfaces_always_present[] = {
+ TP_IFACE_CONNECTION_INTERFACE_ALIASING,
+ TP_IFACE_CONNECTION_INTERFACE_AVATARS,
+ TP_IFACE_CONNECTION_INTERFACE_CONTACTS,
+ TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST,
+ TP_IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS,
+ TP_IFACE_CONNECTION_INTERFACE_PRESENCE,
+ TP_IFACE_CONNECTION_INTERFACE_LOCATION,
+ TP_IFACE_CONNECTION_INTERFACE_CLIENT_TYPES,
+ TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES,
+ TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO,
+ TP_IFACE_CONNECTION_INTERFACE_REQUESTS,
+ NULL };
+
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, TP_TESTS_TYPE_CONTACTS_CONNECTION,
TpTestsContactsConnectionPrivate);
self->priv->aliases = g_hash_table_new_full (g_direct_hash, g_direct_equal,
@@ -164,6 +173,11 @@ tp_tests_contacts_connection_init (TpTestsContactsConnection *self)
g_direct_equal, NULL, (GDestroyNotify) free_rcc_list);
self->priv->contact_info = g_hash_table_new_full (g_direct_hash,
g_direct_equal, NULL, (GDestroyNotify) g_ptr_array_unref);
+
+ /* We cannot set base_class->interfaces_always_present because that would
+ * override interfaces set in TpTestsSimpleConnection */
+ tp_base_connection_add_interfaces ((TpBaseConnection *) self,
+ interfaces_always_present);
}
static void
@@ -402,11 +416,17 @@ constructed (GObject *object)
if (parent_impl != NULL)
parent_impl (object);
+ self->priv->list_manager = g_object_new (TP_TESTS_TYPE_CONTACT_LIST_MANAGER,
+ "connection", self, NULL);
+
tp_contacts_mixin_init (object,
G_STRUCT_OFFSET (TpTestsContactsConnection, contacts_mixin));
tp_base_connection_register_with_contacts_mixin (base);
if (self->priv->list_manager)
- tp_base_contact_list_mixin_register_with_contacts_mixin (base);
+ {
+ tp_base_contact_list_mixin_register_with_contacts_mixin (
+ TP_BASE_CONTACT_LIST (self->priv->list_manager), base);
+ }
tp_contacts_mixin_add_contact_attributes_iface (object,
TP_IFACE_CONNECTION_INTERFACE_ALIASING,
aliasing_fill_contact_attributes);
@@ -428,7 +448,7 @@ constructed (GObject *object)
tp_presence_mixin_init (object,
G_STRUCT_OFFSET (TpTestsContactsConnection, presence_mixin));
- tp_presence_mixin_simple_presence_register_with_contacts_mixin (object);
+ tp_presence_mixin_register_with_contacts_mixin (object);
}
static const TpPresenceStatusOptionalArgumentSpec can_have_message[] = {
@@ -530,15 +550,7 @@ my_get_maximum_status_message_length_cb (GObject *obj)
static GPtrArray *
create_channel_managers (TpBaseConnection *conn)
{
- TpTestsContactsConnection *self = TP_TESTS_CONTACTS_CONNECTION (conn);
- GPtrArray *ret = g_ptr_array_sized_new (1);
-
- self->priv->list_manager = g_object_new (TP_TESTS_TYPE_CONTACT_LIST_MANAGER,
- "connection", conn, NULL);
-
- g_ptr_array_add (ret, self->priv->list_manager);
-
- return ret;
+ return g_ptr_array_new ();
}
static void
@@ -548,20 +560,6 @@ tp_tests_contacts_connection_class_init (TpTestsContactsConnectionClass *klass)
(TpBaseConnectionClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
TpPresenceMixinClass *mixin_class;
- static const gchar *interfaces_always_present[] = {
- TP_IFACE_CONNECTION_INTERFACE_ALIASING,
- TP_IFACE_CONNECTION_INTERFACE_AVATARS,
- TP_IFACE_CONNECTION_INTERFACE_CONTACTS,
- TP_IFACE_CONNECTION_INTERFACE_CONTACT_LIST,
- TP_IFACE_CONNECTION_INTERFACE_CONTACT_GROUPS,
- TP_IFACE_CONNECTION_INTERFACE_PRESENCE,
- TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
- TP_IFACE_CONNECTION_INTERFACE_LOCATION,
- TP_IFACE_CONNECTION_INTERFACE_CLIENT_TYPES,
- TP_IFACE_CONNECTION_INTERFACE_CONTACT_CAPABILITIES,
- TP_IFACE_CONNECTION_INTERFACE_CONTACT_INFO,
- TP_IFACE_CONNECTION_INTERFACE_REQUESTS,
- NULL };
static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
{ TP_IFACE_CONNECTION_INTERFACE_AVATARS,
conn_avatars_properties_getter,
@@ -580,7 +578,6 @@ tp_tests_contacts_connection_class_init (TpTestsContactsConnectionClass *klass)
object_class->finalize = finalize;
g_type_class_add_private (klass, sizeof (TpTestsContactsConnectionPrivate));
- base_class->interfaces_always_present = interfaces_always_present;
base_class->create_channel_managers = create_channel_managers;
tp_contacts_mixin_class_init (object_class,
@@ -594,7 +591,7 @@ tp_tests_contacts_connection_class_init (TpTestsContactsConnectionClass *klass)
mixin_class->get_maximum_status_message_length =
my_get_maximum_status_message_length_cb;
- tp_presence_mixin_simple_presence_init_dbus_properties (object_class);
+ tp_presence_mixin_init_dbus_properties (object_class);
klass->properties_class.interfaces = prop_interfaces;
tp_dbus_properties_mixin_class_init (object_class,
@@ -805,49 +802,6 @@ my_get_alias_flags (TpSvcConnectionInterfaceAliasing *aliasing,
}
static void
-my_get_aliases (TpSvcConnectionInterfaceAliasing *aliasing,
- const GArray *contacts,
- DBusGMethodInvocation *context)
-{
- TpTestsContactsConnection *self = TP_TESTS_CONTACTS_CONNECTION (aliasing);
- TpBaseConnection *base = TP_BASE_CONNECTION (aliasing);
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (base,
- TP_HANDLE_TYPE_CONTACT);
- GHashTable *result;
- GError *error = NULL;
- guint i;
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (base, context);
-
- if (!tp_handles_are_valid (contact_repo, contacts, FALSE, &error))
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- result = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, NULL);
-
- for (i = 0; i < contacts->len; i++)
- {
- TpHandle handle = g_array_index (contacts, TpHandle, i);
- const gchar *alias = g_hash_table_lookup (self->priv->aliases,
- GUINT_TO_POINTER (handle));
-
- if (alias == NULL)
- g_hash_table_insert (result, GUINT_TO_POINTER (handle),
- (gchar *) tp_handle_inspect (contact_repo, handle));
- else
- g_hash_table_insert (result, GUINT_TO_POINTER (handle),
- (gchar *) alias);
- }
-
- tp_svc_connection_interface_aliasing_return_from_get_aliases (context,
- result);
- g_hash_table_unref (result);
-}
-
-static void
my_request_aliases (TpSvcConnectionInterfaceAliasing *aliasing,
const GArray *contacts,
DBusGMethodInvocation *context)
@@ -953,103 +907,11 @@ init_aliasing (gpointer g_iface,
klass, my_##x)
IMPLEMENT(get_alias_flags);
IMPLEMENT(request_aliases);
- IMPLEMENT(get_aliases);
IMPLEMENT(set_aliases);
#undef IMPLEMENT
}
static void
-my_get_avatar_tokens (TpSvcConnectionInterfaceAvatars *avatars,
- const GArray *contacts,
- DBusGMethodInvocation *context)
-{
- TpTestsContactsConnection *self = TP_TESTS_CONTACTS_CONNECTION (avatars);
- TpBaseConnection *base = TP_BASE_CONNECTION (avatars);
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (base,
- TP_HANDLE_TYPE_CONTACT);
- GError *error = NULL;
- GHashTable *result;
- guint i;
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (base, context);
-
- if (!tp_handles_are_valid (contact_repo, contacts, FALSE, &error))
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- result = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, NULL);
-
- for (i = 0; i < contacts->len; i++)
- {
- TpHandle handle = g_array_index (contacts, TpHandle, i);
- AvatarData *a = g_hash_table_lookup (self->priv->avatars,
- GUINT_TO_POINTER (handle));
-
- if (a == NULL || a->token == NULL)
- {
- /* we're expected to do a round-trip to the server to find out
- * their token, so we have to give some sort of result. Assume
- * no avatar, here */
- a = avatar_data_new (NULL, NULL, "");
- g_hash_table_insert (self->priv->avatars,
- GUINT_TO_POINTER (handle), a);
- tp_svc_connection_interface_avatars_emit_avatar_updated (self,
- handle, a->token);
- }
-
- g_hash_table_insert (result, GUINT_TO_POINTER (handle),
- a->token);
- }
-
- tp_svc_connection_interface_avatars_return_from_get_known_avatar_tokens (
- context, result);
- g_hash_table_unref (result);
-}
-
-static void
-my_get_known_avatar_tokens (TpSvcConnectionInterfaceAvatars *avatars,
- const GArray *contacts,
- DBusGMethodInvocation *context)
-{
- TpTestsContactsConnection *self = TP_TESTS_CONTACTS_CONNECTION (avatars);
- TpBaseConnection *base = TP_BASE_CONNECTION (avatars);
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (base,
- TP_HANDLE_TYPE_CONTACT);
- GError *error = NULL;
- GHashTable *result;
- guint i;
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (base, context);
-
- if (!tp_handles_are_valid (contact_repo, contacts, FALSE, &error))
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- result = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, NULL);
-
- for (i = 0; i < contacts->len; i++)
- {
- TpHandle handle = g_array_index (contacts, TpHandle, i);
- AvatarData *a = g_hash_table_lookup (self->priv->avatars,
- GUINT_TO_POINTER (handle));
- const gchar *token = a ? a->token : NULL;
-
- g_hash_table_insert (result, GUINT_TO_POINTER (handle),
- (gchar *) (token != NULL ? token : ""));
- }
-
- tp_svc_connection_interface_avatars_return_from_get_known_avatar_tokens (
- context, result);
- g_hash_table_unref (result);
-}
-
-static void
my_request_avatars (TpSvcConnectionInterfaceAvatars *avatars,
const GArray *contacts,
DBusGMethodInvocation *context)
@@ -1113,8 +975,6 @@ init_avatars (gpointer g_iface,
#define IMPLEMENT(x) tp_svc_connection_interface_avatars_implement_##x (\
klass, my_##x)
/* IMPLEMENT(get_avatar_requirements); */
- IMPLEMENT(get_avatar_tokens);
- IMPLEMENT(get_known_avatar_tokens);
/* IMPLEMENT(request_avatar); */
IMPLEMENT(request_avatars);
/* IMPLEMENT(set_avatar); */
@@ -1122,113 +982,6 @@ init_avatars (gpointer g_iface,
#undef IMPLEMENT
}
-static void
-my_get_locations (TpSvcConnectionInterfaceLocation *avatars,
- const GArray *contacts,
- DBusGMethodInvocation *context)
-{
- TpTestsContactsConnection *self = TP_TESTS_CONTACTS_CONNECTION (avatars);
- TpBaseConnection *base = TP_BASE_CONNECTION (avatars);
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (base,
- TP_HANDLE_TYPE_CONTACT);
- GError *error = NULL;
- GHashTable *result;
- guint i;
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (base, context);
-
- if (!tp_handles_are_valid (contact_repo, contacts, FALSE, &error))
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- result = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, NULL);
-
- for (i = 0; i < contacts->len; i++)
- {
- TpHandle handle = g_array_index (contacts, TpHandle, i);
- GHashTable *location = g_hash_table_lookup (self->priv->locations,
- GUINT_TO_POINTER (handle));
-
- if (location != NULL)
- {
- g_hash_table_insert (result, GUINT_TO_POINTER (handle), location);
- }
- }
-
- tp_svc_connection_interface_location_return_from_get_locations (
- context, result);
- g_hash_table_unref (result);
-}
-
-static void
-init_location (gpointer g_iface,
- gpointer iface_data)
-{
- TpSvcConnectionInterfaceLocationClass *klass = g_iface;
-
-#define IMPLEMENT(x) tp_svc_connection_interface_location_implement_##x (\
- klass, my_##x)
- IMPLEMENT(get_locations);
-#undef IMPLEMENT
-}
-
-static void
-my_get_contact_capabilities (TpSvcConnectionInterfaceContactCapabilities *obj,
- const GArray *contacts,
- DBusGMethodInvocation *context)
-{
- TpTestsContactsConnection *self = TP_TESTS_CONTACTS_CONNECTION (obj);
- TpBaseConnection *base = TP_BASE_CONNECTION (obj);
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (base,
- TP_HANDLE_TYPE_CONTACT);
- GError *error = NULL;
- GHashTable *result;
- guint i;
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (base, context);
-
- if (!tp_handles_are_valid (contact_repo, contacts, FALSE, &error))
- {
- dbus_g_method_return_error (context, error);
- g_error_free (error);
- return;
- }
-
- result = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, NULL);
-
- for (i = 0; i < contacts->len; i++)
- {
- TpHandle handle = g_array_index (contacts, TpHandle, i);
- GPtrArray *arr = g_hash_table_lookup (self->priv->capabilities,
- GUINT_TO_POINTER (handle));
-
- if (arr != NULL)
- {
- g_hash_table_insert (result, GUINT_TO_POINTER (handle), arr);
- }
- }
-
- tp_svc_connection_interface_contact_capabilities_return_from_get_contact_capabilities (
- context, result);
-
- g_hash_table_unref (result);
-}
-
-static void
-init_contact_caps (gpointer g_iface,
- gpointer iface_data)
-{
- TpSvcConnectionInterfaceContactCapabilitiesClass *klass = g_iface;
-
-#define IMPLEMENT(x) tp_svc_connection_interface_contact_capabilities_implement_##x (\
- klass, my_##x)
- IMPLEMENT(get_contact_capabilities);
-#undef IMPLEMENT
-}
-
static GPtrArray *
lookup_contact_info (TpTestsContactsConnection *self,
TpHandle handle)
@@ -1352,92 +1105,3 @@ init_contact_info (gpointer g_iface,
IMPLEMENT (set_contact_info);
#undef IMPLEMENT
}
-
-/* =============== Legacy version (no Contacts interface) ================= */
-
-G_DEFINE_TYPE (TpTestsLegacyContactsConnection,
- tp_tests_legacy_contacts_connection, TP_TESTS_TYPE_CONTACTS_CONNECTION);
-
-enum
-{
- LEGACY_PROP_HAS_IMMORTAL_HANDLES = 1
-};
-
-static void
-legacy_contacts_connection_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
-{
- switch (property_id)
- {
- case LEGACY_PROP_HAS_IMMORTAL_HANDLES:
- /* Pretend we don't. */
- g_value_set_boolean (value, FALSE);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-tp_tests_legacy_contacts_connection_init (TpTestsLegacyContactsConnection *self)
-{
-}
-
-static void
-tp_tests_legacy_contacts_connection_class_init (
- TpTestsLegacyContactsConnectionClass *klass)
-{
- /* Leave Contacts out of the interfaces we say are present, so clients
- * won't use it */
- static const gchar *interfaces_always_present[] = {
- TP_IFACE_CONNECTION_INTERFACE_ALIASING,
- TP_IFACE_CONNECTION_INTERFACE_AVATARS,
- TP_IFACE_CONNECTION_INTERFACE_PRESENCE,
- TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
- TP_IFACE_CONNECTION_INTERFACE_LOCATION,
- TP_IFACE_CONNECTION_INTERFACE_REQUESTS,
- NULL };
- TpBaseConnectionClass *base_class =
- (TpBaseConnectionClass *) klass;
- GObjectClass *object_class = (GObjectClass *) klass;
-
- object_class->get_property = legacy_contacts_connection_get_property;
-
- base_class->interfaces_always_present = interfaces_always_present;
-
- g_object_class_override_property (object_class,
- LEGACY_PROP_HAS_IMMORTAL_HANDLES, "has-immortal-handles");
-}
-
-/* =============== No Requests and no ContactCapabilities ================= */
-
-G_DEFINE_TYPE (TpTestsNoRequestsConnection, tp_tests_no_requests_connection,
- TP_TESTS_TYPE_CONTACTS_CONNECTION);
-
-static void
-tp_tests_no_requests_connection_init (TpTestsNoRequestsConnection *self)
-{
-}
-
-static void
-tp_tests_no_requests_connection_class_init (
- TpTestsNoRequestsConnectionClass *klass)
-{
- static const gchar *interfaces_always_present[] = {
- TP_IFACE_CONNECTION_INTERFACE_ALIASING,
- TP_IFACE_CONNECTION_INTERFACE_AVATARS,
- TP_IFACE_CONNECTION_INTERFACE_CONTACTS,
- TP_IFACE_CONNECTION_INTERFACE_PRESENCE,
- TP_IFACE_CONNECTION_INTERFACE_SIMPLE_PRESENCE,
- TP_IFACE_CONNECTION_INTERFACE_LOCATION,
- NULL };
- TpBaseConnectionClass *base_class =
- (TpBaseConnectionClass *) klass;
-
- base_class->interfaces_always_present = interfaces_always_present;
- base_class->create_channel_managers = NULL;
-}
diff --git a/tests/lib/contacts-conn.h b/tests/lib/contacts-conn.h
index 64056e039..174f1de02 100644
--- a/tests/lib/contacts-conn.h
+++ b/tests/lib/contacts-conn.h
@@ -15,6 +15,7 @@
#include <glib-object.h>
#include <telepathy-glib/base-connection.h>
#include <telepathy-glib/contacts-mixin.h>
+#include <telepathy-glib/dbus-properties-mixin.h>
#include <telepathy-glib/presence-mixin.h>
#include "simple-conn.h"
@@ -113,78 +114,6 @@ void tp_tests_contacts_connection_set_default_contact_info (
TpTestsContactsConnection *self,
GPtrArray *info);
-/* Legacy version (no Contacts interface, and no immortal handles) */
-
-typedef struct _TpTestsLegacyContactsConnection TpTestsLegacyContactsConnection;
-typedef struct _TpTestsLegacyContactsConnectionClass TpTestsLegacyContactsConnectionClass;
-typedef struct _TpTestsLegacyContactsConnectionPrivate
- TpTestsLegacyContactsConnectionPrivate;
-
-struct _TpTestsLegacyContactsConnectionClass {
- TpTestsContactsConnectionClass parent_class;
-};
-
-struct _TpTestsLegacyContactsConnection {
- TpTestsContactsConnection parent;
-
- TpTestsLegacyContactsConnectionPrivate *priv;
-};
-
-GType tp_tests_legacy_contacts_connection_get_type (void);
-
-/* TYPE MACROS */
-#define TP_TESTS_TYPE_LEGACY_CONTACTS_CONNECTION \
- (tp_tests_legacy_contacts_connection_get_type ())
-#define LEGACY_TP_TESTS_CONTACTS_CONNECTION(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TP_TESTS_TYPE_LEGACY_CONTACTS_CONNECTION, \
- TpTestsLegacyContactsConnection))
-#define LEGACY_TP_TESTS_CONTACTS_CONNECTION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TP_TESTS_TYPE_LEGACY_CONTACTS_CONNECTION, \
- TpTestsLegacyContactsConnectionClass))
-#define TP_TESTS_LEGACY_CONTACTS_IS_CONNECTION(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj), TP_TESTS_TYPE_LEGACY_CONTACTS_CONNECTION))
-#define TP_TESTS_LEGACY_CONTACTS_IS_CONNECTION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE((klass), TP_TESTS_TYPE_LEGACY_CONTACTS_CONNECTION))
-#define LEGACY_TP_TESTS_CONTACTS_CONNECTION_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TESTS_TYPE_LEGACY_CONTACTS_CONNECTION, \
- TpTestsLegacyContactsConnectionClass))
-
-/* No Requests version */
-
-typedef struct _TpTestsNoRequestsConnection TpTestsNoRequestsConnection;
-typedef struct _TpTestsNoRequestsConnectionClass TpTestsNoRequestsConnectionClass;
-typedef struct _TpTestsNoRequestsConnectionPrivate
- TpTestsNoRequestsConnectionPrivate;
-
-struct _TpTestsNoRequestsConnectionClass {
- TpTestsContactsConnectionClass parent_class;
-};
-
-struct _TpTestsNoRequestsConnection {
- TpTestsContactsConnection parent;
-
- TpTestsNoRequestsConnectionPrivate *priv;
-};
-
-GType tp_tests_no_requests_connection_get_type (void);
-
-/* TYPE MACROS */
-#define TP_TESTS_TYPE_NO_REQUESTS_CONNECTION \
- (tp_tests_no_requests_connection_get_type ())
-#define TP_TESTS_NO_REQUESTS_CONNECTION(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TP_TESTS_TYPE_NO_REQUESTS_CONNECTION, \
- TpTestsNoRequestsConnection))
-#define TP_TESTS_NO_REQUESTS_CONNECTION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TP_TESTS_TYPE_NO_REQUESTS_CONNECTION, \
- TpTestsNoRequestsConnectionClass))
-#define TP_TESTS_NO_REQUESTS_IS_CONNECTION(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj), TP_TESTS_TYPE_NO_REQUESTS_CONNECTION))
-#define TP_TESTS_NO_REQUESTS_IS_CONNECTION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE((klass), TP_TESTS_TYPE_NO_REQUESTS_CONNECTION))
-#define TP_TESTS_NO_REQUESTS_CONNECTION_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TESTS_TYPE_NO_REQUESTS_CONNECTION, \
- TpTestsNoRequestsConnectionClass))
-
G_END_DECLS
#endif /* ifndef __TP_TESTS_CONTACTS_CONN_H__ */
diff --git a/tests/lib/dbus-tube-chan.c b/tests/lib/dbus-tube-chan.c
index d3e04eebf..c078f21b3 100644
--- a/tests/lib/dbus-tube-chan.c
+++ b/tests/lib/dbus-tube-chan.c
@@ -13,6 +13,7 @@
#include "dbus-tube-chan.h"
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include <telepathy-glib/channel-iface.h>
#include <telepathy-glib/svc-channel.h>
#include <telepathy-glib/gnio-util.h>
diff --git a/tests/lib/echo-chan.c b/tests/lib/echo-chan.c
index 75f27d449..236ffff9c 100644
--- a/tests/lib/echo-chan.c
+++ b/tests/lib/echo-chan.c
@@ -16,20 +16,17 @@
#include "echo-chan.h"
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include <telepathy-glib/channel-iface.h>
#include <telepathy-glib/svc-channel.h>
-/* This is for text-mixin unit tests, others should be using ExampleEcho2Channel
- * which uses newer TpMessageMixin */
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-
-static void text_iface_init (gpointer iface, gpointer data);
static void destroyable_iface_init (gpointer iface, gpointer data);
G_DEFINE_TYPE_WITH_CODE (TpTestsEchoChannel,
tp_tests_echo_channel,
TP_TYPE_BASE_CHANNEL,
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TEXT, text_iface_init);
+ G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TEXT,
+ tp_message_mixin_iface_init);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_DESTROYABLE,
destroyable_iface_init);
)
@@ -53,6 +50,9 @@ tp_tests_echo_channel_init (TpTestsEchoChannel *self)
{
}
+static void text_send (GObject *object, TpMessage *message,
+ TpMessageSendingFlags flags);
+
static GObject *
constructor (GType type,
guint n_props,
@@ -62,22 +62,26 @@ constructor (GType type,
G_OBJECT_CLASS (tp_tests_echo_channel_parent_class)->constructor (type,
n_props, props);
TpTestsEchoChannel *self = TP_TESTS_ECHO_CHANNEL (object);
- TpHandleRepoIface *contact_repo = NULL;
TpBaseConnection *conn = tp_base_channel_get_connection (TP_BASE_CHANNEL (self));
+ const TpChannelTextMessageType types[] = {
+ TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
+ TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
+ TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE,
+ };
+ const gchar * supported_content_types[] = {
+ "text/plain",
+ NULL
+ };
g_assert (conn != NULL);
- contact_repo = tp_base_connection_get_handles (conn, TP_HANDLE_TYPE_CONTACT);
-
tp_base_channel_register (TP_BASE_CHANNEL (self));
- tp_text_mixin_init (object, G_STRUCT_OFFSET (TpTestsEchoChannel, text),
- contact_repo);
-
- tp_text_mixin_set_message_types (object,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE,
- G_MAXUINT);
+ tp_message_mixin_init (object,
+ G_STRUCT_OFFSET (TpTestsEchoChannel, message),
+ conn);
+ tp_message_mixin_implement_sending (object,
+ text_send, G_N_ELEMENTS (types), types, 0, 0,
+ supported_content_types);
return object;
}
@@ -85,7 +89,7 @@ constructor (GType type,
static void
finalize (GObject *object)
{
- tp_text_mixin_finalize (object);
+ tp_message_mixin_finalize (object);
((GObjectClass *) tp_tests_echo_channel_parent_class)->finalize (object);
}
@@ -105,10 +109,10 @@ tp_tests_echo_channel_close (TpTestsEchoChannel *self)
* to the contact who sent us those messages (if it isn't already),
* and the messages must be marked as having been rescued so they
* don't get logged twice. */
- if (tp_text_mixin_has_pending_messages (object, &first_sender))
+ if (tp_message_mixin_has_pending_messages (object, &first_sender))
{
tp_base_channel_reopened (TP_BASE_CHANNEL (self), first_sender);
- tp_text_mixin_set_rescued (object);
+ tp_message_mixin_set_rescued (object);
}
else
{
@@ -139,32 +143,32 @@ tp_tests_echo_channel_class_init (TpTestsEchoChannelClass *klass)
base_class->get_interfaces = tp_tests_echo_channel_get_interfaces;
base_class->close = channel_close;
- tp_text_mixin_class_init (object_class,
- G_STRUCT_OFFSET (TpTestsEchoChannelClass, text_class));
+ tp_message_mixin_init_dbus_properties (object_class);
}
+
static void
-text_send (TpSvcChannelTypeText *iface,
- guint type,
- const gchar *text,
- DBusGMethodInvocation *context)
+text_send (GObject *object,
+ TpMessage *message,
+ TpMessageSendingFlags flags)
{
- TpTestsEchoChannel *self = TP_TESTS_ECHO_CHANNEL (iface);
- time_t timestamp = time (NULL);
- gchar *echo;
- guint echo_type = type;
+ TpTestsEchoChannel *self = TP_TESTS_ECHO_CHANNEL (object);
+ TpChannelTextMessageType type = tp_message_get_message_type (message);
+ TpChannelTextMessageType echo_type = type;
TpHandle target = tp_base_channel_get_target_handle (TP_BASE_CHANNEL (self));
-
- /* Send should return just before Sent is emitted. */
- tp_svc_channel_type_text_return_from_send (context);
-
- /* Tell the client that the message was submitted for sending */
- tp_svc_channel_type_text_emit_sent ((GObject *) self, timestamp, type, text);
+ gchar *echo;
+ gint64 now = time (NULL);
+ const GHashTable *part;
+ const gchar *text;
+ TpMessage *msg;
/* Pretend that the remote contact has replied. Normally, you'd
* call tp_text_mixin_receive or tp_text_mixin_receive_with_flags
* in response to network events */
+ part = tp_message_peek (message, 1);
+ text = tp_asv_get_string (part, "content");
+
switch (type)
{
case TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL:
@@ -182,21 +186,23 @@ text_send (TpSvcChannelTypeText *iface,
echo_type = TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL;
}
- tp_text_mixin_receive ((GObject *) self, echo_type, target, timestamp, echo);
+ tp_message_mixin_sent (object, message, 0, "", NULL);
- g_free (echo);
-}
+ msg = tp_cm_message_new (
+ tp_base_channel_get_connection (TP_BASE_CHANNEL (self)),
+ 2);
-static void
-text_iface_init (gpointer iface,
- gpointer data)
-{
- TpSvcChannelTypeTextClass *klass = iface;
+ tp_cm_message_set_sender (msg, target);
+ tp_message_set_uint32 (msg, 0, "message-type", echo_type);
+ tp_message_set_int64 (msg, 0, "message-sent", now);
+ tp_message_set_int64 (msg, 0, "message-received", now);
- tp_text_mixin_iface_init (iface, data);
-#define IMPLEMENT(x) tp_svc_channel_type_text_implement_##x (klass, text_##x)
- IMPLEMENT (send);
-#undef IMPLEMENT
+ tp_message_set_string (msg, 1, "content-type", "text/plain");
+ tp_message_set_string (msg, 1, "content", echo);
+
+ tp_message_mixin_take_received (object, msg);
+
+ g_free (echo);
}
static void
@@ -205,7 +211,7 @@ destroyable_destroy (TpSvcChannelInterfaceDestroyable *iface,
{
TpTestsEchoChannel *self = TP_TESTS_ECHO_CHANNEL (iface);
- tp_text_mixin_clear ((GObject *) self);
+ tp_message_mixin_clear ((GObject *) self);
tp_base_channel_destroyed (TP_BASE_CHANNEL (self));
tp_svc_channel_interface_destroyable_return_from_destroy (context);
@@ -222,5 +228,3 @@ destroyable_iface_init (gpointer iface,
IMPLEMENT (destroy);
#undef IMPLEMENT
}
-
-G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/tests/lib/echo-chan.h b/tests/lib/echo-chan.h
index 7c4e11c8d..b0391341c 100644
--- a/tests/lib/echo-chan.h
+++ b/tests/lib/echo-chan.h
@@ -15,7 +15,7 @@
#include <glib-object.h>
#include <telepathy-glib/base-channel.h>
#include <telepathy-glib/base-connection.h>
-#include <telepathy-glib/text-mixin.h>
+#include <telepathy-glib/message-mixin.h>
G_BEGIN_DECLS
@@ -43,13 +43,12 @@ GType tp_tests_echo_channel_get_type (void);
struct _TpTestsEchoChannelClass {
TpBaseChannelClass parent_class;
- TpTextMixinClass text_class;
TpDBusPropertiesMixinClass dbus_properties_class;
};
struct _TpTestsEchoChannel {
TpBaseChannel parent;
- TpTextMixin text;
+ TpMessageMixin message;
TpTestsEchoChannelPrivate *priv;
};
diff --git a/tests/lib/echo-channel-manager-conn.c b/tests/lib/echo-channel-manager-conn.c
deleted file mode 100644
index 1fcccfeb8..000000000
--- a/tests/lib/echo-channel-manager-conn.c
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * echo-channel-manager-conn.c
- *
- * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
- *
- * Copying and distribution of this file, with or without modification,
- * are permitted in any medium without royalty provided the copyright
- * notice and this notice are preserved.
- */
-
-#include "config.h"
-
-#include "echo-channel-manager-conn.h"
-#include "simple-channel-manager.h"
-
-G_DEFINE_TYPE (TpTestsEchoChannelManagerConnection,
- tp_tests_echo_channel_manager_connection,
- TP_TESTS_TYPE_ECHO_CONNECTION)
-
-/* type definition stuff */
-
-enum
-{
- PROP_CHANNEL_MANAGER = 1,
- N_PROPS
-};
-
-struct _TpTestsEchoChannelManagerConnectionPrivate
-{
- TpTestsSimpleChannelManager *channel_manager;
-};
-
-static void
-tp_tests_echo_channel_manager_connection_init (TpTestsEchoChannelManagerConnection *self)
-{
- self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, TP_TESTS_TYPE_ECHO_CHANNEL_MANAGER_CONNECTION,
- TpTestsEchoChannelManagerConnectionPrivate);
-}
-
-static void
-get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *spec)
-{
- TpTestsEchoChannelManagerConnection *self = TP_TESTS_ECHO_CHANNEL_MANAGER_CONNECTION (object);
-
- switch (property_id) {
- case PROP_CHANNEL_MANAGER:
- g_value_set_object (value, self->priv->channel_manager);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, spec);
- }
-}
-
-static void
-set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *spec)
-{
- TpTestsEchoChannelManagerConnection *self = TP_TESTS_ECHO_CHANNEL_MANAGER_CONNECTION (object);
-
- switch (property_id) {
- case PROP_CHANNEL_MANAGER:
- self->priv->channel_manager = g_value_dup_object (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, spec);
- }
-}
-
-static GPtrArray *
-create_channel_managers (TpBaseConnection *conn)
-{
- TpTestsEchoChannelManagerConnection *self = TP_TESTS_ECHO_CHANNEL_MANAGER_CONNECTION (conn);
- GPtrArray *ret = g_ptr_array_sized_new (1);
-
- /* tp-glib will free this for us so we don't need to worry about
- doing it ourselves. */
- g_ptr_array_add (ret, self->priv->channel_manager);
-
- return ret;
-}
-
-static void
-tp_tests_echo_channel_manager_connection_class_init (TpTestsEchoChannelManagerConnectionClass *klass)
-{
- TpBaseConnectionClass *base_class =
- (TpBaseConnectionClass *) klass;
- GObjectClass *object_class = (GObjectClass *) klass;
- GParamSpec *param_spec;
-
- object_class->get_property = get_property;
- object_class->set_property = set_property;
- g_type_class_add_private (klass, sizeof (TpTestsEchoChannelManagerConnectionPrivate));
-
- base_class->create_channel_managers = create_channel_managers;
-
- param_spec = g_param_spec_object ("channel-manager", "Channel manager",
- "The channel manager", TP_TESTS_TYPE_SIMPLE_CHANNEL_MANAGER,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_CHANNEL_MANAGER, param_spec);
-}
diff --git a/tests/lib/echo-channel-manager-conn.h b/tests/lib/echo-channel-manager-conn.h
deleted file mode 100644
index 326f7478a..000000000
--- a/tests/lib/echo-channel-manager-conn.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * echo-channel-manager-conn.h - header for an example conn
- *
- * Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
- *
- * Copying and distribution of this file, with or without modification,
- * are permitted in any medium without royalty provided the copyright
- * notice and this notice are preserved.
- */
-
-#ifndef __TP_TESTS_ECHO_CHANNEL_MANAGER_CONNECTION_H__
-#define __TP_TESTS_ECHO_CHANNEL_MANAGER_CONNECTION_H__
-
-#include "echo-conn.h"
-
-G_BEGIN_DECLS
-
-typedef struct _TpTestsEchoChannelManagerConnection TpTestsEchoChannelManagerConnection;
-typedef struct _TpTestsEchoChannelManagerConnectionClass TpTestsEchoChannelManagerConnectionClass;
-typedef struct _TpTestsEchoChannelManagerConnectionPrivate TpTestsEchoChannelManagerConnectionPrivate;
-
-struct _TpTestsEchoChannelManagerConnectionClass {
- TpTestsEchoConnectionClass parent_class;
-};
-
-struct _TpTestsEchoChannelManagerConnection {
- TpTestsEchoConnection parent;
-
- TpTestsEchoChannelManagerConnectionPrivate *priv;
-};
-
-GType tp_tests_echo_channel_manager_connection_get_type (void);
-
-/* TYPE MACROS */
-#define TP_TESTS_TYPE_ECHO_CHANNEL_MANAGER_CONNECTION \
- (tp_tests_echo_channel_manager_connection_get_type ())
-#define TP_TESTS_ECHO_CHANNEL_MANAGER_CONNECTION(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), TP_TESTS_TYPE_ECHO_CHANNEL_MANAGER_CONNECTION, \
- TpTestsEchoChannelManagerConnection))
-#define TP_TESTS_ECHO_CHANNEL_MANAGER_CONNECTION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), TP_TESTS_TYPE_ECHO_CHANNEL_MANAGER_CONNECTION, \
- TpTestsEchoChannelManagerConnectionClass))
-#define TP_TESTS_IS_ECHO_CHANNEL_MANAGER_CONNECTION(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj), TP_TESTS_TYPE_ECHO_CHANNEL_MANAGER_CONNECTION))
-#define TP_TESTS_IS_ECHO_CHANNEL_MANAGER_CONNECTION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_TYPE((klass), TP_TESTS_TYPE_ECHO_CHANNEL_MANAGER_CONNECTION))
-#define TP_TESTS_ECHO_CHANNEL_MANAGER_CONNECTION_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TESTS_TYPE_ECHO_CHANNEL_MANAGER_CONNECTION, \
- TpTestsEchoChannelManagerConnectionClass))
-
-G_END_DECLS
-
-#endif
diff --git a/tests/lib/echo-conn.c b/tests/lib/echo-conn.c
index 963363e02..54a79a3b1 100644
--- a/tests/lib/echo-conn.c
+++ b/tests/lib/echo-conn.c
@@ -16,85 +16,45 @@
#include <dbus/dbus-glib.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include <telepathy-glib/handle-repo-dynamic.h>
+
#include "echo-im-manager.h"
+#include "simple-channel-manager.h"
G_DEFINE_TYPE (TpTestsEchoConnection,
tp_tests_echo_connection,
- TP_TYPE_BASE_CONNECTION)
+ TP_TESTS_TYPE_CONTACTS_CONNECTION)
/* type definition stuff */
enum
{
- PROP_ACCOUNT = 1,
+ PROP_CHANNEL_MANAGER = 1,
N_PROPS
};
struct _TpTestsEchoConnectionPrivate
{
- gchar *account;
+ TpTestsSimpleChannelManager *channel_manager;
};
+
static void
tp_tests_echo_connection_init (TpTestsEchoConnection *self)
{
+ static const gchar *interfaces_always_present[] = {
+ TP_IFACE_CONNECTION_INTERFACE_REQUESTS,
+ NULL };
+
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, TP_TESTS_TYPE_ECHO_CONNECTION,
TpTestsEchoConnectionPrivate);
-}
-
-static void
-get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *spec)
-{
- TpTestsEchoConnection *self = TP_TESTS_ECHO_CONNECTION (object);
-
- switch (property_id) {
- case PROP_ACCOUNT:
- g_value_set_string (value, self->priv->account);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, spec);
- }
-}
-
-static void
-set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *spec)
-{
- TpTestsEchoConnection *self = TP_TESTS_ECHO_CONNECTION (object);
-
- switch (property_id) {
- case PROP_ACCOUNT:
- g_free (self->priv->account);
- self->priv->account = g_utf8_strdown (g_value_get_string (value), -1);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, spec);
- }
-}
-
-static void
-finalize (GObject *object)
-{
- TpTestsEchoConnection *self = TP_TESTS_ECHO_CONNECTION (object);
-
- g_free (self->priv->account);
- G_OBJECT_CLASS (tp_tests_echo_connection_parent_class)->finalize (object);
-}
-
-static gchar *
-get_unique_connection_name (TpBaseConnection *conn)
-{
- TpTestsEchoConnection *self = TP_TESTS_ECHO_CONNECTION (conn);
-
- return g_strdup (self->priv->account);
+ /* We cannot set base_class->interfaces_always_present because that would
+ * override interfaces set in TpTestsSimpleConnection */
+ tp_base_connection_add_interfaces ((TpBaseConnection *) self,
+ interfaces_always_present);
}
/* Returns the same id given in but in lowercase. If '#' is present,
@@ -127,6 +87,12 @@ static void
create_handle_repos (TpBaseConnection *conn,
TpHandleRepoIface *repos[TP_NUM_HANDLE_TYPES])
{
+ ((TpBaseConnectionClass *)
+ tp_tests_echo_connection_parent_class)->create_handle_repos (conn, repos);
+
+ /* Replace the contacts handle repo with our own, for special normalization */
+ g_assert (repos[TP_HANDLE_TYPE_CONTACT] != NULL);
+ g_object_unref (repos[TP_HANDLE_TYPE_CONTACT]);
repos[TP_HANDLE_TYPE_CONTACT] = tp_dynamic_handle_repo_new
(TP_HANDLE_TYPE_CONTACT, tp_tests_echo_normalize_contact, NULL);
}
@@ -134,51 +100,64 @@ create_handle_repos (TpBaseConnection *conn,
static GPtrArray *
create_channel_managers (TpBaseConnection *conn)
{
- GPtrArray *ret = g_ptr_array_sized_new (1);
+ TpTestsEchoConnection *self = TP_TESTS_ECHO_CONNECTION (conn);
+ GPtrArray *ret;
+
+ ret = ((TpBaseConnectionClass *)
+ tp_tests_echo_connection_parent_class)->create_channel_managers (conn);
- g_ptr_array_add (ret, g_object_new (TP_TESTS_TYPE_ECHO_IM_MANAGER,
- "connection", conn,
- NULL));
+ if (self->priv->channel_manager == NULL)
+ {
+ self->priv->channel_manager = g_object_new (TP_TESTS_TYPE_ECHO_IM_MANAGER,
+ "connection", conn,
+ NULL);
+ }
+
+ /* tp-glib will free this for us so we don't need to worry about
+ doing it ourselves. */
+ g_ptr_array_add (ret, self->priv->channel_manager);
return ret;
}
-static gboolean
-start_connecting (TpBaseConnection *conn,
- GError **error)
+static void
+get_property (GObject *object,
+ guint property_id,
+ GValue *value,
+ GParamSpec *spec)
{
- TpTestsEchoConnection *self = TP_TESTS_ECHO_CONNECTION (conn);
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (conn,
- TP_HANDLE_TYPE_CONTACT);
-
- /* In a real connection manager we'd ask the underlying implementation to
- * start connecting, then go to state CONNECTED when finished, but here
- * we can do it immediately. */
-
- conn->self_handle = tp_handle_ensure (contact_repo, self->priv->account,
- NULL, NULL);
-
- tp_base_connection_change_status (conn, TP_CONNECTION_STATUS_CONNECTED,
- TP_CONNECTION_STATUS_REASON_REQUESTED);
+ TpTestsEchoConnection *self = TP_TESTS_ECHO_CONNECTION (object);
- return TRUE;
+ switch (property_id) {
+ case PROP_CHANNEL_MANAGER:
+ g_assert (self->priv->channel_manager == NULL); /* construct-only */
+ g_value_set_object (value, self->priv->channel_manager);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, spec);
+ }
}
static void
-shut_down (TpBaseConnection *conn)
+set_property (GObject *object,
+ guint property_id,
+ const GValue *value,
+ GParamSpec *spec)
{
- /* In a real connection manager we'd ask the underlying implementation to
- * start shutting down, then call this function when finished, but here
- * we can do it immediately. */
- tp_base_connection_finish_shutdown (conn);
+ TpTestsEchoConnection *self = TP_TESTS_ECHO_CONNECTION (object);
+
+ switch (property_id) {
+ case PROP_CHANNEL_MANAGER:
+ self->priv->channel_manager = g_value_dup_object (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, spec);
+ }
}
static void
tp_tests_echo_connection_class_init (TpTestsEchoConnectionClass *klass)
{
- static const gchar *interfaces_always_present[] = {
- TP_IFACE_CONNECTION_INTERFACE_REQUESTS,
- NULL };
TpBaseConnectionClass *base_class =
(TpBaseConnectionClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
@@ -186,18 +165,13 @@ tp_tests_echo_connection_class_init (TpTestsEchoConnectionClass *klass)
object_class->get_property = get_property;
object_class->set_property = set_property;
- object_class->finalize = finalize;
g_type_class_add_private (klass, sizeof (TpTestsEchoConnectionPrivate));
base_class->create_handle_repos = create_handle_repos;
- base_class->get_unique_connection_name = get_unique_connection_name;
base_class->create_channel_managers = create_channel_managers;
- base_class->start_connecting = start_connecting;
- base_class->shut_down = shut_down;
- base_class->interfaces_always_present = interfaces_always_present;
- param_spec = g_param_spec_string ("account", "Account name",
- "The username of this user", NULL,
+ param_spec = g_param_spec_object ("channel-manager", "Channel manager",
+ "The channel manager", TP_TESTS_TYPE_SIMPLE_CHANNEL_MANAGER,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_ACCOUNT, param_spec);
+ g_object_class_install_property (object_class, PROP_CHANNEL_MANAGER, param_spec);
}
diff --git a/tests/lib/echo-conn.h b/tests/lib/echo-conn.h
index 7bcad0749..ffc8f4d95 100644
--- a/tests/lib/echo-conn.h
+++ b/tests/lib/echo-conn.h
@@ -13,7 +13,8 @@
#define __TP_TESTS_ECHO_CONN_H__
#include <glib-object.h>
-#include <telepathy-glib/base-connection.h>
+
+#include "contacts-conn.h"
G_BEGIN_DECLS
@@ -22,11 +23,11 @@ typedef struct _TpTestsEchoConnectionClass TpTestsEchoConnectionClass;
typedef struct _TpTestsEchoConnectionPrivate TpTestsEchoConnectionPrivate;
struct _TpTestsEchoConnectionClass {
- TpBaseConnectionClass parent_class;
+ TpTestsContactsConnectionClass parent_class;
};
struct _TpTestsEchoConnection {
- TpBaseConnection parent;
+ TpTestsContactsConnection parent;
TpTestsEchoConnectionPrivate *priv;
};
diff --git a/tests/lib/echo-im-manager.c b/tests/lib/echo-im-manager.c
index 1810f9264..f886bf4e3 100644
--- a/tests/lib/echo-im-manager.c
+++ b/tests/lib/echo-im-manager.c
@@ -18,6 +18,7 @@
#include <dbus/dbus-glib.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include "echo-chan.h"
diff --git a/tests/lib/file-transfer-chan.c b/tests/lib/file-transfer-chan.c
index 36c10ddfd..b6dfa4c45 100644
--- a/tests/lib/file-transfer-chan.c
+++ b/tests/lib/file-transfer-chan.c
@@ -16,6 +16,7 @@
#include "debug.h"
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include <telepathy-glib/channel-iface.h>
#include <telepathy-glib/svc-channel.h>
#include <telepathy-glib/gnio-util.h>
diff --git a/tests/lib/room-list-chan.c b/tests/lib/room-list-chan.c
index 49ed291ab..46e6e3286 100644
--- a/tests/lib/room-list-chan.c
+++ b/tests/lib/room-list-chan.c
@@ -4,6 +4,7 @@
#include "room-list-chan.h"
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include <telepathy-glib/channel-iface.h>
#include <telepathy-glib/svc-channel.h>
diff --git a/tests/lib/simple-account-manager.c b/tests/lib/simple-account-manager.c
index e1fec6749..5f5139490 100644
--- a/tests/lib/simple-account-manager.c
+++ b/tests/lib/simple-account-manager.c
@@ -39,14 +39,14 @@ enum
{
PROP_0,
PROP_INTERFACES,
- PROP_VALID_ACCOUNTS,
- PROP_INVALID_ACCOUNTS,
+ PROP_USABLE_ACCOUNTS,
+ PROP_UNUSABLE_ACCOUNTS,
};
struct _TpTestsSimpleAccountManagerPrivate
{
- GPtrArray *valid_accounts;
- GPtrArray *invalid_accounts;
+ GPtrArray *usable_accounts;
+ GPtrArray *unusable_accounts;
};
static void
@@ -95,8 +95,8 @@ tp_tests_simple_account_manager_init (TpTestsSimpleAccountManager *self)
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
TP_TESTS_TYPE_SIMPLE_ACCOUNT_MANAGER, TpTestsSimpleAccountManagerPrivate);
- self->priv->valid_accounts = g_ptr_array_new_with_free_func (g_free);
- self->priv->invalid_accounts = g_ptr_array_new_with_free_func (g_free);
+ self->priv->usable_accounts = g_ptr_array_new_with_free_func (g_free);
+ self->priv->unusable_accounts = g_ptr_array_new_with_free_func (g_free);
}
static void
@@ -112,12 +112,12 @@ tp_tests_simple_account_manager_get_property (GObject *object,
g_value_set_boxed (value, ACCOUNT_MANAGER_INTERFACES);
break;
- case PROP_VALID_ACCOUNTS:
- g_value_set_boxed (value, self->priv->valid_accounts);
+ case PROP_USABLE_ACCOUNTS:
+ g_value_set_boxed (value, self->priv->usable_accounts);
break;
- case PROP_INVALID_ACCOUNTS:
- g_value_set_boxed (value, self->priv->invalid_accounts);
+ case PROP_UNUSABLE_ACCOUNTS:
+ g_value_set_boxed (value, self->priv->unusable_accounts);
break;
default:
@@ -131,8 +131,8 @@ tp_tests_simple_account_manager_finalize (GObject *object)
{
TpTestsSimpleAccountManager *self = SIMPLE_ACCOUNT_MANAGER (object);
- g_ptr_array_unref (self->priv->valid_accounts);
- g_ptr_array_unref (self->priv->invalid_accounts);
+ g_ptr_array_unref (self->priv->usable_accounts);
+ g_ptr_array_unref (self->priv->unusable_accounts);
tp_clear_pointer (&self->create_cm, g_free);
tp_clear_pointer (&self->create_protocol, g_free);
@@ -160,8 +160,8 @@ tp_tests_simple_account_manager_class_init (
static TpDBusPropertiesMixinPropImpl am_props[] = {
{ "Interfaces", "interfaces", NULL },
- { "ValidAccounts", "valid-accounts", NULL },
- { "InvalidAccounts", "invalid-accounts", NULL },
+ { "UsableAccounts", "usable-accounts", NULL },
+ { "UnusableAccounts", "unusable-accounts", NULL },
/*
{ "SupportedAccountProperties", "supported-account-properties", NULL },
*/
@@ -186,16 +186,16 @@ tp_tests_simple_account_manager_class_init (
G_TYPE_STRV,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_INTERFACES, param_spec);
- param_spec = g_param_spec_boxed ("valid-accounts", "Valid accounts",
- "The accounts which are valid on this account. This may be a lie.",
+ param_spec = g_param_spec_boxed ("usable-accounts", "Usable accounts",
+ "The accounts which are usable on this account manager. This may be a lie.",
TP_ARRAY_TYPE_OBJECT_PATH_LIST,
G_PARAM_READABLE);
- g_object_class_install_property (object_class, PROP_VALID_ACCOUNTS, param_spec);
- param_spec = g_param_spec_boxed ("invalid-accounts", "Invalid accounts",
- "The accounts which are invalid on this account. This may be a lie.",
+ g_object_class_install_property (object_class, PROP_USABLE_ACCOUNTS, param_spec);
+ param_spec = g_param_spec_boxed ("unusable-accounts", "Unusable accounts",
+ "The accounts which are unusable on this account manager. This may be a lie.",
TP_ARRAY_TYPE_OBJECT_PATH_LIST,
G_PARAM_READABLE);
- g_object_class_install_property (object_class, PROP_INVALID_ACCOUNTS, param_spec);
+ g_object_class_install_property (object_class, PROP_UNUSABLE_ACCOUNTS, param_spec);
klass->dbus_props_class.interfaces = prop_interfaces;
tp_dbus_properties_mixin_class_init (object_class,
@@ -219,17 +219,18 @@ void
tp_tests_simple_account_manager_add_account (
TpTestsSimpleAccountManager *self,
const gchar *object_path,
- gboolean valid)
+ gboolean usable)
{
- remove_from_array (self->priv->valid_accounts, object_path);
- remove_from_array (self->priv->valid_accounts, object_path);
+ remove_from_array (self->priv->usable_accounts, object_path);
+ remove_from_array (self->priv->unusable_accounts, object_path);
- if (valid)
- g_ptr_array_add (self->priv->valid_accounts, g_strdup (object_path));
+ if (usable)
+ g_ptr_array_add (self->priv->usable_accounts, g_strdup (object_path));
else
- g_ptr_array_add (self->priv->invalid_accounts, g_strdup (object_path));
+ g_ptr_array_add (self->priv->unusable_accounts, g_strdup (object_path));
- tp_svc_account_manager_emit_account_validity_changed (self, object_path, valid);
+ tp_svc_account_manager_emit_account_usability_changed (self, object_path,
+ usable);
}
void
@@ -237,8 +238,8 @@ tp_tests_simple_account_manager_remove_account (
TpTestsSimpleAccountManager *self,
const gchar *object_path)
{
- remove_from_array (self->priv->valid_accounts, object_path);
- remove_from_array (self->priv->valid_accounts, object_path);
+ remove_from_array (self->priv->usable_accounts, object_path);
+ remove_from_array (self->priv->unusable_accounts, object_path);
tp_svc_account_manager_emit_account_removed (self, object_path);
}
diff --git a/tests/lib/simple-account-manager.h b/tests/lib/simple-account-manager.h
index d1608d518..7554461fd 100644
--- a/tests/lib/simple-account-manager.h
+++ b/tests/lib/simple-account-manager.h
@@ -61,7 +61,7 @@ GType tp_tests_simple_account_manager_get_type (void);
void tp_tests_simple_account_manager_add_account (
TpTestsSimpleAccountManager *self,
const gchar *object_path,
- gboolean valid);
+ gboolean usable);
void tp_tests_simple_account_manager_remove_account (
TpTestsSimpleAccountManager *self,
diff --git a/tests/lib/simple-account.c b/tests/lib/simple-account.c
index 6279d7559..098ed683c 100644
--- a/tests/lib/simple-account.c
+++ b/tests/lib/simple-account.c
@@ -50,7 +50,7 @@ enum
PROP_INTERFACES,
PROP_DISPLAY_NAME,
PROP_ICON,
- PROP_VALID,
+ PROP_USABLE,
PROP_ENABLED,
PROP_NICKNAME,
PROP_PARAMETERS,
@@ -161,7 +161,7 @@ tp_tests_simple_account_get_property (GObject *object,
case PROP_ICON:
g_value_set_string (value, "");
break;
- case PROP_VALID:
+ case PROP_USABLE:
g_value_set_boolean (value, TRUE);
break;
case PROP_ENABLED:
@@ -213,7 +213,7 @@ tp_tests_simple_account_get_property (GObject *object,
g_value_set_boolean (value, TRUE);
break;
case PROP_STORAGE_PROVIDER:
- g_value_set_string (value, "org.freedesktop.Telepathy.glib.test");
+ g_value_set_string (value, "im.telepathy1.glib.test");
break;
case PROP_STORAGE_IDENTIFIER:
g_value_set_boxed (value, &identifier);
@@ -292,7 +292,7 @@ tp_tests_simple_account_class_init (TpTestsSimpleAccountClass *klass)
{ "Interfaces", "interfaces", NULL },
{ "DisplayName", "display-name", NULL },
{ "Icon", "icon", NULL },
- { "Valid", "valid", NULL },
+ { "Usable", "usable", NULL },
{ "Enabled", "enabled", NULL },
{ "Nickname", "nickname", NULL },
{ "Parameters", "parameters", NULL },
@@ -375,11 +375,11 @@ tp_tests_simple_account_class_init (TpTestsSimpleAccountClass *klass)
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_ICON, param_spec);
- param_spec = g_param_spec_boolean ("valid", "valid",
- "Valid property",
+ param_spec = g_param_spec_boolean ("usable", "usable",
+ "Usable property",
FALSE,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_VALID, param_spec);
+ g_object_class_install_property (object_class, PROP_USABLE, param_spec);
param_spec = g_param_spec_boolean ("enabled", "enabled",
"Enabled property",
@@ -401,7 +401,7 @@ tp_tests_simple_account_class_init (TpTestsSimpleAccountClass *klass)
param_spec = g_param_spec_boxed ("automatic-presence", "automatic presence",
"AutomaticPresence property",
- TP_STRUCT_TYPE_SIMPLE_PRESENCE,
+ TP_STRUCT_TYPE_PRESENCE,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_AUTOMATIC_PRESENCE,
param_spec);
@@ -435,14 +435,14 @@ tp_tests_simple_account_class_init (TpTestsSimpleAccountClass *klass)
param_spec = g_param_spec_boxed ("current-presence", "current presence",
"CurrentPresence property",
- TP_STRUCT_TYPE_SIMPLE_PRESENCE,
+ TP_STRUCT_TYPE_PRESENCE,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_CURRENT_PRESENCE,
param_spec);
param_spec = g_param_spec_boxed ("requested-presence", "requested presence",
"RequestedPresence property",
- TP_STRUCT_TYPE_SIMPLE_PRESENCE,
+ TP_STRUCT_TYPE_PRESENCE,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_REQUESTED_PRESENCE,
param_spec);
@@ -533,12 +533,12 @@ tp_tests_simple_account_set_presence (TpTestsSimpleAccount *self,
g_object_get (self, "current-presence", &v, NULL);
props = tp_asv_new (
- "CurrentPresence", TP_STRUCT_TYPE_SIMPLE_PRESENCE, v,
+ "CurrentPresence", TP_STRUCT_TYPE_PRESENCE, v,
NULL);
tp_svc_account_emit_account_property_changed (self, props);
- g_boxed_free (TP_STRUCT_TYPE_SIMPLE_PRESENCE, v);
+ g_boxed_free (TP_STRUCT_TYPE_PRESENCE, v);
}
void
diff --git a/tests/lib/simple-channel-dispatcher.c b/tests/lib/simple-channel-dispatcher.c
index 116df9a02..1eaf13e40 100644
--- a/tests/lib/simple-channel-dispatcher.c
+++ b/tests/lib/simple-channel-dispatcher.c
@@ -115,8 +115,9 @@ create_channel_request (TpTestsSimpleChannelDispatcher *self,
return path;
}
-static gchar *
-create_channel (TpTestsSimpleChannelDispatcher *self,
+static void
+tp_tests_simple_channel_dispatcher_create_channel (
+ TpSvcChannelDispatcher *dispatcher,
const gchar *account,
GHashTable *request,
gint64 user_action_time,
@@ -124,6 +125,9 @@ create_channel (TpTestsSimpleChannelDispatcher *self,
GHashTable *hints,
DBusGMethodInvocation *context)
{
+ TpTestsSimpleChannelDispatcher *self = SIMPLE_CHANNEL_DISPATCHER (dispatcher);
+ gchar *path;
+
tp_clear_pointer (&self->last_request, g_hash_table_unref);
self->last_request = g_boxed_copy (TP_HASH_TYPE_STRING_VARIANT_MAP, request);
tp_clear_pointer (&self->last_hints, g_hash_table_unref);
@@ -141,37 +145,23 @@ create_channel (TpTestsSimpleChannelDispatcher *self,
"Computer says no" };
dbus_g_method_return_error (context, &error);
- return NULL;
+ return;
}
- return create_channel_request (self, account, request, user_action_time,
+ path = create_channel_request (self, account, request, user_action_time,
preferred_handler, hints);
-}
-
-static void
-tp_tests_simple_channel_dispatcher_create_channel (
- TpSvcChannelDispatcher *dispatcher,
- const gchar *account,
- GHashTable *request,
- gint64 user_action_time,
- const gchar *preferred_handler,
- DBusGMethodInvocation *context)
-{
- TpTestsSimpleChannelDispatcher *self = SIMPLE_CHANNEL_DISPATCHER (dispatcher);
- gchar *path;
- path = create_channel (self, account, request, user_action_time,
- preferred_handler, NULL, context);
if (path == NULL)
return;
- tp_svc_channel_dispatcher_return_from_create_channel (context, path);
+ tp_svc_channel_dispatcher_return_from_create_channel (context,
+ path);
g_free (path);
}
static void
-tp_tests_simple_channel_dispatcher_create_channel_with_hints (
+tp_tests_simple_channel_dispatcher_ensure_channel (
TpSvcChannelDispatcher *dispatcher,
const gchar *account,
GHashTable *request,
@@ -183,26 +173,6 @@ tp_tests_simple_channel_dispatcher_create_channel_with_hints (
TpTestsSimpleChannelDispatcher *self = SIMPLE_CHANNEL_DISPATCHER (dispatcher);
gchar *path;
- path = create_channel (self, account, request, user_action_time,
- preferred_handler, hints, context);
- if (path == NULL)
- return;
-
- tp_svc_channel_dispatcher_return_from_create_channel_with_hints (context,
- path);
-
- g_free (path);
-}
-
-static gchar *
-ensure_channel (TpTestsSimpleChannelDispatcher *self,
- const gchar *account,
- GHashTable *request,
- gint64 user_action_time,
- const gchar *preferred_handler,
- GHashTable *hints,
- DBusGMethodInvocation *context)
-{
tp_clear_pointer (&self->last_request, g_hash_table_unref);
self->last_request = g_boxed_copy (TP_HASH_TYPE_STRING_VARIANT_MAP, request);
tp_clear_pointer (&self->last_hints, g_hash_table_unref);
@@ -216,53 +186,18 @@ ensure_channel (TpTestsSimpleChannelDispatcher *self,
if (self->priv->old_handler != NULL)
{
/* Pretend that the channel already exists */
- return create_channel_request (self, account, request, user_action_time,
+ path = create_channel_request (self, account, request, user_action_time,
self->priv->old_handler, hints);
}
+ else
+ {
+ self->priv->old_handler = g_strdup (preferred_handler);
- self->priv->old_handler = g_strdup (preferred_handler);
-
- return create_channel_request (self, account, request, user_action_time,
+ path = create_channel_request (self, account, request, user_action_time,
preferred_handler, hints);
-}
-
-static void
-tp_tests_simple_channel_dispatcher_ensure_channel (
- TpSvcChannelDispatcher *dispatcher,
- const gchar *account,
- GHashTable *request,
- gint64 user_action_time,
- const gchar *preferred_handler,
- DBusGMethodInvocation *context)
-{
- TpTestsSimpleChannelDispatcher *self = SIMPLE_CHANNEL_DISPATCHER (dispatcher);
- gchar *path;
-
- path = ensure_channel (self, account, request, user_action_time,
- preferred_handler, NULL, context);
-
- tp_svc_channel_dispatcher_return_from_ensure_channel (context, path);
-
- g_free (path);
-}
-
-static void
-tp_tests_simple_channel_dispatcher_ensure_channel_with_hints (
- TpSvcChannelDispatcher *dispatcher,
- const gchar *account,
- GHashTable *request,
- gint64 user_action_time,
- const gchar *preferred_handler,
- GHashTable *hints,
- DBusGMethodInvocation *context)
-{
- TpTestsSimpleChannelDispatcher *self = SIMPLE_CHANNEL_DISPATCHER (dispatcher);
- gchar *path;
-
- path = ensure_channel (self, account, request, user_action_time,
- preferred_handler, hints, context);
+ }
- tp_svc_channel_dispatcher_return_from_ensure_channel_with_hints (context,
+ tp_svc_channel_dispatcher_return_from_ensure_channel (context,
path);
g_free (path);
@@ -337,8 +272,6 @@ channel_dispatcher_iface_init (gpointer klass,
klass, tp_tests_simple_channel_dispatcher_##x)
IMPLEMENT (create_channel);
IMPLEMENT (ensure_channel);
- IMPLEMENT (create_channel_with_hints);
- IMPLEMENT (ensure_channel_with_hints);
IMPLEMENT (delegate_channels);
IMPLEMENT (present_channel);
#undef IMPLEMENT
@@ -401,11 +334,6 @@ tp_tests_simple_channel_dispatcher_dispose (GObject *object)
g_free (self->priv->old_handler);
- tp_clear_pointer (&self->last_request, g_hash_table_unref);
- tp_clear_pointer (&self->last_hints, g_hash_table_unref);
- tp_clear_pointer (&self->last_account, g_free);
- tp_clear_pointer (&self->last_preferred_handler, g_free);
-
if (G_OBJECT_CLASS (tp_tests_simple_channel_dispatcher_parent_class)->dispose != NULL)
G_OBJECT_CLASS (tp_tests_simple_channel_dispatcher_parent_class)->dispose (object);
}
diff --git a/tests/lib/simple-channel-manager.c b/tests/lib/simple-channel-manager.c
index 28cb6a9a6..5cd7df920 100644
--- a/tests/lib/simple-channel-manager.c
+++ b/tests/lib/simple-channel-manager.c
@@ -11,6 +11,7 @@
#include "config.h"
#include <telepathy-glib/channel-manager.h>
+#include <telepathy-glib/interfaces.h>
#include "simple-channel-manager.h"
#include "util.h"
diff --git a/tests/lib/simple-channel-request.c b/tests/lib/simple-channel-request.c
index 0f587a528..98503ec97 100644
--- a/tests/lib/simple-channel-request.c
+++ b/tests/lib/simple-channel-request.c
@@ -18,6 +18,7 @@
#include <telepathy-glib/svc-channel-request.h>
#include <telepathy-glib/svc-generic.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include <telepathy-glib/util.h>
#include "tests/lib/util.h"
@@ -74,6 +75,9 @@ handle_channels_cb (TpClient *client,
GObject *weak_object)
{
TpTestsSimpleChannelRequest *self = SIMPLE_CHANNEL_REQUEST (weak_object);
+ TpBaseConnection *base_conn = TP_BASE_CONNECTION (self->priv->conn);
+ const gchar *chan_path = user_data;
+ GHashTable *props = tp_asv_new (NULL, NULL);
if (error != NULL)
{
@@ -82,10 +86,13 @@ handle_channels_cb (TpClient *client,
return;
}
- tp_svc_channel_request_emit_succeeded (self);
+ tp_svc_channel_request_emit_succeeded (self,
+ base_conn->object_path, props, chan_path, props);
+
+ g_hash_table_unref (props);
}
-static void
+static gchar *
add_channel (TpTestsSimpleChannelRequest *self,
GPtrArray *channels)
{
@@ -122,8 +129,9 @@ add_channel (TpTestsSimpleChannelRequest *self,
TP_HASH_TYPE_STRING_VARIANT_MAP, props,
G_TYPE_INVALID));
- g_free (chan_path);
g_hash_table_unref (props);
+
+ return chan_path;
}
static void
@@ -166,6 +174,7 @@ tp_tests_simple_channel_request_proceed (TpSvcChannelRequest *request,
TpBaseConnection *base_conn = (TpBaseConnection *) self->priv->conn;
GHashTable *req;
GHashTable *request_props;
+ gchar *chan_path;
req = g_ptr_array_index (self->priv->requests, 0);
g_assert (req != NULL);
@@ -204,21 +213,12 @@ tp_tests_simple_channel_request_proceed (TpSvcChannelRequest *request,
GHashTable *props;
props = g_hash_table_new (NULL, NULL);
- tp_svc_channel_request_emit_succeeded_with_channel (self,
+ tp_svc_channel_request_emit_succeeded (self,
base_conn->object_path, props, "/chan", props);
- tp_svc_channel_request_emit_succeeded (self);
g_hash_table_unref (props);
return;
}
- else if (!tp_strdiff (self->priv->preferred_handler, "FakeNoChannel"))
- {
- /* Pretend that the channel has been handled but only fire the old
- * Succeeded signal. */
-
- tp_svc_channel_request_emit_succeeded (self);
- return;
- }
/* Call HandleChannels() on the preferred handler */
client_path = g_strdelimit (g_strdup_printf ("/%s",
@@ -238,7 +238,7 @@ tp_tests_simple_channel_request_proceed (TpSvcChannelRequest *request,
TP_IFACE_QUARK_CLIENT_HANDLER);
channels = g_ptr_array_sized_new (1);
- add_channel (self, channels);
+ chan_path = add_channel (self, channels);
satisfied = g_ptr_array_sized_new (1);
g_ptr_array_add (satisfied, self->priv->path);
@@ -256,9 +256,10 @@ tp_tests_simple_channel_request_proceed (TpSvcChannelRequest *request,
tp_cli_client_handler_call_handle_channels (client, -1,
self->priv->account_path, base_conn->object_path, channels,
- satisfied, self->priv->user_action_time, info, handle_channels_cb, NULL,
- NULL, G_OBJECT (self));
+ satisfied, self->priv->user_action_time, info, handle_channels_cb,
+ g_strdup (chan_path), g_free, G_OBJECT (self));
+ g_free (chan_path);
g_free (client_path);
g_ptr_array_foreach (channels, free_channel_details, NULL);
g_ptr_array_unref (channels);
diff --git a/tests/lib/simple-client.c b/tests/lib/simple-client.c
index 15da26bb1..8ad131592 100644
--- a/tests/lib/simple-client.c
+++ b/tests/lib/simple-client.c
@@ -233,13 +233,22 @@ tp_tests_simple_client_class_init (TpTestsSimpleClientClass *klass)
}
TpTestsSimpleClient *
-tp_tests_simple_client_new (TpDBusDaemon *dbus_daemon,
+tp_tests_simple_client_new (TpClientFactory *factory,
const gchar *name,
gboolean uniquify_name)
{
return tp_tests_object_new_static_class (TP_TESTS_TYPE_SIMPLE_CLIENT,
- "dbus-daemon", dbus_daemon,
+ "factory", factory,
"name", name,
"uniquify-name", uniquify_name,
NULL);
}
+
+TpTestsSimpleClient *
+tp_tests_simple_client_new_with_am (TpAccountManager *account_mgr,
+ const gchar *name,
+ gboolean uniquify_name)
+{
+ return tp_tests_simple_client_new (tp_proxy_get_factory (account_mgr),
+ name, uniquify_name);
+}
diff --git a/tests/lib/simple-client.h b/tests/lib/simple-client.h
index ec4fd31b8..ab186af5a 100644
--- a/tests/lib/simple-client.h
+++ b/tests/lib/simple-client.h
@@ -12,6 +12,8 @@
#define __TP_TESTS_SIMPLE_CLIENT_H__
#include <glib-object.h>
+
+#include <telepathy-glib/account-manager.h>
#include <telepathy-glib/base-client.h>
G_BEGIN_DECLS
@@ -50,7 +52,12 @@ GType tp_tests_simple_client_get_type (void);
(G_TYPE_INSTANCE_GET_CLASS ((obj), TP_TESTS_TYPE_SIMPLE_CLIENT, \
TpTestsSimpleClientClass))
-TpTestsSimpleClient * tp_tests_simple_client_new (TpDBusDaemon *dbus_daemon,
+TpTestsSimpleClient * tp_tests_simple_client_new (TpClientFactory *factory,
+ const gchar *name,
+ gboolean uniquify_name);
+
+TpTestsSimpleClient * tp_tests_simple_client_new_with_am (
+ TpAccountManager *account_mgr,
const gchar *name,
gboolean uniquify_name);
diff --git a/tests/lib/simple-conn.c b/tests/lib/simple-conn.c
index 51bf9e232..30829143e 100644
--- a/tests/lib/simple-conn.c
+++ b/tests/lib/simple-conn.c
@@ -22,48 +22,35 @@
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/handle-repo-dynamic.h>
#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/svc-connection.h>
#include <telepathy-glib/util.h>
#include "textchan-null.h"
#include "room-list-chan.h"
#include "util.h"
-static void conn_iface_init (TpSvcConnectionClass *);
-
G_DEFINE_TYPE_WITH_CODE (TpTestsSimpleConnection, tp_tests_simple_connection,
TP_TYPE_BASE_CONNECTION,
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION, conn_iface_init))
+ G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CONNECTION, NULL))
/* type definition stuff */
enum
{
PROP_ACCOUNT = 1,
- PROP_BREAK_PROPS = 2,
- PROP_DBUS_STATUS = 3,
+ PROP_DBUS_STATUS,
N_PROPS
};
-enum
-{
- SIGNAL_GOT_SELF_HANDLE,
- N_SIGNALS
-};
-
-static guint signals[N_SIGNALS] = {0};
-
struct _TpTestsSimpleConnectionPrivate
{
gchar *account;
guint connect_source;
guint disconnect_source;
- gboolean break_fastpath_props;
/* TpHandle => reffed TpTestsTextChannelNull */
GHashTable *text_channels;
TpTestsRoomListChan *room_list_chan;
-
- GError *get_self_handle_error /* initially NULL */ ;
};
static void
@@ -88,16 +75,7 @@ get_property (GObject *object,
case PROP_ACCOUNT:
g_value_set_string (value, self->priv->account);
break;
- case PROP_BREAK_PROPS:
- g_value_set_boolean (value, self->priv->break_fastpath_props);
- break;
case PROP_DBUS_STATUS:
- if (self->priv->break_fastpath_props)
- {
- g_debug ("returning broken value for Connection.Status");
- g_value_set_uint (value, 0xdeadbeefU);
- }
- else
{
guint32 status = TP_BASE_CONNECTION (self)->status;
@@ -125,9 +103,6 @@ set_property (GObject *object,
g_free (self->priv->account);
self->priv->account = g_utf8_strdown (g_value_get_string (value), -1);
break;
- case PROP_BREAK_PROPS:
- self->priv->break_fastpath_props = g_value_get_boolean (value);
- break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, spec);
}
@@ -159,7 +134,6 @@ finalize (GObject *object)
g_source_remove (self->priv->disconnect_source);
}
- g_clear_error (&self->priv->get_self_handle_error);
g_free (self->priv->account);
G_OBJECT_CLASS (tp_tests_simple_connection_parent_class)->finalize (object);
@@ -207,7 +181,7 @@ create_handle_repos (TpBaseConnection *conn,
}
static GPtrArray *
-create_channel_factories (TpBaseConnection *conn)
+create_channel_managers (TpBaseConnection *conn)
{
return g_ptr_array_sized_new (0);
}
@@ -304,7 +278,7 @@ tp_tests_simple_connection_class_init (TpTestsSimpleConnectionClass *klass)
base_class->create_handle_repos = create_handle_repos;
base_class->get_unique_connection_name = get_unique_connection_name;
- base_class->create_channel_factories = create_channel_factories;
+ base_class->create_channel_managers = create_channel_managers;
base_class->start_connecting = start_connecting;
base_class->shut_down = shut_down;
@@ -315,12 +289,6 @@ tp_tests_simple_connection_class_init (TpTestsSimpleConnectionClass *klass)
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_ACCOUNT, param_spec);
- param_spec = g_param_spec_boolean ("break-0192-properties",
- "Break 0.19.2 properties",
- "Break Connection D-Bus properties introduced in spec 0.19.2", FALSE,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_BREAK_PROPS, param_spec);
-
param_spec = g_param_spec_uint ("dbus-status",
"Connection.Status",
"The connection status as visible on D-Bus (overridden so can break it)",
@@ -328,13 +296,6 @@ tp_tests_simple_connection_class_init (TpTestsSimpleConnectionClass *klass)
TP_CONNECTION_STATUS_DISCONNECTED,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_DBUS_STATUS, param_spec);
-
- signals[SIGNAL_GOT_SELF_HANDLE] = g_signal_new ("got-self-handle",
- G_OBJECT_CLASS_TYPE (klass),
- G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
- 0,
- NULL, NULL, NULL,
- G_TYPE_NONE, 0);
}
void
@@ -396,7 +357,7 @@ tp_tests_simple_connection_ensure_text_chan (TpTestsSimpleConnection *self,
chan = TP_TESTS_TEXT_CHANNEL_NULL (
tp_tests_object_new_static_class (
- TP_TESTS_TYPE_TEXT_CHANNEL_NULL,
+ TP_TESTS_TYPE_PROPS_TEXT_CHANNEL,
"connection", self,
"object-path", chan_path,
"handle", handle,
@@ -456,44 +417,3 @@ tp_tests_simple_connection_ensure_room_list_chan (TpTestsSimpleConnection *self,
return chan_path;
}
-
-void
-tp_tests_simple_connection_set_get_self_handle_error (
- TpTestsSimpleConnection *self,
- GQuark domain,
- gint code,
- const gchar *message)
-{
- self->priv->get_self_handle_error = g_error_new_literal (domain, code,
- message);
-}
-
-static void
-get_self_handle (TpSvcConnection *iface,
- DBusGMethodInvocation *context)
-{
- TpTestsSimpleConnection *self = TP_TESTS_SIMPLE_CONNECTION (iface);
- TpBaseConnection *base = TP_BASE_CONNECTION (iface);
-
- g_assert (TP_IS_BASE_CONNECTION (base));
-
- TP_BASE_CONNECTION_ERROR_IF_NOT_CONNECTED (base, context);
-
- if (self->priv->get_self_handle_error != NULL)
- {
- dbus_g_method_return_error (context, self->priv->get_self_handle_error);
- return;
- }
-
- tp_svc_connection_return_from_get_self_handle (context, base->self_handle);
- g_signal_emit (self, signals[SIGNAL_GOT_SELF_HANDLE], 0);
-}
-
-static void
-conn_iface_init (TpSvcConnectionClass *iface)
-{
-#define IMPLEMENT(prefix,x) \
- tp_svc_connection_implement_##x (iface, prefix##x)
- IMPLEMENT(,get_self_handle);
-#undef IMPLEMENT
-}
diff --git a/tests/lib/simple-conn.h b/tests/lib/simple-conn.h
index 837400bc3..baa8fec96 100644
--- a/tests/lib/simple-conn.h
+++ b/tests/lib/simple-conn.h
@@ -66,12 +66,6 @@ gchar * tp_tests_simple_connection_ensure_text_chan (
const gchar *target_id,
GHashTable **props);
-void tp_tests_simple_connection_set_get_self_handle_error (
- TpTestsSimpleConnection *self,
- GQuark domain,
- gint code,
- const gchar *message);
-
gchar * tp_tests_simple_connection_ensure_room_list_chan (
TpTestsSimpleConnection *self,
const gchar *server,
diff --git a/tests/lib/stream-tube-chan.c b/tests/lib/stream-tube-chan.c
index 95388d013..26ab8244e 100644
--- a/tests/lib/stream-tube-chan.c
+++ b/tests/lib/stream-tube-chan.c
@@ -16,6 +16,7 @@
#include "util.h"
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/telepathy-glib-dbus.h>
#include <telepathy-glib/channel-iface.h>
#include <telepathy-glib/svc-channel.h>
#include <telepathy-glib/gnio-util.h>
@@ -521,6 +522,10 @@ tp_tests_stream_tube_channel_peer_connected (TpTestsStreamTubeChannel *self,
TpHandle handle)
{
GValue *connection_param;
+ TpBaseChannel *base = (TpBaseChannel *) self;
+ TpBaseConnection *conn = tp_base_channel_get_connection (base);
+ TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (conn,
+ TP_HANDLE_TYPE_CONTACT);
if (self->priv->state == TP_TUBE_CHANNEL_STATE_REMOTE_PENDING)
change_state (self, TP_TUBE_CHANNEL_STATE_OPEN);
@@ -581,7 +586,8 @@ tp_tests_stream_tube_channel_peer_connected (TpTestsStreamTubeChannel *self,
}
tp_svc_channel_type_stream_tube_emit_new_remote_connection (self, handle,
- connection_param, self->priv->connection_id);
+ tp_handle_inspect (contact_repo, handle), connection_param,
+ self->priv->connection_id);
self->priv->connection_id++;
diff --git a/tests/lib/textchan-group.c b/tests/lib/textchan-group.c
index 710af4daa..f6fbdd694 100644
--- a/tests/lib/textchan-group.c
+++ b/tests/lib/textchan-group.c
@@ -21,16 +21,12 @@
#include <telepathy-glib/svc-channel.h>
#include <telepathy-glib/svc-generic.h>
-/* This is for text-mixin unit tests, others should be using ExampleEcho2Channel
- * which uses newer TpMessageMixin */
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-
-static void text_iface_init (gpointer iface, gpointer data);
static void password_iface_init (gpointer iface, gpointer data);
G_DEFINE_TYPE_WITH_CODE (TpTestsTextChannelGroup,
tp_tests_text_channel_group, TP_TYPE_BASE_CHANNEL,
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TEXT, text_iface_init);
+ G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TEXT,
+ tp_message_mixin_iface_init);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_GROUP,
tp_group_mixin_iface_init);
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_PASSWORD,
@@ -53,18 +49,8 @@ text_channel_group_get_interfaces (TpBaseChannel *self)
/* type definition stuff */
-enum
-{
- PROP_DETAILED = 1,
- PROP_PROPERTIES,
- N_PROPS
-};
-
struct _TpTestsTextChannelGroupPrivate
{
- gboolean detailed;
- gboolean properties;
-
gboolean closed;
gboolean disposed;
@@ -80,12 +66,18 @@ add_member (GObject *obj,
{
TpTestsTextChannelGroup *self = TP_TESTS_TEXT_CHANNEL_GROUP (obj);
TpIntset *add = tp_intset_new ();
+ GHashTable *details = tp_asv_new (
+ "actor", G_TYPE_UINT, self->conn->self_handle,
+ "change-reason", G_TYPE_UINT, TP_CHANNEL_GROUP_CHANGE_REASON_NONE,
+ "message", G_TYPE_STRING, message,
+ NULL);
tp_intset_add (add, handle);
- tp_group_mixin_change_members (obj, message, add, NULL, NULL, NULL,
- self->conn->self_handle, TP_CHANNEL_GROUP_CHANGE_REASON_NONE);
+ tp_group_mixin_change_members (obj, add, NULL, NULL, NULL, details);
tp_intset_destroy (add);
+ g_hash_table_unref (details);
+
return TRUE;
}
@@ -127,6 +119,15 @@ tp_tests_text_channel_group_init (TpTestsTextChannelGroup *self)
TP_TESTS_TYPE_TEXT_CHANNEL_GROUP, TpTestsTextChannelGroupPrivate);
}
+static void
+text_send (GObject *object,
+ TpMessage *message,
+ TpMessageSendingFlags flags)
+{
+ /* silently swallow the message */
+ tp_message_mixin_sent (object, message, 0, "", NULL);
+}
+
static GObject *
constructor (GType type,
guint n_props,
@@ -139,6 +140,15 @@ constructor (GType type,
TpHandleRepoIface *contact_repo;
TpChannelGroupFlags flags = 0;
TpBaseChannel *base = TP_BASE_CHANNEL (self);
+ const TpChannelTextMessageType types[] = {
+ TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
+ TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
+ TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE,
+ };
+ const gchar * supported_content_types[] = {
+ "text/plain",
+ NULL
+ };
self->conn = tp_base_channel_get_connection (base);
@@ -147,82 +157,25 @@ constructor (GType type,
tp_base_channel_register (base);
- tp_text_mixin_init (object, G_STRUCT_OFFSET (TpTestsTextChannelGroup, text),
- contact_repo);
+ tp_message_mixin_init (object,
+ G_STRUCT_OFFSET (TpTestsTextChannelGroup, message),
+ self->conn);
- tp_text_mixin_set_message_types (object,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE,
- G_MAXUINT);
-
- if (self->priv->properties)
- flags |= TP_CHANNEL_GROUP_FLAG_PROPERTIES;
+ tp_message_mixin_implement_sending (object,
+ text_send, G_N_ELEMENTS (types), types, 0, 0,
+ supported_content_types);
flags |= TP_CHANNEL_GROUP_FLAG_CAN_ADD;
tp_group_mixin_init (object, G_STRUCT_OFFSET (TpTestsTextChannelGroup, group),
contact_repo, self->conn->self_handle);
- if (!self->priv->detailed)
- {
- /* TpGroupMixin always set the Members_Changed_Detailed flag so we have
- * to cheat and manually remove it to pretend we don't implement it. */
- TpGroupMixin *group = TP_GROUP_MIXIN (self);
-
- group->group_flags &= ~TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED;
- }
-
tp_group_mixin_change_flags (object, flags, 0);
return object;
}
static void
-get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
-{
- TpTestsTextChannelGroup *self = TP_TESTS_TEXT_CHANNEL_GROUP (object);
-
- switch (property_id)
- {
- case PROP_DETAILED:
- g_value_set_boolean (value, self->priv->detailed);
- break;
- case PROP_PROPERTIES:
- g_value_set_boolean (value, self->priv->properties);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
-set_property (GObject *object,
- guint property_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- TpTestsTextChannelGroup *self = TP_TESTS_TEXT_CHANNEL_GROUP (object);
-
- switch (property_id)
- {
- case PROP_DETAILED:
- self->priv->detailed = g_value_get_boolean (value);
- break;
- case PROP_PROPERTIES:
- self->priv->properties = g_value_get_boolean (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
- break;
- }
-}
-
-static void
dispose (GObject *object)
{
TpTestsTextChannelGroup *self = TP_TESTS_TEXT_CHANNEL_GROUP (object);
@@ -245,7 +198,7 @@ finalize (GObject *object)
{
TpTestsTextChannelGroup *self = TP_TESTS_TEXT_CHANNEL_GROUP (object);
- tp_text_mixin_finalize (object);
+ tp_message_mixin_finalize (object);
tp_group_mixin_finalize (object);
tp_clear_pointer (&self->priv->password, g_free);
@@ -269,14 +222,11 @@ static void
tp_tests_text_channel_group_class_init (TpTestsTextChannelGroupClass *klass)
{
GObjectClass *object_class = (GObjectClass *) klass;
- GParamSpec *param_spec;
TpBaseChannelClass *base_class = (TpBaseChannelClass *) klass;
g_type_class_add_private (klass, sizeof (TpTestsTextChannelGroupPrivate));
object_class->constructor = constructor;
- object_class->set_property = set_property;
- object_class->get_property = get_property;
object_class->dispose = dispose;
object_class->finalize = finalize;
@@ -285,22 +235,6 @@ tp_tests_text_channel_group_class_init (TpTestsTextChannelGroupClass *klass)
base_class->get_interfaces = text_channel_group_get_interfaces;
base_class->close = channel_close;
- param_spec = g_param_spec_boolean ("detailed",
- "Has the Members_Changed_Detailed flag?",
- "True if the Members_Changed_Detailed group flag should be set",
- TRUE,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_DETAILED, param_spec);
-
- param_spec = g_param_spec_boolean ("properties",
- "Has the Properties flag?",
- "True if the Properties group flag should be set",
- TRUE,
- G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
- g_object_class_install_property (object_class, PROP_PROPERTIES, param_spec);
-
- tp_text_mixin_class_init (object_class,
- G_STRUCT_OFFSET (TpTestsTextChannelGroupClass, text_class));
tp_group_mixin_class_init (object_class,
G_STRUCT_OFFSET (TpTestsTextChannelGroupClass, group_class), add_member,
NULL);
@@ -314,44 +248,30 @@ tp_tests_text_channel_group_class_init (TpTestsTextChannelGroupClass *klass)
G_STRUCT_OFFSET (TpTestsTextChannelGroupClass, dbus_properties_class));
tp_group_mixin_init_dbus_properties (object_class);
-}
-
-static void
-text_send (TpSvcChannelTypeText *iface,
- guint type,
- const gchar *text,
- DBusGMethodInvocation *context)
-{
- /* silently swallow the message */
- tp_svc_channel_type_text_return_from_send (context);
-}
-static void
-text_iface_init (gpointer iface,
- gpointer data)
-{
- TpSvcChannelTypeTextClass *klass = iface;
-
- tp_text_mixin_iface_init (iface, data);
-#define IMPLEMENT(x) tp_svc_channel_type_text_implement_##x (klass, text_##x)
- IMPLEMENT (send);
-#undef IMPLEMENT
+ tp_message_mixin_init_dbus_properties (object_class);
}
void
tp_tests_text_channel_group_join (TpTestsTextChannelGroup *self)
{
TpIntset *add, *empty;
+ GHashTable *details = tp_asv_new (
+ "actor", G_TYPE_UINT, 0,
+ "change-reason", G_TYPE_UINT, 0,
+ "message", G_TYPE_STRING, "",
+ NULL);
/* Add ourself as a member */
add = tp_intset_new_containing (self->conn->self_handle);
empty = tp_intset_new ();
- tp_group_mixin_change_members ((GObject *) self, NULL, add, empty,
- empty, empty, 0, 0);
+ tp_group_mixin_change_members ((GObject *) self, add, empty,
+ empty, empty, details);
tp_intset_destroy (add);
tp_intset_destroy (empty);
+ g_hash_table_unref (details);
}
void
@@ -414,5 +334,3 @@ password_iface_init (gpointer iface, gpointer data)
IMPLEMENT (provide_password);
#undef IMPLEMENT
}
-
-G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/tests/lib/textchan-group.h b/tests/lib/textchan-group.h
index b33a5d35b..d78f7b3ec 100644
--- a/tests/lib/textchan-group.h
+++ b/tests/lib/textchan-group.h
@@ -16,7 +16,7 @@
#include <telepathy-glib/base-connection.h>
#include <telepathy-glib/base-channel.h>
#include <telepathy-glib/group-mixin.h>
-#include <telepathy-glib/text-mixin.h>
+#include <telepathy-glib/message-mixin.h>
G_BEGIN_DECLS
@@ -45,7 +45,6 @@ GType tp_tests_text_channel_group_get_type (void);
struct _TpTestsTextChannelGroupClass {
TpBaseChannelClass parent_class;
- TpTextMixinClass text_class;
TpGroupMixinClass group_class;
TpDBusPropertiesMixinClass dbus_properties_class;
};
@@ -55,7 +54,7 @@ struct _TpTestsTextChannelGroup {
TpBaseConnection *conn;
- TpTextMixin text;
+ TpMessageMixin message;
TpGroupMixin group;
TpHandle removed_handle;
diff --git a/tests/lib/textchan-null.c b/tests/lib/textchan-null.c
index 64b156fe4..4a64f9a65 100644
--- a/tests/lib/textchan-null.c
+++ b/tests/lib/textchan-null.c
@@ -21,18 +21,14 @@
#include <telepathy-glib/svc-channel.h>
#include <telepathy-glib/svc-generic.h>
-/* This is for text-mixin unit tests, others should be using ExampleEcho2Channel
- * which uses newer TpMessageMixin */
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-
-static void text_iface_init (gpointer iface, gpointer data);
static void channel_iface_init (gpointer iface, gpointer data);
G_DEFINE_TYPE_WITH_CODE (TpTestsTextChannelNull,
tp_tests_text_channel_null,
G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL, channel_iface_init);
- G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TEXT, text_iface_init);
+ G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_TEXT,
+ tp_message_mixin_iface_init);
G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_IFACE, NULL))
G_DEFINE_TYPE_WITH_CODE (TpTestsPropsTextChannel,
@@ -89,6 +85,15 @@ tp_tests_props_text_channel_init (TpTestsPropsTextChannel *self)
self->dbus_property_interfaces_retrieved = g_hash_table_new (NULL, NULL);
}
+static void
+text_send (GObject *object,
+ TpMessage *message,
+ TpMessageSendingFlags flags)
+{
+ /* silently swallow the message */
+ tp_message_mixin_sent (object, message, 0, "", NULL);
+}
+
static GObject *
constructor (GType type,
guint n_props,
@@ -98,23 +103,27 @@ constructor (GType type,
G_OBJECT_CLASS (tp_tests_text_channel_null_parent_class)->constructor (type,
n_props, props);
TpTestsTextChannelNull *self = TP_TESTS_TEXT_CHANNEL_NULL (object);
- TpHandleRepoIface *contact_repo = tp_base_connection_get_handles
- (self->priv->conn, TP_HANDLE_TYPE_CONTACT);
-
- tp_handle_ref (contact_repo, self->priv->handle);
+ const TpChannelTextMessageType types[] = {
+ TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
+ TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
+ TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE,
+ };
+ const gchar * supported_content_types[] = {
+ "text/plain",
+ NULL
+ };
tp_dbus_daemon_register_object (
tp_base_connection_get_dbus_daemon (self->priv->conn),
self->priv->object_path, self);
- tp_text_mixin_init (object, G_STRUCT_OFFSET (TpTestsTextChannelNull, text),
- contact_repo);
+ tp_message_mixin_init (object,
+ G_STRUCT_OFFSET (TpTestsTextChannelNull, message),
+ self->priv->conn);
- tp_text_mixin_set_message_types (object,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_NORMAL,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION,
- TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE,
- G_MAXUINT);
+ tp_message_mixin_implement_sending (object,
+ text_send, G_N_ELEMENTS (types), types, 0, 0,
+ supported_content_types);
return object;
}
@@ -241,13 +250,10 @@ static void
finalize (GObject *object)
{
TpTestsTextChannelNull *self = TP_TESTS_TEXT_CHANNEL_NULL (object);
- TpHandleRepoIface *contact_handles = tp_base_connection_get_handles
- (self->priv->conn, TP_HANDLE_TYPE_CONTACT);
- tp_handle_unref (contact_handles, self->priv->handle);
g_free (self->priv->object_path);
- tp_text_mixin_finalize (object);
+ tp_message_mixin_finalize (object);
((GObjectClass *) tp_tests_text_channel_null_parent_class)->finalize (object);
}
@@ -312,8 +318,7 @@ tp_tests_text_channel_null_class_init (TpTestsTextChannelNullClass *klass)
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_REQUESTED, param_spec);
- tp_text_mixin_class_init (object_class,
- G_STRUCT_OFFSET (TpTestsTextChannelNullClass, text_class));
+ tp_message_mixin_init_dbus_properties (object_class);
}
static void
@@ -392,7 +397,6 @@ group_constructed (GObject *self)
G_STRUCT_OFFSET (TpTestsPropsGroupTextChannel, group),
tp_base_connection_get_handles (conn, TP_HANDLE_TYPE_CONTACT),
tp_base_connection_get_self_handle (conn));
- tp_group_mixin_change_flags (self, TP_CHANNEL_GROUP_FLAG_PROPERTIES, 0);
}
static void
@@ -438,6 +442,7 @@ tp_tests_props_group_text_channel_class_init (TpTestsPropsGroupTextChannelClass
{ "Members", NULL, NULL },
{ "RemotePendingMembers", NULL, NULL },
{ "SelfHandle", NULL, NULL },
+ { "MemberIdentifiers", NULL, NULL },
{ NULL }
};
@@ -464,42 +469,6 @@ channel_close (TpSvcChannel *iface,
}
static void
-channel_get_channel_type (TpSvcChannel *iface,
- DBusGMethodInvocation *context)
-{
- TpTestsTextChannelNull *self = TP_TESTS_TEXT_CHANNEL_NULL (iface);
-
- self->get_channel_type_called++;
-
- tp_svc_channel_return_from_get_channel_type (context,
- TP_IFACE_CHANNEL_TYPE_TEXT);
-}
-
-static void
-channel_get_handle (TpSvcChannel *iface,
- DBusGMethodInvocation *context)
-{
- TpTestsTextChannelNull *self = TP_TESTS_TEXT_CHANNEL_NULL (iface);
-
- self->get_handle_called++;
-
- tp_svc_channel_return_from_get_handle (context, TP_HANDLE_TYPE_CONTACT,
- self->priv->handle);
-}
-
-static void
-channel_get_interfaces (TpSvcChannel *iface,
- DBusGMethodInvocation *context)
-{
- TpTestsTextChannelNull *self = TP_TESTS_TEXT_CHANNEL_NULL (iface);
-
- self->get_interfaces_called++;
-
- tp_svc_channel_return_from_get_interfaces (context,
- tp_tests_text_channel_null_interfaces);
-}
-
-static void
channel_iface_init (gpointer iface,
gpointer data)
{
@@ -507,31 +476,6 @@ channel_iface_init (gpointer iface,
#define IMPLEMENT(x) tp_svc_channel_implement_##x (klass, channel_##x)
IMPLEMENT (close);
- IMPLEMENT (get_channel_type);
- IMPLEMENT (get_handle);
- IMPLEMENT (get_interfaces);
-#undef IMPLEMENT
-}
-
-static void
-text_send (TpSvcChannelTypeText *iface,
- guint type,
- const gchar *text,
- DBusGMethodInvocation *context)
-{
- /* silently swallow the message */
- tp_svc_channel_type_text_return_from_send (context);
-}
-
-static void
-text_iface_init (gpointer iface,
- gpointer data)
-{
- TpSvcChannelTypeTextClass *klass = iface;
-
- tp_text_mixin_iface_init (iface, data);
-#define IMPLEMENT(x) tp_svc_channel_type_text_implement_##x (klass, text_##x)
- IMPLEMENT (send);
#undef IMPLEMENT
}
@@ -573,5 +517,3 @@ tp_tests_text_channel_get_props (TpTestsTextChannelNull *self)
g_strfreev (interfaces);
return props;
}
-
-G_GNUC_END_IGNORE_DEPRECATIONS
diff --git a/tests/lib/textchan-null.h b/tests/lib/textchan-null.h
index 583bec571..96542c5e4 100644
--- a/tests/lib/textchan-null.h
+++ b/tests/lib/textchan-null.h
@@ -14,8 +14,8 @@
#include <glib-object.h>
#include <telepathy-glib/base-connection.h>
-#include <telepathy-glib/text-mixin.h>
#include <telepathy-glib/group-mixin.h>
+#include <telepathy-glib/message-mixin.h>
G_BEGIN_DECLS
@@ -43,17 +43,11 @@ GType tp_tests_text_channel_null_get_type (void);
struct _TpTestsTextChannelNullClass {
GObjectClass parent_class;
-
- TpTextMixinClass text_class;
};
struct _TpTestsTextChannelNull {
GObject parent;
- TpTextMixin text;
-
- guint get_handle_called;
- guint get_interfaces_called;
- guint get_channel_type_called;
+ TpMessageMixin message;
TpTestsTextChannelNullPrivate *priv;
};
diff --git a/tests/lib/tls-certificate.c b/tests/lib/tls-certificate.c
index 8a936e922..e61b2dd1c 100644
--- a/tests/lib/tls-certificate.c
+++ b/tests/lib/tls-certificate.c
@@ -21,7 +21,10 @@
#include "config.h"
#include "tls-certificate.h"
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/telepathy-glib.h>
+#include <telepathy-glib/svc-generic.h>
#include <telepathy-glib/svc-tls.h>
#define DEBUG_FLAG TP_TESTS_DEBUG_TLS
@@ -216,7 +219,7 @@ tp_tests_tls_certificate_class_init (TpTestsTLSCertificateClass *klass)
pspec = g_param_spec_uint ("state",
"State of this certificate",
"The state of this TLS certificate.",
- 0, NUM_TP_TLS_CERTIFICATE_STATES - 1,
+ 0, TP_NUM_TLS_CERTIFICATE_STATES - 1,
TP_TLS_CERTIFICATE_STATE_PENDING,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (oclass, PROP_STATE, pspec);
diff --git a/tests/lib/util.c b/tests/lib/util.c
index fea462f0b..db90649ed 100644
--- a/tests/lib/util.c
+++ b/tests/lib/util.c
@@ -12,7 +12,11 @@
#include "tests/lib/util.h"
+#include <telepathy-glib/cli-connection.h>
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/connection.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/interfaces.h>
#include <glib/gstdio.h>
#include <string.h>
@@ -447,12 +451,11 @@ one_contact_cb (GObject *object,
TpContact *
tp_tests_connection_run_until_contact_by_id (TpConnection *connection,
const gchar *id,
- guint n_features,
- const TpContactFeature *features)
+ const GQuark *features)
{
TpContact *contact = NULL;
- tp_connection_dup_contact_by_id_async (connection, id, n_features, features,
+ tp_connection_dup_contact_by_id_async (connection, id, features,
one_contact_cb, &contact);
while (contact == NULL)
@@ -460,3 +463,28 @@ tp_tests_connection_run_until_contact_by_id (TpConnection *connection,
return contact;
}
+
+void
+tp_tests_channel_assert_expect_members (TpChannel *channel,
+ TpIntset *expected_members)
+{
+ GPtrArray *contacts;
+ TpIntset *members;
+ guint i;
+
+ members = tp_intset_new ();
+ contacts = tp_channel_group_dup_members (channel);
+ if (contacts != NULL)
+ {
+ for (i = 0; i < contacts->len; i++)
+ {
+ TpContact *contact = g_ptr_array_index (contacts, i);
+ tp_intset_add (members, tp_contact_get_handle (contact));
+ }
+ }
+
+ g_assert (tp_intset_is_equal (members, expected_members));
+
+ g_ptr_array_unref (contacts);
+ tp_intset_destroy (members);
+}
diff --git a/tests/lib/util.h b/tests/lib/util.h
index d58138ea9..454d99dde 100644
--- a/tests/lib/util.h
+++ b/tests/lib/util.h
@@ -72,7 +72,9 @@ void tp_tests_connection_assert_disconnect_succeeds (TpConnection *connection);
TpContact *tp_tests_connection_run_until_contact_by_id (
TpConnection *connection,
const gchar *id,
- guint n_features,
- const TpContactFeature *features);
+ const GQuark *features);
+
+void tp_tests_channel_assert_expect_members (TpChannel *channel,
+ TpIntset *expected_members);
#endif /* #ifndef __TP_TESTS_LIB_UTIL_H__ */
diff --git a/tools/c-constants-gen.py b/tools/c-constants-gen.py
index c7a93d371..caa2793b5 100644
--- a/tools/c-constants-gen.py
+++ b/tools/c-constants-gen.py
@@ -130,13 +130,6 @@ extern "C" {
*
* 1 higher than the highest valid value of #%(mixed-name)s.
*/
-
-/**
- * NUM_%(upper-prefix)s%(upper-plural)s: (skip)
- *
- * 1 higher than the highest valid value of #%(mixed-name)s.
- * In new code, use %(upper-prefix)sNUM_%(upper-plural)s instead.
- */
""" % {'mixed-name' : (self.prefix + name).replace('_', ''),
'upper-prefix' : self.prefix.upper(),
'upper-plural' : name_plural.upper(),
@@ -144,7 +137,6 @@ extern "C" {
self.write("""\
#define %(upper-prefix)sNUM_%(upper-plural)s (%(last-val)s+1)
-#define NUM_%(upper-prefix)s%(upper-plural)s %(upper-prefix)sNUM_%(upper-plural)s
""" % {'mixed-name' : (self.prefix + name).replace('_', ''),
'upper-prefix' : self.prefix.upper(),
diff --git a/tools/glib-client-gen.py b/tools/glib-client-gen.py
index 6b2b97f1d..5e44db5cf 100644
--- a/tools/glib-client-gen.py
+++ b/tools/glib-client-gen.py
@@ -41,6 +41,8 @@ class Generator(object):
self.__header = []
self.__body = []
self.__docs = []
+ self.__reentrant_header = []
+ self.__reentrant_body = []
self.prefix_lc = prefix.lower()
self.prefix_uc = prefix.upper()
@@ -71,6 +73,8 @@ class Generator(object):
self.deprecation_attribute = opts.get('--deprecation-attribute',
'G_GNUC_DEPRECATED')
+ self.split_reentrants = opts.get('--split-reentrants', False)
+
self.guard = opts.get('--guard', None)
def h(self, s):
@@ -83,6 +87,16 @@ class Generator(object):
s = s.encode('utf-8')
self.__body.append(s)
+ def rh(self, s):
+ if isinstance(s, unicode):
+ s = s.encode('utf-8')
+ self.__reentrant_header.append(s)
+
+ def rb(self, s):
+ if isinstance(s, unicode):
+ s = s.encode('utf-8')
+ self.__reentrant_body.append(s)
+
def d(self, s):
if isinstance(s, unicode):
s = s.encode('utf-8')
@@ -313,9 +327,11 @@ class Generator(object):
# emitted the 'invalidated' signal, or because the weakly referenced
# object has gone away.
- self.d('/**')
- self.d(' * %s_%s_connect_to_%s:'
+ connect_to = ('%s_%s_connect_to_%s'
% (self.prefix_lc, iface_lc, member_lc))
+
+ self.d('/**')
+ self.d(' * %s:' % connect_to)
self.d(' * @proxy: %s' % self.proxy_doc)
self.d(' * @callback: Callback to be called when the signal is')
self.d(' * received')
@@ -340,8 +356,8 @@ class Generator(object):
self.d(' */')
self.d('')
- self.h('TpProxySignalConnection *%s_%s_connect_to_%s (%sproxy,'
- % (self.prefix_lc, iface_lc, member_lc, self.proxy_arg))
+ self.h('TpProxySignalConnection *%s (%sproxy,'
+ % (connect_to, self.proxy_arg))
self.h(' %s callback,' % callback_name)
self.h(' gpointer user_data,')
self.h(' GDestroyNotify destroy,')
@@ -350,8 +366,7 @@ class Generator(object):
self.h('')
self.b('TpProxySignalConnection *')
- self.b('%s_%s_connect_to_%s (%sproxy,'
- % (self.prefix_lc, iface_lc, member_lc, self.proxy_arg))
+ self.b('(%s) (%sproxy,' % (connect_to, self.proxy_arg))
self.b(' %s callback,' % callback_name)
self.b(' gpointer user_data,')
self.b(' GDestroyNotify destroy,')
@@ -368,8 +383,6 @@ class Generator(object):
self.b(' G_TYPE_INVALID };')
self.b('')
- self.b(' g_return_val_if_fail (%s (proxy), NULL);'
- % self.proxy_assert)
self.b(' g_return_val_if_fail (callback != NULL, NULL);')
self.b('')
self.b(' return tp_proxy_signal_connection_v0_new ((TpProxy *) proxy,')
@@ -387,6 +400,26 @@ class Generator(object):
self.b('}')
self.b('')
+ # Inline the type-check into the header file, so the object code
+ # doesn't depend on tp_channel_get_type() or whatever
+ self.h('#ifndef __GTK_DOC_IGNORE__')
+ self.h('static inline TpProxySignalConnection *')
+ self.h('_%s (%sproxy,' % (connect_to, self.proxy_arg))
+ self.h(' %s callback,' % callback_name)
+ self.h(' gpointer user_data,')
+ self.h(' GDestroyNotify destroy,')
+ self.h(' GObject *weak_object,')
+ self.h(' GError **error)')
+ self.h('{')
+ self.h(' g_return_val_if_fail (%s (proxy), NULL);'
+ % self.proxy_assert)
+ self.h(' return %s (proxy, callback, user_data,' % connect_to)
+ self.h(' destroy, weak_object, error);')
+ self.h('}')
+ self.h('#define %s(...) _%s (__VA_ARGS__)'
+ % (connect_to, connect_to))
+ self.h('#endif /* __GTK_DOC_IGNORE__ */')
+
def do_method(self, iface, method):
iface_lc = iface.lower()
@@ -500,19 +533,25 @@ class Generator(object):
iface_lc,
member_lc)
+ # This is needed by both reentrant and non-reentrant calls
+ if self.split_reentrants:
+ collector = lambda x: (self.b(x), self.rb(x))
+ else:
+ collector = self.b
+
# The callback called by dbus-glib; this ends the call and collects
# the results into a GValueArray.
- self.b('static void')
- self.b('%s (DBusGProxy *proxy,' % collect_callback)
- self.b(' DBusGProxyCall *call,')
- self.b(' gpointer user_data)')
- self.b('{')
- self.b(' GError *error = NULL;')
+ collector('static void')
+ collector('%s (DBusGProxy *proxy,' % collect_callback)
+ collector(' DBusGProxyCall *call,')
+ collector(' gpointer user_data)')
+ collector('{')
+ collector(' GError *error = NULL;')
if len(out_args) > 0:
- self.b(' GValueArray *args;')
- self.b(' GValue blank = { 0 };')
- self.b(' guint i;')
+ collector(' GValueArray *args;')
+ collector(' GValue blank = { 0 };')
+ collector(' guint i;')
for arg in out_args:
name, info, tp_type, elt = arg
@@ -522,92 +561,93 @@ class Generator(object):
# have already allocated storage for them". Thanks,
# dbus-glib...
if gtype == 'G_TYPE_VALUE':
- self.b(' GValue *%s = g_new0 (GValue, 1);' % name)
+ collector(' GValue *%s = g_new0 (GValue, 1);' % name)
else:
- self.b(' %s%s;' % (ctype, name))
+ collector(' %s%s;' % (ctype, name))
- self.b('')
- self.b(' dbus_g_proxy_end_call (proxy, call, &error,')
+ collector('')
+ collector(' dbus_g_proxy_end_call (proxy, call, &error,')
for arg in out_args:
name, info, tp_type, elt = arg
ctype, gtype, marshaller, pointer = info
if gtype == 'G_TYPE_VALUE':
- self.b(' %s, %s,' % (gtype, name))
+ collector(' %s, %s,' % (gtype, name))
else:
- self.b(' %s, &%s,' % (gtype, name))
+ collector(' %s, &%s,' % (gtype, name))
- self.b(' G_TYPE_INVALID);')
+ collector(' G_TYPE_INVALID);')
if len(out_args) == 0:
- self.b(' tp_proxy_pending_call_v0_take_results (user_data, error,'
+ collector(' tp_proxy_pending_call_v0_take_results (user_data, error,'
'NULL);')
else:
- self.b('')
- self.b(' if (error != NULL)')
- self.b(' {')
- self.b(' tp_proxy_pending_call_v0_take_results (user_data, error,')
- self.b(' NULL);')
+ collector('')
+ collector(' if (error != NULL)')
+ collector(' {')
+ collector(' tp_proxy_pending_call_v0_take_results (user_data, error,')
+ collector(' NULL);')
for arg in out_args:
name, info, tp_type, elt = arg
ctype, gtype, marshaller, pointer = info
if gtype == 'G_TYPE_VALUE':
- self.b(' g_free (%s);' % name)
+ collector(' g_free (%s);' % name)
- self.b(' return;')
- self.b(' }')
- self.b('')
- self.b(' args = g_value_array_new (%d);' % len(out_args))
- self.b(' g_value_init (&blank, G_TYPE_INT);')
- self.b('')
- self.b(' for (i = 0; i < %d; i++)' % len(out_args))
- self.b(' g_value_array_append (args, &blank);')
+ collector(' return;')
+ collector(' }')
+ collector('')
+ collector(' args = g_value_array_new (%d);' % len(out_args))
+ collector(' g_value_init (&blank, G_TYPE_INT);')
+ collector('')
+ collector(' for (i = 0; i < %d; i++)' % len(out_args))
+ collector(' g_value_array_append (args, &blank);')
for i, arg in enumerate(out_args):
name, info, tp_type, elt = arg
ctype, gtype, marshaller, pointer = info
- self.b('')
- self.b(' g_value_unset (args->values + %d);' % i)
- self.b(' g_value_init (args->values + %d, %s);' % (i, gtype))
+ collector('')
+ collector(' g_value_unset (args->values + %d);' % i)
+ collector(' g_value_init (args->values + %d, %s);'
+ % (i, gtype))
if gtype == 'G_TYPE_STRING':
- self.b(' g_value_take_string (args->values + %d, %s);'
- % (i, name))
+ collector(' g_value_take_string (args->values + %d, %s);'
+ % (i, name))
elif marshaller == 'BOXED':
- self.b(' g_value_take_boxed (args->values + %d, %s);'
- % (i, name))
+ collector(' g_value_take_boxed (args->values + %d, %s);'
+ % (i, name))
elif gtype == 'G_TYPE_UCHAR':
- self.b(' g_value_set_uchar (args->values + %d, %s);'
- % (i, name))
+ collector(' g_value_set_uchar (args->values + %d, %s);'
+ % (i, name))
elif gtype == 'G_TYPE_BOOLEAN':
- self.b(' g_value_set_boolean (args->values + %d, %s);'
- % (i, name))
+ collector(' g_value_set_boolean (args->values + %d, %s);'
+ % (i, name))
elif gtype == 'G_TYPE_INT':
- self.b(' g_value_set_int (args->values + %d, %s);'
- % (i, name))
+ collector(' g_value_set_int (args->values + %d, %s);'
+ % (i, name))
elif gtype == 'G_TYPE_UINT':
- self.b(' g_value_set_uint (args->values + %d, %s);'
- % (i, name))
+ collector(' g_value_set_uint (args->values + %d, %s);'
+ % (i, name))
elif gtype == 'G_TYPE_INT64':
- self.b(' g_value_set_int (args->values + %d, %s);'
- % (i, name))
+ collector(' g_value_set_int (args->values + %d, %s);'
+ % (i, name))
elif gtype == 'G_TYPE_UINT64':
- self.b(' g_value_set_uint (args->values + %d, %s);'
- % (i, name))
+ collector(' g_value_set_uint (args->values + %d, %s);'
+ % (i, name))
elif gtype == 'G_TYPE_DOUBLE':
- self.b(' g_value_set_double (args->values + %d, %s);'
- % (i, name))
+ collector(' g_value_set_double (args->values + %d, %s);'
+ % (i, name))
else:
assert False, ("Don't know how to put %s in a GValue"
% gtype)
- self.b(' tp_proxy_pending_call_v0_take_results (user_data, '
- 'NULL, args);')
+ collector(' tp_proxy_pending_call_v0_take_results (user_data, '
+ 'NULL, args);')
- self.b('}')
+ collector('}')
self.b('static void')
self.b('%s (TpProxy *self,' % invoke_callback)
@@ -692,13 +732,15 @@ class Generator(object):
# gpointer user_data,
# GDestroyNotify *destructor);
- self.h('TpProxyPendingCall *%s_%s_call_%s (%sproxy,'
- % (self.prefix_lc, iface_lc, member_lc, self.proxy_arg))
+ caller_name = ('%s_%s_call_%s'
+ % (self.prefix_lc, iface_lc, member_lc))
+
+ self.h('TpProxyPendingCall *%s (%sproxy,'
+ % (caller_name, self.proxy_arg))
self.h(' gint timeout_ms,')
self.d('/**')
- self.d(' * %s_%s_call_%s:'
- % (self.prefix_lc, iface_lc, member_lc))
+ self.d(' * %s:' % caller_name)
self.d(' * @proxy: the #TpProxy')
self.d(' * @timeout_ms: the timeout in milliseconds, or -1 to use the')
self.d(' * default')
@@ -746,8 +788,8 @@ class Generator(object):
self.d(' */')
self.d('')
- self.b('TpProxyPendingCall *\n%s_%s_call_%s (%sproxy,'
- % (self.prefix_lc, iface_lc, member_lc, self.proxy_arg))
+ self.b('TpProxyPendingCall *\n(%s) (%sproxy,'
+ % (caller_name, self.proxy_arg))
self.b(' gint timeout_ms,')
for arg in in_args:
@@ -774,8 +816,6 @@ class Generator(object):
self.b(' GQuark interface = %s;' % self.get_iface_quark())
self.b(' DBusGProxy *iface;')
self.b('')
- self.b(' g_return_val_if_fail (%s (proxy), NULL);'
- % self.proxy_assert)
self.b(' g_return_val_if_fail (callback != NULL || '
'user_data == NULL, NULL);')
self.b(' g_return_val_if_fail (callback != NULL || '
@@ -785,33 +825,13 @@ class Generator(object):
self.b('')
self.b(' iface = tp_proxy_borrow_interface_by_id (')
self.b(' (TpProxy *) proxy,')
- self.b(' interface, &error);')
- self.b('')
- self.b(' if (iface == NULL)')
- self.b(' {')
- self.b(' if (callback != NULL)')
- self.b(' callback (proxy,')
-
- for arg in out_args:
- name, info, tp_type, elt = arg
- ctype, gtype, marshaller, pointer = info
-
- if pointer:
- self.b(' NULL,')
- else:
- self.b(' 0,')
-
- self.b(' error, user_data, weak_object);')
- self.b('')
- self.b(' if (destroy != NULL)')
- self.b(' destroy (user_data);')
- self.b('')
- self.b(' g_error_free (error);')
- self.b(' return NULL;')
- self.b(' }')
+ self.b(' interface, (callback == NULL ? NULL : &error));')
self.b('')
self.b(' if (callback == NULL)')
self.b(' {')
+ self.b(' if (iface == NULL)')
+ self.b(' return NULL;')
+ self.b('')
self.b(' dbus_g_proxy_call_no_reply (iface, "%s",' % member)
for arg in in_args:
@@ -834,6 +854,18 @@ class Generator(object):
self.b(' %s,' % invoke_callback)
self.b(' G_CALLBACK (callback), user_data, destroy,')
self.b(' weak_object, FALSE);')
+ self.b('')
+ # If iface is NULL then the only valid thing we can do is to
+ # terminate the call with an error. Go through the machinery
+ # we'd use for dbus-glib anyway, to stop it being re-entrant.
+ self.b(' if (iface == NULL)')
+ self.b(' {')
+ self.b(' tp_proxy_pending_call_v0_take_results (data,')
+ self.b(' error, NULL);')
+ self.b(' tp_proxy_pending_call_v0_completed (data);')
+ self.b(' return data;')
+ self.b(' }')
+ self.b('')
self.b(' tp_proxy_pending_call_v0_take_pending_call (data,')
self.b(' dbus_g_proxy_begin_call_with_timeout (iface,')
self.b(' "%s",' % member)
@@ -857,6 +889,38 @@ class Generator(object):
self.b('}')
self.b('')
+ # Inline the type-check into the header file, so the object code
+ # doesn't depend on tp_channel_get_type() or whatever
+ self.h('#ifndef __GTK_DOC_IGNORE__')
+ self.h('static inline TpProxyPendingCall *')
+ self.h('_%s (%sproxy,' % (caller_name, self.proxy_arg))
+ self.h(' gint timeout_ms,')
+
+ for arg in in_args:
+ name, info, tp_type, elt = arg
+ ctype, gtype, marshaller, pointer = info
+ const = pointer and 'const ' or ''
+ self.h(' %s%s%s,' % (const, ctype, name))
+
+ self.h(' %s callback,' % callback_name)
+ self.h(' gpointer user_data,')
+ self.h(' GDestroyNotify destroy,')
+ self.h(' GObject *weak_object)')
+ self.h('{')
+ self.h(' g_return_val_if_fail (%s (proxy), NULL);'
+ % self.proxy_assert)
+ self.h(' return %s (proxy, timeout_ms,' % caller_name)
+
+ for arg in in_args:
+ name, info, tp_type, elt = arg
+ self.h(' %s,' % name)
+
+ self.h(' callback, user_data, destroy, weak_object);')
+ self.h('}')
+ self.h('#define %s(...) _%s (__VA_ARGS__)'
+ % (caller_name, caller_name))
+ self.h('#endif /* __GTK_DOC_IGNORE__ */')
+
self.do_method_reentrant(method, iface_lc, member, member_lc,
in_args, out_args, collect_callback)
@@ -878,94 +942,105 @@ class Generator(object):
# GMainLoop **loop);
run_method_name = '%s_%s_run_%s' % (self.prefix_lc, iface_lc, member_lc)
- if run_method_name not in self.reentrant_symbols:
+
+ b = h = d = None
+
+ if run_method_name in self.reentrant_symbols:
+ b = self.b
+ h = self.h
+ d = self.d
+ elif self.split_reentrants:
+ b = self.rb
+ h = self.rh
+ d = self.rb
+ else:
return
- self.b('typedef struct {')
- self.b(' GMainLoop *loop;')
- self.b(' GError **error;')
+ b('typedef struct {')
+ b(' GMainLoop *loop;')
+ b(' GError **error;')
for arg in out_args:
name, info, tp_type, elt = arg
ctype, gtype, marshaller, pointer = info
- self.b(' %s*%s;' % (ctype, name))
+ b(' %s*%s;' % (ctype, name))
- self.b(' unsigned success:1;')
- self.b(' unsigned completed:1;')
- self.b('} _%s_%s_run_state_%s;'
+ b(' unsigned success:1;')
+ b(' unsigned completed:1;')
+ b('} _%s_%s_run_state_%s;'
% (self.prefix_lc, iface_lc, member_lc))
reentrant_invoke = '_%s_%s_finish_running_%s' % (self.prefix_lc,
iface_lc,
member_lc)
- self.b('static void')
- self.b('%s (TpProxy *self G_GNUC_UNUSED,' % reentrant_invoke)
- self.b(' GError *error,')
- self.b(' GValueArray *args,')
- self.b(' GCallback unused G_GNUC_UNUSED,')
- self.b(' gpointer user_data G_GNUC_UNUSED,')
- self.b(' GObject *unused2 G_GNUC_UNUSED)')
- self.b('{')
- self.b(' _%s_%s_run_state_%s *state = user_data;'
+ b('static void')
+ b('%s (TpProxy *self G_GNUC_UNUSED,' % reentrant_invoke)
+ b(' GError *error,')
+ b(' GValueArray *args,')
+ b(' GCallback unused G_GNUC_UNUSED,')
+ b(' gpointer user_data G_GNUC_UNUSED,')
+ b(' GObject *unused2 G_GNUC_UNUSED)')
+ b('{')
+ b(' _%s_%s_run_state_%s *state = user_data;'
% (self.prefix_lc, iface_lc, member_lc))
- self.b('')
- self.b(' state->success = (error == NULL);')
- self.b(' state->completed = TRUE;')
- self.b(' g_main_loop_quit (state->loop);')
- self.b('')
- self.b(' if (error != NULL)')
- self.b(' {')
- self.b(' if (state->error != NULL)')
- self.b(' *state->error = error;')
- self.b(' else')
- self.b(' g_error_free (error);')
- self.b('')
- self.b(' return;')
- self.b(' }')
- self.b('')
+ b('')
+ b(' state->success = (error == NULL);')
+ b(' state->completed = TRUE;')
+ b(' g_main_loop_quit (state->loop);')
+ b('')
+ b(' if (error != NULL)')
+ b(' {')
+ b(' if (state->error != NULL)')
+ b(' *state->error = error;')
+ b(' else')
+ b(' g_error_free (error);')
+ b('')
+ b(' return;')
+ b(' }')
+ b('')
for i, arg in enumerate(out_args):
name, info, tp_type, elt = arg
ctype, gtype, marshaller, pointer = info
- self.b(' if (state->%s != NULL)' % name)
+ b(' if (state->%s != NULL)' % name)
if marshaller == 'BOXED':
- self.b(' *state->%s = g_value_dup_boxed ('
+ b(' *state->%s = g_value_dup_boxed ('
'args->values + %d);' % (name, i))
elif marshaller == 'STRING':
- self.b(' *state->%s = g_value_dup_string '
+ b(' *state->%s = g_value_dup_string '
'(args->values + %d);' % (name, i))
elif marshaller in ('UCHAR', 'BOOLEAN', 'INT', 'UINT',
'INT64', 'UINT64', 'DOUBLE'):
- self.b(' *state->%s = g_value_get_%s (args->values + %d);'
+ b(' *state->%s = g_value_get_%s (args->values + %d);'
% (name, marshaller.lower(), i))
else:
assert False, "Don't know how to copy %s" % gtype
- self.b('')
+ b('')
if len(out_args) > 0:
- self.b(' g_value_array_free (args);')
+ b(' g_value_array_free (args);')
else:
- self.b(' if (args != NULL)')
- self.b(' g_value_array_free (args);')
+ b(' if (args != NULL)')
+ b(' g_value_array_free (args);')
- self.b('}')
- self.b('')
+ b('}')
+ b('')
if self.deprecate_reentrant:
- self.h('#ifndef %s' % self.deprecate_reentrant)
+ h('#ifndef %s' % self.deprecate_reentrant)
- self.h('gboolean %s (%sproxy,'
+ h('gboolean %s (%sproxy,'
% (run_method_name, self.proxy_arg))
- self.h(' gint timeout_ms,')
+ h(' gint timeout_ms,')
- self.d('/**')
- self.d(' * %s:' % run_method_name)
- self.d(' * @proxy: %s' % self.proxy_doc)
- self.d(' * @timeout_ms: Timeout in milliseconds, or -1 for default')
+ d('/**')
+ d(' * %s:' % run_method_name)
+ d(' * @proxy: %s' % self.proxy_doc)
+ d(' * @timeout_ms: Timeout in milliseconds, or -1 for default')
for arg in in_args:
name, info, tp_type, elt = arg
@@ -976,47 +1051,47 @@ class Generator(object):
if ctype == 'guint ' and tp_type != '':
docs += ' (#%s)' % ('Tp' + tp_type.replace('_', ''))
- self.d(' * @%s: Used to pass an \'in\' argument: %s'
+ d(' * @%s: Used to pass an \'in\' argument: %s'
% (name, docs))
for arg in out_args:
name, info, tp_type, elt = arg
ctype, gtype, marshaller, pointer = info
- self.d(' * @%s: Used to return an \'out\' argument if %%TRUE is '
+ d(' * @%s: Used to return an \'out\' argument if %%TRUE is '
'returned: %s'
% (name, xml_escape(get_docstring(elt) or '(Undocumented)')))
- self.d(' * @error: If not %NULL, used to return errors if %FALSE ')
- self.d(' * is returned')
- self.d(' * @loop: If not %NULL, set before re-entering ')
- self.d(' * the main loop, to point to a #GMainLoop ')
- self.d(' * which can be used to cancel this call with ')
- self.d(' * g_main_loop_quit(), causing a return of ')
- self.d(' * %FALSE with @error set to %TP_DBUS_ERROR_CANCELLED')
- self.d(' *')
- self.d(' * Call the method %s and run the main loop' % member)
- self.d(' * until it returns. Before calling this method, you must')
- self.d(' * add a reference to any borrowed objects you need to keep,')
- self.d(' * and generally ensure that everything is in a consistent')
- self.d(' * state.')
- self.d(' *')
- self.d(' * %s' % xml_escape(get_docstring(method) or '(Undocumented)'))
- self.d(' *')
- self.d(' * Returns: TRUE on success, FALSE and sets @error on error')
+ d(' * @error: If not %NULL, used to return errors if %FALSE ')
+ d(' * is returned')
+ d(' * @loop: If not %NULL, set before re-entering ')
+ d(' * the main loop, to point to a #GMainLoop ')
+ d(' * which can be used to cancel this call with ')
+ d(' * g_main_loop_quit(), causing a return of ')
+ d(' * %FALSE with @error set to %TP_DBUS_ERROR_CANCELLED')
+ d(' *')
+ d(' * Call the method %s and run the main loop' % member)
+ d(' * until it returns. Before calling this method, you must')
+ d(' * add a reference to any borrowed objects you need to keep,')
+ d(' * and generally ensure that everything is in a consistent')
+ d(' * state.')
+ d(' *')
+ d(' * %s' % xml_escape(get_docstring(method) or '(Undocumented)'))
+ d(' *')
+ d(' * Returns: TRUE on success, FALSE and sets @error on error')
deprecated = method.getElementsByTagName('tp:deprecated')
if deprecated:
d = deprecated[0]
- self.d(' *')
- self.d(' * Deprecated: %s' % xml_escape(get_deprecated(d)))
+ d(' *')
+ d(' * Deprecated: %s' % xml_escape(get_deprecated(d)))
- self.d(' */')
- self.d('')
+ d(' */')
+ d('')
- self.b('gboolean\n%s (%sproxy,'
+ b('gboolean\n%s (%sproxy,'
% (run_method_name, self.proxy_arg))
- self.b(' gint timeout_ms,')
+ b(' gint timeout_ms,')
for arg in in_args:
name, info, tp_type, elt = arg
@@ -1024,69 +1099,69 @@ class Generator(object):
const = pointer and 'const ' or ''
- self.h(' %s%s%s,' % (const, ctype, name))
- self.b(' %s%s%s,' % (const, ctype, name))
+ h(' %s%s%s,' % (const, ctype, name))
+ b(' %s%s%s,' % (const, ctype, name))
for arg in out_args:
name, info, tp_type, elt = arg
ctype, gtype, marshaller, pointer = info
- self.h(' %s*%s,' % (ctype, name))
- self.b(' %s*%s,' % (ctype, name))
+ h(' %s*%s,' % (ctype, name))
+ b(' %s*%s,' % (ctype, name))
- self.h(' GError **error,')
+ h(' GError **error,')
if self.deprecate_reentrant:
- self.h(' GMainLoop **loop) %s;' % self.deprecation_attribute)
- self.h('#endif /* not %s */' % self.deprecate_reentrant)
+ h(' GMainLoop **loop) %s;' % self.deprecation_attribute)
+ h('#endif /* not %s */' % self.deprecate_reentrant)
else:
- self.h(' GMainLoop **loop);')
+ h(' GMainLoop **loop);')
- self.h('')
+ h('')
- self.b(' GError **error,')
- self.b(' GMainLoop **loop)')
- self.b('{')
- self.b(' DBusGProxy *iface;')
- self.b(' GQuark interface = %s;' % self.get_iface_quark())
- self.b(' TpProxyPendingCall *pc;')
- self.b(' _%s_%s_run_state_%s state = {'
+ b(' GError **error,')
+ b(' GMainLoop **loop)')
+ b('{')
+ b(' DBusGProxy *iface;')
+ b(' GQuark interface = %s;' % self.get_iface_quark())
+ b(' TpProxyPendingCall *pc;')
+ b(' _%s_%s_run_state_%s state = {'
% (self.prefix_lc, iface_lc, member_lc))
- self.b(' NULL /* loop */, error,')
+ b(' NULL /* loop */, error,')
for arg in out_args:
name, info, tp_type, elt = arg
- self.b(' %s,' % name)
+ b(' %s,' % name)
- self.b(' FALSE /* completed */, FALSE /* success */ };')
- self.b('')
- self.b(' g_return_val_if_fail (%s (proxy), FALSE);'
+ b(' FALSE /* completed */, FALSE /* success */ };')
+ b('')
+ b(' g_return_val_if_fail (%s (proxy), FALSE);'
% self.proxy_assert)
- self.b('')
- self.b(' iface = tp_proxy_borrow_interface_by_id')
- self.b(' ((TpProxy *) proxy, interface, error);')
- self.b('')
- self.b(' if (iface == NULL)')
- self.b(' return FALSE;')
- self.b('')
- self.b(' state.loop = g_main_loop_new (NULL, FALSE);')
- self.b('')
- self.b(' pc = tp_proxy_pending_call_v0_new ((TpProxy *) proxy,')
- self.b(' interface, "%s", iface,' % member)
- self.b(' %s,' % reentrant_invoke)
- self.b(' NULL, &state, NULL, NULL, TRUE);')
- self.b('')
- self.b(' if (loop != NULL)')
- self.b(' *loop = state.loop;')
- self.b('')
- self.b(' tp_proxy_pending_call_v0_take_pending_call (pc,')
- self.b(' dbus_g_proxy_begin_call_with_timeout (iface,')
- self.b(' "%s",' % member)
- self.b(' %s,' % collect_callback)
- self.b(' pc,')
- self.b(' tp_proxy_pending_call_v0_completed,')
- self.b(' timeout_ms,')
+ b('')
+ b(' iface = tp_proxy_borrow_interface_by_id')
+ b(' ((TpProxy *) proxy, interface, error);')
+ b('')
+ b(' if (iface == NULL)')
+ b(' return FALSE;')
+ b('')
+ b(' state.loop = g_main_loop_new (NULL, FALSE);')
+ b('')
+ b(' pc = tp_proxy_pending_call_v0_new ((TpProxy *) proxy,')
+ b(' interface, "%s", iface,' % member)
+ b(' %s,' % reentrant_invoke)
+ b(' NULL, &state, NULL, NULL, TRUE);')
+ b('')
+ b(' if (loop != NULL)')
+ b(' *loop = state.loop;')
+ b('')
+ b(' tp_proxy_pending_call_v0_take_pending_call (pc,')
+ b(' dbus_g_proxy_begin_call_with_timeout (iface,')
+ b(' "%s",' % member)
+ b(' %s,' % collect_callback)
+ b(' pc,')
+ b(' tp_proxy_pending_call_v0_completed,')
+ b(' timeout_ms,')
for arg in in_args:
name, info, tp_type, elt = arg
@@ -1094,24 +1169,24 @@ class Generator(object):
const = pointer and 'const ' or ''
- self.b(' %s, %s,' % (gtype, name))
-
- self.b(' G_TYPE_INVALID));')
- self.b('')
- self.b(' if (!state.completed)')
- self.b(' g_main_loop_run (state.loop);')
- self.b('')
- self.b(' if (!state.completed)')
- self.b(' tp_proxy_pending_call_cancel (pc);')
- self.b('')
- self.b(' if (loop != NULL)')
- self.b(' *loop = NULL;')
- self.b('')
- self.b(' g_main_loop_unref (state.loop);')
- self.b('')
- self.b(' return state.success;')
- self.b('}')
- self.b('')
+ b(' %s, %s,' % (gtype, name))
+
+ b(' G_TYPE_INVALID));')
+ b('')
+ b(' if (!state.completed)')
+ b(' g_main_loop_run (state.loop);')
+ b('')
+ b(' if (!state.completed)')
+ b(' tp_proxy_pending_call_cancel (pc);')
+ b('')
+ b(' if (loop != NULL)')
+ b(' *loop = NULL;')
+ b('')
+ b(' g_main_loop_unref (state.loop);')
+ b('')
+ b(' return state.success;')
+ b('}')
+ b('')
def do_signal_add(self, signal):
marshaller_items = []
@@ -1135,6 +1210,9 @@ class Generator(object):
assert len(ifaces) == 1
iface = ifaces[0]
name = node.getAttribute('name').replace('/', '')
+ # This is a hack to get rid of interface version numbers
+ # until we migrate to generating version-numbered code
+ name = name.replace('Call1_', 'Call_').rstrip('1')
self.iface = name
self.iface_lc = name.lower()
@@ -1185,6 +1263,10 @@ class Generator(object):
self.b(' * confused by seeing function definitions, so mark it as: */')
self.b('/*<private_header>*/')
self.b('')
+ # if we're splitting out re-entrant things, we want them marked
+ # private too
+ self.rh('/*<private_header>*/')
+ self.rb('/*<private_header>*/')
nodes = self.dom.getElementsByTagName('node')
nodes.sort(cmp_by_name)
@@ -1193,6 +1275,12 @@ class Generator(object):
self.do_interface(node)
if self.group is not None:
+ self.h('void %s_%s_add_signals (TpProxy *self,'
+ % (self.prefix_lc, self.group))
+ self.h(' guint quark,')
+ self.h(' DBusGProxy *proxy,')
+ self.h(' gpointer unused);')
+ self.h('')
self.b('/*')
self.b(' * %s_%s_add_signals:' % (self.prefix_lc, self.group))
@@ -1209,7 +1297,7 @@ class Generator(object):
self.b(' * This function should be used as a signal handler for')
self.b(' * #TpProxy::interface-added.')
self.b(' */')
- self.b('static void')
+ self.b('void')
self.b('%s_%s_add_signals (TpProxy *self G_GNUC_UNUSED,'
% (self.prefix_lc, self.group))
self.b(' guint quark,')
@@ -1225,6 +1313,9 @@ class Generator(object):
if not signals:
continue
name = node.getAttribute('name').replace('/', '').lower()
+ # This is a hack to get rid of interface version numbers
+ # until we migrate to generating version-numbered code
+ name = name.replace('call1_', 'call_').rstrip('1')
self.iface_uc = name.upper()
self.b(' if (quark == %s)' % self.get_iface_quark())
self.b(' %s_add_signals_for_%s (proxy);'
@@ -1240,6 +1331,10 @@ class Generator(object):
self.h('#endif /* defined (%s) */' % self.guard)
self.h('')
+ if self.split_reentrants:
+ file_set_contents(self.basename + '-reentrant-body.h', '\n'.join(self.__reentrant_body))
+ file_set_contents(self.basename + '-reentrant.h', '\n'.join(self.__reentrant_header))
+
file_set_contents(self.basename + '.h', '\n'.join(self.__header))
file_set_contents(self.basename + '-body.h', '\n'.join(self.__body))
file_set_contents(self.basename + '-gtk-doc.h', '\n'.join(self.__docs))
@@ -1253,7 +1348,8 @@ if __name__ == '__main__':
['group=', 'subclass=', 'subclass-assert=',
'iface-quark-prefix=', 'tp-proxy-api=',
'generate-reentrant=', 'deprecate-reentrant=',
- 'deprecation-attribute=', 'guard='])
+ 'deprecation-attribute=', 'guard=',
+ 'split-reentrants='])
opts = {}
diff --git a/tools/glib-ginterface-gen.py b/tools/glib-ginterface-gen.py
index 784397738..87fa6f5db 100644
--- a/tools/glib-ginterface-gen.py
+++ b/tools/glib-ginterface-gen.py
@@ -101,6 +101,9 @@ class Generator(object):
def do_node(self, node):
node_name = node.getAttribute('name').replace('/', '')
+ # This is a hack to get rid of interface version numbers
+ # until we migrate to generating version-numbered code
+ node_name = node_name.replace('Call1_', 'Call_').rstrip('1')
node_name_mixed = self.node_name_mixed = node_name.replace('_', '')
node_name_lc = self.node_name_lc = node_name.lower()
node_name_uc = self.node_name_uc = node_name.upper()
diff --git a/tools/glib-interfaces-gen.py b/tools/glib-interfaces-gen.py
index 410762cde..042f93bed 100644
--- a/tools/glib-interfaces-gen.py
+++ b/tools/glib-interfaces-gen.py
@@ -75,14 +75,14 @@ class Generator(object):
* The interface name "%(name)s"
*/
""" % {'IFACE_DEFINE' : (self.prefix + 'IFACE_' + \
- parent_name).upper().replace('/', ''),
+ parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'),
'name' : iface.getAttribute('name')})
self.h("""
#define %(IFACE_DEFINE)s \\
"%(name)s"
""" % {'IFACE_DEFINE' : (self.prefix + 'IFACE_' + \
- parent_name).upper().replace('/', ''),
+ parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'),
'name' : iface.getAttribute('name')})
self.d("""
@@ -93,9 +93,9 @@ class Generator(object):
name "%(name)s"
*/
""" % {'IFACE_QUARK_DEFINE' : (self.prefix + 'IFACE_QUARK_' + \
- parent_name).upper().replace('/', ''),
+ parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'),
'iface_quark_func' : (self.prefix + 'iface_quark_' + \
- parent_name).lower().replace('/', ''),
+ parent_name).lower().replace('/', '').replace('call1_', 'call_').rstrip('1'),
'name' : iface.getAttribute('name')})
self.h("""
@@ -105,9 +105,9 @@ name "%(name)s"
GQuark %(iface_quark_func)s (void);
""" % {'IFACE_QUARK_DEFINE' : (self.prefix + 'IFACE_QUARK_' + \
- parent_name).upper().replace('/', ''),
+ parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'),
'iface_quark_func' : (self.prefix + 'iface_quark_' + \
- parent_name).lower().replace('/', ''),
+ parent_name).lower().replace('/', '').replace('call1_', 'call_').rstrip('1'),
'name' : iface.getAttribute('name')})
self.c("""\
@@ -125,7 +125,7 @@ GQuark
}
""" % {'iface_quark_func' : (self.prefix + 'iface_quark_' + \
- parent_name).lower().replace('/', ''),
+ parent_name).lower().replace('/', '').replace('call1_', 'call_').rstrip('1'),
'name' : iface.getAttribute('name')})
for prop in iface.getElementsByTagNameNS(None, 'property'):
@@ -136,7 +136,7 @@ GQuark
* The fully-qualified property name "%(name)s.%(prop)s"
*/
""" % {'IFACE_PREFIX' : (self.prefix + 'PROP_' + \
- parent_name).upper().replace('/', ''),
+ parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'),
'PROP_UC': prop.getAttributeNS(NS_TP, "name-for-bindings").upper(),
'name' : iface.getAttribute('name'),
'prop' : prop.getAttribute('name'),
@@ -146,7 +146,7 @@ GQuark
#define %(IFACE_PREFIX)s_%(PROP_UC)s \\
"%(name)s.%(prop)s"
""" % {'IFACE_PREFIX' : (self.prefix + 'PROP_' + \
- parent_name).upper().replace('/', ''),
+ parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'),
'PROP_UC': prop.getAttributeNS(NS_TP, "name-for-bindings").upper(),
'name' : iface.getAttribute('name'),
'prop' : prop.getAttribute('name'),
@@ -161,7 +161,7 @@ GQuark
* The fully-qualified contact attribute token name "%(name)s/%(prop)s"
*/
""" % {'TOKEN_PREFIX' : (self.prefix + 'TOKEN_' + \
- parent_name).upper().replace('/', ''),
+ parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'),
'TOKEN_UC': prop.getAttributeNS(None, "name").upper().replace("-", "_").replace(".", "_"),
'name' : iface.getAttribute('name'),
'prop' : prop.getAttribute('name'),
@@ -171,7 +171,7 @@ GQuark
#define %(TOKEN_PREFIX)s_%(TOKEN_UC)s \\
"%(name)s/%(prop)s"
""" % {'TOKEN_PREFIX' : (self.prefix + 'TOKEN_' + \
- parent_name).upper().replace('/', ''),
+ parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'),
'TOKEN_UC': prop.getAttributeNS(None, "name").upper().replace("-", "_").replace(".", "_"),
'name' : iface.getAttribute('name'),
'prop' : prop.getAttribute('name'),
@@ -186,7 +186,7 @@ GQuark
* The fully-qualified capability token name "%(name)s/%(prop)s"
*/
""" % {'TOKEN_PREFIX' : (self.prefix + 'TOKEN_' + \
- parent_name).upper().replace('/', ''),
+ parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'),
'TOKEN_UC': prop.getAttributeNS(None, "name").upper().replace("-", "_").replace(".", "_"),
'name' : iface.getAttribute('name'),
'prop' : prop.getAttribute('name'),
@@ -196,7 +196,7 @@ GQuark
#define %(TOKEN_PREFIX)s_%(TOKEN_UC)s \\
"%(name)s/%(prop)s"
""" % {'TOKEN_PREFIX' : (self.prefix + 'TOKEN_' + \
- parent_name).upper().replace('/', ''),
+ parent_name).upper().replace('/', '').replace('CALL1_', 'CALL_').rstrip('1'),
'TOKEN_UC': prop.getAttributeNS(None, "name").upper().replace("-", "_").replace(".", "_"),
'name' : iface.getAttribute('name'),
'prop' : prop.getAttribute('name'),
diff --git a/tools/manager-file.py b/tools/manager-file.py
index e1b51a616..1d7078f71 100644
--- a/tools/manager-file.py
+++ b/tools/manager-file.py
@@ -88,8 +88,8 @@ gflags = {
def write_manager(f, manager, protos):
# pointless backwards compat section
print >> f, '[ConnectionManager]'
- print >> f, 'BusName=org.freedesktop.Telepathy.ConnectionManager.' + manager
- print >> f, 'ObjectPath=/org/freedesktop/Telepathy/ConnectionManager/' + manager
+ print >> f, 'BusName=im.telepathy1.ConnectionManager.' + manager
+ print >> f, 'ObjectPath=/im/telepathy1/ConnectionManager/' + manager
# protocols
for proto, params in protos.iteritems():