satengine/SatServer/SystemState/src/TSatSystemStateFactory.cpp
changeset 46 2fa1fa551b0b
parent 42 35488577e233
child 48 78df25012fda
equal deleted inserted replaced
42:35488577e233 46:2fa1fa551b0b
     1 /*
       
     2 * Copyright (c) 2002-2007 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:  Provides SAT SystemState objects outside of this DLL
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include    <startupdomainpskeys.h>
       
    20 #include    <PSVariables.h>
       
    21 #define Q_OS_SYMBIAN // needed to activate homescreendomainpskeys.h
       
    22 #include    <homescreendomainpskeys.h>
       
    23 #include    <CommonEngineDomainCRKeys.h>
       
    24 #include    <BTSapDomainPSKeys.h>
       
    25 #include    <ProfileEngineSDKCRKeys.h>
       
    26 #include    "TSatSystemStateFactory.h"
       
    27 #include    "CSatSystemState.h"
       
    28 #include    "msatmultimodeapi.h"
       
    29 #include    "CSatPSChangeNotifier.h"
       
    30 #include    "CSatCenRepChangeNotifier.h"
       
    31 #include    "SatLog.h"
       
    32 
       
    33 
       
    34 // ======== MEMBER FUNCTIONS ========
       
    35 
       
    36 // -----------------------------------------------------------------------------
       
    37 // (other items were commented in a header).
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 EXPORT_C MSatSystemState* TSatSystemStateFactory::CreateSystemStateL(
       
    41     MSatMultiModeApi& aPhone )
       
    42     {
       
    43     LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::CreateSystemStateL \
       
    44         calling" )
       
    45 
       
    46     MSatSystemState* systemState = CSatSystemState::NewL( aPhone );
       
    47 
       
    48     LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::CreateSystemStateL \
       
    49         exiting" )
       
    50     return systemState;
       
    51     }
       
    52 
       
    53 // -----------------------------------------------------------------------------
       
    54 // TSatSystemStateFactory::CreateIdleModeChangeNotifierL
       
    55 // -----------------------------------------------------------------------------
       
    56 //
       
    57 EXPORT_C MSatSystemStateChangeNotifier*
       
    58     TSatSystemStateFactory::CreateIdleModeChangeNotifierL(
       
    59     MSatSystemStateObserver& aObserver )
       
    60     {
       
    61     LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\
       
    62         CreateIdleModeChangeNotifierL calling" )
       
    63 
       
    64     MSatSystemStateChangeNotifier* ret = CSatPSChangeNotifier::NewL(
       
    65         KHsCategoryUid,
       
    66         KHsCategoryStateKey,
       
    67         aObserver,
       
    68         EHomeScreenIdleState );
       
    69 
       
    70     LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\
       
    71         CreateIdleModeChangeNotifierL exiting" )
       
    72     return ret;
       
    73     }
       
    74 
       
    75 // -----------------------------------------------------------------------------
       
    76 // TSatSystemStateFactory::CreateSimStatusChangeNotifierL
       
    77 // -----------------------------------------------------------------------------
       
    78 //
       
    79 EXPORT_C MSatSystemStateChangeNotifier*
       
    80     TSatSystemStateFactory::CreateSimStatusChangeNotifierL(
       
    81     MSatSystemStateObserver& aObserver )
       
    82     {
       
    83     LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\
       
    84         CreateSimStatusChangeNotifierL calling" )
       
    85 
       
    86     MSatSystemStateChangeNotifier* ret = CSatPSChangeNotifier::NewL(
       
    87         KPSUidStartup,
       
    88         KPSSimStatus,
       
    89         aObserver,
       
    90         ESimNotPresent );
       
    91 
       
    92     LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\
       
    93         CreateSimStatusChangeNotifierL exiting" )
       
    94     return ret;
       
    95     }
       
    96 
       
    97 // -----------------------------------------------------------------------------
       
    98 // TSatSystemStateFactory::CreateSIMAccessProfileChangeNotifierL
       
    99 // -----------------------------------------------------------------------------
       
   100 //
       
   101 EXPORT_C MSatSystemStateChangeNotifier*
       
   102     TSatSystemStateFactory::CreateSIMAccessProfileChangeNotifierL(
       
   103     MSatSystemStateObserver& aObserver )
       
   104     {
       
   105     LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\
       
   106         CreateSIMAccessProfileChangeNotifier calling" )
       
   107 
       
   108     MSatSystemStateChangeNotifier* ret = CSatPSChangeNotifier::NewL(
       
   109         KPSUidBluetoothSapConnectionState,
       
   110         KBTSapConnectionState,
       
   111         aObserver,
       
   112         KNotifyValueNotSet ); // No notify value specified
       
   113 
       
   114     LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\
       
   115         CreateSIMAccessProfileChangeNotifier exiting" )
       
   116     return ret;
       
   117     }
       
   118 
       
   119 // -----------------------------------------------------------------------------
       
   120 // TSatSystemStateFactory::CreateStartupChangeChangeNotifierL
       
   121 // -----------------------------------------------------------------------------
       
   122 //
       
   123 EXPORT_C MSatSystemStateChangeNotifier*
       
   124     TSatSystemStateFactory::CreateStartupChangeNotifierL(
       
   125     MSatSystemStateObserver& aObserver )
       
   126     {
       
   127     LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\
       
   128         CreateStartupChangeNotifierL calling" )
       
   129 
       
   130     MSatSystemStateChangeNotifier* ret = CSatPSChangeNotifier::NewL(
       
   131         KPSUidStartup,
       
   132         KPSGlobalSystemState,
       
   133         aObserver,
       
   134         KNotifyValueNotSet );
       
   135 
       
   136     LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\
       
   137         CreateStartupChangeNotifierL exiting" )
       
   138     return ret;
       
   139     }
       
   140 
       
   141 // -----------------------------------------------------------------------------
       
   142 // TSatSystemStateFactory::CreateLanguageSelectionChangeNotifierL
       
   143 // -----------------------------------------------------------------------------
       
   144 //
       
   145 EXPORT_C MSatSystemStateChangeNotifier*
       
   146     TSatSystemStateFactory::CreateLanguageSelectionChangeNotifierL(
       
   147     MSatSystemStateObserver& aObserver )
       
   148     {
       
   149     LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\
       
   150         CreateLanguageSelectionChangeNotifier calling" )
       
   151 
       
   152     MSatSystemStateChangeNotifier* ret = CSatCenRepChangeNotifier::NewL(
       
   153         KCRUidCommonEngineKeys,
       
   154         KGSDisplayTxtLang,
       
   155         aObserver,
       
   156         CSatCenRepChangeNotifier::ECRTypeInteger );
       
   157 
       
   158     LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\
       
   159         CreateLanguageSelectionChangeNotifier exiting" )
       
   160     return ret;
       
   161     }
       
   162 
       
   163 // -----------------------------------------------------------------------------
       
   164 // TSatSystemStateFactory::CreateProfileChangeNotifierL
       
   165 // -----------------------------------------------------------------------------
       
   166 //
       
   167 EXPORT_C MSatSystemStateChangeNotifier*
       
   168     TSatSystemStateFactory::CreateProfileChangeNotifierL(
       
   169     MSatSystemStateObserver& aObserver )
       
   170     {
       
   171     LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\
       
   172         CreateProfileChangeNotifierL calling" )
       
   173 
       
   174     MSatSystemStateChangeNotifier* ret = CSatCenRepChangeNotifier::NewL(
       
   175         KCRUidProfileEngine,
       
   176         KProEngActiveProfile,
       
   177         aObserver,
       
   178         CSatCenRepChangeNotifier::ECRTypeInteger );
       
   179 
       
   180     LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\
       
   181         CreateProfileChangeNotifierL exiting" )
       
   182     return ret;
       
   183     }