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