|
1 /* |
|
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * WV Services tree data structures for Service Negotiation. |
|
16 * TImpsServices and TImpsFeature. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <featmgr.h> |
|
23 #include "impsservices.h" |
|
24 // NOTE remove this for final build |
|
25 #include "impsvariant.h" |
|
26 |
|
27 |
|
28 // CONSTANTS |
|
29 const TUint maskAll = 0xFFFFFFFF; |
|
30 |
|
31 |
|
32 // ================= MEMBER FUNCTIONS ======================= |
|
33 |
|
34 |
|
35 void TImpsFeature::SetFeature( TImpsFeatures aFeature ) |
|
36 { |
|
37 iFeature = aFeature; |
|
38 } |
|
39 |
|
40 EXPORT_C void TImpsFeature::Reset( TBool aAll ) |
|
41 { |
|
42 if ( aAll ) |
|
43 { |
|
44 iOn = ETrue; |
|
45 iFunctions = maskAll; |
|
46 iCapabilities = maskAll; |
|
47 } |
|
48 else |
|
49 { |
|
50 iOn = EFalse; |
|
51 iFunctions = 0; |
|
52 iCapabilities = 0; |
|
53 } |
|
54 } |
|
55 |
|
56 EXPORT_C void TImpsFeature::Copy( TImpsFeature& aCopy ) |
|
57 { |
|
58 iOn = aCopy.iOn; |
|
59 iFunctions = aCopy.iFunctions; |
|
60 iFeature = aCopy.iFeature; |
|
61 iCapabilities = aCopy.iCapabilities; |
|
62 } |
|
63 |
|
64 |
|
65 EXPORT_C TImpsServices::TImpsServices() |
|
66 { |
|
67 iFundamental.SetFeature( EFundamentalFeat ); |
|
68 iPresence.SetFeature( EPresenceFeat ); |
|
69 iIM.SetFeature( EIMFeat ); |
|
70 iGroup.SetFeature( EGroupFeat ); |
|
71 } |
|
72 |
|
73 EXPORT_C TImpsFeature* TImpsServices::Feature( TImpsFeatures aFeature ) |
|
74 { |
|
75 switch ( aFeature ) |
|
76 { |
|
77 case EFundamentalFeat: |
|
78 return &iFundamental; |
|
79 // break; |
|
80 case EPresenceFeat: |
|
81 return &iPresence; |
|
82 // break; |
|
83 case EIMFeat: |
|
84 return &iIM; |
|
85 // break; |
|
86 case EGroupFeat: |
|
87 default: |
|
88 return &iGroup; |
|
89 // break; |
|
90 } |
|
91 } |
|
92 |
|
93 |
|
94 EXPORT_C void TImpsServices::Reset( TBool aAll ) |
|
95 { |
|
96 iFundamental.Reset( aAll ); |
|
97 iPresence.Reset( aAll ); |
|
98 iIM.Reset( aAll ); |
|
99 iGroup.Reset( aAll ); |
|
100 } |
|
101 |
|
102 EXPORT_C void TImpsServices::Copy( TImpsServices& aCopy ) |
|
103 { |
|
104 iFundamental.Copy( aCopy.iFundamental ); |
|
105 iPresence.Copy( aCopy.iPresence ); |
|
106 iIM.Copy( aCopy.iIM ); |
|
107 iGroup.Copy( aCopy.iGroup ); |
|
108 } |
|
109 |
|
110 |
|
111 |
|
112 EXPORT_C TImpsCspIdentifier::TImpsCspIdentifier() |
|
113 { |
|
114 } |
|
115 |
|
116 EXPORT_C TImpsCspIdentifier::TImpsCspIdentifier( const TDesC& aSap, |
|
117 const TDesC& aUserId ) |
|
118 :iSAP(aSap), |
|
119 iUserId(aUserId) |
|
120 { |
|
121 } |
|
122 |
|
123 // ================= OTHER EXPORTED FUNCTIONS ============== |
|
124 |
|
125 |
|
126 // End of File |
|
127 |