imagehandlingutilities/thumbnailmanager/inc/thumbnailpanic.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 31 Mar 2010 22:04:49 +0300
branchRCL_3
changeset 9 dea39715fc05
parent 0 2014ca87e772
child 11 85a88bc05e45
permissions -rw-r--r--
Revision: 201011 Kit: 201013

/*
* 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, EThumbnailAlreadyRunning =
        9, EThumbnailDatabaseUnrecoverable = 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