|
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 #include "nmapiheaders.h" |
|
19 |
|
20 |
|
21 namespace EmailClientApi { |
|
22 |
|
23 |
|
24 NmApiMailboxSettings::NmApiMailboxSettings(QObject *parent) |
|
25 :QObject(parent) |
|
26 { |
|
27 d = new NmApiMailboxSettingsPrivate(this); |
|
28 connect(d, SIGNAL(mailboxDeleted(int)),this,SIGNAL(mailboxDeleted(int))); |
|
29 } |
|
30 |
|
31 NmApiMailboxSettings::~NmApiMailboxSettings() |
|
32 { |
|
33 delete d; |
|
34 } |
|
35 |
|
36 /*! |
|
37 \fn listMailboxIds |
|
38 \param idList - QList consists of ids as quint64. |
|
39 \return true is successful, otherwise return false |
|
40 |
|
41 Lists ids of mailboxes |
|
42 */ |
|
43 bool NmApiMailboxSettings::listMailboxIds(QList<quint64> &idList) |
|
44 { |
|
45 return d->listMailboxIds(idList); |
|
46 } |
|
47 |
|
48 bool NmApiMailboxSettings::loadSettings(quint64 mailboxId, NmApiMailboxSettingsData &data) |
|
49 { |
|
50 return d->loadSettings(mailboxId, data); |
|
51 } |
|
52 |
|
53 bool NmApiMailboxSettings::saveSettings(const NmApiMailboxSettingsData &data) |
|
54 { |
|
55 return d->saveSettings(data); |
|
56 } |
|
57 |
|
58 /*! |
|
59 \fn createMailbox |
|
60 \param mailboxType - mailbox type as QString |
|
61 \param data - mailbox settings data |
|
62 |
|
63 Creates a mailbox |
|
64 */ |
|
65 bool NmApiMailboxSettings::createMailbox(const QString &mailboxType, NmApiMailboxSettingsData &data) |
|
66 { |
|
67 return d->createMailbox(mailboxType, data); |
|
68 } |
|
69 |
|
70 /*! |
|
71 \fn deleteMailbox |
|
72 \param mailboxId - mailbox id. |
|
73 \return quint64 - the mailbox id. |
|
74 |
|
75 Deletes mailbox with specific id. |
|
76 */ |
|
77 bool NmApiMailboxSettings::deleteMailbox(quint64 mailboxId) |
|
78 { |
|
79 return d->deleteMailbox(mailboxId); |
|
80 } |
|
81 |
|
82 /*! |
|
83 \fn populateDefaultSettings |
|
84 \param mailboxType - mailbox type as QString |
|
85 \param data - mailbox settings data, on return contains dafault settings for mailbox protocol |
|
86 \return true if default settings are set, otherwise false |
|
87 |
|
88 Populates NmApiMailboxSettingsData with protocol specific settings data. |
|
89 */ |
|
90 bool NmApiMailboxSettings::populateDefaultSettings(const QString &mailboxType, NmApiMailboxSettingsData &data) |
|
91 { |
|
92 return d->populateDefaultSettings(mailboxType, data); |
|
93 } |
|
94 |
|
95 }//end namespace |