iaupdate/IAD/ui/src/iaupdateuiconfigdata.cpp
changeset 0 ba25891c3a9e
equal deleted inserted replaced
-1:000000000000 0:ba25891c3a9e
       
     1 /*
       
     2 * Copyright (c) 2008 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:   This module contains the implementation of CIAUpdateUiConfigData
       
    15 *                class member functions.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <centralrepository.h>
       
    23 
       
    24 #include "iaupdateuiconfigdata.h"
       
    25 #include "iaupdateprivatecrkeys.h"
       
    26 #include "iaupdatedebug.h"
       
    27 
       
    28 CIAUpdateUiConfigData* CIAUpdateUiConfigData::NewL()
       
    29     {
       
    30     CIAUpdateUiConfigData* self =
       
    31         CIAUpdateUiConfigData::NewLC();
       
    32     CleanupStack::Pop( self );
       
    33     return self;
       
    34     }
       
    35 
       
    36 
       
    37 CIAUpdateUiConfigData* CIAUpdateUiConfigData::NewLC()
       
    38     {
       
    39     CIAUpdateUiConfigData* self =
       
    40         new( ELeave ) CIAUpdateUiConfigData();
       
    41     CleanupStack::PushL( self );
       
    42     self->ConstructL();
       
    43     return self;
       
    44     }
       
    45 
       
    46 
       
    47 CIAUpdateUiConfigData::CIAUpdateUiConfigData()
       
    48 : CBase()
       
    49     {
       
    50     }
       
    51 
       
    52 
       
    53 void CIAUpdateUiConfigData::ConstructL()
       
    54     {
       
    55     IAUPDATE_TRACE("[IAUPDATE]  CIAUpdateUiConfigData::ConstructL begin");
       
    56     CRepository* cenrep = CRepository::NewL( KCRUidIAUpdateSettings ); 
       
    57     CleanupStack::PushL( cenrep );
       
    58     User::LeaveIfError( cenrep->Get( KIAUpdateGridRefreshDeltaHours , iGridRefreshDeltaHours ) );
       
    59     User::LeaveIfError( cenrep->Get( KIAUpdateQueryHistoryDelayHours, iQueryHistoryDelayHours ) );
       
    60     IAUPDATE_TRACE("[IAUPDATE]  CIAUpdateUiConfigData::ConstructL 3");
       
    61     CleanupStack::PopAndDestroy( cenrep );
       
    62     }
       
    63 
       
    64 
       
    65 CIAUpdateUiConfigData::~CIAUpdateUiConfigData()  
       
    66     {
       
    67     }
       
    68 
       
    69 TInt CIAUpdateUiConfigData::GridRefreshDeltaHours() const
       
    70     {
       
    71     return iGridRefreshDeltaHours;
       
    72     }
       
    73 
       
    74 TInt CIAUpdateUiConfigData::QueryHistoryDelayHours() const
       
    75     {
       
    76     return iQueryHistoryDelayHours;
       
    77     }