|
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 since 399 |
|
20 */ |
|
21 |
|
22 #include <comms-infras/es_connectionservparameterbundle.h> |
|
23 #include <comms-infras/cs_connservparams.h> |
|
24 #include <comms-infras/cs_connservparams_internal.h> |
|
25 |
|
26 #ifdef _DEBUG |
|
27 #include <comms-infras/es_connectionservparameterbundletrace.h> |
|
28 #include <comms-infras/es_connectionservparameterbundletraceimpl.h> |
|
29 #endif |
|
30 |
|
31 using namespace ConnectionServ; |
|
32 using namespace Meta; |
|
33 |
|
34 |
|
35 EXPORT_START_ATTRIBUTE_TABLE_NO_FN(XConnectionServParameterSet, KConnectionServParameterSetTypeUid, Meta::KNetMetaTypeAny) |
|
36 END_ATTRIBUTE_TABLE_BASE( XParameterSet, 0 ) |
|
37 |
|
38 EXPORT_C /*virtual*/ XConnectionServParameterSet::~XConnectionServParameterSet() |
|
39 { |
|
40 } |
|
41 |
|
42 EXPORT_C /*virtual*/ void XConnectionServParameterSet::CopyFieldsRequiredByQueryFromL( |
|
43 const CParameterBundleBase& aQuery,const XConnectionServParameterSet& aSource) |
|
44 { |
|
45 (void)aQuery; |
|
46 Copy(aSource); |
|
47 } |
|
48 |
|
49 // Connection Server Parameter Bundle Implementation |
|
50 |
|
51 EXPORT_C XAccessPointGenericQuery* CConnectionServParameterBundle::FindOrCreateGenericQueryL() |
|
52 { |
|
53 CConnectionServParameterSetContainer* parSetCtr = GetParamSetContainer(0); |
|
54 XAccessPointGenericQuery* querySet = 0; |
|
55 if(!parSetCtr) |
|
56 { |
|
57 parSetCtr = CConnectionServParameterSetContainer::NewL(*this, 0 /*no id needed*/); |
|
58 } |
|
59 else |
|
60 { |
|
61 querySet = XAccessPointGenericQuery::FindInParamSetContainer(*parSetCtr); |
|
62 } |
|
63 |
|
64 if(!querySet) |
|
65 { |
|
66 querySet = XAccessPointGenericQuery::NewL(*parSetCtr); |
|
67 } |
|
68 |
|
69 return querySet; |
|
70 } |
|
71 |
|
72 EXPORT_C void CConnectionServParameterBundle::AddMatchConditionL(const TAccessPointInfo& aApInfo) |
|
73 { |
|
74 XAccessPointGenericQuery* querySet = FindOrCreateGenericQueryL(); |
|
75 querySet->AddAccessPointToMatchL(aApInfo); |
|
76 } |
|
77 |
|
78 EXPORT_C void CConnectionServParameterBundle::AddMatchConditionL(const TAccessPointStatusFilter& aApStatusFilter) |
|
79 { |
|
80 XAccessPointGenericQuery* querySet = FindOrCreateGenericQueryL(); |
|
81 querySet->AccessPointStatusFilter(aApStatusFilter); |
|
82 } |
|
83 |
|
84 EXPORT_C void CConnectionServParameterBundle::AddParameterSetToReturnL(const STypeId& aTypeId) |
|
85 { |
|
86 XAccessPointGenericQuery* querySet = FindOrCreateGenericQueryL(); |
|
87 querySet->AddParameterSetTypeToReturnL(aTypeId); |
|
88 } |
|
89 |
|
90 EXPORT_C const RArray<Meta::STypeId>& CConnectionServParameterBundle::GetParameterSetsToReturnL() const |
|
91 { |
|
92 const XAccessPointGenericQuery* querySet = const_cast<CConnectionServParameterBundle*>(this)->FindOrCreateGenericQueryL(); |
|
93 return querySet->GetParameterSetTypesToReturn(); |
|
94 } |
|
95 |
|
96 |
|
97 EXPORT_C const XAccessPointGenericQuery* CConnectionServParameterBundle::FindGenericQuery() const |
|
98 { |
|
99 /*const*/ CConnectionServParameterSetContainer* parSetCtr = const_cast<CConnectionServParameterBundle*>(this)->GetParamSetContainer(0); |
|
100 if(parSetCtr) |
|
101 { |
|
102 return XAccessPointGenericQuery::FindInParamSetContainer(*parSetCtr); |
|
103 } |
|
104 return 0; |
|
105 } |
|
106 |
|
107 |