photosgallery/inc/glxpanic.h
changeset 0 4e91876724a2
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2 * Copyright (c) 2008-2009 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:    Viewer Panics
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef T_GLXPANIC_H
       
    22 #define T_GLXPANIC_H
       
    23 
       
    24 #include <e32std.h>
       
    25 
       
    26 /** Viewer application panic codes */
       
    27 enum TGlxPanics 
       
    28     {
       
    29     EGlxPanicNotImplemented = 1,                  // Feature not implemented yet
       
    30     EGlxPanicNotInitialised,                      // Object is used without having been initialised
       
    31     EGlxPanicAlreadyInitialised,                  // Object has already been initialised
       
    32     EGlxPanicIllegalState,                        // The current internal state of the object(s) is not allowed
       
    33     EGlxPanicNullPointer,                         // Null pointer
       
    34     EGlxPanicNullLayout,                          // Null Layout
       
    35     EGlxPanicNullTHuiImage,                       // Null THuiImage in layouts
       
    36     EGlxPanicNullCHuiVisual,                      // Null CHuiVisual
       
    37     EGlxPanicNullVisualList,                      // Null Visual List
       
    38     EGlxPanicNullScreenInfo,                      // Null screen info in layouts
       
    39     EGlxPanicWrongLayoutType,                     // Wrong layout type for this amount of parameters
       
    40     EGlxPanicNullDescriptor,                      // Provided descriptor pointer was null
       
    41     EGlxPanicNullMediaList,                       // Provided media list pointer was null
       
    42     EGlxPanicIllegalArgument,                     // Argument is not valid
       
    43     EGlxPanicUnhandledError,                      // Error occured, but it is not being handled
       
    44     EGlxPanicLogicError,                          // Error in code logic
       
    45     EGlxPanicTaskNotAddedToManager,               // The task has not been added to the task manager
       
    46     EGlxPanicMemoryLeak,
       
    47     EGlxPanicAlreadyAdded,                        // Item has been already added to the array/list
       
    48     EGlxPanicDebugUnexpectedError,                // A legal error occured, but so unusual that panic is in order in debug builds
       
    49     EGlxPanicInvalidIdentifier,                   // Invalid identifier
       
    50     EGlxPanicInvalidPathLevel,                    // An invalid path level
       
    51     EGlxPanicMediaRequestedWithEmptyPath,         // MediaL has been called with a path that has a count of 0.
       
    52     EGlxPanicCollectionManagerOutstandingRequest, // A request has been made to the collection manager while an outstanding request exists.
       
    53     EGlxPanicDatasourceMdeSessionNotOpen,         // An attempt has been made to access the MDE session before it has been opened.
       
    54     EGlxPanicDatasourceMdeTaskExecutedTwice,      // An attempt has been made to execute a task a second time.
       
    55     EGlxPanicWrongAttributeType,                  // Attempt to read attribute as wrong type (text, C-class, T-class)
       
    56     EGlxPanicCastFailed,                          // An attempt to cast an object from one class to another has failed.
       
    57     EGlxPanicRequiredItemNotFound,                // An item that is required to be in a media list was not found.
       
    58     EGlxPanicEnvironment,                         // Problem with the environment at run time found
       
    59     EGlxPanicSmoothedValueIllegalState,           // A TGlxSmoothedValue is misbehaving
       
    60     EGlxPanicUnhandledValue,                      // An unexpected value has been encountered
       
    61     EGlxPanicUnsupportedCollection,               // The collection is specified is unsupported by the collection manager.
       
    62     EGlxPanicWrongMediaList,                      // The media list instance passed to a method is not the expected instance.   
       
    63     EGlxPanicNoReservation,                       // Attempt made to add an item to a list without reserving space first
       
    64     EGlxPanicIndexOutOfRange,                     // Index is out of range
       
    65     EGlxPanicRequiredPropertyNotFound,            // A required property was not found
       
    66     EGlxPanicEmptyArray,                          // An array was empty when it was expected that it contained values.
       
    67     EGlxPanicCommandHasNoGeneralSessionId,        // A command has been sent to the server that does not have the KMPXCommandGeneralSessionId attribute set
       
    68     EGlxPanicUnsupportedQueryType,                // An attempt has been made to execute a query of an unsupported type 
       
    69     EGlxPanicQueryLogicError,                     // A logic error occurred executing a query.
       
    70     EGlxPanicInvalidCollectionUid,                // An attempt was made to get a container id for a collection that does not have a container id associated with it.
       
    71     EGlxPanicUnexpectedQueryResultCount           // The query did not return a single result as expected.
       
    72     // add further panics here
       
    73     };
       
    74 
       
    75 inline void Panic(TGlxPanics aReason)
       
    76     {
       
    77 	_LIT(applicationName,"Images & videos");
       
    78     User::Panic(applicationName, aReason);
       
    79     }
       
    80 
       
    81 #endif // T_GLXPANIC_H