|
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 : CSIPRegInfoElement.cpp |
|
15 // Part of : ProfileAgent |
|
16 // Version : SIP/4.0 |
|
17 // |
|
18 |
|
19 |
|
20 |
|
21 #include "sipreginfoelement.h" |
|
22 #include "sipregistrationelement.h" |
|
23 |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // CSIPRegInfoElement::NewLC |
|
27 // ----------------------------------------------------------------------------- |
|
28 // |
|
29 CSIPRegInfoElement* CSIPRegInfoElement::NewLC() |
|
30 { |
|
31 CSIPRegInfoElement* self = new( ELeave ) CSIPRegInfoElement; |
|
32 CleanupStack::PushL( self ); |
|
33 self->ConstructL(); |
|
34 return self; |
|
35 } |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // CSIPRegInfoElement::~CSIPRegInfoElement |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 CSIPRegInfoElement::~CSIPRegInfoElement() |
|
42 { |
|
43 iRegistrationElements.ResetAndDestroy(); |
|
44 iState.Close(); |
|
45 } |
|
46 |
|
47 // ----------------------------------------------------------------------------- |
|
48 // CSIPRegInfoElement::ConstructL |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 void CSIPRegInfoElement::ConstructL() |
|
52 { |
|
53 } |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // CSIPRegInfoElement::CSIPRegInfoElement |
|
57 // ----------------------------------------------------------------------------- |
|
58 // |
|
59 CSIPRegInfoElement::CSIPRegInfoElement() |
|
60 : iHasVersion(EFalse) |
|
61 { |
|
62 } |
|
63 |
|
64 // ----------------------------------------------------------------------------- |
|
65 // CSIPRegInfoElement::RegistrationElement |
|
66 // ----------------------------------------------------------------------------- |
|
67 // |
|
68 RPointerArray< CSIPRegistrationElement >& |
|
69 CSIPRegInfoElement::RegistrationElements() |
|
70 { |
|
71 return iRegistrationElements; |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // CSIPRegInfoElement::SetVersion |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 void CSIPRegInfoElement::SetVersion( TUint aVersion ) |
|
79 { |
|
80 iVersion = aVersion; |
|
81 iHasVersion = ETrue; |
|
82 } |
|
83 |
|
84 // ----------------------------------------------------------------------------- |
|
85 // CSIPRegInfoElement::Version |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 TUint CSIPRegInfoElement::Version() const |
|
89 { |
|
90 return iVersion; |
|
91 } |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // CSIPRegInfoElement::HasVersion |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 TBool CSIPRegInfoElement::HasVersion() const |
|
98 { |
|
99 return iHasVersion; |
|
100 } |
|
101 |
|
102 // ----------------------------------------------------------------------------- |
|
103 // CSIPRegInfoElement::SetState |
|
104 // ----------------------------------------------------------------------------- |
|
105 // |
|
106 void CSIPRegInfoElement::SetState( RString aState ) |
|
107 { |
|
108 iState.Close(); |
|
109 iState = aState.Copy(); |
|
110 } |
|
111 |
|
112 // ----------------------------------------------------------------------------- |
|
113 // CSIPRegInfoElement::State |
|
114 // ----------------------------------------------------------------------------- |
|
115 // |
|
116 RString CSIPRegInfoElement::State() const |
|
117 { |
|
118 return iState; |
|
119 } |
|
120 |