1198 @param aMessage The client request wrapped in an IPC message |
1198 @param aMessage The client request wrapped in an IPC message |
1199 |
1199 |
1200 @return The blob stream handle |
1200 @return The blob stream handle |
1201 |
1201 |
1202 @leave KErrNoMemory, An out of memory condition has occurred; |
1202 @leave KErrNoMemory, An out of memory condition has occurred; |
1203 KErrArgument, The IPC data buffer length is invalid, or the ROWID is invalid, |
1203 KErrArgument, The ROWID is invalid or UTF-16 to UTF-8 string conversion failed; |
1204 or UTF-16 to UTF-8 string conversion failed; |
|
1205 KErrBadDescriptor The transferred data is bigger than the specified length; |
1204 KErrBadDescriptor The transferred data is bigger than the specified length; |
1206 KErrBadName, The table name, column name or database name has an invalid length; |
1205 KErrBadName, The table name, column name or database name has an invalid length; |
1207 KErrPermissionDenied, The client does not have the required security capabilites for this operation; |
1206 KErrPermissionDenied, The client does not have the required security capabilites for this operation; |
1208 Note that the function may also leave with some other system wide errors or |
1207 Note that the function may also leave with some other system wide errors or |
1209 database specific errors categorised as ESqlDbError. |
1208 database specific errors categorised as ESqlDbError. |
1210 |
1209 |
1211 @panic SqlDb 2 Client panic. The database object is not yet created (iDatabase is NULL) |
1210 @panic SqlDb 2 Client panic. The database object is not yet created (iDatabase is NULL). |
1212 @panic SqlDb 3 Client panic. Failed to create a blob stream handle |
1211 @panic SqlDb 3 Client panic. Failed to create a blob stream handle. |
|
1212 @panic SqlDb 4 Client panic. IPC buffer length is 0. |
1213 |
1213 |
1214 Usage of the IPC call arguments: |
1214 Usage of the IPC call arguments: |
1215 Arg 0: [in] The length of the IPC data buffer |
1215 Arg 0: [in] The length of the IPC data buffer |
1216 Arg 1: [in] IPC data buffer containing blob parameters: table name, column name, rowid, mode, database name. |
1216 Arg 1: [in] IPC data buffer containing blob parameters: table name, column name, rowid, mode, database name. |
1217 Arg 2: [out] IPC buffer containing the blob stream handle |
1217 Arg 2: [out] IPC buffer containing the blob stream handle |
1218 */ |
1218 */ |
1219 TInt CSqlSrvSession::DbBlobSourceL(const RMessage2& aMessage) |
1219 TInt CSqlSrvSession::DbBlobSourceL(const RMessage2& aMessage) |
1220 { |
1220 { |
1221 __SQLPANIC_CLIENT(iDatabase != NULL, aMessage, ESqlPanicInvalidObj); |
1221 __SQLPANIC_CLIENT(iDatabase != NULL, aMessage, ESqlPanicInvalidObj); |
1222 |
1222 |
|
1223 TInt ipcPrmLen = aMessage.Int0(); |
|
1224 __SQLPANIC_CLIENT(ipcPrmLen > 0, aMessage, ESqlPanicBadArgument); |
|
1225 |
1223 iIpcStreams.AllocL(); |
1226 iIpcStreams.AllocL(); |
1224 |
1227 |
1225 TInt ipcPrmLen = aMessage.Int0(); |
|
1226 if(ipcPrmLen < 1) |
|
1227 { |
|
1228 __SQLLEAVE(KErrArgument); |
|
1229 } |
|
1230 TDes8& ipcPrmDes = ReadString8ZL(aMessage, 1, ipcPrmLen); |
1228 TDes8& ipcPrmDes = ReadString8ZL(aMessage, 1, ipcPrmLen); |
1231 RDesReadStream strm(ipcPrmDes); |
1229 RDesReadStream strm(ipcPrmDes); |
1232 |
1230 |
1233 TBuf8<KMaxFileName + 1> tblName; |
1231 TBuf8<KMaxFileName + 1> tblName; |
1234 ExtractNameL(strm, tblName); |
1232 ExtractNameL(strm, tblName); |