imagehandlingutilities/thumbnailmanager/inc/thumbnailpanic.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 26 Jan 2010 15:18:05 +0200
changeset 0 2014ca87e772
child 11 dea39715fc05
permissions -rw-r--r--
Revision: 201004

/*
* 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