|
1 // Copyright (c) 2005-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 : TSIPRegEventStateReSubscribing.cpp |
|
15 // Part of : SIP Profile Agent |
|
16 // implementation |
|
17 // Version : 1.0 |
|
18 // |
|
19 |
|
20 |
|
21 |
|
22 #include "TSIPRegEventStateReSubscribing.h" |
|
23 #include "sipregeventcontext.h" |
|
24 |
|
25 // ---------------------------------------------------------------------------- |
|
26 // TSIPRegEventStateReSubscribing::TSIPRegEventStateReSubscribing |
|
27 // ---------------------------------------------------------------------------- |
|
28 // |
|
29 TSIPRegEventStateReSubscribing::TSIPRegEventStateReSubscribing( |
|
30 MSIPRegEventContext& aContext) |
|
31 : TSIPRegEventSubscriptionStateBase(aContext) |
|
32 { |
|
33 } |
|
34 |
|
35 // ---------------------------------------------------------------------------- |
|
36 // TSIPRegEventStateReSubscribing::ResponseReceivedL |
|
37 // ---------------------------------------------------------------------------- |
|
38 // |
|
39 void TSIPRegEventStateReSubscribing::ResponseReceivedL( |
|
40 TUint aStatusCode, |
|
41 TUint /*aRetryAfter*/) |
|
42 { |
|
43 if (aStatusCode >= 200) |
|
44 { |
|
45 if (aStatusCode < 300) |
|
46 { |
|
47 iContext.ChangeState(MSIPRegEventContext::ESubscribed); |
|
48 } |
|
49 else if (aStatusCode == 405 || |
|
50 aStatusCode == 482 || |
|
51 aStatusCode == 489) |
|
52 { |
|
53 iContext.ChangeState(MSIPRegEventContext::ENotSubscribed); |
|
54 iContext.RegEventNotSupportedByNetworkL(); |
|
55 } |
|
56 else |
|
57 { |
|
58 iContext.ChangeState(MSIPRegEventContext::ENotSubscribed); |
|
59 iContext.ReRegister(); |
|
60 } |
|
61 } |
|
62 } |