|
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 // Name : sipprofilealrcontroller |
|
15 // Part of : SIP Profile Client |
|
16 // implementation |
|
17 // Version : 1.0 |
|
18 // |
|
19 |
|
20 |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include "sipprofilealrcontroller.h" |
|
24 #include "sipprofilealrobserver.h" |
|
25 #include "sipprofileregistrybase.h" |
|
26 #include "SIPProfileITC.h" |
|
27 #include "SIPProfileITCReceiver.h" |
|
28 |
|
29 |
|
30 // ============================ MEMBER FUNCTIONS =============================== |
|
31 |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CSipProfileAlrController::NewL |
|
34 // Two-phased constructor. |
|
35 // ----------------------------------------------------------------------------- |
|
36 // |
|
37 EXPORT_C CSipProfileAlrController * CSipProfileAlrController::NewL( |
|
38 CSIPProfileRegistryBase& aRegistry, MSipProfileAlrObserver& aObserver ) |
|
39 { |
|
40 CSipProfileAlrController* self = |
|
41 CSipProfileAlrController::NewLC( aRegistry, aObserver ); |
|
42 CleanupStack::Pop ( self ); |
|
43 return self; |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // CSipProfileAlrController::NewLC |
|
48 // Two-phased constructor. |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 EXPORT_C CSipProfileAlrController* CSipProfileAlrController::NewLC( |
|
52 CSIPProfileRegistryBase& aRegistry, MSipProfileAlrObserver& aObserver ) |
|
53 { |
|
54 CSipProfileAlrController* self = |
|
55 new ( ELeave ) CSipProfileAlrController( aRegistry ); |
|
56 CleanupStack::PushL ( self ); |
|
57 self->ConstructL ( aObserver ); |
|
58 return self; |
|
59 } |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // CSipProfileAlrController::CSipProfileAlrController |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 CSipProfileAlrController::CSipProfileAlrController( |
|
66 CSIPProfileRegistryBase& aRegistry ) |
|
67 : iRegistry( aRegistry ) |
|
68 { |
|
69 } |
|
70 |
|
71 // ----------------------------------------------------------------------------- |
|
72 // CSipProfileAlrController::~CSipProfileAlrController |
|
73 // ----------------------------------------------------------------------------- |
|
74 // |
|
75 CSipProfileAlrController::~CSipProfileAlrController() |
|
76 { |
|
77 iRegistry.ItcReceiver().SetALRObserver( NULL ); |
|
78 iRegistry.Itc().RemoveALRObserver(); |
|
79 } |
|
80 |
|
81 |
|
82 // ----------------------------------------------------------------------------- |
|
83 // CSipProfileAlrController::ConstructL |
|
84 // ----------------------------------------------------------------------------- |
|
85 // |
|
86 void CSipProfileAlrController::ConstructL( MSipProfileAlrObserver& aObserver ) |
|
87 { |
|
88 User::LeaveIfError(iRegistry.ItcReceiver().SetALRObserver( &aObserver )); |
|
89 iRegistry.Itc().AddALRObserverL(); |
|
90 } |
|
91 |
|
92 // ----------------------------------------------------------------------------- |
|
93 // CSipProfileAlrController::AllowMigrationL |
|
94 // ----------------------------------------------------------------------------- |
|
95 // |
|
96 EXPORT_C void CSipProfileAlrController::AllowMigrationL( TUint32 aProfileId, |
|
97 TUint32 aIapId ) |
|
98 { |
|
99 iRegistry.Itc().AllowMigrationL( aProfileId, aIapId ); |
|
100 } |
|
101 |
|
102 // ----------------------------------------------------------------------------- |
|
103 // CSipProfileAlrController::DisallowMigration |
|
104 // ----------------------------------------------------------------------------- |
|
105 // |
|
106 EXPORT_C void CSipProfileAlrController::DisallowMigrationL( TUint32 aProfileId, |
|
107 TUint32 aIapId ) |
|
108 { |
|
109 iRegistry.Itc().DisallowMigrationL( aProfileId, aIapId ); |
|
110 } |
|
111 |
|
112 // ----------------------------------------------------------------------------- |
|
113 // CSipProfileAlrController::RefreshIapAvailabilityL |
|
114 // ----------------------------------------------------------------------------- |
|
115 // |
|
116 EXPORT_C void CSipProfileAlrController::RefreshIapAvailabilityL( |
|
117 TUint32 aProfileId ) |
|
118 { |
|
119 iRegistry.Itc().RefreshIapAvailabilityL( aProfileId ); |
|
120 } |