1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/graphicscomposition/openwfsupport/inc/openwfcpanic.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,59 @@
1.4 +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// openwfcpanic.h: panic definition for OpenWf Interop
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef OPENWFCPANIC_H
1.22 +#define OPENWFCPANIC_H
1.23 +
1.24 +enum TOpenWfcPanic // used for OpenWf errors
1.25 + {
1.26 + EOwfPanicInvalidCallStreamMap = 1000000, //An attempt was made to construct the stream map singleton
1.27 + EOwfPanicInvalidHasMap, // The stream map is not available
1.28 + EOwfPanicSurfaceStreamBufferNotLocked, //An attempt was made to use or release a surface buffer while it's not locked
1.29 + EOwfPanicSurfaceStreamBufferIndexOutOfBounds, //Out of bounds indexing of surface buffer
1.30 + EOwfUnexpectedErrorInObservers, // Unexpected errors during observers processing
1.31 + EOwfDestroyedWithOpenReaders, // The stream is destroyed while readers are still using it
1.32 + EOwfInvalidSUSDisplayedParameter, // Invalid timestamp detected in the displayed parameter
1.33 + EOwfInvalidSUSDisplayedXTimesParameter, // Invalid parameters relative to DisplayedXTimes observer
1.34 + EOwfSymbianStreamBadArgument, // Bad argument is detected in the Symbian Streams APIs
1.35 + EOwfSymbianStreamUnexpectedError, // Unexpected error encountered in Symbian Stream APIs
1.36 + EOwfSymbianStreamInvalidBufferIndexError, // Attempt to operate with an invalid buffer
1.37 + EOwfSymbianUnexpectedObserverId, // Unexepected Observer Id
1.38 + };
1.39 +
1.40 +void Panic(TOpenWfcPanic aPanic);
1.41 +
1.42 +#ifdef _DEBUG
1.43 +#define WFCI_ASSERT_DEBUG(c, p) \
1.44 + do { \
1.45 + if(!(c)) \
1.46 + { \
1.47 + Panic(p); \
1.48 + } \
1.49 + } while (EFalse)
1.50 +#else
1.51 +#define WFCI_ASSERT_DEBUG(c, p)
1.52 +#endif //_DEBUG
1.53 +
1.54 +#define WFCI_ASSERT_ALWAYS(c, p) \
1.55 + do { \
1.56 + if(!(c)) \
1.57 + { \
1.58 + Panic(p); \
1.59 + } \
1.60 + } while (EFalse)
1.61 +
1.62 +#endif /* OPENWFCPANIC_H */