|
1 /* |
|
2 * Copyright (c) 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: Defines the Daemon class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef T_LOCODAEMON_H |
|
20 #define T_LOCODAEMON_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32property.h> |
|
24 class CLocodBearerPlugin; |
|
25 class CLocodServiceMan; |
|
26 |
|
27 /** |
|
28 * The root of Daemon. |
|
29 * |
|
30 * It monitors system state, constructs service manager and loads all bearer |
|
31 * plugins when system is up. |
|
32 * It unloads all bearer and service plugins when system is shuting down. |
|
33 * |
|
34 * @euser.lib |
|
35 * @since S60 v3.2 |
|
36 */ |
|
37 class CLocoDaemon : public CActive |
|
38 { |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Factory method, leave the object in cleanupstack. |
|
43 * @since S60 v3.2 |
|
44 */ |
|
45 static CLocoDaemon* NewLC(); |
|
46 |
|
47 ~CLocoDaemon(); |
|
48 |
|
49 private: |
|
50 |
|
51 // From CActive |
|
52 |
|
53 void RunL(); |
|
54 |
|
55 void DoCancel(); |
|
56 |
|
57 TInt RunError(TInt aReason); |
|
58 |
|
59 private: |
|
60 |
|
61 CLocoDaemon(); |
|
62 |
|
63 void ConstructL(); |
|
64 |
|
65 /** |
|
66 * Loads the bearer plug ins |
|
67 * @since S60 v3.2 |
|
68 */ |
|
69 void LoadBearesL(); |
|
70 |
|
71 private: // data |
|
72 |
|
73 // the bearer plugins |
|
74 RPointerArray<CLocodBearerPlugin> iBearers; |
|
75 |
|
76 // the service manager |
|
77 CLocodServiceMan* iServiceMan; |
|
78 |
|
79 // for system state monitoring |
|
80 RProperty iSystemPS; |
|
81 TInt iSystemState; |
|
82 }; |
|
83 |
|
84 |
|
85 #endif // T_LOCODAEMON_H |