|
1 /* |
|
2 * Copyright (c) 2002-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: Startup for and handling statuses of ASYs |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CASYPROXYSTARTER_H |
|
20 #define CASYPROXYSTARTER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "AccServer.h" |
|
24 #include "AsyProxyObserver.h" |
|
25 #include "AccSrvASYProxyHandler.h" |
|
26 #include <e32base.h> |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 // MACROS |
|
31 |
|
32 // DATA TYPES |
|
33 |
|
34 // FUNCTION PROTOTYPES |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 class CASYProxyAPI; |
|
38 |
|
39 // CLASS DECLARATION |
|
40 |
|
41 /** |
|
42 * Startup class for loading ASYs and |
|
43 * handling changes in ASYs statuses |
|
44 * |
|
45 * @lib AccServer.exe |
|
46 * @since S60 3.1 |
|
47 */ |
|
48 NONSHARABLE_CLASS( CASYProxyStarter ) : public CBase, public MASYProxyObserver |
|
49 { |
|
50 public: // Constructors and destructor |
|
51 |
|
52 /** |
|
53 * Two-phased constructor. |
|
54 */ |
|
55 static CASYProxyStarter* NewL( |
|
56 CASYProxyAPI* aAsyProxyAPI, |
|
57 CAccSrvConnectionController* aConnectionController ); |
|
58 |
|
59 /** |
|
60 * Destructor. |
|
61 */ |
|
62 ~CASYProxyStarter(); |
|
63 |
|
64 public: // New functions |
|
65 |
|
66 /** |
|
67 * Starts ASYLoading process in ASYProxy side |
|
68 * @since S60 3.1 |
|
69 * @param void |
|
70 * @return void |
|
71 */ |
|
72 void LoadASYs(); |
|
73 |
|
74 /** |
|
75 * Handles completion of loading ASY |
|
76 * @since S60 3.1 |
|
77 * @param aASYIndex Index of ASY to handle this callback |
|
78 * @param aAllASYsComplete Indicates whether all of ASYs are loaded completely |
|
79 * EFalse All ASYs are not yet loaded completely |
|
80 * ETrue All ASYs are loaded completely |
|
81 * @return void |
|
82 */ |
|
83 virtual void LoadCompleteL( const TInt aASYIndex, |
|
84 const TBool aAllASYsComplete = EFalse ); |
|
85 |
|
86 /** |
|
87 * Handles ASY thread kill |
|
88 * @since S60 3.1 |
|
89 * @param aASYIndex Index of killing ASY |
|
90 * @return void |
|
91 */ |
|
92 virtual void ThreadKills( const TInt aASYIndex ); |
|
93 |
|
94 /** |
|
95 * Handles timeout of ASY's loading process |
|
96 * @since S60 3.1 |
|
97 * @param void |
|
98 * @return void |
|
99 */ |
|
100 virtual void LoadingTimedOutL(); |
|
101 |
|
102 public: // Functions from base classes |
|
103 |
|
104 protected: // New functions |
|
105 |
|
106 protected: // Functions from base classes |
|
107 |
|
108 private: |
|
109 |
|
110 /** |
|
111 * C++ default constructor. |
|
112 */ |
|
113 CASYProxyStarter( CASYProxyAPI* aAsyProxyAPI, |
|
114 CAccSrvConnectionController* aConnectionController ); |
|
115 |
|
116 /** |
|
117 * By default Symbian 2nd phase constructor is private. |
|
118 */ |
|
119 void ConstructL(); |
|
120 |
|
121 public: // Data |
|
122 |
|
123 protected: // Data |
|
124 |
|
125 private: // Data |
|
126 |
|
127 // Pointer to an ASYProxy |
|
128 CASYProxyAPI* iAsyProxyAPI; // Not owned |
|
129 CAccSrvConnectionController* iConnectionController; // Not owned |
|
130 TBool iInitCalled; |
|
131 |
|
132 public: // Friend classes |
|
133 |
|
134 protected: // Friend classes |
|
135 |
|
136 private: // Friend classes |
|
137 |
|
138 }; |
|
139 |
|
140 #endif // CASYPROXYSTARTER_H |
|
141 |
|
142 // End of File |