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 &)
voidProcessDNEventL(TNotificationFlag, const TDriveUnit &)
voidProcessSSAEventL(TStartupStateIdentifier)
TInt Resume()
voidSetBurChangeCallBack(const TCallBackWithArg &)
voidSetSwiChangeCallBack(const TCallBackWithArg &)
TDiscovererState State()
TInt Suspend()
Private Member Functions
CDiscoverer(MDiscovererObserver &, RFs &)
voidCompleteNotificationProcessing()
voidConstructL()
voidDriveMountedL(TDriveUnit)
voidDriveUnmountedL(TDriveUnit)
voidInitialiseEvent()
TBool IsAnyDllRegisteredWithDriveL(const TDriveUnit)
voidLanguageChangeNotificationL()
TInt LocaleChangedL(TAny *)
TBool NotificationL(TInt, const TDriveUnit &)
voidProcessEntryL(const TDriveName &, CPluginBase *&, TBool)
voidRediscoveryScanDirectoryL(const TDriveUnit &)
voidScanDirectoryCancel()
voidStartNotifiers()
voidSwiChangeNotificationL(TInt)
TBool SwiOperationInProgress()
voidValidateEntryL(const TEntry &, const TDriveName &, CPluginBase *&, TBool)
voidValidateEntryL(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
enumTDiscovererState { EDisc_Undefined, EDisc_NoPluginsDisc, EDisc_CriticalPluginsDisc, EDisc_AllPluginsDisc, EDisc_PluginsDirty }
enumTNotificationFlag { 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 & aDiscovererObserverA reference to the owning client of the CDiscoverer
RFs & aFsA 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()

voidCompleteNotificationProcessing()[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()

voidConstructL()[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)

voidDriveMountedL(TDriveUnitaDrive)[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 aDriveThe drive to be noted as available.

DriveUnmountedL(TDriveUnit)

voidDriveUnmountedL(TDriveUnitaDrive)[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 aDriveThe drive to be noted as unavailable.

InitialiseEvent()

voidInitialiseEvent()[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 TDriveUnitaDrive)const [private]

Parameters

const TDriveUnit aDrive

LanguageChangeNotificationL()

voidLanguageChangeNotificationL()[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 & aDiscovererObserverA reference to the owning client of the CDiscoverer
RFs & aFsA reference to a connected file server instance.

NotificationL(TInt, const TDriveUnit &)

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

Parameters

TInt aStatus
const TDriveUnit & aDriveUnit

ProcessDNEventL(TNotificationFlag, const TDriveUnit &)

voidProcessDNEventL(TNotificationFlagaFlag,
const TDriveUnit &aDriveUnit
)

Parameters

TNotificationFlag aFlag
const TDriveUnit & aDriveUnit

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

voidProcessEntryL(const TDriveName &aDrive,
CPluginBase *&aEntry,
TBoolaAnyDllDiscovered
)[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 & aDrivethe drive name containing this entry
CPluginBase *& aEntryA directory entry for an Interface Implementation Collection.
TBool aAnyDllDiscovereda flag to tell if any Dll is discovered in the drive.

ProcessSSAEventL(TStartupStateIdentifier)

voidProcessSSAEventL(TStartupStateIdentifieraKnownState)

Parameters

TStartupStateIdentifier aKnownState

RediscoveryScanDirectoryL(const TDriveUnit &)

voidRediscoveryScanDirectoryL(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()

voidScanDirectoryCancel()[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 &)

voidSetBurChangeCallBack(const TCallBackWithArg &aCallBack)

Set the iBurChangeCallBack member

Parameters

const TCallBackWithArg & aCallBacknew value for iBurChangeCallBack

SetSwiChangeCallBack(const TCallBackWithArg &)

voidSetSwiChangeCallBack(const TCallBackWithArg &aCallBack)

Set the iSwiChangeCallBack member

Parameters

const TCallBackWithArg & aCallBacknew value for iSwiChangeCallBack

StartNotifiers()

voidStartNotifiers()[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)

voidSwiChangeNotificationL(TIntaSwiOperation)[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 aSwiOperationthe 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)

voidValidateEntryL(const TEntry &aEntry,
const TDriveName &aDriveName,
CPluginBase *&aEntryToFill,
TBoolaIsRO
)[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 & aEntryA directory entry for an Interface Implementation Collection.
const TDriveName & aDriveNameThe drive containing this entry
CPluginBase *& aEntryToFillA newly created directory entry with the filename updated to include the full path.
TBool aIsROIndicates whether current drive is Read Only

ValidateEntryL(RResourceArchive &, CPluginBase *&)

voidValidateEntryL(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 & aRscArchiveA referernce to the resource archive
CPluginBase *& aEntryToFillA 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]