|
1 /* |
|
2 * Copyright (c) 2007-2009 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: Static Tls data storage |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef RESMRSTATIC_H |
|
20 #define RESMRSTATIC_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class TESMRStaticData; |
|
25 class CESMRContactMenuHandler; |
|
26 class CESMRContactManagerHandler; |
|
27 |
|
28 /* |
|
29 * Proxy class to access TLS stored data |
|
30 */ |
|
31 class RESMRStatic |
|
32 { |
|
33 public: |
|
34 /** |
|
35 * C++ constructor |
|
36 */ |
|
37 IMPORT_C RESMRStatic(); |
|
38 |
|
39 /** |
|
40 * C++ destructor |
|
41 */ |
|
42 IMPORT_C ~RESMRStatic(); |
|
43 |
|
44 public: // interface |
|
45 /* |
|
46 * Retrieves stored data pointer from Tls, or creates new one |
|
47 * if called first time. Must be called before using this class. |
|
48 */ |
|
49 IMPORT_C void ConnectL(); |
|
50 |
|
51 /* |
|
52 * Closes this instance of static data handler. |
|
53 */ |
|
54 IMPORT_C void Close(); |
|
55 |
|
56 /* |
|
57 * Returns global instance of CESMRContactManagerHandler |
|
58 */ |
|
59 IMPORT_C CESMRContactManagerHandler& ContactManagerHandlerL(); |
|
60 |
|
61 /* |
|
62 * Returns global instance of CESMRContactMenuHandler |
|
63 */ |
|
64 IMPORT_C CESMRContactMenuHandler& ContactMenuHandlerL(); |
|
65 |
|
66 /* |
|
67 * Returns the current index for tracking field |
|
68 */ |
|
69 IMPORT_C TInt CurrentFieldIndex(); |
|
70 |
|
71 /* |
|
72 * Sets the current index for tracking field |
|
73 */ |
|
74 IMPORT_C void SetCurrentFieldIndex(TInt aFieldIndex); |
|
75 |
|
76 private: // Internal definitions |
|
77 /** |
|
78 * Enumeration for cached data types |
|
79 */ |
|
80 enum TUsedType |
|
81 { |
|
82 EContactManagerHandler = 0x01, |
|
83 EContactMenuHandler = 0x04 |
|
84 }; |
|
85 |
|
86 private: // Data |
|
87 /* |
|
88 * Own: Pointer to Tls stored data pointer |
|
89 */ |
|
90 TESMRStaticData* iStaticData; |
|
91 |
|
92 /* |
|
93 * Own: Used pointer types |
|
94 */ |
|
95 TInt iUsedTypes; |
|
96 }; |
|
97 |
|
98 #endif //RESMRSTATIC_H |
|
99 |
|
100 // EOF |
|
101 |