|
1 // Copyright (c) 2006-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 : unregistered.cpp |
|
15 // Part of : SIPAPI |
|
16 // Version : SIP/5.0 |
|
17 // |
|
18 |
|
19 |
|
20 |
|
21 #include "unregistered.h" |
|
22 #include "RegBindingImplementation.h" |
|
23 #include "sipclienttransaction.h" |
|
24 #include "sipresponseelements.h" |
|
25 |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // CUnregistered::NewL |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 CUnregistered* CUnregistered::NewL() |
|
32 { |
|
33 return new (ELeave) CUnregistered(); |
|
34 } |
|
35 |
|
36 // ----------------------------------------------------------------------------- |
|
37 // CUnregistered::CUnregistered |
|
38 // ----------------------------------------------------------------------------- |
|
39 // |
|
40 CUnregistered::CUnregistered() |
|
41 { |
|
42 } |
|
43 |
|
44 // ----------------------------------------------------------------------------- |
|
45 // CUnregistered::~CUnregistered |
|
46 // ----------------------------------------------------------------------------- |
|
47 // |
|
48 CUnregistered::~CUnregistered() |
|
49 { |
|
50 } |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // CUnregistered::SetNeighbourStates |
|
54 // ----------------------------------------------------------------------------- |
|
55 // |
|
56 void CUnregistered::SetNeighbourStates(CRegistrationState& aRegistering) |
|
57 { |
|
58 iRegistering = &aRegistering; |
|
59 } |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // CUnregistered::RegisterL |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 CSIPClientTransaction* |
|
66 CUnregistered::RegisterL(CRegBindingImplementation& aRegistration, |
|
67 CSIPMessageElements* aElements) const |
|
68 { |
|
69 CSIPClientTransaction* ta = aRegistration.DoRegisterL(aElements); |
|
70 aRegistration.ChangeState(iRegistering); |
|
71 return ta; |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // CUnregistered::IncomingResponseL |
|
76 // Response shouldn't be received in this state |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 TBool |
|
80 CUnregistered::IncomingResponseL(CRegBindingImplementation& /*aRegistration*/, |
|
81 CSIPResponseElements* aElements, |
|
82 TUint32 /*aRequestId*/, |
|
83 TUint32 /*aRegistrationId*/, |
|
84 TUint32 /*aRefreshId*/, |
|
85 CConnectionCallback& /*aCallback*/) const |
|
86 { |
|
87 delete aElements; |
|
88 return EFalse; |
|
89 } |
|
90 |
|
91 // ----------------------------------------------------------------------------- |
|
92 // CUnregistered::ErrorOccured |
|
93 // ----------------------------------------------------------------------------- |
|
94 // |
|
95 TBool CUnregistered::ErrorOccured(CRegBindingImplementation& aRegistration, |
|
96 TInt aError, |
|
97 TUint32 aRequestId, |
|
98 CConnectionCallback& aCallback) const |
|
99 { |
|
100 return aRegistration.HandleError(aCallback, aError, aRequestId, *this); |
|
101 } |
|
102 |
|
103 // ----------------------------------------------------------------------------- |
|
104 // CUnregistered::ConnectionLost |
|
105 // No action. |
|
106 // ----------------------------------------------------------------------------- |
|
107 // |
|
108 void CUnregistered::ConnectionLost( |
|
109 CRegBindingImplementation& /*aRegistration*/) const |
|
110 { |
|
111 } |