imagehandlingutilities/thumbnailmanager/inc/thumbnailpanic.h
changeset 0 2014ca87e772
child 11 dea39715fc05
equal deleted inserted replaced
-1:000000000000 0:2014ca87e772
       
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Panic codes for Thumbnail Manager
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef THUMBNAILPANIC_H
       
    20 #define THUMBNAILPANIC_H
       
    21 
       
    22 #include <e32std.h>
       
    23 
       
    24 _LIT( KThumbnailPanicCategory, "ThumbnailManager" );
       
    25 
       
    26 enum TThumbnailPanicCode
       
    27     {
       
    28     // Numerical values used to help finding the reason based on
       
    29     // panic code.
       
    30     EThumbnailNullPointer = 0, EThumbnailBadSize = 1, EThumbnailBadBitmapHandle
       
    31         = 2, EThumbnailBadPath = 3, EThumbnailUnknownMessage = 4,
       
    32         EThumbnailMessageNotCompleted = 5, EThumbnailBitmapNotReleased = 6,
       
    33         EThumbnailEmptyDescriptor = 7, EThumbnailWrongId = 8, EAlreadyRunning =
       
    34         10
       
    35     };
       
    36 
       
    37 /**
       
    38  * Call User::Panic() with Thumbnail Manager panic category using
       
    39  * one of the panic codes above
       
    40  * @param aCode Panic code
       
    41  */
       
    42 inline void ThumbnailPanic( TThumbnailPanicCode aCode );
       
    43 
       
    44 /**
       
    45  * Panic if a pointer is NULL
       
    46  */
       
    47 #define TN_ASSERT_NOT_NULL( ptr ) \
       
    48 __ASSERT_ALWAYS( ptr, ThumbnailPanic( EThumbnailNullPointer ) );
       
    49 
       
    50 #include "thumbnailpanic.inl"
       
    51 
       
    52 
       
    53 #endif // THUMBNAILPANIC_H