47
|
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 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef NMAPIMAILBOXSETTINGS_P_H_
|
|
19 |
#define NMAPIMAILBOXSETTINGS_P_H_
|
|
20 |
|
|
21 |
#include <QObject>
|
|
22 |
#include <qpointer.h>
|
|
23 |
#include <nmapimailboxsettings.h>
|
|
24 |
#include <nmoperation.h>
|
|
25 |
|
|
26 |
class NmApiDataPluginFactory;
|
|
27 |
class NmOperation;
|
|
28 |
|
|
29 |
namespace EmailClientApi
|
|
30 |
{
|
|
31 |
class NmApiMailboxSettingsData;
|
|
32 |
|
|
33 |
class NmApiMailboxSettingsPrivate : public QObject
|
|
34 |
{
|
|
35 |
Q_OBJECT
|
|
36 |
public:
|
|
37 |
NmApiMailboxSettingsPrivate(QObject *parent = 0);
|
|
38 |
~NmApiMailboxSettingsPrivate();
|
|
39 |
|
|
40 |
bool listMailboxIds(QList<quint64> &idList);
|
74
|
41 |
QString getMailboxType(quint64 mailboxId);
|
47
|
42 |
bool loadSettings(quint64 mailboxId, NmApiMailboxSettingsData &data);
|
|
43 |
bool saveSettings(const NmApiMailboxSettingsData &data);
|
|
44 |
bool createMailbox(const QString &mailboxType, NmApiMailboxSettingsData &data);
|
|
45 |
bool deleteMailbox(quint64 mailboxId);
|
|
46 |
bool populateDefaultSettings(const QString &mailboxType, NmApiMailboxSettingsData &data);
|
|
47 |
|
|
48 |
signals:
|
|
49 |
void mailboxDeleted(int result = 0);
|
|
50 |
|
|
51 |
private:
|
|
52 |
void createPopImapMailbox(const QString &type, NmApiMailboxSettingsData &data);
|
74
|
53 |
QString resolveMailboxTypeL(quint64 mailboxId);
|
47
|
54 |
|
|
55 |
|
|
56 |
private:
|
|
57 |
NmApiDataPluginFactory *mFactory;
|
|
58 |
QPointer<NmOperation> mDeleteMailboxOperation; // not owned
|
|
59 |
};
|
|
60 |
|
|
61 |
}
|
|
62 |
|
|
63 |
#endif /* NMAPIMAILBOXSETTINGS_P_H_ */
|