|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file ipeventnotifierinterface.h |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef __CIPEVENTNOTIFIERINTERFACE_H__ |
|
23 #define __CIPEVENTNOTIFIERINTERFACE_H__ |
|
24 |
|
25 |
|
26 using namespace IPEvent; |
|
27 |
|
28 class IPEvent::CMFlagReceived; |
|
29 class IPEvent::CIPReady; |
|
30 class IPEvent::CLinklocalAddressKnown; |
|
31 |
|
32 class CIPEventNotifierInterface : public CBase |
|
33 { |
|
34 public: |
|
35 CIPEventNotifierInterface(TUint32 aIndex, const TDesC& aName) : |
|
36 iInterfaceIndex(aIndex), |
|
37 iInterfaceName(aName), |
|
38 iRefCount(0) |
|
39 {} |
|
40 |
|
41 inline TUint32 GetInterfaceIndex(void) const {return iInterfaceIndex;} |
|
42 inline TName GetInterfaceName(void) const {return iInterfaceName;} |
|
43 |
|
44 inline TInt GetRefCount(void) const {return iRefCount;} |
|
45 |
|
46 inline void IncreaseRefCount(void) { ++iRefCount; } |
|
47 inline void DecreaseRefCount(void) { --iRefCount; } |
|
48 |
|
49 inline ~CIPEventNotifierInterface() |
|
50 { |
|
51 if(iMFlagReceived) delete iMFlagReceived; |
|
52 if(iIPReady) delete iIPReady; |
|
53 if(iLinklocalAddressKnown) delete iLinklocalAddressKnown; |
|
54 } |
|
55 |
|
56 public: |
|
57 |
|
58 // Pointers to the last received instance of each event message class. So they're only constructed once |
|
59 CMFlagReceived* iMFlagReceived; |
|
60 CIPReady* iIPReady; |
|
61 CLinklocalAddressKnown* iLinklocalAddressKnown; |
|
62 |
|
63 private: |
|
64 TUint32 iInterfaceIndex; |
|
65 TName iInterfaceName; |
|
66 |
|
67 TInt iRefCount; |
|
68 |
|
69 }; |
|
70 |
|
71 |
|
72 #endif // __CIPEVENTNOTIFIERINTERFACE_H__ |
|
73 |
|
74 |
|
75 |