persistentstorage/sql/SRC/Common/SqlPanic.h
changeset 0 08ec8eefde2f
child 23 26645d81f48d
equal deleted inserted replaced
-1:000000000000 0:08ec8eefde2f
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __SQLPANIC_H__
       
    17 #define __SQLPANIC_H__
       
    18 
       
    19 #include "SqlAssert.h"
       
    20 
       
    21 //Forward declarations
       
    22 class RMessage2;
       
    23 
       
    24 /**
       
    25 TSqlPanic contains panic codes which may used by the SQL component (SqlDb.dll and SqlSrv.exe).
       
    26 
       
    27 @publishedAll
       
    28 @released
       
    29 */
       
    30 enum TSqlPanic
       
    31 	{
       
    32 	ESqlPanicObjExists 			=   1,
       
    33 	ESqlPanicInvalidObj			=   2,
       
    34 	ESqlPanicBadHandle 			=   3,		
       
    35 	ESqlPanicBadArgument 		=   4,		
       
    36 	ESqlPanicBadColumnIndex 	=   5,
       
    37 	ESqlPanicTypeMismatch 		=   6,	
       
    38 	ESqlPanicInternalError		=   7,
       
    39 	ESqlPanicStreamMarkInvalid  =   8,
       
    40 	ESqlPanicStreamLocationInvalid= 9,
       
    41 	ESqlPanicValueNotPresent  	=  10,
       
    42 	ESqlPanicInvalidRow			=  11,
       
    43 	ESqlPanicMisuse				=  12,
       
    44 	ESqlPanicBadDescriptor		=  13
       
    45 	};
       
    46 
       
    47 /**
       
    48 This function panics the thread where it is called from with aPanicCode panic code.
       
    49 
       
    50 @param aPanicCode Panic code
       
    51 
       
    52 @internalComponent
       
    53 */
       
    54 void SqlPanic(TSqlPanic aPanicCode);
       
    55 
       
    56 /**
       
    57 This function is used inside the SQL server to panic the calling client.
       
    58 
       
    59 @param aMessage The message which processing causes the panic.
       
    60 @param aPanicCode Panic code
       
    61 
       
    62 @leave KSqlLeavePanic
       
    63 
       
    64 @return KErrNone
       
    65 
       
    66 @internalComponent
       
    67 */
       
    68 TInt SqlPanicClientL(const RMessage2& aMessage, TSqlPanic aPanicCode);
       
    69 	
       
    70 #endif //__SQLPANIC_H__