mtpdataproviders/mtpimagedp/src/cmtpimagedpsetobjectreferences.cpp
changeset 47 63cf70d3ecd8
parent 0 d0791faffa3f
equal deleted inserted replaced
44:a5deb6b96675 47:63cf70d3ecd8
    21 #include <mtp/mmtpobjectmgr.h>
    21 #include <mtp/mmtpobjectmgr.h>
    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 "OstTraceDefinitions.h"
       
    27 #ifdef OST_TRACE_COMPILER_IN_USE
       
    28 #include "cmtpimagedpsetobjectreferencesTraces.h"
       
    29 #endif
    26 
    30 
    27 __FLOG_STMT(_LIT8(KComponent,"SetObjectReferences");)
       
    28 
    31 
    29 /**
    32 /**
    30 Two-phase construction method
    33 Two-phase construction method
    31 @param aPlugin The data provider plugin
    34 @param aPlugin The data provider plugin
    32 @param aFramework The data provider framework
    35 @param aFramework The data provider framework
    45 /**
    48 /**
    46 Destructor
    49 Destructor
    47 */    
    50 */    
    48 CMTPImageDpSetObjectReferences::~CMTPImageDpSetObjectReferences()
    51 CMTPImageDpSetObjectReferences::~CMTPImageDpSetObjectReferences()
    49     {
    52     {
    50     __FLOG(_L8(">> CMTPImageDpSetObjectReferences::~CMTPImageDpSetObjectReferences"));
    53     OstTraceFunctionEntry0( CMTPIMAGEDPSETOBJECTREFERENCES_CMTPIMAGEDPSETOBJECTREFERENCES_DES_ENTRY );
    51     delete iReferences;
    54     delete iReferences;
    52     __FLOG(_L8("<< CMTPImageDpSetObjectReferences::~CMTPImageDpSetObjectReferences"));
    55     OstTraceFunctionExit0( CMTPIMAGEDPSETOBJECTREFERENCES_CMTPIMAGEDPSETOBJECTREFERENCES_DES_EXIT );
    53     __FLOG_CLOSE;
       
    54     }
    56     }
    55 
    57 
    56 /**
    58 /**
    57 Standard c++ constructor
    59 Standard c++ constructor
    58 */    
    60 */    
    64 /**
    66 /**
    65 Second phase constructor
    67 Second phase constructor
    66 */
    68 */
    67 void CMTPImageDpSetObjectReferences::ConstructL()
    69 void CMTPImageDpSetObjectReferences::ConstructL()
    68     {
    70     {
    69     __FLOG_OPEN(KMTPSubsystem, KComponent);
    71     OstTraceFunctionEntry0( CMTPIMAGEDPSETOBJECTREFERENCES_CONSTRUCTL_ENTRY );
    70     __FLOG(_L8(">> CMTPImageDpSetObjectReferences::ConstructL"));
    72     OstTraceFunctionExit0( CMTPIMAGEDPSETOBJECTREFERENCES_CONSTRUCTL_EXIT );
    71     __FLOG(_L8("<< CMTPImageDpSetObjectReferences::ConstructL"));
       
    72     }
    73     }
    73 
    74 
    74 TMTPResponseCode CMTPImageDpSetObjectReferences::CheckRequestL()
    75 TMTPResponseCode CMTPImageDpSetObjectReferences::CheckRequestL()
    75     {
    76     {
    76     __FLOG(_L8(">> CMTPImageDpSetObjectReferences::CheckRequestL"));
    77     OstTraceFunctionEntry0( CMTPIMAGEDPSETOBJECTREFERENCES_CHECKREQUESTL_ENTRY );
    77     
    78     
    78     TUint32 objectHandle = Request().Uint32(TMTPTypeRequest::ERequestParameter1);
    79     TUint32 objectHandle = Request().Uint32(TMTPTypeRequest::ERequestParameter1);
    79     CMTPObjectMetaData* objectInfo = CMTPObjectMetaData::NewLC();    
    80     CMTPObjectMetaData* objectInfo = CMTPObjectMetaData::NewLC();    
    80     TMTPResponseCode responseCode = MTPImageDpUtilits::VerifyObjectHandleL(iFramework, objectHandle, *objectInfo);      
    81     TMTPResponseCode responseCode = MTPImageDpUtilits::VerifyObjectHandleL(iFramework, objectHandle, *objectInfo);      
    81     CleanupStack::PopAndDestroy(objectInfo);
    82     CleanupStack::PopAndDestroy(objectInfo);
    82     __FLOG_VA((_L8("CheckRequestL - Exit with responseCode = 0x%04X"), responseCode));
    83     OstTrace1( TRACE_NORMAL, CMTPIMAGEDPSETOBJECTREFERENCES_CHECKREQUESTL, 
    83     __FLOG(_L8("<< CMTPImageDpSetObjectReferences::CheckRequestL"));
    84             "Exit with responseCode = 0x%04X", responseCode );
       
    85     OstTraceFunctionExit0( CMTPIMAGEDPSETOBJECTREFERENCES_CHECKREQUESTL_EXIT );
    84     return responseCode;
    86     return responseCode;
    85     }
    87     }
    86 
    88 
    87 
    89 
    88 /**
    90 /**
   108 /**
   110 /**
   109 GetReferences request handler
   111 GetReferences request handler
   110 */    
   112 */    
   111 void CMTPImageDpSetObjectReferences::ServiceL()
   113 void CMTPImageDpSetObjectReferences::ServiceL()
   112     {
   114     {
   113     __FLOG(_L8(">> CMTPImageDpCopyObject::ServiceL"));
   115     OstTraceFunctionEntry0( CMTPIMAGEDPSETOBJECTREFERENCES_SERVICEL_ENTRY );
   114     delete iReferences;
   116     delete iReferences;
   115     iReferences = NULL;
   117     iReferences = NULL;
   116     iReferences = CMTPTypeArray::NewL(EMTPTypeAUINT32);
   118     iReferences = CMTPTypeArray::NewL(EMTPTypeAUINT32);
   117     ReceiveDataL(*iReferences);
   119     ReceiveDataL(*iReferences);
   118     __FLOG(_L8("<< CMTPImageDpCopyObject::ServiceL"));
   120     OstTraceFunctionExit0( CMTPIMAGEDPSETOBJECTREFERENCES_SERVICEL_EXIT );
   119     }
   121     }
   120 
   122 
   121 TBool CMTPImageDpSetObjectReferences::HasDataphase() const
   123 TBool CMTPImageDpSetObjectReferences::HasDataphase() const
   122     {
   124     {
   123     return ETrue;
   125     return ETrue;