epoc32/include/remconserverpanic.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 remconserverpanic.h
     1 // Copyright (c) 2004-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Panic codes for RemConServer. 
       
    15 // The server may panic clients with these codes.
       
    16 // 
       
    17 //
       
    18 
       
    19 
       
    20 
       
    21 /**
       
    22  @file
       
    23  @publishedAll
       
    24  @released
       
    25 */
       
    26 
       
    27 #ifndef REMCONSERVERPANIC_H
       
    28 #define REMCONSERVERPANIC_H
       
    29 
       
    30 #include <e32base.h>
       
    31 
       
    32 /** Panic category used by Rem Con server to panic the client. */
       
    33 _LIT(KRemConClientPanicCat, "RemConClient");
       
    34 
       
    35 /** Panic codes used by Rem Con server to panic the client. */
       
    36 enum TRemConClientPanic
       
    37 	{
       
    38 	/** The client side has passed an illegal IPC value */
       
    39 	ERemConClientPanicIllegalIpc										= 0,
       
    40 
       
    41 	/** The client is already connection-oriented. */
       
    42 	ERemConClientPanicAlreadyConnectionOriented 						= 1,
       
    43 
       
    44 	/** The client has called GoConnectionless, ConnectBearer or 
       
    45 	DisconnectBearer when the session is not connection-oriented. */
       
    46 	ERemConClientPanicNotConnectionOriented 							= 2,
       
    47 
       
    48 	/** The client called GoConnectionOriented with an unknown bearer UID. The 
       
    49 	given UID is not a known implementation of the bearer interface. */
       
    50 	ERemConClientPanicBearerPluginIncorrectInterface					= 3,
       
    51 
       
    52 	/** The client requested Send when there was already a Send outstanding on 
       
    53 	this session. */
       
    54 	ERemConClientPanicSendAlreadyOutstanding							= 4,
       
    55 
       
    56 	/** The client requested Receive when there was already a Receive 
       
    57 	outstanding on this session. */
       
    58 	ERemConClientPanicReceiveAlreadyOutstanding 						= 5,
       
    59 	
       
    60 	/** The client has not had their type set. */
       
    61 	ERemConClientPanicClientTypeNotSet									= 6,
       
    62 
       
    63 	/** The client has attempted to set the type of the session when it has 
       
    64 	already been set. */
       
    65 	ERemConClientPanicClientTypeAlreadySet								= 7,
       
    66 
       
    67 	/** A client has used a bad or wrong session type in one of the following 
       
    68 	ways:
       
    69 	(a) The client has tried to set the type of the session to a bad type 
       
    70 	(neither controller nor target). 
       
    71 	(b) The client (not of controller type) has called GoConnectionOriented, 
       
    72 	GoConnectionless, ConnectBearer, ConnectBearerCancel, DisconnectBearer or 
       
    73 	DisconnectBearerCancel. */
       
    74 	ERemConClientPanicBadType											= 8,
       
    75 
       
    76 	/** A client tried to open a target session when there is already one in
       
    77 	that client process. 
       
    78 	
       
    79 	This is no longer an illegal condition and so the panic will never
       
    80 	be raised.
       
    81 	*/
       
    82 	ERemConClientPanicTwoTargetSessionsInOneProcess 					= 9,
       
    83 
       
    84 	/** A badly-formed descriptor or other lump of data was sent from the 
       
    85 	client side. */
       
    86 	ERemConClientPanicBadDescriptor 									= 10,
       
    87 
       
    88 	/** The client requested NotifyConnectionStatusChange when there was 
       
    89 	already a NotifyConnectionStatusChange outstanding on this session. */
       
    90 	ERemConClientPanicConnectionsNotificationAlreadyOutstanding 		= 11,
       
    91 	
       
    92 	/** The client has committed one of a number of abuses of the 
       
    93 	ConnectBearer/DisconnectBearer interface. 
       
    94 	With respect to Send, Receive, ConnectBearer and DisconnectBearer 
       
    95 	messages, the following is a table of the legal states of a session 
       
    96 	(- = not outstanding, X = outstanding):
       
    97 	Send	Receive		Connect		Disconnect
       
    98 	-		-			-			-
       
    99 	X		-			-			-
       
   100 	-		X			-			-
       
   101 	-		-			X			-
       
   102 	-		-			-			X
       
   103 	X		X			-			-
       
   104 	X		-			X			-
       
   105 	-		X			X			-
       
   106 	X		X			X			-
       
   107 	-		X			-			X
       
   108 	In other words, any combination of the four is legal except having a 
       
   109 	DisconnectBearer outstanding at the same time as either a Send or a 
       
   110 	ConnectBearer.
       
   111 	In addition, the client cannot call GoConnectionOriented or 
       
   112 	GoConnectionless while there's a Send, ConnectBearer or DisconnectBearer 
       
   113 	outstanding.
       
   114 	This code is also used to error attempts to post a ConnectBearer or 
       
   115 	DisconnectBearer request which is already outstanding.
       
   116 	This is all in the interests of tying the legal client side behaviour to a 
       
   117 	minimum of sensible operations.
       
   118 	*/
       
   119 	ERemConClientPanicBearerControlOutstanding							= 12,
       
   120 
       
   121 	/** The client has tried to send a response to a command which does not
       
   122 	exist in the logs as having been delivered to that client.
       
   123 	
       
   124 	This is no longer an illegal condition and so the panic will never
       
   125 	be raised.
       
   126 	*/
       
   127 	ERemConClientPanicNoCommand 										= 13,
       
   128 
       
   129 	/** RRemConTarget::RegisterInterestedAPIs(...) is called on a non-target session
       
   130 	(i.e. controller or undefined session). This doesn't make any sense because the 
       
   131 	server only filters incoming commands for the target sessions.
       
   132 	
       
   133 	The client is paniced for misusing this API.
       
   134 	*/
       
   135 	ERemConClientPanicRegisterInterestedAPIsInNonTargetSession			= 14,	
       
   136 	};
       
   137 
       
   138 #endif // REMCONSERVERPANIC_H