dbgsrv/coredumpserver/server/inc/coredumpserver.h
changeset 0 c6b0df440bee
equal deleted inserted replaced
-1:000000000000 0:c6b0df440bee
       
     1 // Copyright (c) 2007-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 
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalTechnology
       
    21  @released
       
    22 */
       
    23 
       
    24 
       
    25 #ifndef CORE_DUMP_SERVER_H
       
    26 #define CORE_DUMP_SERVER_H
       
    27 
       
    28 
       
    29 // INCLUDES
       
    30 
       
    31 #include <e32cons.h>
       
    32 #include <s32file.h>
       
    33 #include <rm_debug_api.h>
       
    34 
       
    35 #include <coredumpserverapi.h>
       
    36 
       
    37 
       
    38 using namespace Debug;
       
    39 
       
    40 // CONSTANTS
       
    41 
       
    42 // Default heap size for server thread.
       
    43 const TUint KCoreDumpServerDefaultHeapSize=0x10000;
       
    44 
       
    45 // ENUMS
       
    46 
       
    47 // Server panic codes
       
    48 enum TCoreDumpServerPanic
       
    49 {
       
    50 	ESvrCreateServer,
       
    51 	ESvrStartServer,
       
    52 	ESvrFileServer,
       
    53 	EMainSchedulerError,
       
    54 	EBadRequest,
       
    55 };
       
    56 
       
    57 // CLASS DECLARATIONS
       
    58 
       
    59 
       
    60 /**
       
    61 Define core dump server class. 
       
    62 @see RCoreDumpSession
       
    63 @see RSecuritySvrSession
       
    64 */
       
    65 class CCoreDumpServer : public CServer2
       
    66 {
       
    67 	public:
       
    68 		static CCoreDumpServer* NewLC();
       
    69 		static CCoreDumpServer* NewL();
       
    70 		static void RunServerL();
       
    71 		static void PanicServer(TCoreDumpServerPanic aPanic);	
       
    72 
       
    73 	public:
       
    74 		virtual CSession2* NewSessionL( const TVersion& aVersion, const RMessage2& aMessage) const;
       
    75 		~CCoreDumpServer();
       
    76 
       
    77 		void SessionOpened();
       
    78 		void SessionClosed();
       
    79 		TInt RunError(TInt aError);
       
    80 
       
    81 	private:	// Construction
       
    82 		CCoreDumpServer(TInt aPriority = EPriorityHigh);
       
    83 
       
    84     protected:
       
    85 		void ConstructL();
       
    86 
       
    87 	private:	// Data members
       
    88 
       
    89 		TInt	iNumSessions;
       
    90 
       
    91 	RSecuritySvrSession	iSecSess;
       
    92 };
       
    93 
       
    94 #endif	// CORE_DUMP_SERVER_H
       
    95