|
1 // Copyright (c) 2006-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 // |
|
15 |
|
16 #ifndef __SQLRESOURCETEST_H__ |
|
17 #define __SQLRESOURCETEST_H__ |
|
18 |
|
19 #include "SqlUtil.h" //TSqlSrvFunction |
|
20 |
|
21 //Forward declarations |
|
22 class RSqlDbSession; |
|
23 |
|
24 /** |
|
25 TSqlResourceTestData class is used for sending test commands to the SQL server. |
|
26 If the connection with the server is not established yet, the TSqlResourceTestData |
|
27 instance will store the test command and send it later, at the moment when the connection |
|
28 with the server is established. |
|
29 |
|
30 @internalComponent |
|
31 */ |
|
32 NONSHARABLE_CLASS(TSqlResourceTestData) |
|
33 { |
|
34 public: |
|
35 static TSqlResourceTestData* Instance(); |
|
36 static void Release(); |
|
37 |
|
38 TInt Init(RSqlDbSession& aDbSession); |
|
39 TInt Set(TSqlSrvFunction aFunction, TInt aAllocFailType, TInt aRate); |
|
40 |
|
41 private: |
|
42 TSqlResourceTestData(); |
|
43 |
|
44 private: |
|
45 TBool iRqPending; |
|
46 RSqlDbSession* iDbSession; |
|
47 TSqlSrvFunction iFunction; |
|
48 TInt iAllocFailType; |
|
49 TInt iRate; |
|
50 |
|
51 }; |
|
52 |
|
53 #endif //__SQLRESOURCETEST_H__ |