|
1 /* |
|
2 * Copyright (c) 2002-2004 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: Handler for ASY instance |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CASYPROXYASYHANDLER_H |
|
20 #define CASYPROXYASYHANDLER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "ASYProxyMainService.h" |
|
24 #include "ASYProxy.h" |
|
25 #include <AsyCmdTypes.h> |
|
26 #include <AsyMainServiceBase.h> |
|
27 #include <e32std.h> |
|
28 #include <e32base.h> |
|
29 #include <ecom/implementationinformation.h> |
|
30 |
|
31 // CONSTANTS |
|
32 |
|
33 // MACROS |
|
34 |
|
35 // DATA TYPES |
|
36 |
|
37 // FUNCTION PROTOTYPES |
|
38 |
|
39 // FORWARD DECLARATIONS |
|
40 |
|
41 // CLASS DECLARATION |
|
42 |
|
43 /** |
|
44 * Handler for ASY instance |
|
45 * One handler exists for each ASY |
|
46 * Loads ASY into the new sub thread. |
|
47 * |
|
48 * @lib ASYProxy.dll |
|
49 * @since S60 3.1 |
|
50 */ |
|
51 class CASYProxyASYHandler : public CBase |
|
52 { |
|
53 public: // Constructors and destructor |
|
54 |
|
55 /** |
|
56 * Two-phased constructor. |
|
57 */ |
|
58 static CASYProxyASYHandler* NewL( |
|
59 CASYProxy* aASYProxy, |
|
60 const TInt aIndex, |
|
61 const TUid aHandlerUid, |
|
62 const CImplementationInformation& aImplementationInformation ); |
|
63 |
|
64 /** |
|
65 * Destructor. |
|
66 */ |
|
67 virtual ~CASYProxyASYHandler(); |
|
68 |
|
69 public: // New functions |
|
70 |
|
71 /** |
|
72 * Sets ASY's state. |
|
73 * @since S60 3.1 |
|
74 * @param aASYState State to be set for ASY |
|
75 * @return void |
|
76 */ |
|
77 void UpdateASYStateL( TASYProxyASYState aASYState ); |
|
78 |
|
79 /** |
|
80 * Gets the current status of ASY. |
|
81 * @since S60 3.1 |
|
82 * @param void |
|
83 * @return Current status of ASY |
|
84 */ |
|
85 TASYProxyASYState CurrentState() const; |
|
86 |
|
87 /** |
|
88 * Gets the index of ASY. |
|
89 * @since S60 3.1 |
|
90 * @param void |
|
91 * @return Index of this ASY |
|
92 */ |
|
93 TInt Index() const; |
|
94 |
|
95 public: // Functions from base classes |
|
96 |
|
97 protected: // New functions |
|
98 |
|
99 protected: // Functions from base classes |
|
100 |
|
101 private: |
|
102 |
|
103 /** |
|
104 * C++ default constructor. |
|
105 */ |
|
106 CASYProxyASYHandler( |
|
107 CASYProxy* aASYProxy, |
|
108 const TInt aIndex, |
|
109 const TUid aHandlerUid, |
|
110 const CImplementationInformation& aImplementationInformation ); |
|
111 |
|
112 /** |
|
113 * By default Symbian 2nd phase constructor is private. |
|
114 */ |
|
115 void ConstructL(); |
|
116 |
|
117 void SetMemoryValues(); |
|
118 TInt ReadMemoryItem( const TDesC8& aOpaqData, const TDesC8& aMemKey ); |
|
119 void LoadASYL(); |
|
120 |
|
121 public: // Data |
|
122 |
|
123 protected: // Data |
|
124 |
|
125 private: // Data |
|
126 |
|
127 // Pointer to the main service of ASY |
|
128 CASYProxyMainService* iASYServiceMain; // Owned |
|
129 |
|
130 // Implementation uid of ASYCommandHandlerBase -ASY. |
|
131 TUid iHandlerUid; |
|
132 |
|
133 // Pointer to ASYProxy. |
|
134 CASYProxy* iASYProxy; // Not owned |
|
135 |
|
136 // Current status of ASY. |
|
137 TASYProxyASYState iASYState; |
|
138 |
|
139 // Static information about the ASY. |
|
140 CImplementationInformation* iImplementationInformation; |
|
141 |
|
142 // Zero based index of this ASY in array of handlers. |
|
143 TInt iIndex; |
|
144 |
|
145 // ASY's thread heap size |
|
146 TInt iHeapValue; |
|
147 |
|
148 // ASY's thread stack size |
|
149 TInt iStackValue; |
|
150 |
|
151 |
|
152 public: // Friend classes |
|
153 |
|
154 friend const CImplementationInformation* CASYProxy::ASYInfo( TInt aIndex ) const; |
|
155 |
|
156 protected: // Friend classes |
|
157 |
|
158 private: // Friend classes |
|
159 |
|
160 }; |
|
161 |
|
162 #endif // CASYPROXYASYHANDLER_H |
|
163 |
|
164 // End of File |