|
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: This is the LCD Service Plugin base class declaration. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_LOCODSERVICEPLUGIN_H |
|
20 #define C_LOCODSERVICEPLUGIN_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "locodservicepluginparams.h" |
|
25 #include "locodbearer.h" |
|
26 |
|
27 /** |
|
28 * Service Plugin base class |
|
29 * |
|
30 * This is the base class from which service plugins inherit. |
|
31 * |
|
32 * When a service plugin is constructed, it should not start any service by default. |
|
33 * A service is started on demand when the bearer is available. |
|
34 * |
|
35 * @euser.lib |
|
36 * @since S60 v3.2 |
|
37 */ |
|
38 class CLocodServicePlugin : public CBase |
|
39 { |
|
40 public: |
|
41 |
|
42 static CLocodServicePlugin* NewL(TLocodServicePluginParams& aParams); |
|
43 |
|
44 virtual ~CLocodServicePlugin(); |
|
45 |
|
46 /** |
|
47 * Tell service plugin which service should be enabled or disabled according to |
|
48 * specified bearer and its status. |
|
49 * |
|
50 * On completion, the plugin should call |
|
51 * MLocodServicePluginObserver::ManageServiceCompleted() to inform the result. |
|
52 * |
|
53 * @since S60 v3.2 |
|
54 * @param aBearer the bearer identification |
|
55 * @param aStatus the status of this bearer, ETrue if it is available; |
|
56 * EFalse otherwise. |
|
57 */ |
|
58 virtual void ManageService(TLocodBearer aBearer, TBool aStatus) = 0; |
|
59 |
|
60 TUid ImplementationUid() const; |
|
61 |
|
62 protected: |
|
63 |
|
64 CLocodServicePlugin(TLocodServicePluginParams& aParams); |
|
65 |
|
66 /** |
|
67 * Gets the observer interface object associated with this plugin |
|
68 * |
|
69 * @since S60 v3.2 |
|
70 * @return The observer object |
|
71 */ |
|
72 MLocodServicePluginObserver& Observer() const; |
|
73 |
|
74 private: // data |
|
75 |
|
76 /** |
|
77 * UID set by ECOM when the instance is created. Used when the instance |
|
78 * is destroyed. |
|
79 */ |
|
80 TUid iInstanceUid; |
|
81 |
|
82 /** |
|
83 * Implementation UID of the concrete instance. |
|
84 */ |
|
85 const TUid iImplementationUid; |
|
86 |
|
87 /** |
|
88 * Holds the observer object which will be notified when the operations |
|
89 * complete |
|
90 * Not own. |
|
91 */ |
|
92 MLocodServicePluginObserver& iObserver; |
|
93 |
|
94 }; |
|
95 |
|
96 #include <locodserviceplugin.inl> |
|
97 |
|
98 #endif // C_LOCODSERVICEPLUGIN_H |