CBaBackupServer Class Reference

class CBaBackupServer : public CServer2

Inherits from

Public Member Functions
~CBaBackupServer ()
void AddSession ()
IMPORT_C void CloseAllFilesL ( MBackupObserver::TFileLockFlags )
void CloseFileL ( MBackupObserver::TFileLockFlags , const TDesC &)
IMPORT_C void CompleteClosingFiles ( CArrayFix < CBaServBackupSession::TClosedFile > *)
IMPORT_C void ConstructL ()
void DecrementRegisteredFilesCount ( TInt )
void DropSession ()
IMPORT_C TBool HaveAllCloseAllFilesClientsReRegistered ()
void IncrementFilesReRegistrationCount ()
void IncrementRegisteredFilesCount ()
TBool IsBackupOperationRunning ()
IMPORT_C TBool IsClientBusy ( TUint32 )
TBool IsCloseAllOperationRunning ()
IMPORT_C TBool IsOtherClientBusy ( TUint32 )
IMPORT_C CBaBackupServer * NewL ()
IMPORT_C void RestartAll ()
void RestartFile (const TDesC &)
IMPORT_C TInt RunError ( TInt )
void SetBackupOperationRunning ( TBool )
IMPORT_C void SetBusy ( TUint32 )
IMPORT_C void SetCloseAllOperationRunningState ( TBool )
IMPORT_C void SignalBackupOperation (const TBackupOperationAttributes &)
void StartCloseAllFilesOperationTimer (const RMessagePtr2 &)
Protected Member Functions
CBaBackupServer ( TInt )
IMPORT_C CSession2 * NewSessionL (const TVersion &, const RMessage2 &)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
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()
CServer2::CServer2(TInt,TServerType)
CServer2::DoCancel()
CServer2::DoConnect(const RMessage2 &)
CServer2::Extension_(TUint,TAny *&,TAny *)
CServer2::Message()const
CServer2::ReStart()
CServer2::RunL()
CServer2::Server()const
CServer2::SetMaster(const CServer2 *)
CServer2::SetPinClientDescriptors(TBool)
CServer2::Start(const TDesC &)
CServer2::StartL(const TDesC &)
CServer2::~CServer2()
Inherited Enumerations
CActive:TPriority
CServer2:TPanic
CServer2:TServerType
Private Attributes
TBool iBackupOperationRunning
CBaServCloseAllOperationTimer * iCloseAllFilesOperationTimer
TBool iCloseAllOperationRunning
CBaBackupServerExt * iExtension
TInt16 iRegisteredFilesCount
TInt iSessionCount
TInt16 iSessionLockReRegistrationCount
CShutdownServer * iShutdown
Inherited Attributes
CActive::iStatus
CServer2::iSessionIter

Constructor & Destructor Documentation

CBaBackupServer(TInt)

IMPORT_C CBaBackupServer ( TInt aPriority ) [protected]

Constructor.

Parameters

TInt aPriority

~CBaBackupServer()

IMPORT_C ~CBaBackupServer ( )

Destructor.

Member Functions Documentation

AddSession()

void AddSession ( )

CloseAllFilesL(MBackupObserver::TFileLockFlags)

IMPORT_C void CloseAllFilesL ( MBackupObserver::TFileLockFlags aFlag ) [virtual]

Handles the closing of all files by signaling the new file lock flag, aFlag, to all client.

CloseFileL(MBackupObserver::TFileLockFlags, const TDesC &)

void CloseFileL ( MBackupObserver::TFileLockFlags aFlag,
const TDesC & aFileName
)

Parameters

MBackupObserver::TFileLockFlags aFlag
const TDesC & aFileName

CompleteClosingFiles(CArrayFix< CBaServBackupSession::TClosedFile > *)

IMPORT_C void CompleteClosingFiles ( CArrayFix < CBaServBackupSession::TClosedFile > * aClosedFiles ) [virtual]

Allows any subclass of CBaBackupServer of completing the closing of files. The server will lose the ownership of aClosedFiles object, which implies it is up to this virtual function to deal with it in order to avoid a memory leak.

ConstructL()

IMPORT_C void ConstructL ( ) [virtual]

Completes the server construction by adding the server to the active scheduler and creating a CShutdownServer object.

DecrementRegisteredFilesCount(TInt)

void DecrementRegisteredFilesCount ( TInt aNumberFiles = 1 )

Parameters

TInt aNumberFiles = 1

DropSession()

void DropSession ( )

HaveAllCloseAllFilesClientsReRegistered()

IMPORT_C TBool HaveAllCloseAllFilesClientsReRegistered ( )

Allows application framework backup code to check if all registerd files have beem updated

IncrementFilesReRegistrationCount()

void IncrementFilesReRegistrationCount ( )

IncrementRegisteredFilesCount()

void IncrementRegisteredFilesCount ( )

IsBackupOperationRunning()

TBool IsBackupOperationRunning ( ) const [inline]

IsClientBusy(TUint32)

IMPORT_C TBool IsClientBusy ( TUint32 aUniqueClientId ) const

Returns ETrue if the client using the server corresponds has aUniqueClientId as unique id oterwise EFalse

Parameters

TUint32 aUniqueClientId

IsCloseAllOperationRunning()

TBool IsCloseAllOperationRunning ( )

IsOtherClientBusy(TUint32)

IMPORT_C TBool IsOtherClientBusy ( TUint32 aUniqueClientId ) const [virtual]

Returns ETrue if the client using the server is not the one identified by aUniqueClientId oterwise EFalse

Parameters

TUint32 aUniqueClientId

NewL()

IMPORT_C CBaBackupServer * NewL ( ) [static]

Returns a pointer to CBaBackupServer object.

NewSessionL(const TVersion &, const RMessage2 &)

IMPORT_C CSession2 * NewSessionL ( const TVersion & aVersion,
const RMessage2 & aMessage
) const [protected, virtual]

Creates a server-side client CBaServBackupSession session object by checking first if the version of the server is compatible with the client.

Parameters

const TVersion & aVersion
const RMessage2 & aMessage

RestartAll()

IMPORT_C void RestartAll ( ) [virtual]

Signals to all clients of getting the lock of their respective files.

RestartFile(const TDesC &)

void RestartFile ( const TDesC & aFileName )

Parameters

const TDesC & aFileName

RunError(TInt)

IMPORT_C TInt RunError ( TInt aError ) [virtual]

Handle an error from CBaServBackupSession::ServiceL() A bad descriptor error implies a badly programmed client, so panic it; otherwise report the error to the client

Parameters

TInt aError

SetBackupOperationRunning(TBool)

void SetBackupOperationRunning ( TBool aBackupOperationRunning ) [inline]

Parameters

TBool aBackupOperationRunning

SetBusy(TUint32)

IMPORT_C void SetBusy ( TUint32 aUniqueClientId )

Sets the server to be busy with the aUniqueClientId client.

Parameters

TUint32 aUniqueClientId

SetCloseAllOperationRunningState(TBool)

IMPORT_C void SetCloseAllOperationRunningState ( TBool aRunning )

Parameters

TBool aRunning

SignalBackupOperation(const TBackupOperationAttributes &)

IMPORT_C void SignalBackupOperation ( const TBackupOperationAttributes & aBackupOperationAttributes )

Signals to all clients the aBackupOperationAttributes.

Parameters

const TBackupOperationAttributes & aBackupOperationAttributes

StartCloseAllFilesOperationTimer(const RMessagePtr2 &)

void StartCloseAllFilesOperationTimer ( const RMessagePtr2 & aPtr )

This timer will only be created in cases of no derived backup server

Parameters

const RMessagePtr2 & aPtr

Member Data Documentation

TBool iBackupOperationRunning

TBool iBackupOperationRunning [private]

CBaServCloseAllOperationTimer * iCloseAllFilesOperationTimer

CBaServCloseAllOperationTimer * iCloseAllFilesOperationTimer [private]

TBool iCloseAllOperationRunning

TBool iCloseAllOperationRunning [private]

CBaBackupServerExt * iExtension

CBaBackupServerExt * iExtension [private]

TInt16 iRegisteredFilesCount

TInt16 iRegisteredFilesCount [private]

TInt iSessionCount

TInt iSessionCount [private]

TInt16 iSessionLockReRegistrationCount

TInt16 iSessionLockReRegistrationCount [private]

CShutdownServer * iShutdown

CShutdownServer * iShutdown [private]