emulator/emulatorbsp/hcr/hcr_psl.cpp
changeset 0 cec860690d41
equal deleted inserted replaced
-1:000000000000 0:cec860690d41
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // This file is part of the EPOC Emulator Variant Base Port
       
    15 // Hardware Configuration Repository Platform Specific Layer (PSL) 
       
    16 //
       
    17 
       
    18 
       
    19 // -- INCLUDES ----------------------------------------------------------------
       
    20 
       
    21 
       
    22 #include "hcr_debug.h"
       
    23 
       
    24 #include "hcr_hai.h"
       
    25 
       
    26 
       
    27 
       
    28 // -- GLOBALS -----------------------------------------------------------------
       
    29 
       
    30 
       
    31 GLREF_C HCR::SRepositoryCompiled gRepository;
       
    32 
       
    33 
       
    34 // -- CLASSES- ----------------------------------------------------------------
       
    35 
       
    36 
       
    37 class HCRVariant : public HCR::MVariant
       
    38     {    
       
    39     
       
    40 public:
       
    41 
       
    42     HCRVariant();
       
    43     virtual ~HCRVariant();
       
    44     
       
    45 public:    
       
    46     
       
    47     TInt Initialise();
       
    48     
       
    49     TBool IgnoreCoreImgRepository();
       
    50 	TInt GetCompiledRepositoryAddress( TAny* & aAddr);
       
    51     TInt GetOverrideRepositoryAddress( TAny* & aAddr);
       
    52     
       
    53     };
       
    54     
       
    55     
       
    56 
       
    57 
       
    58 // -- METHODS -----------------------------------------------------------------
       
    59 
       
    60 
       
    61 HCRVariant::HCRVariant()
       
    62     {
       
    63     HCR_FUNC("HCRVariant");
       
    64     }
       
    65 
       
    66 
       
    67 HCRVariant::~HCRVariant()
       
    68     {
       
    69     HCR_FUNC("~HCRVariant");
       
    70     }
       
    71 
       
    72 
       
    73 TInt HCRVariant::Initialise()
       
    74     {
       
    75     HCR_FUNC("HCRVariant::Initialise");
       
    76     
       
    77     HCR_TRACE_RETURN(KErrNone);
       
    78     }
       
    79     
       
    80     
       
    81 TInt HCRVariant::GetCompiledRepositoryAddress( TAny* & aAddr)
       
    82     {
       
    83     HCR_FUNC("HCRVariant::GetCompiledRepositoryAddress");
       
    84         
       
    85     aAddr = static_cast<TAny*>(&gRepository);
       
    86     HCR_TRACE_RETURN(KErrNone);
       
    87     }
       
    88 
       
    89 TBool HCRVariant::IgnoreCoreImgRepository()
       
    90     {
       
    91     HCR_FUNC("HCRVariant::IgnoreCoreImgRepository");
       
    92         
       
    93     HCR_TRACE_RETURN(EFalse);
       
    94     }
       
    95 
       
    96 TInt HCRVariant::GetOverrideRepositoryAddress( TAny* &)
       
    97     {
       
    98     HCR_FUNC("HCRVariant::GetRAMRepositoryAddress");
       
    99     
       
   100     // OverrideRepository not supported in EPOC Emulator version
       
   101     
       
   102     HCR_TRACE_RETURN(KErrNotSupported);
       
   103     }
       
   104 
       
   105  
       
   106 // -- ENTRY POINTS ------------------------------------------------------------
       
   107 
       
   108 
       
   109 GLDEF_C HCR::MVariant* CreateHCRVariant()
       
   110     {
       
   111     HCR_FUNC("CreateHCRVariant");
       
   112 
       
   113     return new HCRVariant;
       
   114     }