sl@0: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Implementation of the state accessor class for the CRegistrar class sl@0: // sl@0: // sl@0: sl@0: // ______________________________________________________________________________ sl@0: // sl@0: inline TInt TRegistrar_StateAccessor::InvariantTest(TAny* aTestObject) sl@0: { sl@0: CRegistrar* registrar = REINTERPRET_CAST(CRegistrar*, aTestObject); sl@0: sl@0: // The only invariants over all cases sl@0: if( registrar == NULL || sl@0: registrar->iDiscoverer == NULL) sl@0: return KTestBedFailedInvariant; sl@0: return KErrNone; sl@0: } sl@0: sl@0: inline TInt TRegistrar_StateAccessor::Internalize(TAny* /* aTestObject */) sl@0: { sl@0: // No reload state sl@0: return KErrNone; sl@0: } sl@0: sl@0: inline TInt TRegistrar_StateAccessor::Externalize(TAny* /* aTestObject */) sl@0: { sl@0: // No persistent state yet sl@0: return KErrNone; sl@0: } sl@0: sl@0: inline void TRegistrar_StateAccessor::ParseL(CRegistrar& aRegistrar, sl@0: CRegistryData::CDllData& aDll, sl@0: const TDesC& aRscFileName) sl@0: { sl@0: aRegistrar.ParseL(aDll, aRscFileName); sl@0: } sl@0: sl@0: inline void TRegistrar_StateAccessor::ParseRegistrationDataL(CRegistrar& aRegistrar, sl@0: const TEntry& aEntry, sl@0: const TDesC& aRscFileName, sl@0: const TDriveUnit& aDrive, sl@0: TBool aUpdate, sl@0: TInt aRegistryDriveIndex) sl@0: { sl@0: aRegistrar.ParseRegistrationDataL(aEntry, aRscFileName, aDrive, aUpdate, aRegistryDriveIndex); sl@0: } sl@0: sl@0: inline void TRegistrar_StateAccessor::DiscoveriesBegin(CRegistrar& aRegistrar) sl@0: { sl@0: aRegistrar.DiscoveriesBegin(); sl@0: } sl@0: sl@0: inline void TRegistrar_StateAccessor::DiscoveriesComplete(CRegistrar& aRegistrar, TBool aSuccessful) sl@0: { sl@0: aRegistrar.DiscoveriesComplete(aSuccessful); sl@0: } sl@0: sl@0: inline void TRegistrar_StateAccessor::DriveRemoved(CRegistrar& aRegistrar, TDriveUnit aDrive) sl@0: { sl@0: aRegistrar.DriveRemovedL(aDrive); sl@0: } sl@0: sl@0: inline void TRegistrar_StateAccessor::DriveReinstatedL(CRegistrar& aRegistrar, sl@0: TDriveUnit aDrive) sl@0: { sl@0: aRegistrar.DriveReinstatedL(aDrive); sl@0: } sl@0: sl@0: void TRegistrar_StateAccessor::RegisterDiscoveryL(CRegistrar& aRegistrar, const TEntry& aEntry) sl@0: { sl@0: aRegistrar.RegisterDiscoveryL(aEntry); sl@0: } sl@0: