CFileLoggerServer Class Reference

class CFileLoggerServer : public CServer2

CFileLoggerServer - maintain server state

This class is responsible for maintaining the server state. It provides control of the second thread, the ini file change notifier, the current list of valid logs and other ini file settings, and the log queue.

Inherits from

Public Member Functions
~CFileLoggerServer()
TInt AppendAndGiveOwnership(CLogMessageBase *)
voidGetFirstMessageAndTakeOwnership(CLogMessageBase *&)
voidIniFileChanged(TDesC &)
CFileLoggerServer *NewL()
CSession2 *NewSessionL(const TVersion &, const RMessage2 &)
voidPutOOMErrorInLog()
voidSignalCompletionSemaphore()
Protected Member Functions
TInt RunError(TInt)
Private Member Functions
CFileLoggerServer()
voidConstructL()
voidRePrepareForOOML()
voidUpdateMediaL()
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 iArrayHasSpaceForWrite
RSemaphore iCompletionSemaphore
RCriticalSection iCriticalSection
RFs iFs
CIniFileParser *iIniFileParser
CIniFileWatcher *iIniFileWatcher
CIniFileWatcher *iIniOldFileWatcher
RPointerArray< CLogMessageBase >iLogMessageArray
CLogCommentMessage *iPreAllocatedErrorMessage
CSecondaryThread *iSecondaryThread
CTimeManager *iTimeManager
Inherited Attributes
CActive::iStatus
CServer2::iSessionIter

Constructor & Destructor Documentation

CFileLoggerServer()

CFileLoggerServer()[private]

~CFileLoggerServer()

~CFileLoggerServer()

Member Functions Documentation

AppendAndGiveOwnership(CLogMessageBase *)

TInt AppendAndGiveOwnership(CLogMessageBase *aMessage)[virtual]
Append a log package to the queue end.
Note:

Entry only allowed for primary (producer) thread.

If win32 and debug port logging on, package is written immediately to the debug port as well.

If no space has been allocated for the OOM error msg, then this is done first.

If flushing (synchronous) operation then waits for completion.

Parameters

CLogMessageBase * aMessage

ConstructL()

voidConstructL()[private]
Note:

Constructs the secondary thread, passing through a pointer to the log queue. Constructs the file parser object and parses the file, attempting to copy the file from the ROM if it is not found on C drive. Constructs the time beat. Performs the first UpdateMedia to ensure a media is set.

GetFirstMessageAndTakeOwnership(CLogMessageBase *&)

voidGetFirstMessageAndTakeOwnership(CLogMessageBase *&aMessage)[virtual]

Parameters

CLogMessageBase *& aMessage

IniFileChanged(TDesC &)

voidIniFileChanged(TDesC &aIniFile)

Called by the file watcher when the ini file changes. Any OOM problems are ignored

Parameters

TDesC & aIniFile

NewL()

CFileLoggerServer *NewL()[static]

NewSessionL(const TVersion &, const RMessage2 &)

CSession2 *NewSessionL(const TVersion &aVersion,
const RMessage2 &aMessage
)const [virtual]
Create a new server session. Check that client is using current or older interface and make a new session.
Note:

Called by kernel after RFileLogger::DoConnect().

Parameters

const TVersion & aVersion
const RMessage2 & aMessage

PutOOMErrorInLog()

voidPutOOMErrorInLog()[virtual]

RePrepareForOOML()

voidRePrepareForOOML()[private]

Called to ensure there is space for the OOM error msg in log queue.

RunError(TInt)

TInt RunError(TIntaError)[protected, virtual]

Leave has occured in CFileLogSession::ServiceL. Usually this is because the appending of the message to the queue has failed due to the queue being filled.

Parameters

TInt aError

SignalCompletionSemaphore()

voidSignalCompletionSemaphore()[virtual]

UpdateMediaL()

voidUpdateMediaL()[private]

Member Data Documentation

TBool iArrayHasSpaceForWrite

TBool iArrayHasSpaceForWrite[private]

RSemaphore iCompletionSemaphore

RSemaphore iCompletionSemaphore[private]

RCriticalSection iCriticalSection

RCriticalSection iCriticalSection[private]

RFs iFs

RFs iFs[private]

CIniFileParser * iIniFileParser

CIniFileParser *iIniFileParser[private]

CIniFileWatcher * iIniFileWatcher

CIniFileWatcher *iIniFileWatcher[private]

CIniFileWatcher * iIniOldFileWatcher

CIniFileWatcher *iIniOldFileWatcher[private]

RPointerArray< CLogMessageBase > iLogMessageArray

RPointerArray< CLogMessageBase >iLogMessageArray[private]

CLogCommentMessage * iPreAllocatedErrorMessage

CLogCommentMessage *iPreAllocatedErrorMessage[private]

CSecondaryThread * iSecondaryThread

CSecondaryThread *iSecondaryThread[private]

CTimeManager * iTimeManager

CTimeManager *iTimeManager[private]