Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <babackup.h>
Link against: bafl.lib

Class CBaBackupSessionWrapper

class CBaBackupSessionWrapper : public CBase;

Description

CBaBackupSessionWrapper provides the APIs necessary to enable a backup or restore/install by allowing broadcast requests for some or all files to either remain untouched or have their locks released for an arbitrary period.

The class should be used by both code driving a backup/install and any engines that will hold files locks or may access files regardless of the presence of (non-system) client apps

Derivation

Members

Defined in CBaBackupSessionWrapper:

Inherited from CBase:


Construction and destruction


NewL()

IMPORT_C static CBaBackupSessionWrapper* NewL();

Description

Returns a newly created CBaBackupSessionWrapper, passing ownership immediately

Return value

CBaBackupSessionWrapper *


~CBaBackupSessionWrapper()

IMPORT_C ~CBaBackupSessionWrapper();

Description

D'tor. Any files or apps that have been closed will be restarted

[Top]


Member functions


RegisterFileL(const TDesC &,MBackupObserver &)

IMPORT_C void RegisterFileL(const TDesC &aFileName, MBackupObserver &aObserver);

Description

Register the specified file to the server. The given observer will be called back when the lock state of the file should be modified

Parameters

const TDesC16 &aFileName

the name of the file to be observed.

MBackupObserver &aObserver

the observer which will be called back when the lock state of the file should be modified.

Leave codes

KErrServerBusy

if the server is busy with the other client or under CloseAll operation. KErrNoMemory if not enough memory to register this file.


DeregisterFile(const TDesC &)

IMPORT_C void DeregisterFile(const TDesC &aFileName);

Description

Stop sending this client requests to alter the lock state of aFileName

Parameters

const TDesC16 &aFileName


RegisterBackupOperationObserverL(MBackupOperationObserver &)

IMPORT_C void RegisterBackupOperationObserverL(MBackupOperationObserver &aBackupOperationObserver);

Description

Registers the observer aBackupOperationObserver for getting notifications whether a backup or restore operation starts or ends.

Parameters

MBackupOperationObserver &aBackupOperationObserver


DeRegisterBackupOperationObserver(MBackupOperationObserver &)

IMPORT_C void DeRegisterBackupOperationObserver(MBackupOperationObserver &aBackupOperationObserver);

Description

De-registers the observer aBackupOperationObserver for getting notifications whether a backup or restore operation starts or ends.

Parameters

MBackupOperationObserver &aBackupOperationObserver


IsBackupOperationRunning()const

IMPORT_C TBool IsBackupOperationRunning() const;

Description

Returns ETrue when either a backup or restore operation is running, otherwise it retunrs EFalse.

Return value

TBool