|
1 /* |
|
2 * Copyright (c) 2007 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: Always Online class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __CAOACTIVESCHEDULER_H__ |
|
20 #define __CAOACTIVESCHEDULER_H__ |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 |
|
25 #include "AlwaysOnlineManagerClient.h" |
|
26 |
|
27 class CAlwaysOnlineManagerServer; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 /** |
|
31 * Active Scheduler |
|
32 * |
|
33 * Own derived CActiveScheduler which is overwritting |
|
34 * Error() function so it does not panic there as default implementation |
|
35 * |
|
36 * @since S60 v3.1 |
|
37 */ |
|
38 NONSHARABLE_CLASS( CAOActiveScheduler ): |
|
39 public CActiveScheduler |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * C++ constructor |
|
45 * @since S60 v3.1 |
|
46 * @param aAoServer reference to ao server object |
|
47 */ |
|
48 CAOActiveScheduler(); |
|
49 |
|
50 /** |
|
51 * C++ destructor |
|
52 * @since S60 v3.1 |
|
53 */ |
|
54 virtual ~CAOActiveScheduler(); |
|
55 |
|
56 /** |
|
57 * From CActiveScheduler |
|
58 * |
|
59 * If some active object returns error code from RunError() |
|
60 * this function is called, implementation broadcasts |
|
61 * EServerAPIBaseCommandAoSchedulerError to every ao plugin. |
|
62 * |
|
63 * NOTE: This error must be handled in HandleServerCommandL() |
|
64 * if there is a risk that some plugin's active object returns |
|
65 * something else than KErrNone from RunError() method. |
|
66 * |
|
67 * @since S60 v3.1 |
|
68 * @param anError Error code from RunError function |
|
69 */ |
|
70 virtual void Error( TInt anError ) const; |
|
71 |
|
72 /** |
|
73 * |
|
74 * Setter function for AO server object pointer, this can't set |
|
75 * in constructor because Active scheduler have to be |
|
76 * installed before creation of AO server object |
|
77 * (chicken - egg problem) |
|
78 * |
|
79 * @since S60 v3.1 |
|
80 * @param aAoServer pointer to AoServer object, NOT OWNED |
|
81 */ |
|
82 void SetServerRef( CAlwaysOnlineManagerServer* aAoServer ); |
|
83 |
|
84 private: |
|
85 |
|
86 // pointer to ao server class (NOT OWNED) |
|
87 CAlwaysOnlineManagerServer* iAoServer; |
|
88 }; |
|
89 |
|
90 |
|
91 #endif // __CAOACTIVESCHEDULER_H__ |