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 )
void InstallBurEventCallBack (const TCallBackWithArg &)
void InstallSwiEventCallBack (const TCallBackWithArg &)
CRegistrar * NewL ( CRegistryData &, MRegistrarObserver &, RFs &)
void ProcessSSAEventL ( TStartupStateIdentifier )
TInt Resume ()
TInt Suspend ()
Private Member Functions
CRegistrar ( CRegistryData &, MRegistrarObserver &, RFs &)
void ConstructL ()
void DiscoveriesBegin ()
void DiscoveriesComplete ( TBool , TPluginProcessingTypeIdentifier )
void DriveReinstatedL ( TDriveUnit )
void DriveRemovedL ( TDriveUnit )
void GetResourceFormatVersionL ( RResourceReader &, TInt &)
void InitialiseEvent ()
TBool IsAnyDllRegisteredWithDriveL (const TDriveUnit )
void LanguageChangedL ( TBool &)
TBool NotifiedWithErrorCode ( TInt )
void ParseL ( CPluginBase *&, CRegistryData::CDllData &)
void ParseRegistrationDataL ( CPluginBase *&, const TDriveUnit &, TBool , TInt , CRegistryData::CDriveData *)
void RegisterDiscoveryL (const TDriveName &, CPluginBase *&, TBool )
void SetDiscoveryFlagL (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
enum TRegistrarState { 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 & aRegistry A reference to the registry data management class.
MRegistrarObserver & aRegistrarObserver A reference to the registrar observer class.
RFs & aFs A 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()

void ConstructL ( ) [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 ( TUid aImplementationUid )
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 aImplementationUid The Interface Implementation to disable.

DiscoveriesBegin()

void DiscoveriesBegin ( ) [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)

void DiscoveriesComplete ( TBool aSuccessful,
TPluginProcessingTypeIdentifier aProcessingType
) [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 aSuccessful ETrue indicates the scan completed successfully, EFalse, that the scan was only partial.
TPluginProcessingTypeIdentifier aProcessingType indicates the type of processing for plugins for ensuring that plugins are not processed multiple times during start-up phase

DriveReinstatedL(TDriveUnit)

void DriveReinstatedL ( TDriveUnit aDrive ) [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 aDrive The drive identifier.

DriveRemovedL(TDriveUnit)

void DriveRemovedL ( TDriveUnit aDrive ) [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 aDrive The drive identifier.

Enable(TUid)

TInt Enable ( TUid aImplementationUid )
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 aImplementationUid The Interface Implementation to enable.

GetResourceFormatVersionL(RResourceReader &, TInt &)

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

Parameters

RResourceReader & aReader The resource file reader.
TInt & aResourceFormatVersion The resource file format version

InitialiseEvent()

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

InstallBurEventCallBack(const TCallBackWithArg &)

void InstallBurEventCallBack ( 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 & aCallBack the callback function to install.

InstallSwiEventCallBack(const TCallBackWithArg &)

void InstallSwiEventCallBack ( 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 & aCallBack the callback function to install.

IsAnyDllRegisteredWithDriveL(const TDriveUnit)

TBool IsAnyDllRegisteredWithDriveL ( const TDriveUnit aDrive ) const [private]

Parameters

const TDriveUnit aDrive

LanguageChangedL(TBool &)

void LanguageChangedL ( 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 & aRegistry A reference to the registry data management class.
MRegistrarObserver & aRegistrarObserver A reference to the registrar observer class.
RFs & aFs A reference to an connected file server session.

NotifiedWithErrorCode(TInt)

TBool NotifiedWithErrorCode ( TInt aError ) [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 aError The error value recieved by the notifier.

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

void ParseL ( 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 *& aEntry The directory entry data for the Interface Impplementation Collection.
CRegistryData::CDllData & aDll The CDllData information to fill

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

void ParseRegistrationDataL ( CPluginBase *& aEntry,
const TDriveUnit & aDrive,
TBool aUpdate,
TInt aRegistryDriveIndex,
CRegistryData::CDriveData * aDriveData
) [private]

Parameters

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

ProcessSSAEventL(TStartupStateIdentifier)

void ProcessSSAEventL ( TStartupStateIdentifier aKnownState )

Parameters

TStartupStateIdentifier aKnownState

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

void RegisterDiscoveryL ( const TDriveName & aDrive,
CPluginBase *& aDirEntry,
TBool aAnyDllDiscovered
) [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 *& aDirEntry The directory entry to register.
TBool aAnyDllDiscovered A 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 &)

void SetDiscoveryFlagL ( 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,
TUid aDllUid,
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 aDllUid The interface implementation collection data to add. CRegistryData takes ownership of this object so it should not be on the CleanupStack.
const TTime & aModified The date of the last modification of the Interface Implementation Collection.
TInt & aRegistryDriveIndex An 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