os/persistentdata/loggingservices/eventlogger/LogServ/inc/LogServServer.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __LOGSERVSERVER_H__
    17 #define __LOGSERVSERVER_H__
    18 
    19 #include <logcli.h>
    20 #include "LogCliServShared.h"
    21 #include "LogServSessionLifetimeObserver.h"
    22 
    23 // Classes referenced
    24 class CLogServRecentListManager;
    25 class CLogServOperationQueue;
    26 class CLogServDatabaseDriver;
    27 class CLogServDatabaseMarshall;
    28 class CLogServResourceInterpreter;
    29 class CLogServBackupManager;
    30 class CLogServShutdownTimer;
    31 class CLogServDatabaseChangeTracker;
    32 
    33 /**
    34 The LogEng server class. Implements the MLogServSessionLifetimeObserver interface.
    35 Owns the following objects (private data members): 
    36  - Shutdown timer (CLogServShutdownTimer instance);
    37  - Backup manager (CLogServBackupManager instance);
    38  - Resource interpreter (CLogServResourceInterpreter instance);
    39  - CLogServDatabaseMarshall instance;
    40  - CLogServDatabaseChangeTracker instance;
    41  - CLogServDatabaseDriver instance;
    42  - CLogServOperationQueue instance;
    43 
    44 @see MLogServSessionLifetimeObserver
    45 @see CLogServShutdownTimer 
    46 @see CLogServBackupManager 
    47 @see CLogServResourceInterpreter 
    48 @see CLogServDatabaseMarshall 
    49 @see CLogServDatabaseChangeTracker 
    50 @see CLogServDatabaseDriver 
    51 @see CLogServOperationQueue 
    52 @internalComponent
    53 */
    54 class CLogServServer : public CServer2, public MLogServSessionLifetimeObserver
    55 	{
    56 public:
    57 	static CLogServServer* NewLC();
    58 	~CLogServServer();
    59     void MakeTransient(TBool aTransient);
    60 
    61 private:
    62 	CLogServServer();
    63 	void ConstructL();
    64     // FROM MLogServSessionLifetimeObserver
    65 	void SLOHandleEvent(TLogServSessionId aId, TLogServSessionEvent aEvent);
    66     // FROM CServer
    67 	CSession2* NewSessionL(const TVersion& aVersion,const RMessage2& aMessage) const;
    68 
    69 private:
    70 	TInt iSessionCount;//Number of connected sessions
    71 	TBool iTransient;//Whether the server is transient or not
    72 	TLogServSessionId iNextFreeSessionId;//The next id to assign to any new session
    73 	TLogOperationId iNextFreeOperationId;//The next free id to assign to an operation
    74 	TLogViewId iNextFreeViewId;//The next free id to assign to a view
    75 	RFs iFsSession;
    76 	CLogServShutdownTimer* iShutdownTimer;
    77 	CLogServBackupManager* iBackupManager;
    78 	CLogServResourceInterpreter* iResourceInterpreter;
    79 	CLogServRecentListManager* iRecentListManager;
    80 	CLogServDatabaseMarshall* iDatabaseMarshall;
    81 	CLogServDatabaseChangeTracker* iChangeTracker;
    82 	CLogServDatabaseDriver* iDatabaseDriver;
    83 	CLogServOperationQueue* iOperationQueue;
    84 	};
    85 
    86 #endif