sl@0: // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // openwfcpanic.h: panic definition for OpenWf Interop sl@0: // sl@0: // sl@0: sl@0: #ifndef OPENWFCPANIC_H sl@0: #define OPENWFCPANIC_H sl@0: sl@0: enum TOpenWfcPanic // used for OpenWf errors sl@0: { sl@0: EOwfPanicInvalidCallStreamMap = 1000000, //An attempt was made to construct the stream map singleton sl@0: EOwfPanicInvalidHasMap, // The stream map is not available sl@0: EOwfPanicSurfaceStreamBufferNotLocked, //An attempt was made to use or release a surface buffer while it's not locked sl@0: EOwfPanicSurfaceStreamBufferIndexOutOfBounds, //Out of bounds indexing of surface buffer sl@0: EOwfUnexpectedErrorInObservers, // Unexpected errors during observers processing sl@0: EOwfDestroyedWithOpenReaders, // The stream is destroyed while readers are still using it sl@0: EOwfInvalidSUSDisplayedParameter, // Invalid timestamp detected in the displayed parameter sl@0: EOwfInvalidSUSDisplayedXTimesParameter, // Invalid parameters relative to DisplayedXTimes observer sl@0: EOwfSymbianStreamBadArgument, // Bad argument is detected in the Symbian Streams APIs sl@0: EOwfSymbianStreamUnexpectedError, // Unexpected error encountered in Symbian Stream APIs sl@0: EOwfSymbianStreamInvalidBufferIndexError, // Attempt to operate with an invalid buffer sl@0: EOwfSymbianUnexpectedObserverId, // Unexepected Observer Id sl@0: }; sl@0: sl@0: void Panic(TOpenWfcPanic aPanic); sl@0: sl@0: #ifdef _DEBUG sl@0: #define WFCI_ASSERT_DEBUG(c, p) \ sl@0: do { \ sl@0: if(!(c)) \ sl@0: { \ sl@0: Panic(p); \ sl@0: } \ sl@0: } while (EFalse) sl@0: #else sl@0: #define WFCI_ASSERT_DEBUG(c, p) sl@0: #endif //_DEBUG sl@0: sl@0: #define WFCI_ASSERT_ALWAYS(c, p) \ sl@0: do { \ sl@0: if(!(c)) \ sl@0: { \ sl@0: Panic(p); \ sl@0: } \ sl@0: } while (EFalse) sl@0: sl@0: #endif /* OPENWFCPANIC_H */