Debian Codegraph @

Dekko/server/mailmessageclient.cpp

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 #include "mailmessageclient.h"
43 #include <qcopadaptor.h>
44
45 static bool connectIpc( QObject *sender, const QByteArray& signal,
46 QObject *receiver, const QByteArray& member)
47 {
48 return QCopAdaptor::connect(sender,signal,receiver,member);
49 }
50
51 MailMessageClient::MailMessageClient(QObject* parent)
52 : QObject(parent),
53 adaptor(new QCopAdaptor("QPE/QMailMessageServer",this))
54 {
55 connectIpc(this, SIGNAL(newCountChanged(QMailMessageCountMap)),
56 adaptor, MESSAGE(newCountChanged(QMailMessageCountMap)));
57 connectIpc(adaptor, MESSAGE(acknowledgeNewMessages(QMailMessageTypeList)),
58 this, SIGNAL(acknowledgeNewMessages(QMailMessageTypeList)));
59
60 connectIpc(this, SIGNAL(actionStarted(QMailActionData)),
61 adaptor, MESSAGE(actionStarted(QMailActionData)));
62 connectIpc(this, SIGNAL(activityChanged(quint64, QMailServiceAction::Activity)),
63 adaptor, MESSAGE(activityChanged(quint64, QMailServiceAction::Activity)));
64 connectIpc(this, SIGNAL(connectivityChanged(quint64, QMailServiceAction::Connectivity)),
65 adaptor, MESSAGE(connectivityChanged(quint64, QMailServiceAction::Connectivity)));
66 connectIpc(this, SIGNAL(statusChanged(quint64, const QMailServiceAction::Status)),
67 adaptor, MESSAGE(statusChanged(quint64, const QMailServiceAction::Status)));
68 connectIpc(this, SIGNAL(progressChanged(quint64, uint, uint)),
69 adaptor, MESSAGE(progressChanged(quint64, uint, uint)));
70 connectIpc(this, SIGNAL(transmissionCompleted(quint64)),
71 adaptor, MESSAGE(transmissionCompleted(quint64)));
72 connectIpc(this, SIGNAL(messagesTransmitted(quint64, QMailMessageIdList)),
73 adaptor, MESSAGE(messagesTransmitted(quint64, QMailMessageIdList)));
74 connectIpc(this, SIGNAL(messagesFailedTransmission(quint64, QMailMessageIdList, QMailServiceAction::Status::ErrorCode)),
75 adaptor, MESSAGE(messagesFailedTransmission(quint64, QMailMessageIdList, QMailServiceAction::Status::ErrorCode)));
76 connectIpc(this, SIGNAL(retrievalCompleted(quint64)),
77 adaptor, MESSAGE(retrievalCompleted(quint64)));
78 connectIpc(this, SIGNAL(messagesDeleted(quint64, QMailMessageIdList)),
79 adaptor, MESSAGE(messagesDeleted(quint64, QMailMessageIdList)));
80 connectIpc(this, SIGNAL(messagesCopied(quint64, QMailMessageIdList)),
81 adaptor, MESSAGE(messagesCopied(quint64, QMailMessageIdList)));
82 connectIpc(this, SIGNAL(messagesMoved(quint64, QMailMessageIdList)),
83 adaptor, MESSAGE(messagesMoved(quint64, QMailMessageIdList)));
84 connectIpc(this, SIGNAL(messagesFlagged(quint64, QMailMessageIdList)),
85 adaptor, MESSAGE(messagesFlagged(quint64, QMailMessageIdList)));
86 connectIpc(this, SIGNAL(folderCreated(quint64, QMailFolderId)),
87 adaptor, MESSAGE(folderCreated(quint64, QMailFolderId)));
88 connectIpc(this, SIGNAL(folderRenamed(quint64, QMailFolderId)),
89 adaptor, MESSAGE(folderRenamed(quint64, QMailFolderId)));
90 connectIpc(this, SIGNAL(folderDeleted(quint64, QMailFolderId)),
91 adaptor, MESSAGE(folderDeleted(quint64, QMailFolderId)));
92 connectIpc(this, SIGNAL(storageActionCompleted(quint64)),
93 adaptor, MESSAGE(storageActionCompleted(quint64)));
94 connectIpc(this, SIGNAL(matchingMessageIds(quint64, QMailMessageIdList)),
95 adaptor, MESSAGE(matchingMessageIds(quint64, QMailMessageIdList)));
96 connectIpc(this, SIGNAL(remainingMessagesCount(quint64, uint)),
97 adaptor, MESSAGE(remainingMessagesCount(quint64, uint)));
98 connectIpc(this, SIGNAL(messagesCount(quint64, uint)),
99 adaptor, MESSAGE(messagesCount(quint64, uint)));
100 connectIpc(this, SIGNAL(searchCompleted(quint64)),
101 adaptor, MESSAGE(searchCompleted(quint64)));
102 connectIpc(this, SIGNAL(actionsListed(QMailActionDataList)),
103 adaptor, MESSAGE(actionsListed(QMailActionDataList)));
104 connectIpc(this, SIGNAL(protocolResponse(quint64, QString, QVariant)),
105 adaptor, MESSAGE(protocolResponse(quint64, QString, QVariant)));
106 connectIpc(this, SIGNAL(protocolRequestCompleted(quint64)),
107 adaptor, MESSAGE(protocolRequestCompleted(quint64)));
108
109 connectIpc(adaptor, MESSAGE(transmitMessages(quint64, QMailAccountId)),
110 this, SIGNAL(transmitMessages(quint64, QMailAccountId)));
111 connectIpc(adaptor, MESSAGE(transmitMessage(quint64, QMailMessageId)),
112 this, SIGNAL(transmitMessage(quint64, QMailMessageId)));
113 connectIpc(adaptor, MESSAGE(retrieveFolderList(quint64, QMailAccountId, QMailFolderId, bool)),
114 this, SIGNAL(retrieveFolderList(quint64, QMailAccountId, QMailFolderId, bool)));
115 connectIpc(adaptor, MESSAGE(retrieveMessageLists(quint64, QMailAccountId, QMailFolderIdList, uint, QMailMessageSortKey)),
116 this, SIGNAL(retrieveMessageLists(quint64, QMailAccountId, QMailFolderIdList, uint, QMailMessageSortKey)));
117 connectIpc(adaptor, MESSAGE(retrieveMessageList(quint64, QMailAccountId, QMailFolderId, uint, QMailMessageSortKey)),
118 this, SIGNAL(retrieveMessageList(quint64, QMailAccountId, QMailFolderId, uint, QMailMessageSortKey)));
119 connectIpc(adaptor, MESSAGE(retrieveNewMessages(quint64, QMailAccountId, QMailFolderIdList)),
120 this, SIGNAL(retrieveNewMessages(quint64, QMailAccountId, QMailFolderIdList)));
121 connectIpc(adaptor, MESSAGE(createStandardFolders(quint64, QMailAccountId)),
122 this, SIGNAL(createStandardFolders(quint64, QMailAccountId)));
123 connectIpc(adaptor, MESSAGE(retrieveMessages(quint64, QMailMessageIdList, QMailRetrievalAction::RetrievalSpecification)),
124 this, SIGNAL(retrieveMessages(quint64, QMailMessageIdList, QMailRetrievalAction::RetrievalSpecification)));
125 connectIpc(adaptor, MESSAGE(retrieveMessagePart(quint64, QMailMessagePart::Location)),
126 this, SIGNAL(retrieveMessagePart(quint64, QMailMessagePart::Location)));
127 connectIpc(adaptor, MESSAGE(retrieveMessageRange(quint64, QMailMessageId, uint)),
128 this, SIGNAL(retrieveMessageRange(quint64, QMailMessageId, uint)));
129 connectIpc(adaptor, MESSAGE(retrieveMessagePartRange(quint64, QMailMessagePart::Location, uint)),
130 this, SIGNAL(retrieveMessagePartRange(quint64, QMailMessagePart::Location, uint)));
131 connectIpc(adaptor, MESSAGE(retrieveAll(quint64, QMailAccountId)),
132 this, SIGNAL(retrieveAll(quint64, QMailAccountId)));
133 connectIpc(adaptor, MESSAGE(exportUpdates(quint64, QMailAccountId)),
134 this, SIGNAL(exportUpdates(quint64, QMailAccountId)));
135 connectIpc(adaptor, MESSAGE(synchronize(quint64, QMailAccountId)),
136 this, SIGNAL(synchronize(quint64, QMailAccountId)));
137 connectIpc(adaptor, MESSAGE(onlineDeleteMessages(quint64, QMailMessageIdList, QMailStore::MessageRemovalOption)),
138 this, SIGNAL(onlineDeleteMessages(quint64, QMailMessageIdList, QMailStore::MessageRemovalOption)));
139 connectIpc(adaptor, MESSAGE(onlineCopyMessages(quint64, QMailMessageIdList, QMailFolderId)),
140 this, SIGNAL(onlineCopyMessages(quint64, QMailMessageIdList, QMailFolderId)));
141 connectIpc(adaptor, MESSAGE(onlineMoveMessages(quint64, QMailMessageIdList, QMailFolderId)),
142 this, SIGNAL(onlineMoveMessages(quint64, QMailMessageIdList, QMailFolderId)));
143 connectIpc(adaptor, MESSAGE(onlineFlagMessagesAndMoveToStandardFolder(quint64, QMailMessageIdList, quint64, quint64)),
144 this, SIGNAL(onlineFlagMessagesAndMoveToStandardFolder(quint64, QMailMessageIdList, quint64, quint64)));
145 connectIpc(adaptor, MESSAGE(addMessages(quint64,QString)),
146 this, SIGNAL(addMessages(quint64, QString)));
147 connectIpc(adaptor, MESSAGE(addMessages(quint64,QMailMessageMetaDataList)),
148 this, SIGNAL(addMessages(quint64, QMailMessageMetaDataList)));
149 connectIpc(adaptor, MESSAGE(updateMessages(quint64,QString)),
150 this, SIGNAL(updateMessages(quint64, QString)));
151 connectIpc(adaptor, MESSAGE(updateMessages(quint64,QMailMessageMetaDataList)),
152 this, SIGNAL(updateMessages(quint64, QMailMessageMetaDataList)));
153 connectIpc(adaptor, MESSAGE(deleteMessages(quint64, QMailMessageIdList)),
154 this, SIGNAL(deleteMessages(quint64, QMailMessageIdList)));
155 connectIpc(adaptor, MESSAGE(rollBackUpdates(quint64, QMailAccountId)),
156 this, SIGNAL(rollBackUpdates(quint64, QMailAccountId)));
157 connectIpc(adaptor, MESSAGE(moveToStandardFolder(quint64, QMailMessageIdList, quint64)),
158 this, SIGNAL(moveToStandardFolder(quint64, QMailMessageIdList, quint64)));
159 connectIpc(adaptor, MESSAGE(moveToFolder(quint64, QMailMessageIdList, QMailFolderId)),
160 this, SIGNAL(moveToFolder(quint64, QMailMessageIdList, QMailFolderId)));
161 connectIpc(adaptor, MESSAGE(flagMessages(quint64, QMailMessageIdList, quint64, quint64)),
162 this, SIGNAL(flagMessages(quint64, QMailMessageIdList, quint64, quint64)));
163 connectIpc(adaptor, MESSAGE(restoreToPreviousFolder(quint64, QMailMessageKey)),
164 this, SIGNAL(restoreToPreviousFolder(quint64, QMailMessageKey)));
165 connectIpc(adaptor, MESSAGE(onlineCreateFolder(quint64, QString, QMailAccountId, QMailFolderId)),
166 this, SIGNAL(onlineCreateFolder(quint64,QString,QMailAccountId,QMailFolderId)));
167 connectIpc(adaptor, MESSAGE(onlineRenameFolder(quint64, QMailFolderId, QString)),
168 this, SIGNAL(onlineRenameFolder(quint64,QMailFolderId,QString)));
169 connectIpc(adaptor, MESSAGE(onlineDeleteFolder(quint64, QMailFolderId)),
170 this, SIGNAL(onlineDeleteFolder(quint64,QMailFolderId)));
171 connectIpc(adaptor, MESSAGE(cancelTransfer(quint64)),
172 this, SIGNAL(cancelTransfer(quint64)));
173 connectIpc(adaptor, MESSAGE(cancelSearch(quint64)),
174 this, SIGNAL(cancelSearch(quint64)));
175 connectIpc(adaptor, MESSAGE(shutdown()),
176 this, SIGNAL(shutdown()));
177 connectIpc(adaptor, MESSAGE(listActions()),
178 this, SIGNAL(listActions()));
179 connectIpc(adaptor, MESSAGE(searchMessages(quint64, QMailMessageKey, QString, QMailSearchAction::SearchSpecification, QMailMessageSortKey)),
180 this, SIGNAL(searchMessages(quint64, QMailMessageKey, QString, QMailSearchAction::SearchSpecification, QMailMessageSortKey)));
181 connectIpc(adaptor, MESSAGE(searchMessages(quint64, QMailMessageKey, QString, QMailSearchAction::SearchSpecification, quint64, QMailMessageSortKey)),
182 this, SIGNAL(searchMessages(quint64, QMailMessageKey, QString, QMailSearchAction::SearchSpecification, quint64, QMailMessageSortKey)));
183 connectIpc(adaptor, MESSAGE(countMessages(quint64, QMailMessageKey, QString)),
184 this, SIGNAL(countMessages(quint64, QMailMessageKey, QString)));
185 connectIpc(adaptor, MESSAGE(protocolRequest(quint64, QMailAccountId, QString, QVariant)),
186 this, SIGNAL(protocolRequest(quint64, QMailAccountId, QString, QVariant)));
187 }
188
189 MailMessageClient::~MailMessageClient()
190 {
191 }
192