os/graphics/windowing/windowserverplugins/openwfc/inc/openwfcpanics.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) 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 // openwfpanics.h: panic definition for OpenWf Interop
    15 //
    16 //
    17 
    18 #ifndef OPENWFPANICS_H
    19 #define OPENWFPANICS_H
    20 enum TOpenWfcPanic // used for OpenWf errors
    21 	{	//low values are line numbers.
    22 	EPanicSetOrderError						=10001,
    23 	EPanicUnexpectedErrorElementConstruct,
    24 	EPanicWfcNoDevForScreen,
    25 	EPanicWfcDeviceNotCreated,
    26 	EPanicWfcContextNotCreated,
    27 	EPanicWfcStartupErrorUnexpected,
    28 	EPanicWfcStreamError,
    29 	EPanicWfcElementNotRemovedOnShutdown,
    30 	EPanicWfcSourceLookupOnElementRemoval,
    31 
    32 	EPanicWfcInvalidRotation,
    33 	EPanicWfcBadAttribute,
    34 	EPanicWfcNoStreamSurface,
    35 	EPanicWfcThreadManagerNotInitialised,
    36 	EPanicWfcThreadManagerCannotQueueJob,
    37 	EPanicUnexpectedErrorElementScene,
    38 	EPanicUnexpectedErrorElementRemoval,
    39 	EPanicMethodNotImplemented,
    40 
    41 	};
    42 
    43 void Panic(TOpenWfcPanic aPanic);
    44 
    45 #ifdef _DEBUG
    46 #define OPENWFC_ASSERT_DEBUG(c, p) \
    47 	do { \
    48 		if(!(c)) \
    49 			{ \
    50 			Panic(p); \
    51 			} \
    52 		} while (EFalse)
    53 #else
    54 #define OPENWFC_ASSERT_DEBUG(c, p)
    55 #endif //_DEBUG
    56 
    57 #define OPENWFC_ASSERT_ALWAYS(c, p) \
    58 	do { \
    59 		if(!(c)) \
    60 			{ \
    61 			Panic(p); \
    62 			} \
    63 		} while (EFalse)
    64 
    65 #endif /*OPENWFPANICS_H_*/