Debian Codegraph @

Dekko/server/mailmessageclient.h

raw symbols SCIP
1 /****************************************************************************
2 **
3 ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the Qt Messaging Framework.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41
42 #ifndef MAILMESSAGECLIENT_H
43 #define MAILMESSAGECLIENT_H
44
45 #include "qmailmessageserver.h"
46 #include <QObject>
47 #include <qmailipc.h>
48 #include <qcopadaptor.h>
49
50 // The back-end corresponding to the front-end in QMailMessageServer
51 class MailMessageClient : public QObject
52 {
53 Q_OBJECT
54
55 friend class MessageServer;
56
57 public:
58 MailMessageClient(QObject* parent);
59 ~MailMessageClient();
60
61 private:
62 // Disallow copying
63 MailMessageClient(const MailMessageClient&);
64 void operator=(const MailMessageClient&);
65
66 signals:
67 void newCountChanged(const QMailMessageCountMap&);
68 void acknowledgeNewMessages(const QMailMessageTypeList&);
69
70 void transmitMessages(quint64, const QMailAccountId &accountId);
71 void transmitMessage(quint64, const QMailMessageId &messageId);
72
73 void retrieveFolderList(quint64, const QMailAccountId &accountId, const QMailFolderId &folderId, bool descending);
74 void retrieveMessageList(quint64, const QMailAccountId &accountId, const QMailFolderId &folderId, uint minimum, const QMailMessageSortKey &sort);
75 void retrieveMessageLists(quint64, const QMailAccountId &accountId, const QMailFolderIdList &folderIds, uint minimum, const QMailMessageSortKey &sort);
76 void retrieveNewMessages(quint64, const QMailAccountId &accountId, const QMailFolderIdList &folderIds);
77
78 void createStandardFolders(quint64, const QMailAccountId &accountId);
79
80 void retrieveMessages(quint64, const QMailMessageIdList &messageIds, QMailRetrievalAction::RetrievalSpecification spec);
81 void retrieveMessagePart(quint64, const QMailMessagePart::Location &partLocation);
82
83 void retrieveMessageRange(quint64, const QMailMessageId &messageId, uint minimum);
84 void retrieveMessagePartRange(quint64, const QMailMessagePart::Location &partLocation, uint minimum);
85
86 void retrieveAll(quint64, const QMailAccountId &accountId);
87 void exportUpdates(quint64, const QMailAccountId &accountId);
88
89 void synchronize(quint64, const QMailAccountId &accountId);
90
91 void onlineDeleteMessages(quint64, const QMailMessageIdList&, QMailStore::MessageRemovalOption);
92
93 void onlineCopyMessages(quint64, const QMailMessageIdList&, const QMailFolderId&);
94 void onlineMoveMessages(quint64, const QMailMessageIdList&, const QMailFolderId&);
95 void onlineFlagMessagesAndMoveToStandardFolder(quint64, const QMailMessageIdList&, quint64 setMask, quint64 unsetMask);
96 void addMessages(quint64, const QString &filename);
97 void addMessages(quint64, const QMailMessageMetaDataList &metadata);
98 void updateMessages(quint64, const QString &filename);
99 void updateMessages(quint64, const QMailMessageMetaDataList &metadata);
100 void deleteMessages(quint64, const QMailMessageIdList &ids);
101 void rollBackUpdates(quint64, const QMailAccountId &mailAccountId);
102 void moveToStandardFolder(quint64, const QMailMessageIdList& ids, quint64 standardFolder);
103 void moveToFolder(quint64, const QMailMessageIdList& ids, const QMailFolderId& folderId);
104 void flagMessages(quint64, const QMailMessageIdList& ids, quint64 setMask, quint64 unsetMask);
105 void restoreToPreviousFolder(quint64, const QMailMessageKey& key);
106
107 void onlineCreateFolder(quint64, const QString &name, const QMailAccountId &accountId, const QMailFolderId &parentId);
108 void onlineRenameFolder(quint64, const QMailFolderId &folderId, const QString &name);
109 void onlineDeleteFolder(quint64, const QMailFolderId &folderId);
110
111 void cancelTransfer(quint64);
112
113 void searchMessages(quint64, const QMailMessageKey& filter, const QString& bodyText, QMailSearchAction::SearchSpecification spec, const QMailMessageSortKey &sort);
114 void searchMessages(quint64, const QMailMessageKey& filter, const QString& bodyText, QMailSearchAction::SearchSpecification spec, quint64 limit, const QMailMessageSortKey &sort);
115 void countMessages(quint64, const QMailMessageKey& filter, const QString& bodyText);
116
117 void cancelSearch(quint64);
118
119 void shutdown();
120
121 void listActions();
122
123 void protocolRequest(quint64, const QMailAccountId &accountId, const QString &request, const QVariant &data);
124
125
126 void actionStarted(QMailActionData);
127 void activityChanged(quint64, QMailServiceAction::Activity);
128 void connectivityChanged(quint64, QMailServiceAction::Connectivity);
129 void statusChanged(quint64, const QMailServiceAction::Status);
130 void progressChanged(quint64, uint, uint);
131
132 void retrievalCompleted(quint64);
133
134 void messagesTransmitted(quint64, const QMailMessageIdList&);
135 void messagesFailedTransmission(quint64, const QMailMessageIdList&, QMailServiceAction::Status::ErrorCode);
136 void transmissionCompleted(quint64);
137
138 void messagesDeleted(quint64, const QMailMessageIdList&);
139 void messagesCopied(quint64, const QMailMessageIdList&);
140 void messagesMoved(quint64, const QMailMessageIdList&);
141 void messagesFlagged(quint64, const QMailMessageIdList&);
142
143 void folderCreated(quint64, const QMailFolderId&);
144 void folderRenamed(quint64, const QMailFolderId&);
145 void folderDeleted(quint64, const QMailFolderId&);
146
147 void storageActionCompleted(quint64);
148
149 void matchingMessageIds(quint64, const QMailMessageIdList&);
150 void remainingMessagesCount(quint64, uint);
151 void messagesCount(quint64, uint);
152 void searchCompleted(quint64);
153
154 void actionsListed(const QMailActionDataList &);
155
156 void protocolResponse(quint64, const QString &response, const QVariant &data);
157 void protocolRequestCompleted(quint64);
158
159 private:
160 QCopAdaptor* adaptor;
161 };
162
163 #endif