|
1 // Copyright (c) 2007-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 |
|
18 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef SYMBIAN_INTERFACETABLE_H |
|
23 #define SYMBIAN_INTERFACETABLE_H |
|
24 |
|
25 #include <elements/interfacetable_internal.h> |
|
26 |
|
27 /** |
|
28 Helper macros. |
|
29 Not intended to be used directly but only via helper macros (like IMPLEMENTERBASE_x) defined below. |
|
30 |
|
31 @publishedPartner |
|
32 @released |
|
33 */ |
|
34 |
|
35 #define ITFHIERARCHY_1(TCLIENT,TIF1) NetInterfaces::TIfStaticFetcher<NetInterfaces::TIfStaticFetcherFirstInHierarchy<NetInterfaces::TInterfaceControl>,TCLIENT,TIF1> |
|
36 #define ITFHIERARCHY_2(TCLIENT,TIF1,TIF2) NetInterfaces::TIfStaticFetcher<ITFHIERARCHY_1(TCLIENT,TIF1),TCLIENT,TIF2> |
|
37 #define ITFHIERARCHY_3(TCLIENT,TIF1,TIF2,TIF3) NetInterfaces::TIfStaticFetcher<ITFHIERARCHY_2(TCLIENT,TIF1,TIF2),TCLIENT,TIF3> |
|
38 #define ITFHIERARCHY_4(TCLIENT,TIF1,TIF2,TIF3,TIF4) NetInterfaces::TIfStaticFetcher<ITFHIERARCHY_3(TCLIENT,TIF1,TIF2,TIF3),TCLIENT,TIF4> |
|
39 //and so on if needed at all |
|
40 |
|
41 #define ITFHIERARCHY_LINK_1(TCLIENT,TLINK,TIF1) NetInterfaces::TIfStaticFetcherLinkBase<TLINK::TIfStaticFetcherNearestInHierarchy,TCLIENT,TIF1> |
|
42 #define ITFHIERARCHY_LINK_2(TCLIENT,TLINK,TIF1,TIF2) NetInterfaces::TIfStaticFetcher<ITFHIERARCHY_LINK_1(TCLIENT,TLINK,TIF1),TCLIENT,TIF2> |
|
43 #define ITFHIERARCHY_LINK_3(TCLIENT,TLINK,TIF1,TIF2,TIF3) NetInterfaces::TIfStaticFetcher<ITFHIERARCHY_LINK_2(TCLIENT,TLINK,TIF1,TIF2),TCLIENT,TIF3> |
|
44 #define ITFHIERARCHY_LINK_4(TCLIENT,TLINK,TIF1,TIF2,TIF3,TIF4) NetInterfaces::TIfStaticFetcher<ITFHIERARCHY_LINK_3(TCLIENT,TLINK,TIF1,TIF2,TIF3),TCLIENT,TIF4> |
|
45 #define ITFHIERARCHY_LINK_5(TCLIENT,TLINK,TIF1,TIF2,TIF3,TIF4,TIF5) NetInterfaces::TIfStaticFetcher<ITFHIERARCHY_LINK_4(TCLIENT,TLINK,TIF1,TIF2,TIF3,TIF4),TCLIENT,TIF5> |
|
46 |
|
47 //and so on if needed at all |
|
48 |
|
49 |
|
50 /** |
|
51 Helper macros usage example. |
|
52 |
|
53 Used by the implementer. An example usage has been ilustrated below: |
|
54 |
|
55 NONSHARABLE_CLASS(CIPNetworkConnectionProvider) : public CConnectionProviderBase, public MConnectionControlClient, public AMobilityProtocolReq, public AAvailabilityProtocolReq, |
|
56 ITFHIERARCHY_2(CIPNetworkConnectionProvider,MMobilityProtocolReq,MAvailabilityProtocolReq) |
|
57 { |
|
58 public: |
|
59 typedef ITFHIERARCHY_2(CIPNetworkConnectionProvider,MMobilityProtocolReq,MAvailabilityProtocolReq) TIfStaticFetcherNearestInHierarchy; |
|
60 |
|
61 protected: |
|
62 CIPNetworkConnectionProvider(CConnectionProviderFactoryBase& aFactory) : |
|
63 CConnectionProviderBase(aFactory), |
|
64 TIfStaticFetcherNearestInHierarchy(this) |
|
65 { |
|
66 } |
|
67 ... |
|
68 public: |
|
69 void ReturnInterfacePtrL(MMobilityProtocolReq*& aInterface); |
|
70 void ReturnInterfacePtrL(MAvailabilityProtocolReq*& aInterface); |
|
71 ... |
|
72 }; |
|
73 */ |
|
74 |
|
75 #endif |
|
76 //SYMBIAN_INTERFACETABLE_H |
|
77 |
|
78 |
|
79 |