mtpfws/mtpfw/src/cmtpserviceinfo.cpp
changeset 47 63cf70d3ecd8
parent 0 d0791faffa3f
equal deleted inserted replaced
44:a5deb6b96675 47:63cf70d3ecd8
    18 @internalComponent
    18 @internalComponent
    19 */ 
    19 */ 
    20 
    20 
    21 #include "mtpservicecommon.h"
    21 #include "mtpservicecommon.h"
    22 #include "cmtpserviceinfo.h"
    22 #include "cmtpserviceinfo.h"
       
    23 #include "OstTraceDefinitions.h"
       
    24 #ifdef OST_TRACE_COMPILER_IN_USE
       
    25 #include "cmtpserviceinfoTraces.h"
       
    26 #endif
       
    27 
    23 
    28 
    24 
    29 
    25 // Class constants.
    30 // Class constants.
    26 
       
    27 __FLOG_STMT(_LIT8(KComponent,"ServiceInfo");)
       
    28 
    31 
    29 
    32 
    30 TPKeyPair::TPKeyPair( const TMTPTypeGuid& aNamespace, const TUint aID ):
    33 TPKeyPair::TPKeyPair( const TMTPTypeGuid& aNamespace, const TUint aID ):
    31     iNamespace( aNamespace ),
    34     iNamespace( aNamespace ),
    32     iPKeyId(aID)
    35     iPKeyId(aID)
   202     return self;
   205     return self;
   203     }
   206     }
   204 
   207 
   205 CMTPServiceInfo::~CMTPServiceInfo()
   208 CMTPServiceInfo::~CMTPServiceInfo()
   206     {
   209     {
   207     __FLOG(_L8("CServiceInfo::~CserviceInfo() - Entry"));
   210     OstTraceFunctionEntry0( CMTPSERVICEINFO_CMTPSERVICEINFO_DES_ENTRY );
   208     
   211     
   209     delete iServiceName;
   212     delete iServiceName;
   210     
   213     
   211     iUsedServiceGUIDs.Close();
   214     iUsedServiceGUIDs.Close();
   212     iServiceProperties.ResetAndDestroy();
   215     iServiceProperties.ResetAndDestroy();
   213     iServiceFormats.ResetAndDestroy();
   216     iServiceFormats.ResetAndDestroy();
   214     iServiceMethods.ResetAndDestroy();
   217     iServiceMethods.ResetAndDestroy();
   215     iServiceEvents.ResetAndDestroy();
   218     iServiceEvents.ResetAndDestroy();
   216     iDataBlock.Close();
   219     iDataBlock.Close();
   217     
   220 
   218     __FLOG(_L8("CServiceInfo::~CserviceInfo() - Exit"));
   221     OstTraceFunctionExit0( CMTPSERVICEINFO_CMTPSERVICEINFO_DES_EXIT );
   219     __FLOG_CLOSE;
       
   220     }
   222     }
   221     
   223     
   222 
   224 
   223 CMTPServiceInfo::CMTPServiceInfo()
   225 CMTPServiceInfo::CMTPServiceInfo()
   224     {
   226     {
   225     }
   227     }
   226 void CMTPServiceInfo::ConstructL()
   228 void CMTPServiceInfo::ConstructL()
   227     {
   229     {
   228     __FLOG_OPEN(KMTPSubsystem, KComponent);
   230     OstTraceFunctionEntry0( CMTPSERVICEINFO_CONSTRUCTL_ENTRY );
   229     __FLOG(_L8("CServiceInfo::ConstructL() - Entry"));
   231     OstTraceFunctionExit0( CMTPSERVICEINFO_CONSTRUCTL_EXIT );
   230    
       
   231     
       
   232     
       
   233     __FLOG(_L8("CServiceInfo::ConstructL() - Exit"));
       
   234     }
   232     }
   235 
   233 
   236 
   234 
   237 TInt CMTPServiceInfo::ServicePropertyOrderFromAscending( const CServiceProperty& aL, const CServiceProperty& aR)
   235 TInt CMTPServiceInfo::ServicePropertyOrderFromAscending( const CServiceProperty& aL, const CServiceProperty& aR)
   238     {
   236     {
   337     iBaseServiceId = aID;
   335     iBaseServiceId = aID;
   338     }
   336     }
   339 
   337 
   340 void CMTPServiceInfo::AppendUserServiceL( const TMTPTypeGuid& aServiceGUID )
   338 void CMTPServiceInfo::AppendUserServiceL( const TMTPTypeGuid& aServiceGUID )
   341     {
   339     {
   342     __FLOG(_L8("CServiceInfo::AppendUserServiceL - Entry"));
   340     OstTraceFunctionEntry0( CMTPSERVICEINFO_APPENDUSERSERVICEL_ENTRY );
   343     
   341     
   344     iUsedServiceGUIDs.AppendL( aServiceGUID );
   342     iUsedServiceGUIDs.AppendL( aServiceGUID );
   345     
   343     
   346     __FLOG(_L8("CServiceInfo::AppendUserServiceL - Exit"));
   344     OstTraceFunctionExit0( CMTPSERVICEINFO_APPENDUSERSERVICEL_EXIT );
   347     }
   345     }
   348 
   346 
   349 void CMTPServiceInfo::InsertPropertyL( const CServiceProperty* aProperty )
   347 void CMTPServiceInfo::InsertPropertyL( const CServiceProperty* aProperty )
   350     {
   348     {
   351     __FLOG(_L8("CServiceInfo::InsertPropertyL - Entry"));
   349     OstTraceFunctionEntry0( CMTPSERVICEINFO_INSERTPROPERTYL_ENTRY );
   352     
   350     
   353     iServiceProperties.InsertInOrderL( aProperty, TLinearOrder<CServiceProperty>(ServicePropertyOrderFromAscending) );
   351     iServiceProperties.InsertInOrderL( aProperty, TLinearOrder<CServiceProperty>(ServicePropertyOrderFromAscending) );
   354     
   352 
   355     __FLOG(_L8("CServiceInfo::InsertPropertyL - Exit"));
   353     OstTraceFunctionExit0( CMTPSERVICEINFO_INSERTPROPERTYL_EXIT );
   356     }
   354     }
   357 
   355 
   358 void CMTPServiceInfo::InsertFormatL( const CServiceFormat* aFormat )
   356 void CMTPServiceInfo::InsertFormatL( const CServiceFormat* aFormat )
   359     {
   357     {
   360     __FLOG(_L8("CServiceInfo::InsertFormatL - Entry"));
   358     OstTraceFunctionEntry0( CMTPSERVICEINFO_INSERTFORMATL_ENTRY );
   361     
   359     
   362     iServiceFormats.InsertInOrderL( aFormat, TLinearOrder<CServiceFormat>(ServiceFormatOrderFromAscending) );
   360     iServiceFormats.InsertInOrderL( aFormat, TLinearOrder<CServiceFormat>(ServiceFormatOrderFromAscending) );
   363     
   361 
   364     __FLOG(_L8("CServiceInfo::InsertFormatL - Exit"));
   362     OstTraceFunctionExit0( CMTPSERVICEINFO_INSERTFORMATL_EXIT );
   365     }
   363     }
   366 
   364 
   367 void CMTPServiceInfo::InsertMethodL( const CServiceMethod* aMethod )
   365 void CMTPServiceInfo::InsertMethodL( const CServiceMethod* aMethod )
   368     {
   366     {
   369     __FLOG(_L8("CServiceInfo::InsertMethodL - Entry"));
   367     OstTraceFunctionEntry0( CMTPSERVICEINFO_INSERTMETHODL_ENTRY );
   370     
   368     
   371     iServiceMethods.InsertInOrderL( aMethod , TLinearOrder<CServiceMethod>(ServiceMethodOrderFromAscending) );
   369     iServiceMethods.InsertInOrderL( aMethod , TLinearOrder<CServiceMethod>(ServiceMethodOrderFromAscending) );
   372     
   370 
   373     __FLOG(_L8("CServiceInfo::InsertMethodL - Exit"));
   371     OstTraceFunctionExit0( CMTPSERVICEINFO_INSERTMETHODL_EXIT );
   374     }
   372     }
   375 
   373 
   376 void CMTPServiceInfo::InsertEventL( const CServiceEvent* aEvent )
   374 void CMTPServiceInfo::InsertEventL( const CServiceEvent* aEvent )
   377     {
   375     {
   378     __FLOG(_L8("CServiceInfo::InsertMethodL - Entry"));
   376     OstTraceFunctionEntry0( CMTPSERVICEINFO_INSERTEVENTL_ENTRY );
   379     
   377     
   380     iServiceEvents.InsertInOrderL( aEvent , TLinearOrder<CServiceEvent>(ServiceEventOrderFromAscending) );
   378     iServiceEvents.InsertInOrderL( aEvent , TLinearOrder<CServiceEvent>(ServiceEventOrderFromAscending) );
   381     
   379 
   382     __FLOG(_L8("CServiceInfo::InsertMethodL - Exit"));
   380     OstTraceFunctionExit0( CMTPSERVICEINFO_INSERTEVENTL_EXIT );
   383     }
   381     }
   384   
   382   
   385 void CMTPServiceInfo::AppendDataGUIDL( const TMTPTypeGuid& aGUID )
   383 void CMTPServiceInfo::AppendDataGUIDL( const TMTPTypeGuid& aGUID )
   386     {
   384     {
   387     __FLOG(_L8("CServiceInfo::AppendDataGUIDL - Entry"));
   385     OstTraceFunctionEntry0( CMTPSERVICEINFO_APPENDDATAGUIDL_ENTRY );
   388     
   386 
   389     iDataBlock.AppendL( aGUID );
   387     iDataBlock.AppendL( aGUID );
   390     
   388 
   391     __FLOG(_L8("CServiceInfo::AppendDataGUIDL - Exit"));
   389     OstTraceFunctionExit0( CMTPSERVICEINFO_APPENDDATAGUIDL_EXIT );
   392     }
   390     }
   393     
   391     
   394 EXPORT_C TUint CMTPServiceInfo::ServiceID() const
   392 EXPORT_C TUint CMTPServiceInfo::ServiceID() const
   395     {
   393     {
   396     return iServiceId;
   394     return iServiceId;