emailservices/nmclientapi/src/nmapimailboxsettings.cpp
author hgs
Tue, 29 Jun 2010 17:12:28 +0300
changeset 48 10eaf342f539
parent 47 f83bd4ae1fe3
child 74 6c59112cfd31
permissions -rw-r--r--
201025_1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
47
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
 * All rights reserved.
hgs
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
 *
hgs
parents:
diff changeset
     9
 * Initial Contributors:
hgs
parents:
diff changeset
    10
 * Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
 *
hgs
parents:
diff changeset
    12
 * Contributors:
hgs
parents:
diff changeset
    13
 *
hgs
parents:
diff changeset
    14
 * Description:
hgs
parents:
diff changeset
    15
 *
hgs
parents:
diff changeset
    16
 */
48
10eaf342f539 201025_1
hgs
parents: 47
diff changeset
    17
 
10eaf342f539 201025_1
hgs
parents: 47
diff changeset
    18
#include "nmapiheaders.h"
10eaf342f539 201025_1
hgs
parents: 47
diff changeset
    19
47
hgs
parents:
diff changeset
    20
hgs
parents:
diff changeset
    21
namespace EmailClientApi {
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
hgs
parents:
diff changeset
    24
NmApiMailboxSettings::NmApiMailboxSettings(QObject *parent)
hgs
parents:
diff changeset
    25
   :QObject(parent)
hgs
parents:
diff changeset
    26
{
hgs
parents:
diff changeset
    27
   d = new NmApiMailboxSettingsPrivate(this); 
hgs
parents:
diff changeset
    28
   connect(d, SIGNAL(mailboxDeleted(int)),this,SIGNAL(mailboxDeleted(int)));
hgs
parents:
diff changeset
    29
}
hgs
parents:
diff changeset
    30
hgs
parents:
diff changeset
    31
NmApiMailboxSettings::~NmApiMailboxSettings()
hgs
parents:
diff changeset
    32
{
hgs
parents:
diff changeset
    33
    delete d;
hgs
parents:
diff changeset
    34
}
hgs
parents:
diff changeset
    35
hgs
parents:
diff changeset
    36
/*!
hgs
parents:
diff changeset
    37
 \fn listMailboxIds
hgs
parents:
diff changeset
    38
 \param idList - QList consists of ids as quint64.
hgs
parents:
diff changeset
    39
 \return true is successful, otherwise return false
hgs
parents:
diff changeset
    40
hgs
parents:
diff changeset
    41
 Lists ids of mailboxes
hgs
parents:
diff changeset
    42
 */
hgs
parents:
diff changeset
    43
bool NmApiMailboxSettings::listMailboxIds(QList<quint64> &idList)
hgs
parents:
diff changeset
    44
{
hgs
parents:
diff changeset
    45
    return d->listMailboxIds(idList);
hgs
parents:
diff changeset
    46
}
hgs
parents:
diff changeset
    47
hgs
parents:
diff changeset
    48
bool NmApiMailboxSettings::loadSettings(quint64 mailboxId, NmApiMailboxSettingsData &data)
hgs
parents:
diff changeset
    49
{
hgs
parents:
diff changeset
    50
	return d->loadSettings(mailboxId, data);
hgs
parents:
diff changeset
    51
}
hgs
parents:
diff changeset
    52
hgs
parents:
diff changeset
    53
bool NmApiMailboxSettings::saveSettings(const NmApiMailboxSettingsData &data)
hgs
parents:
diff changeset
    54
{
hgs
parents:
diff changeset
    55
	return d->saveSettings(data);
hgs
parents:
diff changeset
    56
}
hgs
parents:
diff changeset
    57
hgs
parents:
diff changeset
    58
/*!
hgs
parents:
diff changeset
    59
 \fn createMailbox
hgs
parents:
diff changeset
    60
 \param mailboxType - mailbox type as QString
hgs
parents:
diff changeset
    61
 \param data - mailbox settings data
hgs
parents:
diff changeset
    62
hgs
parents:
diff changeset
    63
 Creates a mailbox
hgs
parents:
diff changeset
    64
 */
hgs
parents:
diff changeset
    65
bool NmApiMailboxSettings::createMailbox(const QString &mailboxType, NmApiMailboxSettingsData &data)
hgs
parents:
diff changeset
    66
{
hgs
parents:
diff changeset
    67
    return d->createMailbox(mailboxType, data);
hgs
parents:
diff changeset
    68
}
hgs
parents:
diff changeset
    69
hgs
parents:
diff changeset
    70
/*!
hgs
parents:
diff changeset
    71
 \fn deleteMailbox
hgs
parents:
diff changeset
    72
 \param mailboxId - mailbox id.
hgs
parents:
diff changeset
    73
 \return quint64 - the mailbox id.
hgs
parents:
diff changeset
    74
 
hgs
parents:
diff changeset
    75
 Deletes mailbox with specific id.
hgs
parents:
diff changeset
    76
 */
hgs
parents:
diff changeset
    77
bool NmApiMailboxSettings::deleteMailbox(quint64 mailboxId)
hgs
parents:
diff changeset
    78
{
hgs
parents:
diff changeset
    79
    return d->deleteMailbox(mailboxId);
hgs
parents:
diff changeset
    80
}
hgs
parents:
diff changeset
    81
hgs
parents:
diff changeset
    82
/*!
hgs
parents:
diff changeset
    83
 \fn populateDefaultSettings
hgs
parents:
diff changeset
    84
 \param mailboxType - mailbox type as QString
hgs
parents:
diff changeset
    85
 \param data - mailbox settings data, on return contains dafault settings for mailbox protocol
hgs
parents:
diff changeset
    86
 \return true if default settings are set, otherwise false
hgs
parents:
diff changeset
    87
 
hgs
parents:
diff changeset
    88
 Populates NmApiMailboxSettingsData with protocol specific settings data.
hgs
parents:
diff changeset
    89
 */
hgs
parents:
diff changeset
    90
bool NmApiMailboxSettings::populateDefaultSettings(const QString &mailboxType, NmApiMailboxSettingsData &data)
hgs
parents:
diff changeset
    91
{
hgs
parents:
diff changeset
    92
    return d->populateDefaultSettings(mailboxType, data);
hgs
parents:
diff changeset
    93
}
hgs
parents:
diff changeset
    94
hgs
parents:
diff changeset
    95
}//end namespace