|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Switches |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __CPROTOCOLTYPE_H__ |
|
22 #define __CPROTOCOLTYPE_H__ |
|
23 |
|
24 /************************************************************************************* |
|
25 * |
|
26 * Defines |
|
27 * |
|
28 ************************************************************************************/ |
|
29 #define MAXVARNAMELEN 60 |
|
30 #define MAXCOMMANDLINELEN 1024 |
|
31 |
|
32 /************************************************************************************* |
|
33 * |
|
34 * Types |
|
35 * |
|
36 ************************************************************************************/ |
|
37 typedef enum { |
|
38 CMD_REQ_STARTUSECASEID, |
|
39 CMD_REQ_SIGNALID, |
|
40 CMD_REQ_RENDEZVOUSID, |
|
41 CMD_REQ_WAITID, |
|
42 CMD_REQ_ENDUSECASEID, |
|
43 CMD_REQ_GETVARIABLENAMEID, |
|
44 CMD_REQ_RUNCOMMAND, |
|
45 CMD_REP_STARTUSECASEID, |
|
46 CMD_REP_SIGNALID, |
|
47 CMD_REP_RENDEZVOUSID, |
|
48 CMD_REP_WAITID, |
|
49 CMD_REP_ENDUSECASEID, |
|
50 CMD_REP_GETVARIABLENAMEID, |
|
51 CMD_REP_RUNCOMMAND, |
|
52 CMD_QUITID, |
|
53 CMD_UNKNOWN |
|
54 }TPCommand; |
|
55 |
|
56 typedef struct { |
|
57 int iUid; |
|
58 TPCommand iCmdID; |
|
59 int iDataLen; |
|
60 } TPHeader; |
|
61 |
|
62 /************************************************************************************* |
|
63 * Request Structs |
|
64 ************************************************************************************/ |
|
65 |
|
66 typedef struct { |
|
67 int iUsecaseID; |
|
68 } TStartUsecaseRequest; |
|
69 |
|
70 typedef struct { |
|
71 int iUsecaseID; |
|
72 } TSignalRequest; |
|
73 |
|
74 typedef struct { |
|
75 int iUsecaseID; |
|
76 } TRendezvousRequest; |
|
77 |
|
78 typedef struct { |
|
79 int iUsecaseID; |
|
80 } TWaitRequest; |
|
81 |
|
82 typedef struct { |
|
83 int iUsecaseID; |
|
84 int iResult; |
|
85 } TEndUsecaseRequest; |
|
86 |
|
87 typedef struct { |
|
88 char iVariableName[MAXVARNAMELEN] ; |
|
89 } TGetVariableNameRequest; |
|
90 |
|
91 typedef struct { |
|
92 char iCommandLine[MAXCOMMANDLINELEN] ; |
|
93 int iResult; |
|
94 } TRunCommandRequest; |
|
95 |
|
96 /************************************************************************************* |
|
97 * Reply Requests |
|
98 ************************************************************************************/ |
|
99 |
|
100 typedef struct { |
|
101 int iResult; |
|
102 } TStartUsecaseReply; |
|
103 |
|
104 typedef struct { |
|
105 int iResult; |
|
106 } TSignalReply; |
|
107 |
|
108 typedef struct { |
|
109 int iResult; |
|
110 } TRendezvousReply; |
|
111 |
|
112 typedef struct { |
|
113 int iResult; |
|
114 } TWaitReply; |
|
115 |
|
116 typedef struct { |
|
117 int iCommandResult; |
|
118 int iScriptResult; |
|
119 } TEndUsecaseReply; |
|
120 |
|
121 typedef struct { |
|
122 char iVariableValue[MAXVARNAMELEN] ; |
|
123 int iResult; |
|
124 } TGetVariableNameReply; |
|
125 |
|
126 typedef struct { |
|
127 int iResult; |
|
128 } TRunCommandReply; |
|
129 |
|
130 #endif //__CPROTOCOLTYPE_H__ |