CBaBackupServer Class Reference

class CBaBackupServer : public CServer2

Inherits from

Public Member Functions
~CBaBackupServer()
voidAddSession()
IMPORT_C voidCloseAllFilesL(MBackupObserver::TFileLockFlags)
voidCloseFileL(MBackupObserver::TFileLockFlags, const TDesC &)
IMPORT_C voidCompleteClosingFiles(CArrayFix< CBaServBackupSession::TClosedFile > *)
IMPORT_C voidConstructL()
voidDecrementRegisteredFilesCount(TInt)
voidDropSession()
IMPORT_C TBoolHaveAllCloseAllFilesClientsReRegistered()
voidIncrementFilesReRegistrationCount()
voidIncrementRegisteredFilesCount()
TBool IsBackupOperationRunning()
IMPORT_C TBoolIsClientBusy(TUint32)
TBool IsCloseAllOperationRunning()
IMPORT_C TBoolIsOtherClientBusy(TUint32)
IMPORT_C CBaBackupServer *NewL()
IMPORT_C voidRestartAll()
voidRestartFile(const TDesC &)
IMPORT_C TIntRunError(TInt)
voidSetBackupOperationRunning(TBool)
IMPORT_C voidSetBusy(TUint32)
IMPORT_C voidSetCloseAllOperationRunningState(TBool)
IMPORT_C voidSignalBackupOperation(const TBackupOperationAttributes &)
voidStartCloseAllFilesOperationTimer(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_CCBaBackupServer(TIntaPriority)[protected]

Constructor.

Parameters

TInt aPriority

~CBaBackupServer()

IMPORT_C~CBaBackupServer()

Destructor.

Member Functions Documentation

AddSession()

voidAddSession()

CloseAllFilesL(MBackupObserver::TFileLockFlags)

IMPORT_C voidCloseAllFilesL(MBackupObserver::TFileLockFlagsaFlag)[virtual]

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

CloseFileL(MBackupObserver::TFileLockFlags, const TDesC &)

voidCloseFileL(MBackupObserver::TFileLockFlagsaFlag,
const TDesC &aFileName
)

Parameters

MBackupObserver::TFileLockFlags aFlag
const TDesC & aFileName

CompleteClosingFiles(CArrayFix< CBaServBackupSession::TClosedFile > *)

IMPORT_C voidCompleteClosingFiles(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.

Parameters

CArrayFix< CBaServBackupSession::TClosedFile > * aClosedFiles

ConstructL()

IMPORT_C voidConstructL()[virtual]

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

DecrementRegisteredFilesCount(TInt)

voidDecrementRegisteredFilesCount(TIntaNumberFiles = 1)

Parameters

TInt aNumberFiles = 1

DropSession()

voidDropSession()

HaveAllCloseAllFilesClientsReRegistered()

IMPORT_C TBoolHaveAllCloseAllFilesClientsReRegistered()

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

IncrementFilesReRegistrationCount()

voidIncrementFilesReRegistrationCount()

IncrementRegisteredFilesCount()

voidIncrementRegisteredFilesCount()

IsBackupOperationRunning()

TBool IsBackupOperationRunning()const [inline]

IsClientBusy(TUint32)

IMPORT_C TBoolIsClientBusy(TUint32aUniqueClientId)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 TBoolIsOtherClientBusy(TUint32aUniqueClientId)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 voidRestartAll()[virtual]

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

RestartFile(const TDesC &)

voidRestartFile(const TDesC &aFileName)

Parameters

const TDesC & aFileName

RunError(TInt)

IMPORT_C TIntRunError(TIntaError)[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)

voidSetBackupOperationRunning(TBoolaBackupOperationRunning)[inline]

Parameters

TBool aBackupOperationRunning

SetBusy(TUint32)

IMPORT_C voidSetBusy(TUint32aUniqueClientId)

Sets the server to be busy with the aUniqueClientId client.

Parameters

TUint32 aUniqueClientId

SetCloseAllOperationRunningState(TBool)

IMPORT_C voidSetCloseAllOperationRunningState(TBoolaRunning)

Parameters

TBool aRunning

SignalBackupOperation(const TBackupOperationAttributes &)

IMPORT_C voidSignalBackupOperation(const TBackupOperationAttributes &aBackupOperationAttributes)

Signals to all clients the aBackupOperationAttributes.

Parameters

const TBackupOperationAttributes & aBackupOperationAttributes

StartCloseAllFilesOperationTimer(const RMessagePtr2 &)

voidStartCloseAllFilesOperationTimer(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]