1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/graphics/windowing/windowserverplugins/openwfc/inc/openwfcpanics.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,65 @@
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 +// openwfpanics.h: panic definition for OpenWf Interop
1.18 +//
1.19 +//
1.20 +
1.21 +#ifndef OPENWFPANICS_H
1.22 +#define OPENWFPANICS_H
1.23 +enum TOpenWfcPanic // used for OpenWf errors
1.24 + { //low values are line numbers.
1.25 + EPanicSetOrderError =10001,
1.26 + EPanicUnexpectedErrorElementConstruct,
1.27 + EPanicWfcNoDevForScreen,
1.28 + EPanicWfcDeviceNotCreated,
1.29 + EPanicWfcContextNotCreated,
1.30 + EPanicWfcStartupErrorUnexpected,
1.31 + EPanicWfcStreamError,
1.32 + EPanicWfcElementNotRemovedOnShutdown,
1.33 + EPanicWfcSourceLookupOnElementRemoval,
1.34 +
1.35 + EPanicWfcInvalidRotation,
1.36 + EPanicWfcBadAttribute,
1.37 + EPanicWfcNoStreamSurface,
1.38 + EPanicWfcThreadManagerNotInitialised,
1.39 + EPanicWfcThreadManagerCannotQueueJob,
1.40 + EPanicUnexpectedErrorElementScene,
1.41 + EPanicUnexpectedErrorElementRemoval,
1.42 + EPanicMethodNotImplemented,
1.43 +
1.44 + };
1.45 +
1.46 +void Panic(TOpenWfcPanic aPanic);
1.47 +
1.48 +#ifdef _DEBUG
1.49 +#define OPENWFC_ASSERT_DEBUG(c, p) \
1.50 + do { \
1.51 + if(!(c)) \
1.52 + { \
1.53 + Panic(p); \
1.54 + } \
1.55 + } while (EFalse)
1.56 +#else
1.57 +#define OPENWFC_ASSERT_DEBUG(c, p)
1.58 +#endif //_DEBUG
1.59 +
1.60 +#define OPENWFC_ASSERT_ALWAYS(c, p) \
1.61 + do { \
1.62 + if(!(c)) \
1.63 + { \
1.64 + Panic(p); \
1.65 + } \
1.66 + } while (EFalse)
1.67 +
1.68 +#endif /*OPENWFPANICS_H_*/