|
1 /* |
|
2 * Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 |
|
21 #include "sip.h" |
|
22 #include "sipconnection.h" |
|
23 #include "sipprofileregistry.h" |
|
24 #include "sipmanagedprofileregistry.h" |
|
25 #include "sipprofileregistryobserver.h" |
|
26 #include "sipprofile.h" |
|
27 #include "sipmanagedprofile.h" |
|
28 //#include "sipconcreteprofile.h" |
|
29 |
|
30 // ============================ MEMBER FUNCTIONS =============================== |
|
31 EXPORT_C void CSIPManagedProfileRegistry::SaveL(CSIPProfile& /*aSIPProfile*/) |
|
32 { |
|
33 |
|
34 } |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // CSIPManagedProfileRegistry::NewL |
|
38 // Two-phased constructor. |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 EXPORT_C CSIPManagedProfileRegistry* CSIPManagedProfileRegistry::NewL( |
|
42 MSIPProfileRegistryObserver& aObserver) |
|
43 { |
|
44 CSIPManagedProfileRegistry* self = CSIPManagedProfileRegistry::NewLC(aObserver); |
|
45 CleanupStack::Pop(self); |
|
46 return self; |
|
47 } |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CSIPManagedProfileRegistry::NewLC |
|
51 // Two-phased constructor. |
|
52 // ----------------------------------------------------------------------------- |
|
53 // |
|
54 EXPORT_C CSIPManagedProfileRegistry* CSIPManagedProfileRegistry::NewLC( |
|
55 MSIPProfileRegistryObserver& aObserver) |
|
56 { |
|
57 CSIPManagedProfileRegistry* self = new (ELeave) CSIPManagedProfileRegistry(aObserver); |
|
58 CleanupStack::PushL(self); |
|
59 self->ConstructL(); |
|
60 return self; |
|
61 } |
|
62 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // CSIPManagedProfileRegistry::~CSIPManagedProfileRegistry |
|
65 // ----------------------------------------------------------------------------- |
|
66 // |
|
67 EXPORT_C CSIPManagedProfileRegistry::~CSIPManagedProfileRegistry() |
|
68 { |
|
69 |
|
70 } |
|
71 /* |
|
72 // ----------------------------------------------------------------------------- |
|
73 // CSIPManagedProfileRegistry::EnableL |
|
74 // ----------------------------------------------------------------------------- |
|
75 // |
|
76 EXPORT_C void CSIPManagedProfileRegistry::EnableL(CSIPProfile& aSIPProfile, |
|
77 MSIPConnectionObserver& aObserver) |
|
78 { |
|
79 //__ASSERT_ALWAYS (!aSIPProfile.IsEnabled(), User::Leave (KErrArgument)); |
|
80 //aSIPProfile.ConcreteProfile().SetLastRegistrationError(KErrNone); |
|
81 //iConnectionObserver = &aObserver; |
|
82 |
|
83 //EnableProfileL(aSIPProfile); |
|
84 } |
|
85 |
|
86 // ----------------------------------------------------------------------------- |
|
87 // CSIPManagedProfileRegistry::Disable |
|
88 // ----------------------------------------------------------------------------- |
|
89 // |
|
90 EXPORT_C TInt CSIPManagedProfileRegistry::Disable(CSIPProfile& /*aProfile) |
|
91 { |
|
92 TInt err = KErrNone; |
|
93 //aProfile.ConcreteProfile().SetLastRegistrationError(KErrNone); |
|
94 //TRAPD(err, DisableProfileL(aProfile)); |
|
95 return err; |
|
96 } |
|
97 |
|
98 // ----------------------------------------------------------------------------- |
|
99 // CSIPManagedProfileRegistry::SIP |
|
100 // ----------------------------------------------------------------------------- |
|
101 // |
|
102 EXPORT_C CSIP& CSIPManagedProfileRegistry::SIP() const |
|
103 { |
|
104 return iSip; |
|
105 } |
|
106 |
|
107 // ----------------------------------------------------------------------------- |
|
108 // CSIPManagedProfileRegistry::ConnectionL |
|
109 // ----------------------------------------------------------------------------- |
|
110 // |
|
111 //EXPORT_C CSIPConnection* CSIPManagedProfileRegistry::ConnectionL( |
|
112 // /*CSIPProfile& aSIPProfile) |
|
113 // { |
|
114 //TUint32 apId(0); |
|
115 //__ASSERT_ALWAYS (iConnectionObserver != 0, User::Leave (KErrArgument)); |
|
116 //aSIPProfile.GetParameter(KSIPAccessPointId, apId); |
|
117 //CSIPConnection* connection = iSip.Connection(apId); |
|
118 //if (connection == 0) |
|
119 // { |
|
120 // connection = CSIPConnection::NewL(iSip, apId, |
|
121 // *iConnectionObserver); |
|
122 // } |
|
123 //return connection; |
|
124 // } |
|
125 |
|
126 // ----------------------------------------------------------------------------- |
|
127 // CSIPManagedProfileRegistry::IsEnabled |
|
128 // ----------------------------------------------------------------------------- |
|
129 // |
|
130 EXPORT_C TBool CSIPManagedProfileRegistry::IsEnabled(const CSIPProfile& /*aSIPProfile) const |
|
131 { |
|
132 //return aSIPProfile.IsEnabled(); |
|
133 return ETrue; |
|
134 } |
|
135 */ |
|
136 // ----------------------------------------------------------------------------- |
|
137 // CSIPManagedProfileRegistry::CSIPManagedProfileRegistry |
|
138 // ----------------------------------------------------------------------------- |
|
139 // |
|
140 CSIPManagedProfileRegistry::CSIPManagedProfileRegistry( |
|
141 MSIPProfileRegistryObserver& aObserver) |
|
142 : CSIPProfileRegistryBase( aObserver ) |
|
143 { |
|
144 } |
|
145 |
|
146 // ----------------------------------------------------------------------------- |
|
147 // CSIPManagedProfileRegistry::ConstructL |
|
148 // ----------------------------------------------------------------------------- |
|
149 // |
|
150 void CSIPManagedProfileRegistry::ConstructL() |
|
151 { |
|
152 // BaseConstructL(); |
|
153 |
|
154 } |
|
155 |
|
156 // ----------------------------------------------------------------------------- |
|
157 // CSIPManagedProfileRegistry::NewInstanceL |
|
158 // ----------------------------------------------------------------------------- |
|
159 // |
|
160 CSIPProfile* CSIPManagedProfileRegistry::NewInstanceL() |
|
161 { |
|
162 return CSIPManagedProfile::NewL(this); |
|
163 } |
|
164 |