emailservices/nmclientapi/src/nmapisettingsmanager.cpp
changeset 56 15bc1d5d6267
child 74 6c59112cfd31
equal deleted inserted replaced
51:d845db10c0d4 56:15bc1d5d6267
       
     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 <nmapisettingsmanager.h>
       
    18 #include "nmapisettingsmanager_p.h"
       
    19 #include "nmapiheaders.h"
       
    20 
       
    21 namespace EmailClientApi
       
    22 {
       
    23 
       
    24 NmApiSettingsManager::NmApiSettingsManager(const quint64 mailboxId)
       
    25 {    
       
    26     d = new NmApiSettingsManagerPrivate(mailboxId);
       
    27 }
       
    28 
       
    29 NmApiSettingsManager::~NmApiSettingsManager()
       
    30 {    
       
    31     delete d;
       
    32 }
       
    33 /*!     
       
    34  Loads email settings.
       
    35  \param mailboxId which settings are returned
       
    36  \param data consists of keys and values of settings.
       
    37  \return bool <true> when the setting items were found otherwise <false>.
       
    38  */
       
    39 bool NmApiSettingsManager::load(quint64 mailboxId, NmApiMailboxSettingsData &data)
       
    40 {
       
    41     return d->load(mailboxId, data);
       
    42 }
       
    43 
       
    44 /*!     
       
    45  Saves email settings.
       
    46  \param data consists of keys and values of settings.
       
    47  \return bool <true> when the setting items were successfully saved otherwise <false>.
       
    48  */
       
    49 bool NmApiSettingsManager::save(const NmApiMailboxSettingsData &data)
       
    50 {
       
    51     return d->save(data);
       
    52 }
       
    53 
       
    54 } // end namespace