|
1 // Copyright (c) 2006-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 // Generic connection server parameter sets - plugin for Connection Server Parameter Bundle |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @publishedPartner |
|
21 @released |
|
22 */ |
|
23 |
|
24 #ifndef __CS_CONNSERVPARAMS_H__ |
|
25 #define __CS_CONNSERVPARAMS_H__ |
|
26 |
|
27 #include <e32base.h> |
|
28 #include <e32std.h> |
|
29 #include <comms-infras/metadata.h> |
|
30 #include <comms-infras/metatype.h> |
|
31 |
|
32 #include <es_sock.h> |
|
33 |
|
34 #include <comms-infras/es_parameterbundle.h> |
|
35 #include <comms-infras/es_connectionservparameterbundle.h> |
|
36 #include <comms-infras/es_accesspointstatus.h> |
|
37 |
|
38 #include <comms-infras/ss_common.h> |
|
39 |
|
40 const TInt32 KConnectionServGenericParamImplUid = 0x10272F3E; |
|
41 const TInt32 KAccessPointGenericParameterSetType = 1; |
|
42 const TInt32 KAccessPointGenericQueryType = 2; |
|
43 //const TInt32 Assigned in cs_connservparams_internal.h = 3; |
|
44 //const TInt32 Assigned in cs_connservparams_internal.h = 4; |
|
45 //const TInt32 Assigned in cs_connservparams_internal.h = 5; |
|
46 //const TInt32 Assigned in cs_connservparams_internal.h = 6; |
|
47 //const TInt32 Assigned in cs_connservparams_internal.h = 7; |
|
48 |
|
49 |
|
50 namespace ConnectionServ |
|
51 { |
|
52 |
|
53 class XAccessPointGenericParameterSet : public XConnectionServParameterSet, |
|
54 public MParameterSetTemplateMethods<CConnectionServParameterSetContainer,XAccessPointGenericParameterSet, |
|
55 KConnectionServGenericParamImplUid, KAccessPointGenericParameterSetType> |
|
56 /** Access Point generic parameter set. |
|
57 |
|
58 This class contains generic Access Point properties i.e, independent of any technology and provides the interface to access them. |
|
59 |
|
60 @note SMetaDataECom must be the first in the superclasses' list |
|
61 @publishedPartner |
|
62 @released |
|
63 */ |
|
64 { |
|
65 public: |
|
66 inline XAccessPointGenericParameterSet(): iApInfo(),iApStatus() {} |
|
67 |
|
68 // getters |
|
69 inline const TAccessPointInfo& AccessPointInfo() const {return iApInfo;} |
|
70 inline const TAccessPointStatus& AccessPointStatus() const {return iApStatus;} |
|
71 |
|
72 // setters |
|
73 inline void AccessPointInfo(const TAccessPointInfo& aApInfo) {iApInfo=aApInfo;} |
|
74 inline void AccessPointStatus(const TAccessPointStatus& aApStatus) {iApStatus=aApStatus;} |
|
75 |
|
76 // extra intelligence. This is required because many different collectors may |
|
77 // return an instance of this class and we'll need to merge instances together. |
|
78 virtual void UpdateWithL(const XParameterSet& aRhsBase); |
|
79 virtual void CopyFieldsRequiredByQueryFromL( |
|
80 const CParameterBundleBase& aQuery,const XConnectionServParameterSet& aSource); |
|
81 // polymorphic logging |
|
82 virtual TInt AppendPrintableTo(TDes& aDestination) const; |
|
83 |
|
84 DATA_VTABLE |
|
85 |
|
86 protected: |
|
87 |
|
88 TAccessPointInfo iApInfo; |
|
89 TAccessPointStatus iApStatus; |
|
90 |
|
91 }; |
|
92 |
|
93 class XAccessPointGenericQuery : public XConnectionServParameterSet, |
|
94 public MParameterSetTemplateMethods<CConnectionServParameterSetContainer,XAccessPointGenericQuery, |
|
95 KConnectionServGenericParamImplUid, KAccessPointGenericQueryType> |
|
96 /** Access Point generic query. |
|
97 |
|
98 This class represents a query of the attributes of XAccessPointGenericParameterSet |
|
99 |
|
100 @note SMetaDataECom must be the first in the superclasses' list |
|
101 @publishedPartner |
|
102 @released |
|
103 */ |
|
104 { |
|
105 public: |
|
106 inline XAccessPointGenericQuery(): iApStatusFilter() {} |
|
107 virtual ~XAccessPointGenericQuery(); // due to having an array |
|
108 |
|
109 // getters |
|
110 inline const RArray<TAccessPointInfo>& AccessPointsToMatch() const |
|
111 {return iApsToMatch;} |
|
112 inline const TAccessPointStatusFilter& AccessPointStatusFilter() const {return iApStatusFilter;} |
|
113 inline const RArray<STypeId>& GetParameterSetTypesToReturn() const |
|
114 {return iParameterSetTypesToReturn;} |
|
115 virtual TBool ShouldReturnType(const STypeId& aTypeId) const; |
|
116 |
|
117 // setters |
|
118 inline void AddAccessPointToMatchL(const TAccessPointInfo& aApInfo) |
|
119 {iApsToMatch.AppendL(aApInfo);} |
|
120 inline void AccessPointStatusFilter(const TAccessPointStatusFilter &aApStatusFilter) {iApStatusFilter=aApStatusFilter;} |
|
121 inline void AddParameterSetTypeToReturnL(const STypeId& aTypeId) |
|
122 {iParameterSetTypesToReturn.AppendL(aTypeId);} |
|
123 |
|
124 // No extra intelligence is required here, because this will only ever be part |
|
125 // of a query and will not be in the result (in particular will not be |
|
126 // coming back from many sources) |
|
127 |
|
128 // polymorphic logging |
|
129 virtual TInt AppendPrintableTo(TDes& aDestination) const; |
|
130 |
|
131 DATA_VTABLE |
|
132 |
|
133 protected: |
|
134 |
|
135 RArray<TAccessPointInfo> iApsToMatch; |
|
136 TAccessPointStatusFilter iApStatusFilter; |
|
137 RArray<STypeId> iParameterSetTypesToReturn; |
|
138 }; |
|
139 |
|
140 |
|
141 |
|
142 class CConnectionServGenericParamsFactory : public CBase |
|
143 /** Factory for the various connection server parameter sets. |
|
144 |
|
145 @internalComponent |
|
146 */ |
|
147 { |
|
148 public: |
|
149 static XConnectionServParameterSet* NewL(TAny* aConstructionParameters); |
|
150 }; |
|
151 |
|
152 |
|
153 } // namespace ConnectionServ |
|
154 |
|
155 //#include <cs_connservparams.inl> |
|
156 #endif // __CS_CONNSERVPARAMS_H__ |
|
157 |