imagehandlingutilities/thumbnailmanager/inc/thumbnailpanic.h
changeset 0 2014ca87e772
child 9 dea39715fc05
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/imagehandlingutilities/thumbnailmanager/inc/thumbnailpanic.h	Tue Jan 26 15:18:05 2010 +0200
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Panic codes for Thumbnail Manager
+ *
+*/
+
+
+#ifndef THUMBNAILPANIC_H
+#define THUMBNAILPANIC_H
+
+#include <e32std.h>
+
+_LIT( KThumbnailPanicCategory, "ThumbnailManager" );
+
+enum TThumbnailPanicCode
+    {
+    // Numerical values used to help finding the reason based on
+    // panic code.
+    EThumbnailNullPointer = 0, EThumbnailBadSize = 1, EThumbnailBadBitmapHandle
+        = 2, EThumbnailBadPath = 3, EThumbnailUnknownMessage = 4,
+        EThumbnailMessageNotCompleted = 5, EThumbnailBitmapNotReleased = 6,
+        EThumbnailEmptyDescriptor = 7, EThumbnailWrongId = 8, EAlreadyRunning =
+        10
+    };
+
+/**
+ * Call User::Panic() with Thumbnail Manager panic category using
+ * one of the panic codes above
+ * @param aCode Panic code
+ */
+inline void ThumbnailPanic( TThumbnailPanicCode aCode );
+
+/**
+ * Panic if a pointer is NULL
+ */
+#define TN_ASSERT_NOT_NULL( ptr ) \
+__ASSERT_ALWAYS( ptr, ThumbnailPanic( EThumbnailNullPointer ) );
+
+#include "thumbnailpanic.inl"
+
+
+#endif // THUMBNAILPANIC_H