dbgsrv/coredumpserver/test/crashapps/inc/d_crashdriver_ldd.h
changeset 0 c6b0df440bee
equal deleted inserted replaced
-1:000000000000 0:c6b0df440bee
       
     1 // Copyright (c) 2008-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 // Kernel side interfaces to example Logical Device Drivers
       
    15 //
       
    16 
       
    17 
       
    18 
       
    19 #ifndef __D_CRASHDRIVER_LDD_H__
       
    20 #define __D_CRASHDRIVER_LDD_H__
       
    21 
       
    22 
       
    23 #include <kernel\kern_priv.h>
       
    24 
       
    25 /**
       
    26  * Logical Device (factory class) for 'crashdriver'
       
    27  */
       
    28 class DCrashDriverFactory : public DLogicalDevice
       
    29     {
       
    30 public:    
       
    31 	DCrashDriverFactory();
       
    32     ~DCrashDriverFactory();
       
    33     //  Inherited from DLogicalDevice
       
    34     virtual TInt Install();
       
    35     virtual void GetCaps(TDes8& aDes) const;
       
    36     virtual TInt Create(DLogicalChannelBase*& aChannel);
       
    37     };
       
    38     
       
    39 
       
    40 /**
       
    41  *  Logical Channel class for 'crashdriver'
       
    42  */    
       
    43 class DCrashDriverChannel : public DLogicalChannel
       
    44     {
       
    45 public:
       
    46 	DCrashDriverChannel();
       
    47     virtual ~DCrashDriverChannel();
       
    48     // Inherited from DObject
       
    49     virtual TInt RequestUserHandle(DThread* aThread, TOwnerType aType);
       
    50     // Inherited from DLogicalChannelBase
       
    51     virtual TInt DoCreate(TInt aUnit, const TDesC8* anInfo, const TVersion& aVer);
       
    52     // Inherited from DLogicalChannel
       
    53     virtual void HandleMsg(TMessageBase* aMsg);
       
    54 private:
       
    55     // Panic reasons
       
    56     enum TPanic
       
    57         {
       
    58         ERequestAlreadyPending = 1
       
    59         };
       
    60     // Implementation for the differnt kinds of requests send through RBusLogicalChannel
       
    61     TInt DoRequest(TInt aReqNo, TRequestStatus* aStatus, TAny* a1, TAny* a2);
       
    62     void DoCancel(TUint aMask); 
       
    63     
       
    64     void PrefetchAbort();
       
    65     void DataRead();
       
    66     void DataWrite();
       
    67     void UndefinedInst();
       
    68     void DivByZero();
       
    69     void StackOverFlow();
       
    70     
       
    71     //void TestConfigInsertL(TBool& aPass, TDes8& aResult);
       
    72     
       
    73     typedef void (*Tfunc)();
       
    74    
       
    75 private:
       
    76 	TDynamicDfcQue* iDfcQ;
       
    77     DThread* iClient;
       
    78     TRequestStatus* iStatus;
       
    79     TInt recurseCount;
       
    80    
       
    81     };    
       
    82 
       
    83 #endif
       
    84