sl@0
|
1 |
// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// openwfpanics.h: panic definition for OpenWf Interop
|
sl@0
|
15 |
//
|
sl@0
|
16 |
//
|
sl@0
|
17 |
|
sl@0
|
18 |
#ifndef OPENWFPANICS_H
|
sl@0
|
19 |
#define OPENWFPANICS_H
|
sl@0
|
20 |
enum TOpenWfcPanic // used for OpenWf errors
|
sl@0
|
21 |
{ //low values are line numbers.
|
sl@0
|
22 |
EPanicSetOrderError =10001,
|
sl@0
|
23 |
EPanicUnexpectedErrorElementConstruct,
|
sl@0
|
24 |
EPanicWfcNoDevForScreen,
|
sl@0
|
25 |
EPanicWfcDeviceNotCreated,
|
sl@0
|
26 |
EPanicWfcContextNotCreated,
|
sl@0
|
27 |
EPanicWfcStartupErrorUnexpected,
|
sl@0
|
28 |
EPanicWfcStreamError,
|
sl@0
|
29 |
EPanicWfcElementNotRemovedOnShutdown,
|
sl@0
|
30 |
EPanicWfcSourceLookupOnElementRemoval,
|
sl@0
|
31 |
|
sl@0
|
32 |
EPanicWfcInvalidRotation,
|
sl@0
|
33 |
EPanicWfcBadAttribute,
|
sl@0
|
34 |
EPanicWfcNoStreamSurface,
|
sl@0
|
35 |
EPanicWfcThreadManagerNotInitialised,
|
sl@0
|
36 |
EPanicWfcThreadManagerCannotQueueJob,
|
sl@0
|
37 |
EPanicUnexpectedErrorElementScene,
|
sl@0
|
38 |
EPanicUnexpectedErrorElementRemoval,
|
sl@0
|
39 |
EPanicMethodNotImplemented,
|
sl@0
|
40 |
|
sl@0
|
41 |
};
|
sl@0
|
42 |
|
sl@0
|
43 |
void Panic(TOpenWfcPanic aPanic);
|
sl@0
|
44 |
|
sl@0
|
45 |
#ifdef _DEBUG
|
sl@0
|
46 |
#define OPENWFC_ASSERT_DEBUG(c, p) \
|
sl@0
|
47 |
do { \
|
sl@0
|
48 |
if(!(c)) \
|
sl@0
|
49 |
{ \
|
sl@0
|
50 |
Panic(p); \
|
sl@0
|
51 |
} \
|
sl@0
|
52 |
} while (EFalse)
|
sl@0
|
53 |
#else
|
sl@0
|
54 |
#define OPENWFC_ASSERT_DEBUG(c, p)
|
sl@0
|
55 |
#endif //_DEBUG
|
sl@0
|
56 |
|
sl@0
|
57 |
#define OPENWFC_ASSERT_ALWAYS(c, p) \
|
sl@0
|
58 |
do { \
|
sl@0
|
59 |
if(!(c)) \
|
sl@0
|
60 |
{ \
|
sl@0
|
61 |
Panic(p); \
|
sl@0
|
62 |
} \
|
sl@0
|
63 |
} while (EFalse)
|
sl@0
|
64 |
|
sl@0
|
65 |
#endif /*OPENWFPANICS_H_*/
|