|
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 // SIP Tier Manager selector class. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #ifndef SYMBIAN_SIP_TIER_MANAGER_SELECTOR_H |
|
24 #define SYMBIAN_SIP_TIER_MANAGER_SELECTOR_H |
|
25 |
|
26 #include <comms-infras/ss_tiermanager.h> |
|
27 #include <comms-infras/ss_connselect.h> |
|
28 #include <comms-infras/ss_platsec_apiext.h> |
|
29 #include "siptiermanager.h" |
|
30 #include "sipmcpr.h" |
|
31 #include "sipmcprfactory.h" |
|
32 #include <comms-infras/ss_metaconnprov.h> //for XMetaConnectionFactoryQuesry |
|
33 #include <comms-infras/ss_mcprnodemessages.h> |
|
34 #include <comms-infras/ss_metaconnprov_internal.h> |
|
35 |
|
36 #include "sipprovisioninfo.h" |
|
37 |
|
38 namespace CommsDat |
|
39 { |
|
40 class CMDBSession; |
|
41 class CCDTierRecord; |
|
42 } |
|
43 |
|
44 using namespace ESock; |
|
45 |
|
46 // |
|
47 //CSipProviderSelector |
|
48 class CSipMetaCprSelector : public CBase, public ESock::MProviderSelector |
|
49 /** |
|
50 SIP connection selector. |
|
51 Selector object for the SIP layer. |
|
52 |
|
53 @internalComponent |
|
54 @prototype |
|
55 */ |
|
56 { |
|
57 public: |
|
58 static ESock::MProviderSelector* NewL(const Meta::SMetaData& aSelectionPreferences); |
|
59 void SetTierManager(CSipTierManager* aTierManager); |
|
60 void SetMcpr(CMetaConnectionProviderBase &aMcpr); |
|
61 |
|
62 protected: |
|
63 explicit CSipMetaCprSelector(); |
|
64 virtual ~CSipMetaCprSelector(); |
|
65 virtual void SelectL(ESock::ISelectionNotify& aSelectionNotify); |
|
66 ESock::CMetaConnectionProviderBase* FindOrCreateProviderL(TUint aAccessPoint, TUint32 aProfileId, TUid aAppUid); |
|
67 void ConstructL(const Meta::SMetaData& aSelectionPreferences); |
|
68 virtual void Cancel(); |
|
69 |
|
70 protected: |
|
71 ESock::TSelectionPrefs iSelectionPrefs; |
|
72 CommsDat::CMDBSession* iDbs; |
|
73 ESock::CMetaConnectionFactoryContainer& iMetaContainer; |
|
74 CSipTierManager* iTierManager; |
|
75 CommsDat::CCDTierRecord* iTierRecord; |
|
76 |
|
77 private : |
|
78 TSipMcprProvisionInfo* iProvisionInfo; |
|
79 }; |
|
80 |
|
81 |
|
82 |
|
83 class XSIPFindTheSamePrefsCPRQuery : public TMetaConnectionFactoryQuery |
|
84 /**A query that finds the first SIPCPR created against both |
|
85 the same application UID and the same profile. |
|
86 |
|
87 @internalComponent |
|
88 */ |
|
89 { |
|
90 public: |
|
91 XSIPFindTheSamePrefsCPRQuery(TUid aAppUid, TUint32 aProfileId, TProviderInfo aProviderInfo, TUid aTierImplUid) |
|
92 : TMetaConnectionFactoryQuery(aProviderInfo,aTierImplUid), |
|
93 iAppUid( aAppUid ), |
|
94 iProfileId( aProfileId ) |
|
95 { |
|
96 } |
|
97 |
|
98 protected: |
|
99 TUid iAppUid; |
|
100 TUint32 iProfileId; |
|
101 |
|
102 |
|
103 public: |
|
104 virtual TMatchResult Match( Factories::TFactoryObjectInfo& aConnectionInfo ); |
|
105 }; |
|
106 |
|
107 |
|
108 #endif //SYMBIAN_SIP_TIER_MANAGER_SELECTOR_H |