68
|
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 |
* Message search private implementation.
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef NMAPIMESSAGESEARCHPRIVATE_H_
|
|
19 |
#define NMAPIMESSAGESEARCHPRIVATE_H_
|
|
20 |
|
|
21 |
#include <MFSMailBoxSearchObserver.h>
|
|
22 |
#include <CFSMailBox.h>
|
|
23 |
#include <nmapicommon.h>
|
|
24 |
#include <nmapimessage.h>
|
|
25 |
|
|
26 |
class NmApiEngine;
|
|
27 |
class CFSMailBox;
|
|
28 |
|
|
29 |
class NmApiMessageSearchPrivate : public QObject,
|
|
30 |
public MFSMailBoxSearchObserver
|
|
31 |
{
|
|
32 |
Q_OBJECT
|
|
33 |
|
|
34 |
public:
|
|
35 |
|
|
36 |
NmApiMessageSearchPrivate(const quint64 mailboxId, QObject *parent = 0);
|
|
37 |
|
|
38 |
~NmApiMessageSearchPrivate();
|
|
39 |
|
|
40 |
bool initialise(const QList<QString> &searchStrings, EmailClientApi::NmApiMailSortCriteria sortCriteria);
|
|
41 |
|
|
42 |
bool isRunning() const;
|
|
43 |
|
|
44 |
bool start();
|
|
45 |
|
|
46 |
void cancel();
|
|
47 |
|
|
48 |
public: // From MFSMailboxSearchObserver
|
|
49 |
|
|
50 |
void MatchFoundL(CFSMailMessage *aMatchMessage);
|
|
51 |
|
|
52 |
void SearchCompletedL();
|
|
53 |
|
|
54 |
void ClientRequiredSearchPriority(TInt *apRequiredSearchPriority);
|
|
55 |
|
|
56 |
private:
|
|
57 |
|
|
58 |
void initialiseMailbox();
|
|
59 |
|
|
60 |
signals:
|
|
61 |
|
|
62 |
void messageFound(EmailClientApi::NmApiMessage &message);
|
|
63 |
|
|
64 |
void searchComplete(int result = 0);
|
|
65 |
|
|
66 |
void canceled();
|
|
67 |
|
|
68 |
private:
|
|
69 |
|
|
70 |
RPointerArray<TDesC> mSearchStrings;
|
|
71 |
TFSMailSortCriteria mSortCriteria;
|
|
72 |
TFSMailMsgId mMailBoxId;
|
|
73 |
CFSMailBox *mMailBox;
|
|
74 |
bool mIsRunning;
|
|
75 |
NmApiEngine *mEngine;
|
|
76 |
|
|
77 |
};
|
|
78 |
|
|
79 |
#endif /* NMAPIMESSAGESEARCHPRIVATE_H_ */
|