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