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