CRegistrar Class Reference

class CRegistrar : public CBase
Since
7.0 Responsible for managing Interface Implementaion Collection registration (adding and removing entries).

Inherits from

Public Member Functions
~CRegistrar()
TInt Disable(TUid)
TInt Enable(TUid)
voidInstallBurEventCallBack(const TCallBackWithArg &)
voidInstallSwiEventCallBack(const TCallBackWithArg &)
CRegistrar *NewL(CRegistryData &, MRegistrarObserver &, RFs &)
voidProcessSSAEventL(TStartupStateIdentifier)
TInt Resume()
TInt Suspend()
Private Member Functions
CRegistrar(CRegistryData &, MRegistrarObserver &, RFs &)
voidConstructL()
voidDiscoveriesBegin()
voidDiscoveriesComplete(TBool, TPluginProcessingTypeIdentifier)
voidDriveReinstatedL(TDriveUnit)
voidDriveRemovedL(TDriveUnit)
voidGetResourceFormatVersionL(RResourceReader &, TInt &)
voidInitialiseEvent()
TBool IsAnyDllRegisteredWithDriveL(const TDriveUnit)
voidLanguageChangedL(TBool &)
TBool NotifiedWithErrorCode(TInt)
voidParseL(CPluginBase *&, CRegistryData::CDllData &)
voidParseRegistrationDataL(CPluginBase *&, const TDriveUnit &, TBool, TInt, CRegistryData::CDriveData *)
voidRegisterDiscoveryL(const TDriveName &, CPluginBase *&, TBool)
voidSetDiscoveryFlagL(const TDriveUnit &)
TRegistrarState State()
TBool UpdateRegistryL(TDriveUnit &, TUid, const TTime &, TInt &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumTRegistrarState { EReg_Undefined, EReg_StartupInProgess, EReg_StartupComplete }
Private Attributes
CBackupNotifier *iBackupNotifier
CEComCachedDriveInfo *iCachedDriveInfo
CDiscoverer *iDiscoverer
RFs &iFs
MRegistrarObserver &iRegistrarObserver
CRegistryData &iRegistry
TRegistrarState iState

Constructor & Destructor Documentation

CRegistrar(CRegistryData &, MRegistrarObserver &, RFs &)

CRegistrar(CRegistryData &aRegistry,
MRegistrarObserver &aRegistrarObserver,
RFs &aFs
)[private]
Intended Usage : Standardised default c'tor Error Condition : None
Since
7.0
Pre-condition
None
Post-condition
CRegistrar is fully constructed

Parameters

CRegistryData & aRegistryA reference to the registry data management class.
MRegistrarObserver & aRegistrarObserverA reference to the registrar observer class.
RFs & aFsA reference to an connected file server session.

~CRegistrar()

~CRegistrar()
Intended Usage : Standard default d'tor Error Condition : None
Since
7.0
Pre-condition
None
Post-condition
CRegistrar is totally destroyed

Member Functions Documentation

ConstructL()

voidConstructL()[private]
Intended Usage : Standardised 2nd, (Initialisation) phase of two phase construction. Error Condition : None
leave
None
Since
7.0
Pre-condition
CRegistrar is fully constructed.
Post-condition
CRegistrar is fully initialised.

Disable(TUid)

TInt Disable(TUidaImplementationUid)
Intended Usage :Stop the specified interface implementation from being used. Error Condition : KErrDisableFailed The disable call failed.
Since
7.0 :
Pre-condition
CRegistrar is fully constructed
Post-condition
The interface implementation identified by the UID is no longer available for use.

Parameters

TUid aImplementationUidThe Interface Implementation to disable.

DiscoveriesBegin()

voidDiscoveriesBegin()[private]
Intended Usage :Overload of the MDiscovererObserver callback method. The cue that a registry update is about to occur. Error Condition : None.
Since
7.0 :
Pre-condition
CRegistrar is fully constructed
Post-condition
The Registry data manager has been informed that its internal data is out of date.

DiscoveriesComplete(TBool, TPluginProcessingTypeIdentifier)

voidDiscoveriesComplete(TBoolaSuccessful,
TPluginProcessingTypeIdentifieraProcessingType
)[private]
Intended Usage :Overload of the MDiscovererObserver callback method. Error Condition : None.
Since
7.0 :
Pre-condition
CRegistrar is fully constructed
Post-condition
The current registry data and the internal access indexes have been rebuilt.

Parameters

TBool aSuccessfulETrue indicates the scan completed successfully, EFalse, that the scan was only partial.
TPluginProcessingTypeIdentifier aProcessingTypeindicates the type of processing for plugins for ensuring that plugins are not processed multiple times during start-up phase

DriveReinstatedL(TDriveUnit)

voidDriveReinstatedL(TDriveUnitaDrive)[private]
Intended Usage :Overload of the MDiscovererObserver callback method. The cue to signal the registry that the registered Interface Implementation Collections stored upon the specified drive are again available for use. Error Condition : Leaves with an error code.
leave
KErrNoMemory, KErrRegistrationFailed.
Since
7.0 :
Pre-condition
CRegistrar is fully constructed.
Post-condition
The registered Interface Implementation Collections stored upon the specified drive are again made available for use.

Parameters

TDriveUnit aDriveThe drive identifier.

DriveRemovedL(TDriveUnit)

voidDriveRemovedL(TDriveUnitaDrive)[private]
Intended Usage :Overload of the MDiscovererObserver callback method. The cue to signal the registry that the registered Interface Implementation Collections stored upon the specified drive should no longer available for use. Error Condition : Leaves with an error code.
leave
KErrNoMemory
Since
7.0 :
Pre-condition
CRegistrar is fully constructed.
Post-condition
The registered Interface Implementation Collections stored upon the specified drive are no longer available for use.

Parameters

TDriveUnit aDriveThe drive identifier.

Enable(TUid)

TInt Enable(TUidaImplementationUid)
Intended Usage :Allow the specified Interface Implementation to be used. Error Condition : KErrEnableFailed The enable call failed.
Since
7.0 :
Pre-condition
CRegistrar is fully constructed
Post-condition
The interface implementation identified by the UID is made available for use.

Parameters

TUid aImplementationUidThe Interface Implementation to enable.

GetResourceFormatVersionL(RResourceReader &, TInt &)

voidGetResourceFormatVersionL(RResourceReader &aReader,
TInt &aResourceFormatVersion
)[private]
Intended Usage : Get resource format version from the resource file
Pre-condition
CRegistrar is fully constructed.

Parameters

RResourceReader & aReaderThe resource file reader.
TInt & aResourceFormatVersionThe resource file format version

InitialiseEvent()

voidInitialiseEvent()[private]
Intended Usage : change the state during the CRegistrar's construction.
Post-condition
: state is changed to EReg_StartupInProgess.

InstallBurEventCallBack(const TCallBackWithArg &)

voidInstallBurEventCallBack(const TCallBackWithArg &aCallBack)

Install a callback function to receive notification of BUR status changes. Note that the callback is passed along to CDsicoverer which does the BUR monitoring.

Parameters

const TCallBackWithArg & aCallBackthe callback function to install.

InstallSwiEventCallBack(const TCallBackWithArg &)

voidInstallSwiEventCallBack(const TCallBackWithArg &aCallBack)

Install a callback function to receive notification of SWI status changes. Note that the callback is passed along to CDsicoverer which does the SWI monitoring.

Parameters

const TCallBackWithArg & aCallBackthe callback function to install.

IsAnyDllRegisteredWithDriveL(const TDriveUnit)

TBool IsAnyDllRegisteredWithDriveL(const TDriveUnitaDrive)const [private]

Parameters

const TDriveUnit aDrive

LanguageChangedL(TBool &)

voidLanguageChangedL(TBool &aLanguageChanged)[private]

Parameters

TBool & aLanguageChanged

NewL(CRegistryData &, MRegistrarObserver &, RFs &)

CRegistrar *NewL(CRegistryData &aRegistry,
MRegistrarObserver &aRegistrarObserver,
RFs &aFs
)[static]
Intended Usage : Standardised safe construction which leaves nothing on the cleanup stack. Error Condition : Cannot fully construct because of memory limitations.
leave
KErrNoMemory
Since
7.0
Pre-condition
None
Post-condition
CRegistrar is fully constructed, and initialised.

Parameters

CRegistryData & aRegistryA reference to the registry data management class.
MRegistrarObserver & aRegistrarObserverA reference to the registrar observer class.
RFs & aFsA reference to an connected file server session.

NotifiedWithErrorCode(TInt)

TBool NotifiedWithErrorCode(TIntaError)[private]
Intended Usage :Overload of the MDiscovererObserver callback method. The notification that the notifier has been activated with an error status code. The observer should instruct the notification object how to proceed. Error Condition : None.
Since
7.0 :
Pre-condition
CRegistrar is fully constructed.
Post-condition
The status code should be used by the observer to instruct the notifier to cease recieving notifications or not.

Parameters

TInt aErrorThe error value recieved by the notifier.

ParseL(CPluginBase *&, CRegistryData::CDllData &)

voidParseL(CPluginBase *&aEntry,
CRegistryData::CDllData &aDll
)[private]
Intended Usage : Parsing the resource file information associated with an Interface Implementation Collection for entry into the registry information. Error Condition : Parsing fails due to a lack of memory, or a parsing error.
leave
KErrNoMemory
Since
9.1
Pre-condition
CRegistrar is fully constructed.
Post-condition
The resource file has been parsed and the data added to 'aDll'.

Parameters

CPluginBase *& aEntryThe directory entry data for the Interface Impplementation Collection.
CRegistryData::CDllData & aDllThe CDllData information to fill

ParseRegistrationDataL(CPluginBase *&, const TDriveUnit &, TBool, TInt, CRegistryData::CDriveData *)

voidParseRegistrationDataL(CPluginBase *&aEntry,
const TDriveUnit &aDrive,
TBoolaUpdate,
TIntaRegistryDriveIndex,
CRegistryData::CDriveData *aDriveData
)[private]

Parameters

CPluginBase *& aEntry
const TDriveUnit & aDrive
TBool aUpdate
TInt aRegistryDriveIndex
CRegistryData::CDriveData * aDriveData

ProcessSSAEventL(TStartupStateIdentifier)

voidProcessSSAEventL(TStartupStateIdentifieraKnownState)

Parameters

TStartupStateIdentifier aKnownState

RegisterDiscoveryL(const TDriveName &, CPluginBase *&, TBool)

voidRegisterDiscoveryL(const TDriveName &aDrive,
CPluginBase *&aDirEntry,
TBoolaAnyDllDiscovered
)[private]
Intended Usage :Overload of the MDiscovererObserver callback method. Adds the specified Interface Implementation Collection to the registry. Error Condition : Leaves with an error code.
leave
KErrNoMemory, KErrRegistrationFailed.
Since
9.1 :
Pre-condition
CRegistrar is fully constructed
Post-condition
The Interface Implementation Collection identified by the directory entry is registered.

Parameters

const TDriveName & aDrive
CPluginBase *& aDirEntryThe directory entry to register.
TBool aAnyDllDiscoveredA flag to tell if any DLL is discovered in the drive.

Resume()

TInt Resume()
Intended Usage : Overload of the MBackupNotifierObserver method. Allow registration of new Interface Implementation Collections to begin again. Error Condition : KErrResumeFailed The registration resume failed.
Since
7.0 :
Pre-condition
CRegistrar is fully constructed
Post-condition
Registration suspension is cancelled.

SetDiscoveryFlagL(const TDriveUnit &)

voidSetDiscoveryFlagL(const TDriveUnit &aDriveUnit)[private]

Parameters

const TDriveUnit & aDriveUnit

State()

TRegistrarState State()const [private]

Suspend()

TInt Suspend()
Intended Usage : Overload of the MBackupNotifierObserver method. Suspend registration of new Interface Implementation Collections. Error Condition : KErrSuspendFailed The registration suspension failed.
Since
7.0 :
Pre-condition
CRegistrar is fully constructed
Post-condition
Registration is suspended.

UpdateRegistryL(TDriveUnit &, TUid, const TTime &, TInt &)

TBool UpdateRegistryL(TDriveUnit &driveUnit,
TUidaDllUid,
const TTime &aModified,
TInt &aRegistryDriveIndex
)[private]
Intended Usage :Checks if the Registry must be updated or not. Error Condition : Leaves with an error code.
leave
KErrNoMemory, KErrRegistrationFailed.
Since
9.0 :
Pre-condition
CRegistrar is fully constructed
Post-condition
No change to object..

Parameters

TDriveUnit & driveUnit
TUid aDllUidThe interface implementation collection data to add. CRegistryData takes ownership of this object so it should not be on the CleanupStack.
const TTime & aModifiedThe date of the last modification of the Interface Implementation Collection.
TInt & aRegistryDriveIndexAn output providing index within the registry data for the branch that the registry entry was found within.

Member Enumerations Documentation

Enum TRegistrarState

State declaration for CRegistrar

Enumerators

EReg_Undefined

Undefined state

EReg_StartupInProgess

Internalization/Externalization and Discovery in progress

EReg_StartupComplete

Internalization/Externalization and Discovery complete

Member Data Documentation

CBackupNotifier * iBackupNotifier

CBackupNotifier *iBackupNotifier[private]

The owned backup/restore notification handling class

CEComCachedDriveInfo * iCachedDriveInfo

CEComCachedDriveInfo *iCachedDriveInfo[private]

cached info on drivelist

CDiscoverer * iDiscoverer

CDiscoverer *iDiscoverer[private]

The owned discovery notification handling class

RFs & iFs

RFs &iFs[private]

A reference to a conncted file session

MRegistrarObserver & iRegistrarObserver

MRegistrarObserver &iRegistrarObserver[private]

The reference to the observer of the Registrar for change notification.

CRegistryData & iRegistry

CRegistryData &iRegistry[private]

The reference to the registry data manager class

TRegistrarState iState

TRegistrarState iState[private]

The current state of this object