mtpdataproviders/mtpimagedp/src/cmtpimagedpgetobjectpropvalue.cpp
branchRCL_3
changeset 11 4843bb5893b6
parent 0 d0791faffa3f
child 19 ef55b168cedb
equal deleted inserted replaced
6:f8e15b44d440 11:4843bb5893b6
    23 #include <mtp/tmtptypeuint8.h>
    23 #include <mtp/tmtptypeuint8.h>
    24 #include <mtp/tmtptypeuint32.h>
    24 #include <mtp/tmtptypeuint32.h>
    25 #include <mtp/tmtptypeuint64.h>
    25 #include <mtp/tmtptypeuint64.h>
    26 #include <mtp/tmtptypeuint128.h>
    26 #include <mtp/tmtptypeuint128.h>
    27 #include <mtp/cmtptypestring.h>
    27 #include <mtp/cmtptypestring.h>
       
    28 #include <mtp/cmtptypearray.h>
    28 #include <mtp/mmtpdataproviderframework.h>
    29 #include <mtp/mmtpdataproviderframework.h>
    29 #include <mtp/mtpprotocolconstants.h>
    30 #include <mtp/mtpprotocolconstants.h>
    30 #include <mtp/mmtpobjectmgr.h>
    31 #include <mtp/mmtpobjectmgr.h>
    31 #include <mtp/cmtpobjectmetadata.h>
    32 #include <mtp/cmtpobjectmetadata.h>
    32 
    33 
    62 Destructor
    63 Destructor
    63 */		
    64 */		
    64 CMTPImageDpGetObjectPropValue::~CMTPImageDpGetObjectPropValue()
    65 CMTPImageDpGetObjectPropValue::~CMTPImageDpGetObjectPropValue()
    65     {
    66     {
    66     delete iMTPTypeString;	
    67     delete iMTPTypeString;	
       
    68     delete iMTPTypeArray;
    67     delete iObjectMeta;
    69     delete iObjectMeta;
    68     __FLOG_CLOSE;
    70     __FLOG_CLOSE;
    69     }
    71     }
    70 
    72 
    71 /**
    73 /**
    84 Second-phase construction
    86 Second-phase construction
    85 */                  
    87 */                  
    86 void CMTPImageDpGetObjectPropValue::ConstructL()
    88 void CMTPImageDpGetObjectPropValue::ConstructL()
    87     {
    89     {
    88     iMTPTypeString = CMTPTypeString::NewL();
    90     iMTPTypeString = CMTPTypeString::NewL();
       
    91     iMTPTypeArray = CMTPTypeArray::NewL(EMTPTypeAUINT8);
    89     iObjectMeta = CMTPObjectMetaData::NewL();
    92     iObjectMeta = CMTPObjectMetaData::NewL();
    90     }
    93     }
    91 
    94 
    92 /**
    95 /**
    93 * Check format code, prop code and objectg Handle
    96 * Check format code, prop code and objectg Handle
   179             ServiceRepresentativeSampleHeightL();
   182             ServiceRepresentativeSampleHeightL();
   180             break;
   183             break;
   181         case EMTPObjectPropCodeRepresentativeSampleWidth:
   184         case EMTPObjectPropCodeRepresentativeSampleWidth:
   182             ServiceRepresentativeSampleWidthL();
   185             ServiceRepresentativeSampleWidthL();
   183             break; 
   186             break; 
       
   187         case EMTPObjectPropCodeRepresentativeSampleData:
       
   188             ServiceRepresentativeSampleDataL();
       
   189             break;
   184         case EMTPObjectPropCodeNonConsumable:
   190         case EMTPObjectPropCodeNonConsumable:
   185             ServiceNonConsumableL();
   191             ServiceNonConsumableL();
   186             break;            
   192             break;            
   187         default:
   193         default:
   188             User::Leave(KErrGeneral);
   194             User::Leave(KErrGeneral);
   331     iMTPTypeUint32.Set(representativeSampleWidth);
   337     iMTPTypeUint32.Set(representativeSampleWidth);
   332     
   338     
   333     SendDataL(iMTPTypeUint32);
   339     SendDataL(iMTPTypeUint32);
   334     }
   340     }
   335 
   341 
       
   342 void CMTPImageDpGetObjectPropValue::ServiceRepresentativeSampleDataL()
       
   343     {
       
   344     iObjectPropertyMgr.GetPropertyL(EMTPObjectPropCodeRepresentativeSampleData, *iMTPTypeArray);
       
   345     
       
   346     SendDataL(*iMTPTypeArray);
       
   347     }
       
   348 
   336 void CMTPImageDpGetObjectPropValue::ServiceNonConsumableL()
   349 void CMTPImageDpGetObjectPropValue::ServiceNonConsumableL()
   337     {
   350     {
   338     TUint8 nonConsumable;
   351     TUint8 nonConsumable;
   339     iObjectPropertyMgr.GetPropertyL(EMTPObjectPropCodeNonConsumable, nonConsumable);
   352     iObjectPropertyMgr.GetPropertyL(EMTPObjectPropCodeNonConsumable, nonConsumable);
   340     iMTPTypeUint8.Set(nonConsumable);
   353     iMTPTypeUint8.Set(nonConsumable);