|
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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef __ES_CONNSERVPARAMETERBUNDLE_H |
|
23 #define __ES_CONNSERVPARAMETERBUNDLE_H |
|
24 |
|
25 #include <comms-infras/es_parameterbundle.h> |
|
26 |
|
27 class TAccessPointInfo; |
|
28 |
|
29 namespace ConnectionServ |
|
30 { |
|
31 |
|
32 class XAccessPointGenericParameterSet; |
|
33 class XAccessPointGenericQuery; |
|
34 struct TAccessPointStatusFilter; |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 const TInt KConnectionServParameterSetTypeUid = 0x10272F45; |
|
40 |
|
41 class XConnectionServParameterSet : public XParameterSet |
|
42 { |
|
43 public: |
|
44 IMPORT_C virtual ~XConnectionServParameterSet(); |
|
45 |
|
46 // This decides which fields in the source parameter set are |
|
47 // requested/allowed by the given query, and copies them to this set |
|
48 // |
|
49 // The base implementation ignores the query and just performs a binary copy. |
|
50 IMPORT_C virtual void CopyFieldsRequiredByQueryFromL( |
|
51 const CParameterBundleBase& aQuery,const XConnectionServParameterSet& aSource); |
|
52 |
|
53 EXPORT_TYPEID_TABLE |
|
54 }; |
|
55 |
|
56 class CConnectionServParameterBundle; |
|
57 |
|
58 |
|
59 typedef class CParameterSetContainer CConnectionServParameterSetContainer; |
|
60 |
|
61 class CConnectionServParameterBundle : public CParameterBundle<CConnectionServParameterSetContainer,CConnectionServParameterBundle> |
|
62 { |
|
63 public: |
|
64 |
|
65 // to help in populating the query bundle: |
|
66 |
|
67 IMPORT_C XAccessPointGenericQuery* FindOrCreateGenericQueryL(); |
|
68 |
|
69 // Adds the specified TAccessPointInfo filter to this query bundle |
|
70 // (- constructs a default query ParameterSetContainer (if needed), |
|
71 // - constructs a XAccessPointGenericQuery under it (if needed), |
|
72 // - then sets its TAccessPointInfo filter) |
|
73 IMPORT_C void AddMatchConditionL(const TAccessPointInfo& aApInfo); |
|
74 |
|
75 // Adds the specified TAccessPointStatusFilter filter to this query bundle |
|
76 // (- constructs a default query ParameterSetContainer (if needed), |
|
77 // - constructs a XAccessPointGenericQuery under it (if needed), |
|
78 // - then sets its TAccessPointStatusFilter filter) |
|
79 IMPORT_C void AddMatchConditionL(const TAccessPointStatusFilter& aApStatusFilter); |
|
80 |
|
81 // Adds the specified (parameter set type to return) to this query bundle. |
|
82 // This is an array of type Ids which we are asking to be returned by the |
|
83 // query. The comms server uses this to decide which information it needs to |
|
84 // retrieve. |
|
85 // (- constructs a default query ParameterSetContainer (if needed), |
|
86 // - constructs a XAccessPointGenericQuery under it (if needed), |
|
87 // - then adds the specified type to its iParameterSetTypesToReturn array) |
|
88 IMPORT_C void AddParameterSetToReturnL(const Meta::STypeId& aTypeId); |
|
89 |
|
90 |
|
91 // to help in reading the query bundle: |
|
92 |
|
93 // Retrieves (parameter set types to return) array. |
|
94 // (- finds default query ParameterSetContainer, |
|
95 // - finds XAccessPointGenericQuery under it, |
|
96 // - returns its iParameterSetTypesToReturn array) |
|
97 IMPORT_C const RArray<Meta::STypeId>& GetParameterSetsToReturnL() const; |
|
98 |
|
99 // Finds the XAccessPointGenericQuery in this query bundle |
|
100 // (- finds default query ParameterSetContainer, |
|
101 // - returns any XAccessPointGenericQuery found under it) |
|
102 IMPORT_C const XAccessPointGenericQuery* FindGenericQuery() const; |
|
103 }; |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 } // namespace ConnectionServ |
|
110 |
|
111 #endif |
|
112 // __ES_CONNSERVPARAMETERBUNDLE_H |
|
113 |