36 |
36 |
37 const TInt KTimeOutInSeconds( 30 ); |
37 const TInt KTimeOutInSeconds( 30 ); |
38 const TInt KSecondinMicroseconds( 1000000 ); |
38 const TInt KSecondinMicroseconds( 1000000 ); |
39 |
39 |
40 const TInt KListenTimeoutInSeconds( 30 ); |
40 const TInt KListenTimeoutInSeconds( 30 ); |
41 const TInt KBufSize = 4096; |
41 const TInt KBufSize = 16384; |
42 const TInt KThreshold = 1024; |
42 const TInt KThreshold = 1024; |
43 |
43 |
44 #endif |
44 #endif |
45 |
45 |
46 // CONSTANTS |
46 // CONSTANTS |
95 // CONSTANTS |
95 // CONSTANTS |
96 const TInt KMaxLengthOfUrl = 255; |
96 const TInt KMaxLengthOfUrl = 255; |
97 const TInt KMaxLengthOfHost = 255; |
97 const TInt KMaxLengthOfHost = 255; |
98 const TInt KMaxLengthOfSessionId = 255; |
98 const TInt KMaxLengthOfSessionId = 255; |
99 const TInt KSizeOfProgramPath = 50; |
99 const TInt KSizeOfProgramPath = 50; |
|
100 const TInt KBufExpandSize = 256; |
100 |
101 |
101 // maximum length of incoming message buffer (for externalizing CMSRPMessage |
102 // maximum length of incoming message buffer (for externalizing CMSRPMessage |
102 // class |
103 // class |
103 const TInt KMaxLengthOfIncomingMessageExt = 4096; |
104 const TInt KMaxLengthOfIncomingMessageExt = 4096; |
104 |
105 |
165 #define MSRPLOG3( text, value1, value2 ) |
166 #define MSRPLOG3( text, value1, value2 ) |
166 |
167 |
167 #endif // END MACROS |
168 #endif // END MACROS |
168 |
169 |
169 // ENUMS |
170 // ENUMS |
|
171 |
|
172 /** Error codes returned to the client */ |
|
173 enum TMSRPErrorCodes |
|
174 { |
|
175 EUnknownCode = 1, |
|
176 EAllOk = 200, |
|
177 EUnintelligibleRequest = 400, |
|
178 EActionNotAllowed = 403, |
|
179 ETimeout = 408, |
|
180 EStopSending = 413, |
|
181 EMimeNotUnderstood = 415, |
|
182 EParameterOutOfBounds = 423, |
|
183 ESessionDoesNotExist = 481, |
|
184 EUnknownRequestMethod = 501, |
|
185 ESessionAlreadyBound = 506 |
|
186 }; |
|
187 |
170 // MSRP API IPC request definitions |
188 // MSRP API IPC request definitions |
171 |
|
172 enum TMSRPRequests |
189 enum TMSRPRequests |
173 { |
190 { |
174 EMSRPCreateSubSession, |
191 EMSRPCreateSubSession, |
175 EMSRPCloseSubSession, |
192 EMSRPCloseSubSession, |
176 EMSRPLocalPath, |
193 EMSRPLocalPath, |
177 EMSRPConnect, |
194 EMSRPConnect, |
178 EMSRPListenConnections, |
195 EMSRPListenConnections, |
179 EMSRPListenMessages, |
196 EMSRPListenMessages, |
180 EMSRPListenSendResult, |
197 EMSRPListenSendResult, |
181 EMSRPSendMessage, |
198 EMSRPSendMessage, |
182 EMSRPSendFile, |
|
183 EMSRPReceiveFile, |
|
184 EMSRPCancelSending, |
199 EMSRPCancelSending, |
185 EMSRPCancelReceiving, |
200 EMSRPCancelReceiving, |
186 EMSRPCancelSendRespListening, |
201 EMSRPCancelSendRespListening, |
|
202 EMSRPProcessQueuedRequests, |
|
203 EMSRPProgressReports, |
187 EMSRPReserved |
204 EMSRPReserved |
188 }; |
205 }; |
189 |
206 |
190 enum TMSRPMessageContent |
207 enum TMSRPMessageContent |
191 { |
208 { |
213 EYes, |
230 EYes, |
214 ENo, |
231 ENo, |
215 EPartial |
232 EPartial |
216 }; |
233 }; |
217 |
234 |
218 enum TErrorCode |
|
219 { |
|
220 EUndefined = -1, |
|
221 ENoError = 0, |
|
222 ENetworkTimeout = 1, |
|
223 EUnrecoverableError = 2, |
|
224 ELocalTimeout = 3, |
|
225 EInvalidAction = 4 |
|
226 }; |
|
227 |
|
228 |
|
229 // Local host name and session id |
235 // Local host name and session id |
230 typedef struct TLocalPathMSRPData |
236 typedef struct TLocalPathMSRPData |
231 { |
237 { |
232 TBuf8< KMaxLengthOfHost> iLocalHost; |
238 TBuf8< KMaxLengthOfHost> iLocalHost; |
233 TBuf8< KMaxLengthOfSessionId > iSessionID; |
|
234 } TLocalPathMSRPData; |
239 } TLocalPathMSRPData; |
235 |
240 |
236 |
241 |
237 // for connection parameters |
242 // for connection parameters |
238 typedef struct TConnectMSRPData |
243 typedef struct TConnectMSRPData |