|
1 /* |
|
2 * Copyright (c) 2006 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: Utils implements general tools for bandwidth and |
|
15 * packet loss calculation and IAP selection etc |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef __UTILS_H__ |
|
20 #define __UTILS_H__ |
|
21 |
|
22 #include <e32std.h> |
|
23 |
|
24 #include "uinotify.h" |
|
25 |
|
26 class Utils |
|
27 { |
|
28 public: |
|
29 Utils(); |
|
30 virtual ~Utils(); |
|
31 |
|
32 /** |
|
33 * Adjust given Nifman's idle timeout for every bearer. |
|
34 */ |
|
35 static void SetTimeoutsL(const TInt aTimeout); |
|
36 |
|
37 /** |
|
38 * Set Nifman's idle times for each record in given table. |
|
39 */ |
|
40 static void SetTableTimeoutL(const TInt aTimeout,const TDesC& aTableName); |
|
41 |
|
42 /** |
|
43 * Calculate throughput |
|
44 */ |
|
45 static void CalculateThroughput(TDes8& aBuffer, TTime aStartTime, TInt aSize); |
|
46 |
|
47 /** |
|
48 * Set IapId value into connection preferences table. |
|
49 */ |
|
50 static void SetConnectionPrefsIapL(); |
|
51 |
|
52 /** |
|
53 * Create data chunk for POST performance tests. |
|
54 */ |
|
55 static void CreateDataChunk(TDes8& aBuffer, TInt aLength); |
|
56 |
|
57 /** |
|
58 * Ask IAP id to be used from the user |
|
59 * @param aId Selected IAP id |
|
60 * @return Status of the selection (selection made or cancelled) |
|
61 */ |
|
62 static TInt AskIapIdL(TUint32& aId); |
|
63 |
|
64 /** |
|
65 * Ask Network id from the user. |
|
66 */ |
|
67 static TInt AskNetworkIdL(TUint32& aId); |
|
68 |
|
69 /** |
|
70 * Does the real work for selecting IAP or Network ide. |
|
71 */ |
|
72 static TInt SelectIdFromTableL(TUint32& aId, const TDesC& aTableName); |
|
73 |
|
74 }; |
|
75 |
|
76 #endif // __UTILS_H__ |