natfw/natfwclient/tsrc/ut_natfwclient/src/settings.cpp
author vnuitven <>
Thu, 07 Oct 2010 18:02:33 +0530
branchrcs
changeset 56 eceb2b9c54ac
parent 0 1bce908db942
permissions -rw-r--r--
adding the msrp plugin rss files

/*
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:    
*
*/



#include "settings.h"

#include <centralrepository.h>

#include "datadepository.h"

// -----------------------------------------------------------------------------
// CSettings
// -----------------------------------------------------------------------------
// 
CSettings::CSettings()
    {
    }
 
 
// -----------------------------------------------------------------------------
// ~CSettings
// -----------------------------------------------------------------------------
//
CSettings::~CSettings( )
    {
    delete iDepository;
    delete iRepository;
    }

// -----------------------------------------------------------------------------
// CSettings::ConstructBaseL
// -----------------------------------------------------------------------------
//  
void CSettings::ConstructBaseL( TUid aCRUid )
    {
    iRepository = CRepository::NewL( aCRUid );
    iDepository = CDataDepository::NewL( iRepository );
    }


// -----------------------------------------------------------------------------
// CSettings::CreateNewTableKeyL
// -----------------------------------------------------------------------------
//
EXPORT_C TUint32 CSettings::CreateNewTableKeyL( TUint aTableMask, TUint32 aFieldMask ) const
    {
    return iDepository->CreateNewTableKeyL( aTableMask, aFieldMask );
    }


// -----------------------------------------------------------------------------
// CSettings::StoreL
// -----------------------------------------------------------------------------
//
EXPORT_C void CSettings::StoreL( const TUint32 aKey, const TInt aData )
    {
    iDepository->StoreL( aKey, aData );
    }


// -----------------------------------------------------------------------------
// CSettings::StoreL
// -----------------------------------------------------------------------------
//
EXPORT_C void CSettings::StoreL( const TUint32 aKey, const TDesC8& aData )
    {
    iDepository->StoreL( aKey, aData );
    }
    
    
// -----------------------------------------------------------------------------
// CSettings::Read(
// -----------------------------------------------------------------------------
//
EXPORT_C TInt CSettings::Read( const TUint32 aKey, TInt& aData )
    {
    return iDepository->Read( aKey, aData );
    }


// -----------------------------------------------------------------------------
// CSettings::ReadL
// -----------------------------------------------------------------------------
//
EXPORT_C TInt CSettings::ReadL( const TUint32 aKey, HBufC8** aData )
    {
    return iDepository->ReadL( aKey, aData );
    }
    
    
// -----------------------------------------------------------------------------
// CSettings::EraseL
// -----------------------------------------------------------------------------
//
EXPORT_C TInt CSettings::EraseL( TUint32 aTableMask, TUint32 aFieldTypeMask )
    {
    return iDepository->EraseL( aTableMask, aFieldTypeMask );
    }