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