emailservices/nmclientapi/src/nmapimailboxsettingsdata.cpp
author hgs
Thu, 24 Jun 2010 14:32:18 +0300
changeset 47 f83bd4ae1fe3
child 48 10eaf342f539
permissions -rw-r--r--
201025
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
 */
hgs
parents:
diff changeset
    17
#include <nmapimailboxsettingsdata.h>
hgs
parents:
diff changeset
    18
#include "NmApiMailboxSettingsData_p.h"
hgs
parents:
diff changeset
    19
hgs
parents:
diff changeset
    20
namespace EmailClientApi
hgs
parents:
diff changeset
    21
{
hgs
parents:
diff changeset
    22
hgs
parents:
diff changeset
    23
NmApiMailboxSettingsData::NmApiMailboxSettingsData()
hgs
parents:
diff changeset
    24
{
hgs
parents:
diff changeset
    25
    d = new NmApiMailboxSettingsDataPrivate();
hgs
parents:
diff changeset
    26
    Q_CHECK_PTR(d);
hgs
parents:
diff changeset
    27
}
hgs
parents:
diff changeset
    28
hgs
parents:
diff changeset
    29
NmApiMailboxSettingsData::~NmApiMailboxSettingsData()
hgs
parents:
diff changeset
    30
{
hgs
parents:
diff changeset
    31
    delete d;
hgs
parents:
diff changeset
    32
}
hgs
parents:
diff changeset
    33
hgs
parents:
diff changeset
    34
/*!
hgs
parents:
diff changeset
    35
 \fn setMailboxId 
hgs
parents:
diff changeset
    36
 \param mailboxId - valid mailbox id as quint64.
hgs
parents:
diff changeset
    37
 
hgs
parents:
diff changeset
    38
 Sets the mailbox id               
hgs
parents:
diff changeset
    39
 */
hgs
parents:
diff changeset
    40
void NmApiMailboxSettingsData::setMailboxId(quint64 mailboxId)
hgs
parents:
diff changeset
    41
{
hgs
parents:
diff changeset
    42
    d->setMailboxId(mailboxId);
hgs
parents:
diff changeset
    43
}
hgs
parents:
diff changeset
    44
hgs
parents:
diff changeset
    45
/*!
hgs
parents:
diff changeset
    46
 \fn mailboxId
hgs
parents:
diff changeset
    47
 \return quint64 - the mailbox id.
hgs
parents:
diff changeset
    48
 
hgs
parents:
diff changeset
    49
 Gets the mailbox id.              
hgs
parents:
diff changeset
    50
 */
hgs
parents:
diff changeset
    51
quint64 NmApiMailboxSettingsData::mailboxId() const
hgs
parents:
diff changeset
    52
{
hgs
parents:
diff changeset
    53
    return d->mailboxId();
hgs
parents:
diff changeset
    54
}
hgs
parents:
diff changeset
    55
hgs
parents:
diff changeset
    56
/*!
hgs
parents:
diff changeset
    57
 \fn setValue 
hgs
parents:
diff changeset
    58
 \param key - setting data to be set.
hgs
parents:
diff changeset
    59
 \param settingValue - Value to be set as QVariant.
hgs
parents:
diff changeset
    60
 
hgs
parents:
diff changeset
    61
 Sets individual setting value.        
hgs
parents:
diff changeset
    62
 */
hgs
parents:
diff changeset
    63
void NmApiMailboxSettingsData::setValue(int key, const QVariant &settingValue)
hgs
parents:
diff changeset
    64
{
hgs
parents:
diff changeset
    65
    d->setValue(key, settingValue);
hgs
parents:
diff changeset
    66
}
hgs
parents:
diff changeset
    67
hgs
parents:
diff changeset
    68
/*!
hgs
parents:
diff changeset
    69
 \fn getValue
hgs
parents:
diff changeset
    70
 \param key - setting data to get.
hgs
parents:
diff changeset
    71
 \param settingValue - On return holds as QVariant.
hgs
parents:
diff changeset
    72
 \return true if successfull, false otherwise.
hgs
parents:
diff changeset
    73
 
hgs
parents:
diff changeset
    74
 Get individual setting value.        
hgs
parents:
diff changeset
    75
 */
hgs
parents:
diff changeset
    76
bool NmApiMailboxSettingsData::getValue(int key, QVariant &settingValue) const
hgs
parents:
diff changeset
    77
{
hgs
parents:
diff changeset
    78
    return d->getValue(key, settingValue);
hgs
parents:
diff changeset
    79
}
hgs
parents:
diff changeset
    80
hgs
parents:
diff changeset
    81
/*!
hgs
parents:
diff changeset
    82
 \fn validateData
hgs
parents:
diff changeset
    83
 \return boolean - true, everything validated OK, false otherwise
hgs
parents:
diff changeset
    84
 
hgs
parents:
diff changeset
    85
 Validates data in this container. 
hgs
parents:
diff changeset
    86
 */
hgs
parents:
diff changeset
    87
bool NmApiMailboxSettingsData::validateData() const
hgs
parents:
diff changeset
    88
{
hgs
parents:
diff changeset
    89
    return d->validateData();
hgs
parents:
diff changeset
    90
}
hgs
parents:
diff changeset
    91
hgs
parents:
diff changeset
    92
/*!
hgs
parents:
diff changeset
    93
 \fn listSettings
hgs
parents:
diff changeset
    94
 \return QList<int> - ,on return contains use key values for settingsdata
hgs
parents:
diff changeset
    95
 
hgs
parents:
diff changeset
    96
 Validates data in this container. 
hgs
parents:
diff changeset
    97
 */
hgs
parents:
diff changeset
    98
QList<int> NmApiMailboxSettingsData::listSettings() const
hgs
parents:
diff changeset
    99
{
hgs
parents:
diff changeset
   100
	return d->listSettings();
hgs
parents:
diff changeset
   101
}
hgs
parents:
diff changeset
   102
hgs
parents:
diff changeset
   103
/*!
hgs
parents:
diff changeset
   104
 \fn clearSettings 
hgs
parents:
diff changeset
   105
 
hgs
parents:
diff changeset
   106
 Resets data in this container.
hgs
parents:
diff changeset
   107
 */
hgs
parents:
diff changeset
   108
void NmApiMailboxSettingsData::clearSettings()
hgs
parents:
diff changeset
   109
{
hgs
parents:
diff changeset
   110
	d->clearSettings();
hgs
parents:
diff changeset
   111
}
hgs
parents:
diff changeset
   112
hgs
parents:
diff changeset
   113
}//end namespace