Merge lp:~phablet-team/messaging-framework/telepathy-metadata-interface into lp:messaging-framework

Proposed by Roberto Mier Escandon
Status: Needs review
Proposed branch: lp:~phablet-team/messaging-framework/telepathy-metadata-interface
Merge into: lp:messaging-framework
Diff against target: 345 lines (+258/-3)
7 files modified
include/messaging/qt/tp/interfaces/base_channel_destroyable_internal.h (+1/-1)
include/messaging/qt/tp/interfaces/base_channel_file_transfer_metadata.h (+76/-0)
include/messaging/qt/tp/interfaces/base_channel_file_transfer_metadata_internal.h (+54/-0)
include/messaging/qt/tp/interfaces/base_channel_roles_internal.h (+2/-1)
include/messaging/qt/tp/interfaces/types.h (+4/-1)
src/CMakeLists.txt (+3/-0)
src/messaging/qt/tp/interfaces/base_channel_file_transfer_metadata.cpp (+118/-0)
To merge this branch: bzr merge lp:~phablet-team/messaging-framework/telepathy-metadata-interface
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+303473@code.launchpad.net

Commit message

Implementation of interface described here https://telepathy.freedesktop.org/spec/Channel_Interface_File_Transfer_Metadata.html

This interface is needed to hold file transfer identifier while channel is active

Modified some bad modificators in the other interfaces

Description of the change

Implementation of interface described here https://telepathy.freedesktop.org/spec/Channel_Interface_File_Transfer_Metadata.html

Modified some bad modificators in the other interfaces

To post a comment you must log in.
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:56
https://jenkins.canonical.com/system-apps/job/lp-messaging-framework-ci/41/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1261
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/274
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1261
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/1130
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial+overlay/1130
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=yakkety/1130
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1117
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1117/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1117
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1117/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1117
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1117/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1117
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1117/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1117
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1117/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1117
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1117/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1117
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1117/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1117
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1117/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1117
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1117/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-messaging-framework-ci/41/rebuild

review: Approve (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
57. By Roberto Mier Escandon

merged trunk

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:57
https://jenkins.canonical.com/system-apps/job/lp-messaging-framework-ci/71/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1459
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/341
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1459
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1309
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1309/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1309
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1309/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1309
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1309/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1309
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1309/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1309
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1309/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1309
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1309/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1309
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1309/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1309
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1309/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1309
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1309/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-messaging-framework-ci/71/rebuild

review: Approve (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

PASSED: Continuous integration, rev:57
https://jenkins.canonical.com/system-apps/job/lp-messaging-framework-ci/74/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1489
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/353
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1489
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1337
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1337/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1337
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1337/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1337
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1337/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1337
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1337/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1337
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1337/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1337
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1337/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1337
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1337/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1337
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1337/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1337
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1337/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-messaging-framework-ci/74/rebuild

review: Approve (continuous-integration)

Unmerged revisions

57. By Roberto Mier Escandon

merged trunk

56. By Roberto Mier Escandon

finished implementation

55. By Roberto Mier Escandon

first code

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'include/messaging/qt/tp/interfaces/base_channel_destroyable_internal.h'
2--- include/messaging/qt/tp/interfaces/base_channel_destroyable_internal.h 2016-06-08 16:22:14 +0000
3+++ include/messaging/qt/tp/interfaces/base_channel_destroyable_internal.h 2016-09-09 09:33:30 +0000
4@@ -40,7 +40,7 @@
5 public Q_SLOTS:
6 void destroy(const Tp::Service::ChannelInterfaceDestroyableAdaptor::DestroyContextPtr &context);
7
8-public:
9+private:
10 BaseChannelDestroyableInterface *mInterface;
11 };
12
13
14=== added file 'include/messaging/qt/tp/interfaces/base_channel_file_transfer_metadata.h'
15--- include/messaging/qt/tp/interfaces/base_channel_file_transfer_metadata.h 1970-01-01 00:00:00 +0000
16+++ include/messaging/qt/tp/interfaces/base_channel_file_transfer_metadata.h 2016-09-09 09:33:30 +0000
17@@ -0,0 +1,76 @@
18+/*
19+ * Copyright © 2016 Canonical Ltd.
20+ *
21+ * This program is free software: you can redistribute it and/or modify it
22+ * under the terms of the GNU Lesser General Public License version 3,
23+ * as published by the Free Software Foundation.
24+ *
25+ * This program is distributed in the hope that it will be useful,
26+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
27+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28+ * GNU Lesser General Public License for more details.
29+ *
30+ * You should have received a copy of the GNU Lesser General Public License
31+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
32+ */
33+
34+#ifndef MESSAGING_QT_TP_INTERFACES_BASE_CHANNEL_FILE_TRANSFER_METADATA_H
35+#define MESSAGING_QT_TP_INTERFACES_BASE_CHANNEL_FILE_TRANSFER_METADATA_H
36+
37+#include <messaging/visibility.h>
38+
39+#include <TelepathyQt/BaseChannel>
40+
41+#include <messaging/qt/tp/interfaces/types.h>
42+
43+namespace messaging
44+{
45+namespace qt
46+{
47+namespace tp
48+{
49+namespace interfaces
50+{
51+
52+class MESSAGING_FW_LOCAL BaseChannelFileTransferMetadataInterface : public Tp::AbstractChannelInterface
53+{
54+ Q_OBJECT
55+ Q_DISABLE_COPY(BaseChannelFileTransferMetadataInterface)
56+
57+public:
58+ static BaseChannelFileTransferMetadataInterfacePtr create(const QString &serviceName,
59+ const Tp::Metadata &metadata) {
60+ return BaseChannelFileTransferMetadataInterfacePtr(
61+ new BaseChannelFileTransferMetadataInterface(serviceName,
62+ metadata));
63+ }
64+ template<typename BaseChannelFileTransferMetadataInterfaceSubclass>
65+ static Tp::SharedPtr<BaseChannelFileTransferMetadataInterfaceSubclass> create(const QString &serviceName,
66+ const Tp::Metadata &metadata) {
67+ return Tp::SharedPtr<BaseChannelFileTransferMetadataInterfaceSubclass>(
68+ new BaseChannelFileTransferMetadataInterfaceSubclass(serviceName, metadata));
69+ }
70+ virtual ~BaseChannelFileTransferMetadataInterface();
71+
72+ QVariantMap immutableProperties() const;
73+
74+ QString serviceName() const;
75+ Tp::Metadata metadata() const;
76+
77+private:
78+ BaseChannelFileTransferMetadataInterface(const QString &serviceName, const Tp::Metadata &metadata);
79+ void createAdaptor();
80+
81+ class Adaptee;
82+ friend class Adaptee;
83+ struct Private;
84+ friend struct Private;
85+ Private *mPriv;
86+};
87+
88+}
89+}
90+}
91+}
92+#endif // MESSAGING_QT_TP_INTERFACES_BASE_CHANNEL_FILE_TRANSFER_METADATA_H
93+
94
95=== added file 'include/messaging/qt/tp/interfaces/base_channel_file_transfer_metadata_internal.h'
96--- include/messaging/qt/tp/interfaces/base_channel_file_transfer_metadata_internal.h 1970-01-01 00:00:00 +0000
97+++ include/messaging/qt/tp/interfaces/base_channel_file_transfer_metadata_internal.h 2016-09-09 09:33:30 +0000
98@@ -0,0 +1,54 @@
99+/*
100+ * Copyright © 2016 Canonical Ltd.
101+ *
102+ * This program is free software: you can redistribute it and/or modify it
103+ * under the terms of the GNU Lesser General Public License version 3,
104+ * as published by the Free Software Foundation.
105+ *
106+ * This program is distributed in the hope that it will be useful,
107+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
108+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
109+ * GNU Lesser General Public License for more details.
110+ *
111+ * You should have received a copy of the GNU Lesser General Public License
112+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
113+ */
114+
115+#ifndef MESSAGING_QT_TP_INTERFACES_BASE_CHANNEL_FILE_TRANSFER_METADATA_INTERNAL
116+#define MESSAGING_QT_TP_INTERFACES_BASE_CHANNEL_FILE_TRANSFER_METADATA_INTERNAL
117+
118+#include <TelepathyQt/_gen/svc-channel.h>
119+#include <messaging/qt/tp/interfaces/base_channel_file_transfer_metadata.h>
120+
121+namespace messaging
122+{
123+namespace qt
124+{
125+namespace tp
126+{
127+namespace interfaces
128+{
129+
130+class MESSAGING_FW_LOCAL BaseChannelFileTransferMetadataInterface::Adaptee : public QObject
131+{
132+ Q_OBJECT
133+ Q_PROPERTY(QString serviceName READ serviceName)
134+ Q_PROPERTY(Tp::Metadata metadata READ metadata)
135+
136+public:
137+ Adaptee(BaseChannelFileTransferMetadataInterface *interface);
138+ ~Adaptee();
139+
140+ QString serviceName() const;
141+ Tp::Metadata metadata() const;
142+
143+private:
144+ BaseChannelFileTransferMetadataInterface *mInterface;
145+};
146+
147+}
148+}
149+}
150+}
151+#endif // BASE_CHANNEL_FILE_TRANSFER_METADATA_INTERNAL
152+
153
154=== modified file 'include/messaging/qt/tp/interfaces/base_channel_roles_internal.h'
155--- include/messaging/qt/tp/interfaces/base_channel_roles_internal.h 2016-08-11 21:13:16 +0000
156+++ include/messaging/qt/tp/interfaces/base_channel_roles_internal.h 2016-09-09 09:33:30 +0000
157@@ -35,6 +35,7 @@
158 Q_OBJECT
159 Q_PROPERTY(HandleRolesMap roles READ roles)
160 Q_PROPERTY(bool canUpdateRoles READ canUpdateRoles)
161+
162 public:
163 Adaptee(BaseChannelRolesInterface *interface);
164 ~Adaptee();
165@@ -48,7 +49,7 @@
166 Q_SIGNALS:
167 void rolesChanged(const HandleRolesMap &added, const HandleRolesMap& removed);
168
169-public:
170+private:
171 BaseChannelRolesInterface *mInterface;
172 };
173
174
175=== modified file 'include/messaging/qt/tp/interfaces/types.h'
176--- include/messaging/qt/tp/interfaces/types.h 2016-08-16 16:23:42 +0000
177+++ include/messaging/qt/tp/interfaces/types.h 2016-09-09 09:33:30 +0000
178@@ -19,6 +19,8 @@
179
180 #include <messaging/visibility.h>
181
182+#include <TelepathyQt/SharedPtr>
183+
184 #include <QMap>
185 #include <TelepathyQt/Types>
186
187@@ -31,12 +33,13 @@
188 namespace interfaces
189 {
190
191+class BaseChannelFileTransferMetadataInterface;
192 class BaseChannelDestroyableInterface;
193 class BaseChannelRolesInterface;
194
195 typedef Tp::SharedPtr<BaseChannelDestroyableInterface> BaseChannelDestroyableInterfacePtr;
196 typedef Tp::SharedPtr<BaseChannelRolesInterface> BaseChannelRolesInterfacePtr;
197-
198+typedef Tp::SharedPtr<BaseChannelFileTransferMetadataInterface> BaseChannelFileTransferMetadataInterfacePtr;
199
200 /**
201 * \struct HandleRolesMap
202
203=== modified file 'src/CMakeLists.txt'
204--- src/CMakeLists.txt 2016-08-26 14:11:06 +0000
205+++ src/CMakeLists.txt 2016-09-09 09:33:30 +0000
206@@ -7,6 +7,8 @@
207 ${CMAKE_SOURCE_DIR}/include/messaging/qt/tp/text_channel.h
208 ${CMAKE_SOURCE_DIR}/include/messaging/qt/tp/interfaces/base_channel_destroyable.h
209 ${CMAKE_SOURCE_DIR}/include/messaging/qt/tp/interfaces/base_channel_destroyable_internal.h
210+ ${CMAKE_SOURCE_DIR}/include/messaging/qt/tp/interfaces/base_channel_file_transfer_metadata.h
211+ ${CMAKE_SOURCE_DIR}/include/messaging/qt/tp/interfaces/base_channel_file_transfer_metadata_internal.h
212 ${CMAKE_SOURCE_DIR}/include/messaging/qt/tp/interfaces/base_channel_roles.h
213 ${CMAKE_SOURCE_DIR}/include/messaging/qt/tp/interfaces/base_channel_roles_internal.h
214 ${CMAKE_SOURCE_DIR}/include/messaging/qt/tp/interfaces/channel_interface_roles_adaptor.h)
215@@ -47,6 +49,7 @@
216 messaging/qt/tp/text_channel.cpp
217
218 messaging/qt/tp/interfaces/base_channel_destroyable.cpp
219+ messaging/qt/tp/interfaces/base_channel_file_transfer_metadata.cpp
220 messaging/qt/tp/interfaces/base_channel_roles.cpp
221 messaging/qt/tp/interfaces/channel_interface_roles_adaptor.cpp
222
223
224=== added file 'src/messaging/qt/tp/interfaces/base_channel_file_transfer_metadata.cpp'
225--- src/messaging/qt/tp/interfaces/base_channel_file_transfer_metadata.cpp 1970-01-01 00:00:00 +0000
226+++ src/messaging/qt/tp/interfaces/base_channel_file_transfer_metadata.cpp 2016-09-09 09:33:30 +0000
227@@ -0,0 +1,118 @@
228+/*
229+ * Copyright © 2016 Canonical Ltd.
230+ *
231+ * This program is free software: you can redistribute it and/or modify it
232+ * under the terms of the GNU Lesser General Public License version 3,
233+ * as published by the Free Software Foundation.
234+ *
235+ * This program is distributed in the hope that it will be useful,
236+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
237+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
238+ * GNU Lesser General Public License for more details.
239+ *
240+ * You should have received a copy of the GNU Lesser General Public License
241+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
242+ */
243+
244+#include <TelepathyQt/DBusObject>
245+#include <messaging/qt/tp/interfaces/base_channel_file_transfer_metadata.h>
246+#include <messaging/qt/tp/interfaces/base_channel_file_transfer_metadata_internal.h>
247+
248+namespace mqt = messaging::qt::tp;
249+namespace mqti = messaging::qt::tp::interfaces;
250+
251+// Chan.I.FileTransfer.Metadata
252+struct MESSAGING_FW_LOCAL mqti::BaseChannelFileTransferMetadataInterface::Private {
253+ Private(BaseChannelFileTransferMetadataInterface *parent,
254+ const QString &serviceName,
255+ const Tp::Metadata &metadata)
256+ : serviceName{serviceName}
257+ , metadata{metadata}
258+ , adaptee(new BaseChannelFileTransferMetadataInterface::Adaptee(parent)) {
259+ }
260+
261+ QString serviceName;
262+ Tp::Metadata metadata;
263+ BaseChannelFileTransferMetadataInterface::Adaptee *adaptee;
264+};
265+
266+mqti::BaseChannelFileTransferMetadataInterface::Adaptee::Adaptee(BaseChannelFileTransferMetadataInterface *interface)
267+ : QObject(interface)
268+ , mInterface(interface)
269+{
270+}
271+
272+mqti::BaseChannelFileTransferMetadataInterface::Adaptee::~Adaptee()
273+{
274+}
275+
276+QString mqti::BaseChannelFileTransferMetadataInterface::Adaptee::serviceName() const
277+{
278+ return mInterface->serviceName();
279+}
280+
281+Tp::Metadata mqti::BaseChannelFileTransferMetadataInterface::Adaptee::metadata() const
282+{
283+ return mInterface->metadata();
284+}
285+
286+/**
287+ * \class BaseChannelFileTransferMetadataInterface
288+ *
289+ * \brief Base class for implementations of Channel.Interface.FileTransfer.Metadata
290+ *
291+ */
292+
293+/**
294+ * Class constructor.
295+ */
296+mqti::BaseChannelFileTransferMetadataInterface::BaseChannelFileTransferMetadataInterface(
297+ const QString &serviceName, const Tp::Metadata &metadata)
298+ : Tp::AbstractChannelInterface(TP_QT_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA)
299+ , mPriv(new Private(this, serviceName, metadata))
300+{
301+}
302+
303+/**
304+ * Class destructor.
305+ */
306+mqti::BaseChannelFileTransferMetadataInterface::~BaseChannelFileTransferMetadataInterface()
307+{
308+ delete mPriv;
309+}
310+
311+
312+/**
313+ * Return the immutable properties of this interface.
314+ *
315+ * Immutable properties cannot change after the interface has been registered
316+ * on a service on the bus with registerInterface().
317+ *
318+ * \return The immutable properties of this interface.
319+ */
320+QVariantMap mqti::BaseChannelFileTransferMetadataInterface::immutableProperties() const
321+{
322+ QVariantMap map;
323+ map.insert(TP_QT_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA + QLatin1String(".ServiceName"),
324+ QVariant::fromValue(mPriv->adaptee->serviceName()));
325+ map.insert(TP_QT_IFACE_CHANNEL_INTERFACE_FILE_TRANSFER_METADATA + QLatin1String(".Metadata"),
326+ QVariant::fromValue(mPriv->adaptee->metadata()));
327+ return map;
328+}
329+
330+void mqti::BaseChannelFileTransferMetadataInterface::createAdaptor()
331+{
332+ (void) new Tp::Service::ChannelInterfaceFileTransferMetadataAdaptor(dbusObject()->dbusConnection(),
333+ mPriv->adaptee, dbusObject());
334+}
335+
336+QString mqti::BaseChannelFileTransferMetadataInterface::serviceName() const
337+{
338+ return mPriv->serviceName;
339+}
340+
341+Tp::Metadata mqti::BaseChannelFileTransferMetadataInterface::metadata() const
342+{
343+ return mPriv->metadata;
344+}
345+

Subscribers

People subscribed via source and target branches

to all changes: