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