|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Email message related operations |
|
16 */ |
|
17 |
|
18 #ifndef NMAPIMESSAGEMANAGER_H_ |
|
19 #define NMAPIMESSAGEMANAGER_H_ |
|
20 |
|
21 #include <QObject> |
|
22 #include <QPointer> |
|
23 #include <QList> |
|
24 #include <QVariant> |
|
25 |
|
26 #include <nmapidef.h> |
|
27 #include <nmapioperation.h> |
|
28 #include <nmapimessage.h> |
|
29 |
|
30 namespace EmailClientApi { |
|
31 |
|
32 class NmApiMessageManagerPrivate; |
|
33 |
|
34 class NMAPI_EXPORT NmApiMessageManager : public QObject |
|
35 { |
|
36 Q_OBJECT |
|
37 public: |
|
38 NmApiMessageManager(QObject *parent,quint64 mailboxId); |
|
39 |
|
40 virtual ~NmApiMessageManager(); |
|
41 |
|
42 public slots: |
|
43 QPointer<NmApiOperation> createDraftMessage(const QVariant *initData); |
|
44 |
|
45 QPointer<NmApiOperation> createForwardMessage(NmApiMessage *orig,const QVariant *initData); |
|
46 |
|
47 QPointer<NmApiOperation> createReplyMessage(const NmApiMessage *orig,const QVariant *initData,bool replyAll); |
|
48 |
|
49 QPointer<NmApiOperation> moveMessages(const QList<quint64> messageIds,quint64 sourceFolderId,quint64 targetFolderId); |
|
50 |
|
51 QPointer<NmApiOperation> saveMessage(const NmApiMessage &message); |
|
52 |
|
53 QPointer<NmApiOperation> deleteMessages(const QList<quint64> messageIds); |
|
54 |
|
55 QPointer<NmApiOperation> fetchMessage(quint64 messageId); |
|
56 |
|
57 QPointer<NmApiOperation> sendMessage(const NmApiMessage &message); |
|
58 |
|
59 QPointer<NmApiOperation> createAttachment(NmApiMessage &message,const QVariant &attachmenSpec); |
|
60 |
|
61 QPointer<NmApiOperation> removeAttachment(NmApiMessage &message,quint64 attachmentId); |
|
62 |
|
63 QPointer<NmApiOperation> fetchAttachment(const NmApiMessage &relatedMessage,quint64 attachmentId); |
|
64 |
|
65 private: |
|
66 NmApiMessageManagerPrivate* d; |
|
67 }; |
|
68 |
|
69 } // namespace EmailClientApi |
|
70 #endif /*NMAPIMESSAGEMANAGER_H_ */ |