|
1 /** |
|
2 * Copyright (c) 2003-2009 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: |
|
15 * Declares network layer configuration classes supported by NIFMAN |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 |
|
22 /** |
|
23 @file NIFConfigurationControl.h |
|
24 @internalComponent |
|
25 */ |
|
26 |
|
27 #if !defined (__NIFCONFIGURATIONCONTROL_H__) |
|
28 #define __NIFCONFIGURATIONCONTROL_H__ |
|
29 |
|
30 #include <e32base.h> |
|
31 #include <ecom/ecom.h> |
|
32 #include <comms-infras/nifprvar.h> |
|
33 |
|
34 #include <comms-infras/rconfigdaemonmess.h> |
|
35 |
|
36 class MNifIfNotify; |
|
37 /** |
|
38 An abstract base for NIFMAN configuration controls covering the concrete implementation as to |
|
39 how to configure network layer |
|
40 @internalComponent |
|
41 @version 0.03 |
|
42 @date 26/05/2004 |
|
43 **/ |
|
44 class CNifConfigurationControl : public CActive |
|
45 { |
|
46 protected: |
|
47 CNifConfigurationControl(MNifIfNotify& aNifIfNotify); |
|
48 |
|
49 public: |
|
50 static CNifConfigurationControl* NewL(MNifIfNotify& aNifIfNotify); |
|
51 |
|
52 /** |
|
53 ConfigureNetworkL - called when NIFMAN wants to start network configuration process |
|
54 @internalComponent |
|
55 @version 0.01 |
|
56 **/ |
|
57 virtual void ConfigureNetworkL() = 0; |
|
58 |
|
59 /** |
|
60 LinkLayerDown - used to inform the daemon that link layer renegotiation has started. |
|
61 @internalComponent |
|
62 @version 0.01 |
|
63 **/ |
|
64 virtual void LinkLayerDown() = 0; |
|
65 |
|
66 /** |
|
67 LinkLayerUp - used to inform the daemon that link layer renegotiation has completed. |
|
68 @internalComponent |
|
69 @version 0.01 |
|
70 **/ |
|
71 virtual void LinkLayerUp() = 0; |
|
72 |
|
73 /** |
|
74 Deregister - called when NIFMAN needs to deregister/unconfigure the network |
|
75 @internalComponent |
|
76 **/ |
|
77 virtual void Deregister(TInt aCause) = 0; |
|
78 |
|
79 virtual void SendIoctlMessageL(const RMessage2& aMessage) = 0; |
|
80 |
|
81 virtual void CancelControl() = 0; |
|
82 |
|
83 virtual void AsyncDelete() = 0; |
|
84 |
|
85 /** |
|
86 Notification - used to inform the daemon of notification events. |
|
87 @internalComponent |
|
88 @version 0.01 |
|
89 **/ |
|
90 virtual void EventNotification(TNetworkAdaptorEventType aEventType, TUint aEvent, const TDesC8& aEventData, TAny* aSource) = 0; |
|
91 |
|
92 protected: |
|
93 /** |
|
94 iNifIfNotify - to access comm database and notify NIFMAN. |
|
95 Note that this is a pointer to allow it to be zeroed when detaching from |
|
96 NIFMAN (during asynchronous destruction) to avoid a dangling pointer. |
|
97 @internalComponent |
|
98 @version 0.01 |
|
99 **/ |
|
100 MNifIfNotify* iNifIfNotify; |
|
101 }; |
|
102 |
|
103 inline CNifConfigurationControl::CNifConfigurationControl(MNifIfNotify& aNifIfNotify) : |
|
104 CActive(EPriorityStandard), |
|
105 iNifIfNotify(&aNifIfNotify) |
|
106 /** |
|
107 CNifConfigurationControl - constructor |
|
108 @param aNifIfNotify - client of the control |
|
109 @internalComponent |
|
110 @version 0.01 |
|
111 **/ |
|
112 { |
|
113 } |
|
114 |
|
115 /** |
|
116 NIF configuration interface to be able create plug-ins using ECOM |
|
117 @internalComponent |
|
118 @version 0.01 |
|
119 @date 12/08/2003 |
|
120 **/ |
|
121 class CNifConfigurationIf : public CNifConfigurationControl |
|
122 { |
|
123 friend class CNifConfigurationControl; //to access iDtor_ID_Key from ::NewL |
|
124 |
|
125 public: |
|
126 CNifConfigurationIf(MNifIfNotify& aNifIfNotify); |
|
127 |
|
128 protected: |
|
129 virtual ~CNifConfigurationIf(); |
|
130 |
|
131 private: |
|
132 // Instance identifier key |
|
133 TUid iDtor_ID_Key; |
|
134 }; |
|
135 |
|
136 inline CNifConfigurationIf::CNifConfigurationIf(MNifIfNotify& aNifIfNotify) : |
|
137 CNifConfigurationControl(aNifIfNotify) |
|
138 /** |
|
139 CNifConfigurationIf - constructor |
|
140 @param aNifIfNotify - client of the control |
|
141 @internalComponent |
|
142 @version 0.01 |
|
143 **/ |
|
144 { |
|
145 } |
|
146 |
|
147 //keep the destructor inline even though it's virtual so that |
|
148 //the plug-in doesn't have to link against us |
|
149 inline CNifConfigurationIf::~CNifConfigurationIf() |
|
150 { |
|
151 REComSession::DestroyedImplementation(iDtor_ID_Key); |
|
152 } |
|
153 |
|
154 #endif |
|
155 |
|
156 |