|
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 the License "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: WlanOsa declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 7 % |
|
20 */ |
|
21 |
|
22 #ifndef WLANOSA_H |
|
23 #define WLANOSA_H |
|
24 |
|
25 #include <wlanosa.h> |
|
26 #include <wlanosaext.h> |
|
27 #include "wlanobject.h" |
|
28 |
|
29 struct WlanOsaImpl; |
|
30 |
|
31 /** |
|
32 * concrete osa implementation |
|
33 * |
|
34 * |
|
35 * @lib wlanosa.lib |
|
36 * @since S60 v3.2 |
|
37 */ |
|
38 class WlanOsa : |
|
39 public MWlanOsa, |
|
40 public MWlanOsaExt, |
|
41 public WlanObject |
|
42 { |
|
43 public: |
|
44 |
|
45 /** |
|
46 * dtor |
|
47 * |
|
48 * @since S60 v3.2 |
|
49 */ |
|
50 virtual ~WlanOsa(); |
|
51 |
|
52 /** |
|
53 * ctor |
|
54 * |
|
55 * @since S60 v3.2 |
|
56 */ |
|
57 WlanOsa(); |
|
58 |
|
59 /** |
|
60 * Initializes the object instance. |
|
61 * Note! Needs to be executed successfully after object instance |
|
62 * construction to be able to use the instance. |
|
63 * |
|
64 * @param aUseCachedMemory ETrue if cached interconnect memory shall be used |
|
65 * EFalse otherwise |
|
66 * @param aAllocationUnit allocation unit size for interconnect memory in |
|
67 * bytes |
|
68 * @param aDfcQueue Pointer to the DFC queue to use |
|
69 * @return ETrue when successful |
|
70 * EFalse otherwise |
|
71 */ |
|
72 TBool Initialize( |
|
73 TBool aUseCachedMemory, |
|
74 TInt aAllocationUnit, |
|
75 void* aDfcQueue ); |
|
76 |
|
77 // from base class MWlanOsa |
|
78 |
|
79 /** |
|
80 * From MWlanOsa. |
|
81 * Memory allocation. Correct alignment guaranteed |
|
82 * |
|
83 * @since S60 v3.2 |
|
84 * @param aOsaMemoryType memory type to be allocated |
|
85 * @param aSize size of the buffer to be allocated in bytes. Must be |
|
86 * positive otherwise the allocation fails |
|
87 * @param aFlags bitmask to fine-tune behavior of the allocation |
|
88 * bit 0 - set: zero stamp allocated memory |
|
89 * @return begin of the allocated memory, NULL upon failure |
|
90 */ |
|
91 virtual void* Alloc( TOsaMemoryType aOsaMemoryType, |
|
92 TInt aSize, |
|
93 TUint aFlags ); |
|
94 |
|
95 /** |
|
96 * From MWlanOsa. |
|
97 * Releases memory allocated by the Alloc method |
|
98 * |
|
99 * @since S60 v3.2 |
|
100 * @param aPtr begin of the buffer to be freed |
|
101 */ |
|
102 virtual void Free( void* aPtr ); |
|
103 |
|
104 /** |
|
105 * From MWlanOsa. |
|
106 * Creates DFC context object |
|
107 * |
|
108 * @since S60 v3.2 |
|
109 * @return DFC context object, NULL upon failure |
|
110 */ |
|
111 virtual MWlanDfc* DfcCreate(); |
|
112 |
|
113 /** |
|
114 * From MWlanOsa. |
|
115 * Destroys DFC context object |
|
116 * |
|
117 * @since S60 v3.2 |
|
118 * @param aWlanDfc DFC context object to be destroyed |
|
119 */ |
|
120 virtual void DfcDestroy( MWlanDfc* aWlanDfc ); |
|
121 |
|
122 /** |
|
123 * From MWlanOsa. |
|
124 * Creates timer context object |
|
125 * |
|
126 * @since S60 v3.2 |
|
127 * @return timer context object, NULL upon failure |
|
128 */ |
|
129 virtual MWlanTimer* TimerCreate(); |
|
130 |
|
131 /** |
|
132 * From MWlanOsa. |
|
133 * Destroys timer context object |
|
134 * |
|
135 * @since S60 v3.2 |
|
136 * @param aWlanTimer timer context object to be destroyed |
|
137 */ |
|
138 virtual void TimerDestroy( MWlanTimer* aWlanTimer ); |
|
139 |
|
140 // from base class MWlanOsaExt |
|
141 |
|
142 /** |
|
143 * From MWlanOsaExt. |
|
144 * Acquires the software system lock |
|
145 * |
|
146 * @since S60 v3.2 |
|
147 */ |
|
148 virtual void MutexAcquire(); |
|
149 |
|
150 /** |
|
151 * From MWlanOsaExt. |
|
152 * Releases the software system lock |
|
153 * |
|
154 * @since S60 v3.2 |
|
155 */ |
|
156 virtual void MutexRelease(); |
|
157 |
|
158 protected: |
|
159 |
|
160 private: |
|
161 |
|
162 // Prohibit copy constructor. |
|
163 WlanOsa( const WlanOsa& ); |
|
164 // Prohibit assigment operator. |
|
165 WlanOsa& operator= ( const WlanOsa& ); |
|
166 |
|
167 inline WlanOsaImpl& Pimpl(); |
|
168 |
|
169 private: // data |
|
170 |
|
171 /** |
|
172 * implementation |
|
173 * Own. |
|
174 */ |
|
175 WlanOsaImpl* iPimpl; |
|
176 |
|
177 /** pointer to DFC queue. Not own */ |
|
178 void* iDfcQueue; |
|
179 }; |
|
180 |
|
181 #include "osa.inl" |
|
182 |
|
183 #endif // WLANOSA_H |