serialserver/c32serialserver/INC/cs_panic.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2007-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 // top-level header file for C32 that defines client and server panics.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @publishedPartner 
       
    21  @released
       
    22 */
       
    23 
       
    24 #ifndef CS_PANIC_H
       
    25 #define CS_PANIC_H
       
    26 
       
    27 /**
       
    28  * C32 client panic
       
    29  *
       
    30  * @note Don't change the order of these enums!
       
    31  * @note These panics will appear with a category of "!CommServer".
       
    32  */
       
    33 enum TECommPanic
       
    34 	{
       
    35 	EWriteTwice                                 = 0,  //< 0 cannot have two outstanding writes from the same client
       
    36 	EReadTwice                                  = 1,  //< 1 cannot have two outstanding reads from the same client
       
    37 	EBreakTwice                                 = 2,  //< 2 cannot have two outstanding breaks from the same client
       
    38 	EBadCommHandle                              = 3,  //< 3 the message handle from the client was no good
       
    39 	EBadDescriptor                              = 4,  //< 4 client tried to use a bad descriptor
       
    40 	ESetConfigWhilePendingRequests              = 5,  //< 5 someone tried to config the port when a request was outstanding
       
    41 	ESetSignalsWhilePendingRequests             = 6,  //< 6 someone tried to set the signals when a request was outstanding
       
    42 	EResetBuffersWhilePendingRequests           = 7,  //< 7 someone tried to reset the buffers when a request was outstanding
       
    43 	ESetReceiveBufferLengthWhilePendingRequests = 8,  //< 8 someone tried to set buffer size when a request was outstanding
       
    44 	ENotifySignalTwice                          = 9,  //< 9 cannot have two outstanding notify signals from the same client
       
    45 	ENotifyFlowControlTwice                     = 10, //< 10 cannot have two outstanding notify flow from the same client
       
    46 	ENotifyConfigTwice                          = 11, //< 11 cannot have two outstanding notify config from the same client
       
    47 	ENotifyBreakTwice                           = 12, //< 12 cannot have two outstanding notify break from the same client
       
    48 	ENotifyDataAvailableTwice                   = 13, //< 13 cannot have two outstanding notify data from the same client
       
    49 	ENotifyOutputTwice                          = 14, //< 14 cannot have two outstanding notify empty from the same client
       
    50 	EThreadSizeStackNegative                    = 15, //< 15 thread size is negative
       
    51 	EThreadHeapMinTooSmall                      = 16, //< 16 minimum heap size is too small
       
    52 	EThreadHeapMaxLessThanMin                   = 17, //< 17 maximum heap size is less than minimum heap size
       
    53 	EWrongClientForAccessRequest                = 18, //< 18 wrong client for access request
       
    54 	EMustCloseNotChangeAccessMode               = 19  //< 19 client must close object before doing set access
       
    55 	};
       
    56 
       
    57 /**
       
    58  * Internal C32 server fault
       
    59  *
       
    60  * @note Don't change the order of these enums!
       
    61  * @note These panics will appear with a category of "C32-fault".
       
    62  */
       
    63 enum TECommFault
       
    64 	{
       
    65 	EMainSchedulerError           = 0, //< 0 serious problem with CCommScheduler
       
    66 	ESvrCreateServer              = 1, //< 1 could not create the CC32Server object
       
    67 	ESvrStartServer               = 2, //< 2 could not start the Comms server
       
    68 	ECreateTrapCleanup            = 3, //< 3 no traphandler available
       
    69 	ENotImplementedYet            = 4, //< 4 not implemented yet (not used)
       
    70 	ECPortEObjNegativeAccessCount = 5, //< 5 access count should be a positive number
       
    71 	ECommNullPointer              = 6,  //< 6 illegal NULL pointer
       
    72 	EDTimerAllocFailure           = 7,  //< 7 failed to create a global timer
       
    73 	EBadState					  = 8,	//< 8 internal consistency error
       
    74 	EInitTwice					  = 9,	//< InitC32GlobalsL called twice
       
    75 	EBadIniData                   = 10, //< Found a problem with the [IniData] section of a cmi file
       
    76 	EFindSubSessionFailed		  = 11,	//< Failed to find subsession in CC32SubSessionIx
       
    77 	EMemoryLeakDetected           = 12, //< Dealer detected a memory leak in a player thread
       
    78 	EDbgHandleLeak                = 13, //< Leaked a handle - should only occur in debug builds
       
    79 	};
       
    80 
       
    81 GLDEF_C void Fault(TECommFault aFault, TRefByValue<const TDesC8> aFmt=KNullDesC8(), ...);
       
    82 GLDEF_C void Fault(TECommFault aFault, TRefByValue<const TDesC16> aFmt, ...);
       
    83 
       
    84 
       
    85 #endif // CS_PANIC_H
       
    86