os/graphics/graphicscomposition/openwfsupport/inc/openwfcpanic.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 // openwfcpanic.h: panic definition for OpenWf Interop
    15 // 
    16 //
    17 
    18 #ifndef OPENWFCPANIC_H
    19 #define OPENWFCPANIC_H
    20 
    21 enum TOpenWfcPanic // used for OpenWf errors
    22 	{
    23 	EOwfPanicInvalidCallStreamMap  = 1000000,		//An attempt was made to construct the stream map singleton
    24 	EOwfPanicInvalidHasMap,			// The stream map is not available
    25 	EOwfPanicSurfaceStreamBufferNotLocked, //An attempt was made to use or release a surface buffer while it's not locked
    26 	EOwfPanicSurfaceStreamBufferIndexOutOfBounds, //Out of bounds indexing of surface buffer
    27 	EOwfUnexpectedErrorInObservers,    // Unexpected errors during observers processing 
    28 	EOwfDestroyedWithOpenReaders,      // The stream is destroyed while readers are still using it
    29     EOwfInvalidSUSDisplayedParameter,  // Invalid timestamp detected in the displayed parameter
    30 	EOwfInvalidSUSDisplayedXTimesParameter, // Invalid parameters relative to DisplayedXTimes observer
    31     EOwfSymbianStreamBadArgument,       // Bad argument is detected in the Symbian Streams APIs
    32     EOwfSymbianStreamUnexpectedError,   // Unexpected error encountered in Symbian Stream APIs
    33     EOwfSymbianStreamInvalidBufferIndexError, // Attempt to operate with an invalid buffer
    34     EOwfSymbianUnexpectedObserverId,    // Unexepected Observer Id
    35 	};
    36 
    37 void Panic(TOpenWfcPanic aPanic);
    38 
    39 #ifdef _DEBUG
    40 #define WFCI_ASSERT_DEBUG(c, p) \
    41 	do { \
    42 		if(!(c)) \
    43 			{ \
    44 			Panic(p); \
    45 			} \
    46 		} while (EFalse)
    47 #else
    48 #define WFCI_ASSERT_DEBUG(c, p)
    49 #endif //_DEBUG
    50 
    51 #define WFCI_ASSERT_ALWAYS(c, p) \
    52 	do { \
    53 		if(!(c)) \
    54 			{ \
    55 			Panic(p); \
    56 			} \
    57 		} while (EFalse)
    58 
    59 #endif /* OPENWFCPANIC_H */