xcfw/inc/xcfwpanic.h
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Implements XCFW panic handling.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef XCFWPANIC_H
       
    21 #define XCFWPANIC_H
       
    22 
       
    23 #define __ASSERT_PANIC(c, r) TXCFWPanic::CheckPanic(c ,r)
       
    24 #define __ASSERT_LEAVE(c, r) TXCFWPanic::CheckLeaveL(c, r)
       
    25 
       
    26 #ifdef __DEBUG
       
    27     #define __ASSERT_PANIC_DEBUG(c, r) TXCFWPanic::CheckPanic(c, r)
       
    28     #define __ASSERT_LEAVE_DEBUG(c, r) TXCFWPanic::CheckLeaveL(c, r)
       
    29 #else
       
    30     #define __ASSERT_PANIC_DEBUG(c, r)
       
    31     #define __ASSERT_LEAVE_DEBUG(c, r)
       
    32 #endif
       
    33 
       
    34 //  INCLUDES
       
    35 #include <e32std.h>
       
    36 
       
    37 // DATA TYPES
       
    38 enum TXCFWPanicCode
       
    39     {
       
    40     EXCFWPanicNoTypeIdentifier = 1
       
    41     };
       
    42 
       
    43 /**
       
    44 * Menu Engine panic
       
    45 */
       
    46 class TXCFWPanic
       
    47     {
       
    48     public:
       
    49 
       
    50         /**
       
    51         * Panics if aOK == EFalse
       
    52         * @param aOK defines if we need to panic or not (EFalse => Panic)
       
    53         * @param aReason reason for panic
       
    54         */
       
    55         static void CheckPanic( TBool aOK, TInt aReason );
       
    56         
       
    57         /**
       
    58         * Leaves if aOK = EFalse
       
    59         * @param aOK defines if we need to panic or not (EFalse => Panic)
       
    60         * @param aReason reason for panic
       
    61         */
       
    62         static void CheckLeaveL( TBool aOK, TInt aReason );
       
    63     };
       
    64 
       
    65 #endif //MENUMODELPANIC_H
       
    66 
       
    67 // End of file