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