equal
deleted
inserted
replaced
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #include "e32property.h" |
18 #include "e32property.h" |
19 #include "mussessionproperties.h" |
|
20 #include "mussesseioninformationapi.h" |
|
21 #include <e32cmn.h> |
19 #include <e32cmn.h> |
22 |
20 |
23 static RArray<TUint> iIntProperty; |
21 static RArray<TUint> iIntProperty; |
24 static TInt iErrorCode = KErrNone; |
22 static TInt iErrorCode = KErrNone; |
25 static RProperty::TPropertyCalledFunctions iCalledFunction = RProperty::ENone; |
23 static RProperty::TPropertyCalledFunctions iCalledFunction = RProperty::ENone; |
26 // Large enough to store maximum length descriptor for RProperty |
24 static TName iString = KNullDesC(); |
27 static TBuf<RProperty::KMaxPropertySize> iString = KNullDesC(); |
|
28 static TBuf<RProperty::KMaxPropertySize> iVideoCodecList = KNullDesC(); |
|
29 static TBuf<RProperty::KMaxPropertySize> iSessionRecipient = KNullDesC(); |
|
30 static TBuf<RProperty::KMaxPropertySize> iEngineName = KNullDesC(); |
|
31 static TInt iValue = KErrNotFound; |
25 static TInt iValue = KErrNotFound; |
32 |
26 |
33 |
27 |
34 _LIT( KMusTestPropertyReadDesc, "TEST" ); |
28 _LIT( KMusTestPropertyReadDesc, "TEST" ); |
35 |
29 |
82 TInt error = iErrorCode; |
76 TInt error = iErrorCode; |
83 aValue = iPValue; |
77 aValue = iPValue; |
84 return error; |
78 return error; |
85 } |
79 } |
86 |
80 |
87 |
|
88 TInt RProperty::Get( TUid /*aCategory*/, TUint /*aKey*/, TDes8& aValue) |
81 TInt RProperty::Get( TUid /*aCategory*/, TUint /*aKey*/, TDes8& aValue) |
89 { |
82 { |
90 // This is not widely used in Mush , so who cares in stub. |
83 // This is not widely used in Mush , so who cares in stub. |
91 aValue.Append( KMusTestPropertyReadDesc ); |
84 aValue.Append( KMusTestPropertyReadDesc ); |
92 return iErrorCode; |
85 return iErrorCode; |
93 } |
86 } |
94 |
87 |
95 |
88 TInt RProperty::Get( TUid /*aCategory*/, TUint /*aKey*/, TDes16& aValue ) |
96 TInt RProperty::Get( TUid /*aCategory*/, TUint aKey, TDes16& aValue ) |
|
97 { |
89 { |
98 if ( aKey == NMusSessionInformationApi::KMUSCallProvider ) |
90 // This is not widely used in Mush , so who cares in stub. |
99 { |
91 aValue = iString; |
100 aValue = iEngineName; |
|
101 } |
|
102 else if ( aKey == NMusSessionApi::KVideoCodecs ) |
|
103 { |
|
104 aValue = iVideoCodecList; |
|
105 } |
|
106 else if ( aKey == NMusSessionApi::KRemoteSipAddress ) |
|
107 { |
|
108 aValue = iSessionRecipient; |
|
109 } |
|
110 else |
|
111 { |
|
112 aValue = iString; |
|
113 } |
|
114 |
|
115 return iErrorCode; |
92 return iErrorCode; |
116 } |
93 } |
117 |
94 |
118 TInt RProperty::Set( TUid /*aCategory*/, TUint aKey, TInt aValue) |
95 TInt RProperty::Set( TUid /*aCategory*/, TUint aKey, TInt aValue) |
119 { |
96 { |
139 { |
116 { |
140 // This is not widely used in Mush , so who cares in stub. |
117 // This is not widely used in Mush , so who cares in stub. |
141 return iErrorCode; |
118 return iErrorCode; |
142 } |
119 } |
143 |
120 |
144 |
121 TInt RProperty::Set( TUid /*aCategory*/, TUint /*aKey*/, const TDesC& aValue ) |
145 TInt RProperty::Set( TUid /*aCategory*/, TUint aKey, const TDesC& aValue ) |
|
146 { |
122 { |
147 |
123 // This is not widely used in Mush , so who cares in stub. |
148 if ( aKey == NMusSessionInformationApi::KMUSCallProvider ) |
124 iString = aValue; |
149 { |
|
150 iEngineName = aValue; |
|
151 } |
|
152 |
|
153 else if ( aKey == NMusSessionApi::KVideoCodecs ) |
|
154 { |
|
155 iVideoCodecList = aValue; |
|
156 } |
|
157 else if ( aKey == NMusSessionApi::KRemoteSipAddress ) |
|
158 { |
|
159 iSessionRecipient = aValue; |
|
160 } |
|
161 else |
|
162 { |
|
163 iString = aValue; |
|
164 } |
|
165 return iErrorCode; |
125 return iErrorCode; |
166 } |
126 } |
167 |
127 |
168 |
128 |
169 TInt RProperty::Attach( TUid /*aCategory*/, TUint /*aKey*/) |
129 TInt RProperty::Attach( TUid /*aCategory*/, TUint /*aKey*/) |
231 { |
191 { |
232 iIntProperty.Close(); |
192 iIntProperty.Close(); |
233 iErrorCode = KErrNone; |
193 iErrorCode = KErrNone; |
234 iCalledFunction = RProperty::ENone; |
194 iCalledFunction = RProperty::ENone; |
235 iString = KNullDesC(); |
195 iString = KNullDesC(); |
236 iEngineName = KNullDesC(); |
|
237 iValue = KErrNotFound; |
196 iValue = KErrNotFound; |
238 } |
197 } |
239 |
198 |
|
199 |