1 /* |
|
2 * Copyright (c) 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_RADIOENGINETLS_H |
|
20 #define C_RADIOENGINETLS_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class MRadioEngineLogger; |
|
25 class CCoeEnv; |
|
26 class RFs; |
|
27 |
|
28 /** |
|
29 * TLS handler |
|
30 */ |
|
31 class CRadioEngineTls : public CBase |
|
32 { |
|
33 |
|
34 friend class RadioEngineUtils; |
|
35 |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Returns the CRadioEngineTls instance from TLS |
|
40 * |
|
41 * @since Live TV UI v1.0 |
|
42 * @return Reference to CRadioEngineTls instance |
|
43 */ |
|
44 static CRadioEngineTls& Instance(); |
|
45 |
|
46 /** |
|
47 * Return the logger storage if logging is enabled |
|
48 * |
|
49 * @since Live TV UI v1.0 |
|
50 */ |
|
51 static MRadioEngineLogger* Logger(); |
|
52 |
|
53 /** |
|
54 * Returns the file server session |
|
55 * |
|
56 * @since Live TV UI v1.0 |
|
57 * @return Reference to file server session |
|
58 */ |
|
59 static RFs& FsSession(); |
|
60 |
|
61 /** |
|
62 * Increase reference count |
|
63 */ |
|
64 void AddRef(); |
|
65 |
|
66 /** |
|
67 * Decrease reference count |
|
68 * Deletes self when ref count reaches zero. |
|
69 */ |
|
70 void Release(); |
|
71 |
|
72 private: |
|
73 |
|
74 static void InitializeL( RFs* aFs = NULL ); |
|
75 |
|
76 CRadioEngineTls( RFs* aFs ); |
|
77 |
|
78 ~CRadioEngineTls(); |
|
79 |
|
80 void ConstructL(); |
|
81 |
|
82 #ifdef LOGGING_ENABLED |
|
83 /** |
|
84 * File logger |
|
85 * Own. |
|
86 */ |
|
87 CRadioEngineLogger* iLogger; |
|
88 #endif |
|
89 |
|
90 /** |
|
91 * Flag to indicate whether or not the file server session is owned |
|
92 */ |
|
93 TBool iFsOwned; |
|
94 |
|
95 /** |
|
96 * File server session. |
|
97 * Own status determined by iFsOwned member variable |
|
98 */ |
|
99 RFs* iFs; |
|
100 |
|
101 /** |
|
102 * Reference count |
|
103 */ |
|
104 TInt iRefs; |
|
105 |
|
106 }; |
|
107 |
|
108 #endif // C_RADIOENGINETLS_H |
|