59 // CSIPProfileSIMAuthorization::~CSIPProfileSIMAuthorization |
59 // CSIPProfileSIMAuthorization::~CSIPProfileSIMAuthorization |
60 // ---------------------------------------------------------------------------- |
60 // ---------------------------------------------------------------------------- |
61 // |
61 // |
62 CSIPProfileSIMAuthorization::~CSIPProfileSIMAuthorization() |
62 CSIPProfileSIMAuthorization::~CSIPProfileSIMAuthorization() |
63 { |
63 { |
|
64 PROFILE_DEBUG1("CSIPProfileSIMAuthorization::~CSIPProfileSIMAuthorization") |
|
65 |
64 Cancel(); |
66 Cancel(); |
65 iIMSI.Zero(); |
67 iIMSI.Zero(); |
|
68 |
|
69 PROFILE_DEBUG1("CSIPProfileSIMAuthorization::~CSIPProfileSIMAuthorization, exit") |
66 } |
70 } |
67 |
71 |
68 // ---------------------------------------------------------------------------- |
72 // ---------------------------------------------------------------------------- |
69 // CSIPProfileSIMAuthorization::ConstructL |
73 // CSIPProfileSIMAuthorization::ConstructL |
70 // ---------------------------------------------------------------------------- |
74 // ---------------------------------------------------------------------------- |
71 // |
75 // |
72 void CSIPProfileSIMAuthorization::ConstructL() |
76 void CSIPProfileSIMAuthorization::ConstructL() |
73 { |
77 { |
|
78 PROFILE_DEBUG1("CSIPProfileSIMAuthorization::ConstructL") |
|
79 |
|
80 iSIMAuthorizationNotSupported = EFalse; |
74 TUint32 caps(0); |
81 TUint32 caps(0); |
75 User::LeaveIfError(iPhone.GetIdentityCaps(caps)); |
82 User::LeaveIfError(iPhone.GetIdentityCaps(caps)); |
76 if(!(caps & RMobilePhone::KCapsGetSubscriberId)) |
83 if(!(caps & RMobilePhone::KCapsGetSubscriberId)) |
77 { |
84 { |
78 User::Leave(KErrNotSupported); |
85 User::Leave(KErrNotSupported); |
79 } |
86 } |
80 CActiveScheduler::Add( this ); |
87 CActiveScheduler::Add( this ); |
|
88 |
|
89 PROFILE_DEBUG1("CSIPProfileSIMAuthorization::ConstructL, exit") |
81 } |
90 } |
82 |
91 |
83 // ---------------------------------------------------------------------------- |
92 // ---------------------------------------------------------------------------- |
84 // CSIPProfileSIMAuthorization::RequestL |
93 // CSIPProfileSIMAuthorization::RequestL |
85 // ---------------------------------------------------------------------------- |
94 // ---------------------------------------------------------------------------- |
106 // CSIPProfileSIMAuthorization::RunL |
115 // CSIPProfileSIMAuthorization::RunL |
107 // ---------------------------------------------------------------------------- |
116 // ---------------------------------------------------------------------------- |
108 // |
117 // |
109 void CSIPProfileSIMAuthorization::RunL() |
118 void CSIPProfileSIMAuthorization::RunL() |
110 { |
119 { |
|
120 PROFILE_DEBUG3("CSIPProfileSIMAuthorization::RunL, status:", iStatus.Int() ) |
|
121 |
111 if ( iStatus.Int() == KErrNone) |
122 if ( iStatus.Int() == KErrNone) |
112 { |
123 { |
113 iObserver.AuthorizedSubscriberIdL(); |
124 iObserver.AuthorizedSubscriberIdL(); |
114 } |
125 } |
115 else |
126 else |
116 { |
127 { |
|
128 iSIMAuthorizationNotSupported = ETrue; |
117 User::LeaveIfError(iStatus.Int()); |
129 User::LeaveIfError(iStatus.Int()); |
118 } |
130 } |
|
131 |
|
132 PROFILE_DEBUG1("CSIPProfileSIMAuthorization::RunL, exit") |
119 } |
133 } |
120 |
134 |
121 // ---------------------------------------------------------------------------- |
135 // ---------------------------------------------------------------------------- |
122 // CSIPProfileSIMAuthorization::RunError |
136 // CSIPProfileSIMAuthorization::RunError |
123 // ---------------------------------------------------------------------------- |
137 // ---------------------------------------------------------------------------- |
129 { |
143 { |
130 return aError; |
144 return aError; |
131 } |
145 } |
132 return KErrNone; |
146 return KErrNone; |
133 } |
147 } |
134 |
148 |
|
149 // ---------------------------------------------------------------------------- |
|
150 // CSIPProfileSIMAuthorization::IsImsAuthorizationSupported |
|
151 // ---------------------------------------------------------------------------- |
|
152 // |
|
153 TBool CSIPProfileSIMAuthorization::IsSIMAuthorizationAllowed() |
|
154 { |
|
155 return !iSIMAuthorizationNotSupported; |
|
156 } |
|
157 |
|
158 // ---------------------------------------------------------------------------- |
|
159 // CSIPProfileSIMAuthorization::ResetSIMAuthorizationAllowed |
|
160 // ---------------------------------------------------------------------------- |
|
161 // |
|
162 void CSIPProfileSIMAuthorization::ResetSIMAuthorizationAllowed(TBool aStatus) |
|
163 { |
|
164 iSIMAuthorizationNotSupported = aStatus; |
|
165 } |
|
166 |
135 // ---------------------------------------------------------------------------- |
167 // ---------------------------------------------------------------------------- |
136 // CSIPProfileSIMAuthorization::DoCancel |
168 // CSIPProfileSIMAuthorization::DoCancel |
137 // ---------------------------------------------------------------------------- |
169 // ---------------------------------------------------------------------------- |
138 // |
170 // |
139 void CSIPProfileSIMAuthorization::DoCancel() |
171 void CSIPProfileSIMAuthorization::DoCancel() |