52 // Two-phase construction method |
52 // Two-phase construction method |
53 // ----------------------------------------------------------------------------- |
53 // ----------------------------------------------------------------------------- |
54 // |
54 // |
55 void CMediaMtpDataProviderSetObjectPropValue::ConstructL() |
55 void CMediaMtpDataProviderSetObjectPropValue::ConstructL() |
56 { |
56 { |
57 |
57 // Do nothing |
58 } |
58 } |
59 |
59 |
60 // ----------------------------------------------------------------------------- |
60 // ----------------------------------------------------------------------------- |
61 // CMediaMtpDataProviderSetObjectPropValue::CMediaMtpDataProviderSetObjectPropValue |
61 // CMediaMtpDataProviderSetObjectPropValue::CMediaMtpDataProviderSetObjectPropValue |
62 // Standard c++ constructor |
62 // Standard c++ constructor |
63 // ----------------------------------------------------------------------------- |
63 // ----------------------------------------------------------------------------- |
64 // |
64 // |
65 CMediaMtpDataProviderSetObjectPropValue::CMediaMtpDataProviderSetObjectPropValue( MMTPDataProviderFramework& aFramework, |
65 CMediaMtpDataProviderSetObjectPropValue::CMediaMtpDataProviderSetObjectPropValue( MMTPDataProviderFramework& aFramework, |
66 MMTPConnection& aConnection, |
66 MMTPConnection& aConnection, |
67 MMmMtpDpConfig& aDpConfig ) : |
67 MMmMtpDpConfig& aDpConfig ) : |
68 CSetObjectPropValue( aFramework, aConnection, aDpConfig ) |
68 CSetObjectPropValue( aFramework, aConnection, aDpConfig ) |
69 { |
69 { |
70 |
70 // Do nothing |
71 } |
71 } |
72 |
72 |
73 // ----------------------------------------------------------------------------- |
73 // ----------------------------------------------------------------------------- |
74 // CMediaMtpDataProviderSetObjectPropValue::~CMediaMtpDataProviderSetObjectPropValue |
74 // CMediaMtpDataProviderSetObjectPropValue::~CMediaMtpDataProviderSetObjectPropValue |
75 // Destructor |
75 // Destructor |
76 // ----------------------------------------------------------------------------- |
76 // ----------------------------------------------------------------------------- |
77 // |
77 // |
78 CMediaMtpDataProviderSetObjectPropValue::~CMediaMtpDataProviderSetObjectPropValue() |
78 CMediaMtpDataProviderSetObjectPropValue::~CMediaMtpDataProviderSetObjectPropValue() |
79 { |
79 { |
80 |
80 // Do nothing |
81 } |
81 } |
82 |
82 |
83 TBool CMediaMtpDataProviderSetObjectPropValue::IsSpecificPropCodeReadOnly( TUint16 aPropCode ) const |
83 TBool CMediaMtpDataProviderSetObjectPropValue::IsSpecificPropCodeReadOnly( TUint16 aPropCode ) const |
84 { |
84 { |
85 TBool returnCode = EFalse; |
85 TBool returnCode = EFalse; |
219 { |
219 { |
220 responseCode = EMTPRespCodeAccessDenied; |
220 responseCode = EMTPRespCodeAccessDenied; |
221 } |
221 } |
222 else |
222 else |
223 { |
223 { |
224 TMTPTypeUint8 newValue( iMTPTypeUint8 ); |
|
225 |
|
226 // there's no DB field to remember the value, so return an error |
224 // there's no DB field to remember the value, so return an error |
227 // if there's a mismatch to CAF protection status |
225 // if there's a mismatch to CAF protection status |
228 if ( ( ( drmStatus == EMTPDrmStatusProtected) && ( newValue.Value() == 0 ) ) || |
226 if ( ( ( drmStatus == EMTPDrmStatusProtected) && ( iMTPTypeUint8.Value() == 0 ) ) || |
229 ( ( drmStatus == EMTPDrmStatusNotProtected ) && ( newValue.Value() == 1 ) ) ) |
227 ( ( drmStatus == EMTPDrmStatusNotProtected ) && ( iMTPTypeUint8.Value() == 1 ) ) ) |
230 { |
228 { |
231 responseCode = EMTPRespCodeAccessDenied; |
229 responseCode = EMTPRespCodeAccessDenied; |
232 } |
230 } |
233 } |
231 } |
234 } |
232 } |