equal
deleted
inserted
replaced
22 |
22 |
23 #include "cmtpimagedpsetobjectreferences.h" |
23 #include "cmtpimagedpsetobjectreferences.h" |
24 #include "mtpimagedputilits.h" |
24 #include "mtpimagedputilits.h" |
25 #include "cmtpimagedp.h" |
25 #include "cmtpimagedp.h" |
26 #include "cmtpimagedpsetobjectprotection.h" |
26 #include "cmtpimagedpsetobjectprotection.h" |
|
27 #include "OstTraceDefinitions.h" |
|
28 #ifdef OST_TRACE_COMPILER_IN_USE |
|
29 #include "cmtpimagedpsetobjectprotectionTraces.h" |
|
30 #endif |
27 |
31 |
28 __FLOG_STMT(_LIT8(KComponent,"SetObjectProtection");) |
|
29 |
32 |
30 /** |
33 /** |
31 Two-phase construction method |
34 Two-phase construction method |
32 @param aPlugin The data provider plugin |
35 @param aPlugin The data provider plugin |
33 @param aFramework The data provider framework |
36 @param aFramework The data provider framework |
46 /** |
49 /** |
47 Destructor |
50 Destructor |
48 */ |
51 */ |
49 CMTPImageDpSetObjectProtection::~CMTPImageDpSetObjectProtection() |
52 CMTPImageDpSetObjectProtection::~CMTPImageDpSetObjectProtection() |
50 { |
53 { |
51 __FLOG(_L8(">> CMTPImageDpSetObjectProtection::~CMTPImageDpSetObjectProtection")); |
54 OstTraceFunctionEntry0( CMTPIMAGEDPSETOBJECTPROTECTION_CMTPIMAGEDPSETOBJECTPROTECTION_DES_ENTRY ); |
52 delete iObjMeta; |
55 delete iObjMeta; |
53 __FLOG(_L8("<< CMTPImageDpSetObjectProtection::~CMTPImageDpSetObjectProtection")); |
56 OstTraceFunctionExit0( CMTPIMAGEDPSETOBJECTPROTECTION_CMTPIMAGEDPSETOBJECTPROTECTION_DES_EXIT ); |
54 |
|
55 __FLOG_CLOSE; |
|
56 } |
57 } |
57 |
58 |
58 /** |
59 /** |
59 Standard c++ constructor |
60 Standard c++ constructor |
60 */ |
61 */ |
67 /** |
68 /** |
68 Second phase constructor |
69 Second phase constructor |
69 */ |
70 */ |
70 void CMTPImageDpSetObjectProtection::ConstructL() |
71 void CMTPImageDpSetObjectProtection::ConstructL() |
71 { |
72 { |
72 __FLOG_OPEN(KMTPSubsystem, KComponent); |
73 OstTraceFunctionEntry0( CMTPIMAGEDPSETOBJECTPROTECTION_CONSTRUCTL_ENTRY ); |
73 |
|
74 __FLOG(_L8(">> CMTPImageDpSetObjectProtection::ConstructL")); |
|
75 iObjMeta = CMTPObjectMetaData::NewL(); |
74 iObjMeta = CMTPObjectMetaData::NewL(); |
76 __FLOG(_L8("<< CMTPImageDpSetObjectProtection::ConstructL")); |
75 OstTraceFunctionExit0( CMTPIMAGEDPSETOBJECTPROTECTION_CONSTRUCTL_EXIT ); |
77 |
|
78 } |
76 } |
79 |
77 |
80 TMTPResponseCode CMTPImageDpSetObjectProtection::CheckRequestL() |
78 TMTPResponseCode CMTPImageDpSetObjectProtection::CheckRequestL() |
81 { |
79 { |
82 __FLOG(_L8(">> CMTPImageDpSetObjectProtection::CheckRequestL")); |
80 OstTraceFunctionEntry0( CMTPIMAGEDPSETOBJECTPROTECTION_CHECKREQUESTL_ENTRY ); |
83 |
81 |
84 TUint32 objectHandle = Request().Uint32(TMTPTypeRequest::ERequestParameter1); |
82 TUint32 objectHandle = Request().Uint32(TMTPTypeRequest::ERequestParameter1); |
85 TUint32 statusValue = Request().Uint32(TMTPTypeRequest::ERequestParameter2); |
83 TUint32 statusValue = Request().Uint32(TMTPTypeRequest::ERequestParameter2); |
86 |
84 |
87 //Check ObjectHanlde |
85 //Check ObjectHanlde |
101 default: |
99 default: |
102 responseCode = EMTPRespCodeInvalidParameter; |
100 responseCode = EMTPRespCodeInvalidParameter; |
103 break; |
101 break; |
104 } |
102 } |
105 } |
103 } |
106 __FLOG_VA((_L8("CheckRequestL - Exit with responseCode = 0x%04X"), responseCode)); |
104 OstTrace1( TRACE_NORMAL, CMTPIMAGEDPSETOBJECTPROTECTION_CHECKREQUESTL, |
107 __FLOG(_L8("<< CMTPImageDpSetObjectProtection::CheckRequestL")); |
105 "Exit with responseCode = 0x%04X", responseCode ); |
108 |
106 |
|
107 OstTraceFunctionExit0( CMTPIMAGEDPSETOBJECTPROTECTION_CHECKREQUESTL_EXIT ); |
109 return responseCode; |
108 return responseCode; |
110 } |
109 } |
111 |
110 |
112 |
111 |
113 /** |
112 /** |
122 /** |
121 /** |
123 GetReferences request handler |
122 GetReferences request handler |
124 */ |
123 */ |
125 void CMTPImageDpSetObjectProtection::ServiceL() |
124 void CMTPImageDpSetObjectProtection::ServiceL() |
126 { |
125 { |
127 __FLOG(_L8(">> CMTPImageDpCopyObject::ServiceL")); |
126 OstTraceFunctionEntry0( CMTPIMAGEDPSETOBJECTPROTECTION_SERVICEL_ENTRY ); |
128 TUint32 statusValue = Request().Uint32(TMTPTypeRequest::ERequestParameter2); |
127 TUint32 statusValue = Request().Uint32(TMTPTypeRequest::ERequestParameter2); |
129 TMTPResponseCode responseCode = EMTPRespCodeOK; |
128 TMTPResponseCode responseCode = EMTPRespCodeOK; |
130 TInt ret = KErrNone; |
129 TInt ret = KErrNone; |
131 |
130 |
132 switch(statusValue) |
131 switch(statusValue) |
150 { |
149 { |
151 responseCode = EMTPRespCodeAccessDenied; |
150 responseCode = EMTPRespCodeAccessDenied; |
152 } |
151 } |
153 |
152 |
154 SendResponseL(responseCode); |
153 SendResponseL(responseCode); |
155 __FLOG(_L8("<< CMTPImageDpCopyObject::ServiceL")); |
154 OstTraceFunctionExit0( CMTPIMAGEDPSETOBJECTPROTECTION_SERVICEL_EXIT ); |
156 } |
155 } |
157 |
156 |