diff -r 000000000000 -r ff3b6d0fd310 satengine/SatServer/SystemState/src/TSatSystemStateFactory.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/satengine/SatServer/SystemState/src/TSatSystemStateFactory.cpp Tue Feb 02 01:11:09 2010 +0200 @@ -0,0 +1,182 @@ +/* +* Copyright (c) 2002-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: Provides SAT SystemState objects outside of this DLL +* +*/ + + +#include +#include +#include +#include +#include +#include +#include "TSatSystemStateFactory.h" +#include "CSatSystemState.h" +#include "msatmultimodeapi.h" +#include "CSatPSChangeNotifier.h" +#include "CSatCenRepChangeNotifier.h" +#include "SatLog.h" + + +// ======== MEMBER FUNCTIONS ======== + +// ----------------------------------------------------------------------------- +// (other items were commented in a header). +// ----------------------------------------------------------------------------- +// +EXPORT_C MSatSystemState* TSatSystemStateFactory::CreateSystemStateL( + MSatMultiModeApi& aPhone ) + { + LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::CreateSystemStateL \ + calling" ) + + MSatSystemState* systemState = CSatSystemState::NewL( aPhone ); + + LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::CreateSystemStateL \ + exiting" ) + return systemState; + } + +// ----------------------------------------------------------------------------- +// TSatSystemStateFactory::CreateIdleModeChangeNotifierL +// ----------------------------------------------------------------------------- +// +EXPORT_C MSatSystemStateChangeNotifier* + TSatSystemStateFactory::CreateIdleModeChangeNotifierL( + MSatSystemStateObserver& aObserver ) + { + LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ + CreateIdleModeChangeNotifierL calling" ) + + MSatSystemStateChangeNotifier* ret = CSatPSChangeNotifier::NewL( + KPSUidAiInformation, + KActiveIdleState, + aObserver, + EPSAiForeground ); + + LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ + CreateIdleModeChangeNotifierL exiting" ) + return ret; + } + +// ----------------------------------------------------------------------------- +// TSatSystemStateFactory::CreateSimStatusChangeNotifierL +// ----------------------------------------------------------------------------- +// +EXPORT_C MSatSystemStateChangeNotifier* + TSatSystemStateFactory::CreateSimStatusChangeNotifierL( + MSatSystemStateObserver& aObserver ) + { + LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ + CreateSimStatusChangeNotifierL calling" ) + + MSatSystemStateChangeNotifier* ret = CSatPSChangeNotifier::NewL( + KPSUidStartup, + KPSSimStatus, + aObserver, + ESimNotPresent ); + + LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ + CreateSimStatusChangeNotifierL exiting" ) + return ret; + } + +// ----------------------------------------------------------------------------- +// TSatSystemStateFactory::CreateSIMAccessProfileChangeNotifierL +// ----------------------------------------------------------------------------- +// +EXPORT_C MSatSystemStateChangeNotifier* + TSatSystemStateFactory::CreateSIMAccessProfileChangeNotifierL( + MSatSystemStateObserver& aObserver ) + { + LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ + CreateSIMAccessProfileChangeNotifier calling" ) + + MSatSystemStateChangeNotifier* ret = CSatPSChangeNotifier::NewL( + KPSUidBluetoothSapConnectionState, + KBTSapConnectionState, + aObserver, + KNotifyValueNotSet ); // No notify value specified + + LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ + CreateSIMAccessProfileChangeNotifier exiting" ) + return ret; + } + +// ----------------------------------------------------------------------------- +// TSatSystemStateFactory::CreateStartupChangeChangeNotifierL +// ----------------------------------------------------------------------------- +// +EXPORT_C MSatSystemStateChangeNotifier* + TSatSystemStateFactory::CreateStartupChangeNotifierL( + MSatSystemStateObserver& aObserver ) + { + LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ + CreateStartupChangeNotifierL calling" ) + + MSatSystemStateChangeNotifier* ret = CSatPSChangeNotifier::NewL( + KPSUidStartup, + KPSGlobalSystemState, + aObserver, + KNotifyValueNotSet ); + + LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ + CreateStartupChangeNotifierL exiting" ) + return ret; + } + +// ----------------------------------------------------------------------------- +// TSatSystemStateFactory::CreateLanguageSelectionChangeNotifierL +// ----------------------------------------------------------------------------- +// +EXPORT_C MSatSystemStateChangeNotifier* + TSatSystemStateFactory::CreateLanguageSelectionChangeNotifierL( + MSatSystemStateObserver& aObserver ) + { + LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ + CreateLanguageSelectionChangeNotifier calling" ) + + MSatSystemStateChangeNotifier* ret = CSatCenRepChangeNotifier::NewL( + KCRUidCommonEngineKeys, + KGSDisplayTxtLang, + aObserver, + CSatCenRepChangeNotifier::ECRTypeInteger ); + + LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ + CreateLanguageSelectionChangeNotifier exiting" ) + return ret; + } + +// ----------------------------------------------------------------------------- +// TSatSystemStateFactory::CreateProfileChangeNotifierL +// ----------------------------------------------------------------------------- +// +EXPORT_C MSatSystemStateChangeNotifier* + TSatSystemStateFactory::CreateProfileChangeNotifierL( + MSatSystemStateObserver& aObserver ) + { + LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ + CreateProfileChangeNotifierL calling" ) + + MSatSystemStateChangeNotifier* ret = CSatCenRepChangeNotifier::NewL( + KCRUidProfileEngine, + KProEngActiveProfile, + aObserver, + CSatCenRepChangeNotifier::ECRTypeInteger ); + + LOG( SIMPLE, "SATSYSTEMSTATE: TSatSystemStateFactory::\ + CreateProfileChangeNotifierL exiting" ) + return ret; + }