CBaServBackupSession Class Reference

class CBaServBackupSession : public CSession2

Inherits from

Public Member Functions
~CBaServBackupSession ()
CBaBackupServer * BackupServer ()
IMPORT_C void HandleError ( TInt )
CBaServBackupSession * NewL ()
void SignalBackupOperation (const TBackupOperationAttributes &)
void SignalReleaseAllFileLocksL ( MBackupObserver::TFileLockFlags )
void SignalReleaseFileLockL ( MBackupObserver::TFileLockFlags , const TDesC &)
void SignalRetakeAllFileLocks ()
void SignalRetakeFileLocks (const TDesC &)
Protected Member Functions
CBaServBackupSession ()
IMPORT_C TCompletionType CloseAllFilesL (const RMessage2 &)
CArrayFix < TClosedFile > * ClosedFiles ()
IMPORT_C void ConstructL ()
IMPORT_C void CreateL ()
IMPORT_C TCompletionType DoCloseAllFilesL (const RMessage2 &)
IMPORT_C void RestartAll ()
IMPORT_C void ServiceL (const RMessage2 &)
void SetClosedFiles ( CArrayFix < TClosedFile > *)
TInt UniqueClientId ()
Private Member Functions
void BackupOperationEventReadyL ()
void CleanupCloseAllFiles ( TAny *)
void CloseFileL ()
void DoRestartAll ()
void DoServiceL ( TCompletionType &)
void GetBackupOperationEventL (const RMessagePtr2 &)
void GetBackupOperationStateL ()
void GetEventL ()
void GetFileNameL ( TDes &)
void HandleEventReadyL ()
void NotifyBackupOperationL ()
void NotifyLockChangeCancelL ()
void NotifyLockChangeL ()
void RestartFileL ()
void StopNotifications ()
Inherited Functions
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()
CSession2::CSession2()
CSession2::CountResources()
CSession2::Disconnect(const RMessage2 &)
CSession2::Extension_(TUint,TAny *&,TAny *)
CSession2::ResourceCountMarkEnd(const RMessage2 &)
CSession2::ResourceCountMarkStart()
CSession2::Server()const
CSession2::ServiceError(const RMessage2 &,TInt)
CSession2::SetServer(const CServer2 *)
CSession2::~CSession2()
Public Member Enumerations
enum TLockType {
ENull , ERelease , ETake , EPendingReleaseReadOnly , EPendingReleaseNoAccess , EPendingTake
}
Inherited Enumerations
CSession2:TPanicNo
Private Attributes
TBackupOperationAttributes iBackupOperationAttributes
RMessagePtr2 iBackupOperationMessagePtr
TBool iBackupOperationObserverPresent
BSUL::CClientMessage * iClientMessage
CArrayFix < TClosedFile > * iClosedFiles
CDesCArray * iFileLockObservers
CBaServBackupMessageQueue * iMessageQueue
RMessagePtr2 iNotificationPullMsg
CReRegistrationTimer * iReRegistrationTimer
CDesCArray * iReleasedFiles
TUint32 iUniqueClientId

Constructor & Destructor Documentation

CBaServBackupSession()

IMPORT_C CBaServBackupSession ( ) [protected]

Constructor.

~CBaServBackupSession()

IMPORT_C ~CBaServBackupSession ( )

Destructor.

Member Functions Documentation

BackupOperationEventReadyL()

void BackupOperationEventReadyL ( ) [private]

BackupServer()

CBaBackupServer * BackupServer ( ) const [inline]

CleanupCloseAllFiles(TAny *)

void CleanupCloseAllFiles ( TAny * aPtr ) [private, static]

Parameters

TAny * aPtr

CloseAllFilesL(const RMessage2 &)

IMPORT_C TCompletionType CloseAllFilesL ( const RMessage2 & aMessage ) [protected, virtual]

Asks the server to close all files. This function may leave in case the server is busy. If the requesting client is the current busy client and it has already requested CloseAll, this request will be ignored.

leave
KErrServerBusy if the requesting client is not the busy client. Plus other system-wide errors.

Parameters

const RMessage2 & aMessage The reference to the message containing the client request: file lock.

CloseFileL()

void CloseFileL ( ) [private]

Handle the client's request to close a file. The request will be ignored if the requesting client the current busy client and the server is under CloseAll operation.

leave
KErrServerBusy if the server is busy with the other client, plus other system-wide errors.

ClosedFiles()

CArrayFix < TClosedFile > * ClosedFiles ( ) const [protected, inline]

ConstructL()

IMPORT_C void ConstructL ( ) [protected, virtual]

Completes the session construction by creating a CBaServBackupMessageQueue object.

CreateL()

IMPORT_C void CreateL ( ) [protected, virtual]

Completes the construction of this CBaServBackupSession session by just doing a base call class. It also notify the server that a new session has been created.

DoCloseAllFilesL(const RMessage2 &)

IMPORT_C TCompletionType DoCloseAllFilesL ( const RMessage2 & aMessage ) [protected]

Function called by both base and derived backup sessions in order to start asynchronous file lock notifications. The requesting client is set to the current busy client.

leave
KErrServerBusy if the requesting client is not the current busy client or the server is under CloseAll operation. KErrAlreadyExists if the same client has sent CloseAll request. Plus other system-wide errors.

Parameters

const RMessage2 & aMessage

DoRestartAll()

void DoRestartAll ( ) [private]

DoServiceL(TCompletionType &)

void DoServiceL ( TCompletionType & aCompleteType ) [private]

Parameters

TCompletionType & aCompleteType

GetBackupOperationEventL(const RMessagePtr2 &)

void GetBackupOperationEventL ( const RMessagePtr2 & aPtr ) [private]

Parameters

const RMessagePtr2 & aPtr

GetBackupOperationStateL()

void GetBackupOperationStateL ( ) [private]

GetEventL()

void GetEventL ( ) [private]

GetFileNameL(TDes &)

void GetFileNameL ( TDes & aFileName ) [private]

Parameters

TDes & aFileName

HandleError(TInt)

IMPORT_C void HandleError ( TInt aError ) [virtual]

Allows the session to handle the error.

Parameters

TInt aError

HandleEventReadyL()

void HandleEventReadyL ( ) [private]

NewL()

CBaServBackupSession * NewL ( ) [static]

NotifyBackupOperationL()

void NotifyBackupOperationL ( ) [private]

NotifyLockChangeCancelL()

void NotifyLockChangeCancelL ( ) [private]

NotifyLockChangeL()

void NotifyLockChangeL ( ) [private]

Handles the client's request of notification of a file lock change.

leave
KErrServerBusy if the server is under CloseAll operation, KLeaveWithoutAlert if the requested file has been registered. Plus other system-wide errors.

RestartAll()

IMPORT_C void RestartAll ( ) [protected, virtual]

Asks the server to signal all clients of getting the lock of their respective files.

RestartFileL()

void RestartFileL ( ) [private]

ServiceL(const RMessage2 &)

IMPORT_C void ServiceL ( const RMessage2 & aMessage ) [protected, virtual]

Handles the servicing of client requests passed to the backup server.

Parameters

const RMessage2 & aMessage

SetClosedFiles(CArrayFix< TClosedFile > *)

void SetClosedFiles ( CArrayFix < TClosedFile > * aClosedFiles ) [protected, inline]

Parameters

CArrayFix < TClosedFile > * aClosedFiles

SignalBackupOperation(const TBackupOperationAttributes &)

void SignalBackupOperation ( const TBackupOperationAttributes & aBackupOperationAttributes )

Parameters

const TBackupOperationAttributes & aBackupOperationAttributes

SignalReleaseAllFileLocksL(MBackupObserver::TFileLockFlags)

void SignalReleaseAllFileLocksL ( MBackupObserver::TFileLockFlags aFlag )

SignalReleaseFileLockL(MBackupObserver::TFileLockFlags, const TDesC &)

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

Parameters

MBackupObserver::TFileLockFlags aFlag
const TDesC & aFileName

SignalRetakeAllFileLocks()

void SignalRetakeAllFileLocks ( )

SignalRetakeFileLocks(const TDesC &)

void SignalRetakeFileLocks ( const TDesC & aFileName )

Parameters

const TDesC & aFileName

StopNotifications()

void StopNotifications ( ) [private]

UniqueClientId()

TInt UniqueClientId ( ) const [protected, inline]

Member Enumerations Documentation

Enum TLockType

Enumerators

ENull
ERelease
ETake
EPendingReleaseReadOnly
EPendingReleaseNoAccess
EPendingTake

Member Data Documentation

TBackupOperationAttributes iBackupOperationAttributes

TBackupOperationAttributes iBackupOperationAttributes [private]

RMessagePtr2 iBackupOperationMessagePtr

RMessagePtr2 iBackupOperationMessagePtr [private]

TBool iBackupOperationObserverPresent

TBool iBackupOperationObserverPresent [private]

BSUL::CClientMessage * iClientMessage

BSUL::CClientMessage * iClientMessage [private]

CArrayFix< TClosedFile > * iClosedFiles

CArrayFix < TClosedFile > * iClosedFiles [private]

CDesCArray * iFileLockObservers

CDesCArray * iFileLockObservers [private]

CBaServBackupMessageQueue * iMessageQueue

CBaServBackupMessageQueue * iMessageQueue [private]

RMessagePtr2 iNotificationPullMsg

RMessagePtr2 iNotificationPullMsg [private]

CReRegistrationTimer * iReRegistrationTimer

CReRegistrationTimer * iReRegistrationTimer [private]

CDesCArray * iReleasedFiles

CDesCArray * iReleasedFiles [private]

TUint32 iUniqueClientId

TUint32 iUniqueClientId [private]