1 | /* |
2 | Copyright (c) 2009 Constantin Berzan <exit3219@gmail.com> |
3 | |
4 | This library is free software; you can redistribute it and/or modify it |
5 | under the terms of the GNU Library General Public License as published by |
6 | the Free Software Foundation; either version 2 of the License, or (at your |
7 | option) any later version. |
8 | |
9 | This library is distributed in the hope that it will be useful, but WITHOUT |
10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
11 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public |
12 | License for more details. |
13 | |
14 | You should have received a copy of the GNU Library General Public License |
15 | along with this library; see the file COPYING.LIB. If not, write to the |
16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
17 | 02110-1301, USA. |
18 | */ |
19 | |
20 | #ifndef AKONADI_TRANSPORTRESOURCEBASE_P_H |
21 | #define AKONADI_TRANSPORTRESOURCEBASE_P_H |
22 | |
23 | #include "transportresourcebase.h" |
24 | |
25 | #include <QtCore/QObject> |
26 | |
27 | class Akonadi__TransportAdaptor; |
28 | |
29 | namespace Akonadi { |
30 | |
31 | class TransportResourceBase; |
32 | |
33 | /** |
34 | @internal |
35 | This class hosts the D-Bus adaptor for TransportResourceBase. |
36 | */ |
37 | class TransportResourceBasePrivate : public QObject |
38 | { |
39 | Q_OBJECT |
40 | public: |
41 | explicit TransportResourceBasePrivate(TransportResourceBase *qq); |
42 | |
43 | Q_SIGNALS: |
44 | /** |
45 | * Emitted when an item has been sent. |
46 | * @param item The id of the item that was sent. |
47 | * @param result The result of the sending operation. |
48 | * @param message An optional textual explanation of the result. |
49 | * @since 4.4 |
50 | */ |
51 | void transportResult(qlonglong item, int result, const QString &message); // D-Bus signal |
52 | |
53 | private Q_SLOTS: |
54 | void fetchResult(KJob *); |
55 | |
56 | private: |
57 | friend class TransportResourceBase; |
58 | friend class ::Akonadi__TransportAdaptor; |
59 | |
60 | void send(Akonadi::Item::Id message); // D-Bus call |
61 | |
62 | TransportResourceBase *const q; |
63 | }; |
64 | |
65 | } // namespace Akonadi |
66 | |
67 | #endif // AKONADI_TRANSPORTRESOURCEBASE_P_H |
68 | |