CDiscoverer Class Reference

class CDiscoverer : public CBase
Since
7.0 Responsible for Interface Implementation Collections, installed in the Interface Implementation Collection directories.

Inherits from

Public Member Functions
~CDiscoverer ()
CDiscoverer * NewL ( MDiscovererObserver &, RFs &)
void ProcessDNEventL ( TNotificationFlag , const TDriveUnit &)
void ProcessSSAEventL ( TStartupStateIdentifier )
TInt Resume ()
void SetBurChangeCallBack (const TCallBackWithArg &)
void SetSwiChangeCallBack (const TCallBackWithArg &)
TDiscovererState State ()
TInt Suspend ()
Private Member Functions
CDiscoverer ( MDiscovererObserver &, RFs &)
void CompleteNotificationProcessing ()
void ConstructL ()
void DriveMountedL ( TDriveUnit )
void DriveUnmountedL ( TDriveUnit )
void InitialiseEvent ()
TBool IsAnyDllRegisteredWithDriveL (const TDriveUnit )
void LanguageChangeNotificationL ()
TInt LocaleChangedL ( TAny *)
TBool NotificationL ( TInt , const TDriveUnit &)
void ProcessEntryL (const TDriveName &, CPluginBase *&, TBool )
void RediscoveryScanDirectoryL (const TDriveUnit &)
void ScanDirectoryCancel ()
void StartNotifiers ()
void SwiChangeNotificationL ( TInt )
TBool SwiOperationInProgress ()
void ValidateEntryL (const TEntry &, const TDriveName &, CPluginBase *&, TBool )
void ValidateEntryL ( RResourceArchive &, CPluginBase *&)
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 TDiscovererState { EDisc_Undefined , EDisc_NoPluginsDisc , EDisc_CriticalPluginsDisc , EDisc_AllPluginsDisc , EDisc_PluginsDirty }
enum TNotificationFlag { EPluginsModified , EPluginsRediscover }
Private Member Type Definitions
typedef RPointerArray < CDirChangeNotifier > RDirChangeNotifierPointerArray
Private Attributes
TCallBackWithArg iBurChangeCallBack
CEComCachedDriveInfo * iCachedDriveInfo
CDirScanner * iDirScanner
MDiscovererObserver & iDiscovererObserver
RArray < TUint > iDrivesDiscovered
RFs & iFs
TBool iLanguageChangeDiscoveryPending
CEnvironmentChangeNotifier * iLanguageChangeNotifier
RDirChangeNotifierPointerArray iRscDirNotifierList
CIdleScanningTimer * iScanningTimer
TDiscovererState iState
TCallBackWithArg iSwiChangeCallBack
TBool iSwiChangeDiscoveryPending
CSwiChangeNotifier * iSwiChangeNotifier
TInt iSwiOperation

Constructor & Destructor Documentation

CDiscoverer(MDiscovererObserver &, RFs &)

CDiscoverer ( MDiscovererObserver & aDiscovererObserver,
RFs & aFs
) [private]
Intended Usage : Standardised default c'tor Error Condition : None
Since
7.0
Pre-condition
None
Post-condition
CDiscoverer is fully constructed

Parameters

MDiscovererObserver & aDiscovererObserver A reference to the owning client of the CDiscoverer
RFs & aFs A reference to an connected file server instance.

~CDiscoverer()

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

Member Functions Documentation

CompleteNotificationProcessing()

void CompleteNotificationProcessing ( ) [private]
Intended Usage : Signal that the directory change notification has been fully processed on all drives. Error Condition : None
Since
7.0
Pre-condition
CDiscoverer is fully constructed.
Post-condition
An asynchronous re-scan of the Interface Implementation Collection directories is complete.

ConstructL()

void ConstructL ( ) [private]
Intended Usage : Standardised 2nd, (Initialisation) phase of two phase construction. Error Condition : Leaves with error code : usually KErrNoMemory.
leave
KErrNoMemory.
Since
7.0
Pre-condition
CDiscoverer is fully constructed.
Post-condition
CDiscoverer is fully initialised.

DriveMountedL(TDriveUnit)

void DriveMountedL ( TDriveUnit aDrive ) [private]
Intended Usage : Signal a drive is available. Error Condition : Depends on the observer implementation.
leave
Depends on the observer implementation.
CRegistrar .
Since
7.0
Pre-condition
CDiscoverer is fully constructed.
Post-condition
The drive mount has been signalled to the observer.

Parameters

TDriveUnit aDrive The drive to be noted as available.

DriveUnmountedL(TDriveUnit)

void DriveUnmountedL ( TDriveUnit aDrive ) [private]
Intended Usage : Signal a drive is unavailable. Error Condition : Leaves with an error code
leave
KErrNoMemory
Since
7.0
Pre-condition
CDiscoverer is fully constructed.
Post-condition
The drive dismount has been signalled to the observer.

Parameters

TDriveUnit aDrive The drive to be noted as unavailable.

InitialiseEvent()

void InitialiseEvent ( ) [private]
Intended Usage : called during the CDiscoverer's construction to change the state.
Pre-condition
: non
Post-condition
: State is changed from EDisc_Undefined to EDisc_NoPluginsDisc.

IsAnyDllRegisteredWithDriveL(const TDriveUnit)

TBool IsAnyDllRegisteredWithDriveL ( const TDriveUnit aDrive ) const [private]

Parameters

const TDriveUnit aDrive

LanguageChangeNotificationL()

void LanguageChangeNotificationL ( ) [private]
Intended Usage : Called by iLanguageChangeNotifier when it is notified of language downgrade path changed. Error Condition : None
Since
9.3
Pre-condition
CDiscoverer is fully constructed.
Post-condition
CDiscoverer has been notified that a rescan may be required

LocaleChangedL(TAny *)

TInt LocaleChangedL ( TAny * ) [private, static]
Intended Usage : Callback function to be attached to an instance of CEnvironmentChangeNotifier to rebuild registry data. Note that this has to be a static member function.
Pre-condition
: CDiscoverer is fully constructed.
Post-condition
: Call LanguageChangeNotificationL method to rescan resource files.

Parameters

TAny *

NewL(MDiscovererObserver &, RFs &)

CDiscoverer * NewL ( MDiscovererObserver & aDiscovererObserver,
RFs & aFs
) [static]
Intended Usage : Standardised safe construction which leaves nothing on the cleanup stack. Error Condition : Not enough memory available.
leave
KErrNoMemory
Since
7.0
Pre-condition
None
Post-condition
CDiscoverer is fully constructed, and initialised.

Parameters

MDiscovererObserver & aDiscovererObserver A reference to the owning client of the CDiscoverer
RFs & aFs A reference to a connected file server instance.

NotificationL(TInt, const TDriveUnit &)

TBool NotificationL ( TInt aStatus,
const TDriveUnit & aDriveUnit
) [private]

Parameters

TInt aStatus
const TDriveUnit & aDriveUnit

ProcessDNEventL(TNotificationFlag, const TDriveUnit &)

void ProcessDNEventL ( TNotificationFlag aFlag,
const TDriveUnit & aDriveUnit
)

Parameters

TNotificationFlag aFlag
const TDriveUnit & aDriveUnit

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

void ProcessEntryL ( const TDriveName & aDrive,
CPluginBase *& aEntry,
TBool aAnyDllDiscovered
) [private]
Intended Usage : Verify that a Interface Implementation Collection directories entry is valid discovery. Error Condition : Depends on the observer implementation.
leave
Depends on the observer implementation. (
CRegistrar ).
Since
9.1
Pre-condition
CDiscoverer is fully constructed.
Post-condition
The directory entry has been processed by the observer.

Parameters

const TDriveName & aDrive the drive name containing this entry
CPluginBase *& aEntry A directory entry for an Interface Implementation Collection.
TBool aAnyDllDiscovered a flag to tell if any Dll is discovered in the drive.

ProcessSSAEventL(TStartupStateIdentifier)

void ProcessSSAEventL ( TStartupStateIdentifier aKnownState )

Parameters

TStartupStateIdentifier aKnownState

RediscoveryScanDirectoryL(const TDriveUnit &)

void RediscoveryScanDirectoryL ( const TDriveUnit & aDriveUnit ) [private]

Parameters

const TDriveUnit & aDriveUnit

Resume()

TInt Resume ( )
Intended Usage : Re-enable the Discoverer to continue checking for new interface implementations. Error Condition : Where resume of the discoverer fails. KErrResumeFailed.
Since
7.0
Pre-condition
CDiscoverer is fully constructed.
Post-condition
The operation of the discoverer has been resumed. Or where resumption failed, no change.

ScanDirectoryCancel()

void ScanDirectoryCancel ( ) [private]
Intended Usage : Cancel any scan of the Interface Implementation Collection directories in progress. Error Condition : None
Since
7.0
Pre-condition
CDiscoverer is fully constructed.
Post-condition
The re-scan of the Interface Implementation Collection directories has beed aborted.

SetBurChangeCallBack(const TCallBackWithArg &)

void SetBurChangeCallBack ( const TCallBackWithArg & aCallBack )

Set the iBurChangeCallBack member

Parameters

const TCallBackWithArg & aCallBack new value for iBurChangeCallBack

SetSwiChangeCallBack(const TCallBackWithArg &)

void SetSwiChangeCallBack ( const TCallBackWithArg & aCallBack )

Set the iSwiChangeCallBack member

Parameters

const TCallBackWithArg & aCallBack new value for iSwiChangeCallBack

StartNotifiers()

void StartNotifiers ( ) [private]
Intended Usage : start the iRscDirNotifierList and iSwiChangeNotifier when EDisc_AllPlugins state is reached.
Pre-condition
: CDiscoverer is fully constructed. and iRscDirNotifierList and iSwiChangeNotifier are fully constructed.
Post-condition
: iRscDirNotifierList Activate and iSwiChangeNotifier Subscribe methods are called.

State()

TDiscovererState State ( ) const

Suspend()

TInt Suspend ( )
Intended Usage : Temporarily stop looking for new interface implementations. Error Condition : Where suspension of the discoverer fails. KErrSuspendFailed.
Since
7.0
Pre-condition
CDiscoverer is fully constructed.
Post-condition
The operation of the discoverer has been suspended. Or where suspend failed, no change.

SwiChangeNotificationL(TInt)

void SwiChangeNotificationL ( TInt aSwiOperation ) [private]
Intended Usage : Called by iSwiChangeNotifier when it is notified of a SWI changed. Error Condition : None
Since
9.2
Pre-condition
CDiscoverer is fully constructed.
Post-condition
CDiscoverer has been notified that a re-scan of the removable plugin directories is required and has stored current SWI operation.

Parameters

TInt aSwiOperation the SWI operation that is currently taking place

SwiOperationInProgress()

TBool SwiOperationInProgress ( ) [private]
Intended Usage : Determine if any SWI operation is currently in progress
Pre-condition
: CDiscoverer is fully constructed.
Post-condition
: None

ValidateEntryL(const TEntry &, const TDriveName &, CPluginBase *&, TBool)

void ValidateEntryL ( const TEntry & aEntry,
const TDriveName & aDriveName,
CPluginBase *& aEntryToFill,
TBool aIsRO
) [private]
Intended Usage : Verify that a Interface Implementation Collection directories entry is valid discovery. Error Condition : No memory
leave
KErrNoMemory
Since
9.1
Pre-condition
CDiscoverer is fully constructed, aEntry, aPath and aEntryToFill are all valid references.
Post-condition
aEntryToFill is created and valid, with the full path and filename as its name entry.

Parameters

const TEntry & aEntry A directory entry for an Interface Implementation Collection.
const TDriveName & aDriveName The drive containing this entry
CPluginBase *& aEntryToFill A newly created directory entry with the filename updated to include the full path.
TBool aIsRO Indicates whether current drive is Read Only

ValidateEntryL(RResourceArchive &, CPluginBase *&)

void ValidateEntryL ( RResourceArchive & aRscArchive,
CPluginBase *& aEntryToFill
) [private]
Intended Usage : Verify that a Interface Implementation Collection directories entry is valid discovery. Error Condition : No memory
leave
KErrNoMemory
Since
9.1
Pre-condition
CDiscoverer is fully constructed,
Post-condition
aEntryToFill is created and valid, with the full path and filename as its name entry.

Parameters

RResourceArchive & aRscArchive A referernce to the resource archive
CPluginBase *& aEntryToFill A newly created directory entry with the filename updated to include the full path.

Member Enumerations Documentation

Enum TDiscovererState

State declaration for CDiscoverer

Enumerators

EDisc_Undefined

Undefined state

EDisc_NoPluginsDisc

Initialize state

EDisc_CriticalPluginsDisc

Discover plugins on Ro Internal drive units

EDisc_AllPluginsDisc

All plugins are discovered.

EDisc_PluginsDirty

Plugins added or removed, going to rediscover all plugins

Enum TNotificationFlag

Transition flag for Notification

Enumerators

EPluginsModified

A new plugin added or removed

EPluginsRediscover

should do a rediscovery

Member Type Definitions Documentation

Typedef RDirChangeNotifierPointerArray

typedef RPointerArray < CDirChangeNotifier > RDirChangeNotifierPointerArray [private]

Member Data Documentation

TCallBackWithArg iBurChangeCallBack

TCallBackWithArg iBurChangeCallBack [private]

CEComCachedDriveInfo * iCachedDriveInfo

CEComCachedDriveInfo * iCachedDriveInfo [private]

cached info of drives A to Z

CDirScanner * iDirScanner

CDirScanner * iDirScanner [private]

The internal Interface Implementation Collection identifier and registration handler

MDiscovererObserver & iDiscovererObserver

MDiscovererObserver & iDiscovererObserver [private]

A reference to the owning client of the CDiscoverer

RArray< TUint > iDrivesDiscovered

RArray < TUint > iDrivesDiscovered [private]

The list of existing drives

RFs & iFs

RFs & iFs [private]

A reference to the connected file server instance

TBool iLanguageChangeDiscoveryPending

TBool iLanguageChangeDiscoveryPending [private]

CEnvironmentChangeNotifier * iLanguageChangeNotifier

CEnvironmentChangeNotifier * iLanguageChangeNotifier [private]

RDirChangeNotifierPointerArray iRscDirNotifierList

RDirChangeNotifierPointerArray iRscDirNotifierList [private]

CIdleScanningTimer * iScanningTimer

CIdleScanningTimer * iScanningTimer [private]

TDiscovererState iState

TDiscovererState iState [private]

TCallBackWithArg iSwiChangeCallBack

TCallBackWithArg iSwiChangeCallBack [private]

TBool iSwiChangeDiscoveryPending

TBool iSwiChangeDiscoveryPending [private]

CSwiChangeNotifier * iSwiChangeNotifier

CSwiChangeNotifier * iSwiChangeNotifier [private]

TInt iSwiOperation

TInt iSwiOperation [private]