40 @param aRequestOp operaion name |
40 @param aRequestOp operaion name |
41 */ |
41 */ |
42 ServiceIPCRequest::ServiceIPCRequest(ServiceIPCSession* aSession, |
42 ServiceIPCRequest::ServiceIPCRequest(ServiceIPCSession* aSession, |
43 qint64 aDataLength, |
43 qint64 aDataLength, |
44 const QString& aRequestOp) : |
44 const QString& aRequestOp) : |
|
45 QObject(NULL), |
45 iSession(aSession), |
46 iSession(aSession), |
|
47 iClientInfo(NULL), |
46 iRequestOp(aRequestOp), |
48 iRequestOp(aRequestOp), |
47 iDatalength(aDataLength), |
49 iDatalength(aDataLength), |
48 iClientInfo(NULL), |
|
49 QObject(NULL), |
|
50 iId(-1), |
50 iId(-1), |
51 iAsync(false) |
51 iAsync(false) |
52 { |
52 { |
53 XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::ServiceIPCRequest(1)"); |
53 XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::ServiceIPCRequest(1)"); |
54 XQSERVICE_DEBUG_PRINT("aDataLength: %d", aDataLength); |
54 XQSERVICE_DEBUG_PRINT("aDataLength: %d", aDataLength); |
190 void ServiceIPCRequest::setClientInfo(ClientInfo *aClientInfo) |
190 void ServiceIPCRequest::setClientInfo(ClientInfo *aClientInfo) |
191 { |
191 { |
192 XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::setClientInfo"); |
192 XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::setClientInfo"); |
193 delete iClientInfo; |
193 delete iClientInfo; |
194 iClientInfo = aClientInfo; |
194 iClientInfo = aClientInfo; |
|
195 |
|
196 // Fill in the implicit info generated by the server |
|
197 iRequestInfo.setInfo(XQServiceUtils::InfoSID, iClientInfo->processId()); |
|
198 iRequestInfo.setInfo(XQServiceUtils::InfoVID, iClientInfo->vendorId()); |
|
199 iRequestInfo.setInfo(XQServiceUtils::InfoCap, iClientInfo->capabilities()); |
|
200 |
195 } |
201 } |
196 |
202 |
197 /*! |
203 /*! |
198 Gets the client info. |
204 Gets the client info. |
199 @return Client Information object. NULL if none is available |
205 @return Client Information object. NULL if none is available |
257 XQSERVICE_DEBUG_PRINT("\t iAsync = %d", iAsync); |
263 XQSERVICE_DEBUG_PRINT("\t iAsync = %d", iAsync); |
258 return iAsync; |
264 return iAsync; |
259 } |
265 } |
260 |
266 |
261 |
267 |
|
268 // Set request info passed alomg with the request |
262 void ServiceIPCRequest::setRequestInfo(XQRequestInfo *info) |
269 void ServiceIPCRequest::setRequestInfo(XQRequestInfo *info) |
263 { |
270 { |
264 XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::setRequestInfo"); |
271 XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::setRequestInfo"); |
265 if (info) |
272 if (info) |
266 { |
273 { |
267 iRequestInfo = *info; |
274 iRequestInfo = *info; |
|
275 // Restore the overridden id value |
268 if (iClientInfo) |
276 if (iClientInfo) |
269 { |
277 { |
270 // Fill in client security info from the client info |
278 // Fill in the implicit info generated by the server |
271 XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::setSecurityInfo"); |
279 XQSERVICE_DEBUG_PRINT("ServiceIPCRequest::setRequestInfo fill from clientInfo"); |
272 iRequestInfo.setInfo(XQServiceUtils::InfoSID, iClientInfo->processId()); |
280 iRequestInfo.setInfo(XQServiceUtils::InfoSID, iClientInfo->processId()); |
273 iRequestInfo.setInfo(XQServiceUtils::InfoVID, iClientInfo->vendorId()); |
281 iRequestInfo.setInfo(XQServiceUtils::InfoVID, iClientInfo->vendorId()); |
274 iRequestInfo.setInfo(XQServiceUtils::InfoCap, iClientInfo->capabilities()); |
282 iRequestInfo.setInfo(XQServiceUtils::InfoCap, iClientInfo->capabilities()); |
|
283 iRequestInfo.setInfo(XQServiceUtils::InfoId, id()); |
275 } |
284 } |
276 } |
285 } |
277 } |
286 } |
278 |
287 |
279 XQRequestInfo ServiceIPCRequest::requestInfo() const |
288 XQRequestInfo ServiceIPCRequest::requestInfo() const |