iaupdateapi_stub/src/iaupdate.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:   CIAUpdate
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <iaupdate.h>
       
    20 
       
    21 
       
    22 EXPORT_C CIAUpdate* CIAUpdate::NewL( MIAUpdateObserver& aObserver )
       
    23     {
       
    24     CIAUpdate* self = CIAUpdate::NewLC( aObserver );
       
    25     CleanupStack::Pop( self );
       
    26     return self;
       
    27     }
       
    28     
       
    29 EXPORT_C CIAUpdate* CIAUpdate::NewLC( MIAUpdateObserver& aObserver )
       
    30     {
       
    31     CIAUpdate* self = new( ELeave ) CIAUpdate();
       
    32     CleanupStack::PushL( self );
       
    33     self->ConstructL( aObserver );
       
    34     return self;
       
    35     }
       
    36 
       
    37     
       
    38 CIAUpdate::CIAUpdate()
       
    39 : CBase()
       
    40     {
       
    41     
       
    42     }
       
    43     
       
    44 void CIAUpdate::ConstructL( MIAUpdateObserver& /*aObserver*/ )
       
    45     {
       
    46     // This is just a stub file.
       
    47     // This stuf file does not provide any functionality.
       
    48     // So, leave during construction and inform possible user
       
    49     // that this functionality is not supported.
       
    50     User::Leave( KErrNotSupported );
       
    51     }
       
    52 
       
    53 
       
    54 EXPORT_C CIAUpdate::~CIAUpdate()
       
    55     {
       
    56     // Nothing to do here.
       
    57     }
       
    58 
       
    59 
       
    60 EXPORT_C void CIAUpdate::CheckUpdates( const CIAUpdateParameters& /*aUpdateParameters*/ )
       
    61     {
       
    62     }
       
    63 
       
    64 
       
    65 EXPORT_C void CIAUpdate::ShowUpdates( const CIAUpdateParameters& /*aUpdateParameters*/ )
       
    66     {
       
    67     }
       
    68     
       
    69 
       
    70 EXPORT_C void CIAUpdate::Update( const CIAUpdateParameters& /*aUpdateParameters*/ )
       
    71     {
       
    72     }
       
    73 
       
    74 
       
    75 EXPORT_C void CIAUpdate::UpdateQuery()
       
    76     {
       
    77     }
       
    78 
       
    79 
       
    80 CIAUpdateManager& CIAUpdate::UpdateManager() const
       
    81     {
       
    82     // This class object leaves with KErrNotSupported when
       
    83     // NewL or NewLC is called. So, it does not matter even
       
    84     // if we return reference to NULL here.
       
    85     CIAUpdateManager* ptr( NULL );
       
    86     return *ptr;
       
    87     }