mtpfws/mtpfw/dataproviders/proxydp/src/cmtpproxydp.cpp
changeset 47 63cf70d3ecd8
parent 0 d0791faffa3f
equal deleted inserted replaced
44:a5deb6b96675 47:63cf70d3ecd8
    19 #include <mtp/tmtptyperequest.h>
    19 #include <mtp/tmtptyperequest.h>
    20 
    20 
    21 #include "cmtpproxydp.h"
    21 #include "cmtpproxydp.h"
    22 #include "cmtprequestprocessor.h"
    22 #include "cmtprequestprocessor.h"
    23 #include "mtpproxydppanic.h"
    23 #include "mtpproxydppanic.h"
    24 #include "mtpproxydpprocessor.h" 
    24 #include "mtpproxydpprocessor.h"
       
    25 #include "OstTraceDefinitions.h"
       
    26 #ifdef OST_TRACE_COMPILER_IN_USE
       
    27 #include "cmtpproxydpTraces.h"
       
    28 #endif
       
    29  
    25 
    30 
    26 static const TInt KMTPProxyDpSessionGranularity = 3;	
    31 static const TInt KMTPProxyDpSessionGranularity = 3;	
    27 
       
    28 __FLOG_STMT(_LIT8(KComponent,"CMTPProxyDataProvider");)
       
    29 
    32 
    30 /**
    33 /**
    31 Standard NewL method
    34 Standard NewL method
    32 @param aParams	The pointer to MMTPDataProviderFramework
    35 @param aParams	The pointer to MMTPDataProviderFramework
    33 */	
    36 */	
    41 	}
    44 	}
    42 	
    45 	
    43 	
    46 	
    44 void CMTPProxyDataProvider::ConstructL()
    47 void CMTPProxyDataProvider::ConstructL()
    45 	{  
    48 	{  
    46 	__FLOG_OPEN(KMTPSubsystem, KComponent);  
    49 	OstTraceFunctionEntry0( CMTPPROXYDATAPROVIDER_CONSTRUCTL_ENTRY );
    47 	__FLOG(_L8("ConstructL - Entry"));
       
    48 	iDpSingletons.OpenL(Framework());
    50 	iDpSingletons.OpenL(Framework());
    49 	iSingletons.OpenL(Framework());
    51 	iSingletons.OpenL(Framework());
    50 	__FLOG(_L8("ConstructL - Exit"));
    52 	OstTraceFunctionExit0( CMTPPROXYDATAPROVIDER_CONSTRUCTL_EXIT );
    51 	}
    53 	}
    52 
    54 
    53 /**
    55 /**
    54 Destructor
    56 Destructor
    55 */	
    57 */	
    56 CMTPProxyDataProvider::~CMTPProxyDataProvider()
    58 CMTPProxyDataProvider::~CMTPProxyDataProvider()
    57 	{
    59 	{
       
    60 	OstTraceFunctionEntry0( CMTPPROXYDATAPROVIDER_CMTPPROXYDATAPROVIDER_DES_ENTRY );
    58 	TInt count = iActiveProcessors.Count();
    61 	TInt count = iActiveProcessors.Count();
    59 	while(count--)
    62 	while(count--)
    60 		{
    63 		{
    61 		iActiveProcessors[count]->Release();
    64 		iActiveProcessors[count]->Release();
    62 		}
    65 		}
    63 	iActiveProcessors.Close();	
    66 	iActiveProcessors.Close();	
    64 	iDpSingletons.Close();
    67 	iDpSingletons.Close();
    65 	iSingletons.Close();
    68 	iSingletons.Close();
    66     __FLOG_CLOSE; 
    69 	OstTraceFunctionExit0( CMTPPROXYDATAPROVIDER_CMTPPROXYDATAPROVIDER_DES_EXIT );
    67 	}
    70 	}
    68     
    71     
    69 void CMTPProxyDataProvider::Cancel()
    72 void CMTPProxyDataProvider::Cancel()
    70     {
    73     {
    71     
    74     
   148 @param aCategory category of operations of interest
   151 @param aCategory category of operations of interest
   149 @param aArray array to hold the operations
   152 @param aArray array to hold the operations
   150 */
   153 */
   151 void CMTPProxyDataProvider::Supported(TMTPSupportCategory aCategory, RArray<TUint>& /*aArray*/) const
   154 void CMTPProxyDataProvider::Supported(TMTPSupportCategory aCategory, RArray<TUint>& /*aArray*/) const
   152     {
   155     {
   153 
   156     OstTraceFunctionEntry0( CMTPPROXYDATAPROVIDER_SUPPORTED_ENTRY );
   154     __FLOG(_L8("Supported - Entry"));
       
   155     switch (aCategory) 
   157     switch (aCategory) 
   156         {        
   158         {        
   157     case EEvents:
   159     case EEvents:
   158         break;
   160         break;
   159         
   161         
   174     default:
   176     default:
   175     
   177     
   176         // Unrecognised category, leave aArray unmodified.
   178         // Unrecognised category, leave aArray unmodified.
   177         break;
   179         break;
   178         }
   180         }
   179     __FLOG(_L8("Supported - Exit"));
   181 
   180 
   182     OstTraceFunctionExit0( CMTPPROXYDATAPROVIDER_SUPPORTED_EXIT );
   181     }
   183     }
   182     
   184     
   183 
   185 
   184 void CMTPProxyDataProvider::SupportedL(TMTPSupportCategory /*aCategory*/, CDesCArray& /*aStrings*/) const
   186 void CMTPProxyDataProvider::SupportedL(TMTPSupportCategory /*aCategory*/, CDesCArray& /*aStrings*/) const
   185 	{
   187 	{
   186 	__FLOG(_L8("SupportedL - Entry"));
   188 	OstTraceFunctionEntry0( CMTPPROXYDATAPROVIDER_SUPPORTEDL_ENTRY );
   187 	__FLOG(_L8("SupportedL - Exit"));
   189 	OstTraceFunctionExit0( CMTPPROXYDATAPROVIDER_SUPPORTEDL_EXIT );
   188 	}
   190 	}
   189   
   191   
   190     
   192     
   191 /**
       
   192 Get the pointer to the extended interface
       
   193 @param aInterfaceUid	The uid of the extended interface
       
   194 @return the pointer to the extended interface
       
   195 */
       
   196 TAny* CMTPProxyDataProvider::GetExtendedInterface(TUid /*aInterfaceUid*/)
       
   197     {
       
   198     return NULL;
       
   199     }
       
   200 
   193 
   201 /**
   194 /**
   202 Standard c++ constructor
   195 Standard c++ constructor
   203 */
   196 */
   204 CMTPProxyDataProvider::CMTPProxyDataProvider(TAny* aParams)
   197 CMTPProxyDataProvider::CMTPProxyDataProvider(TAny* aParams)
   260     return index;
   253     return index;
   261     }
   254     }
   262        
   255        
   263 void CMTPProxyDataProvider::SessionClosedL(const TMTPNotificationParamsSessionChange& aSession)
   256 void CMTPProxyDataProvider::SessionClosedL(const TMTPNotificationParamsSessionChange& aSession)
   264     {
   257     {
       
   258     OstTraceFunctionEntry0( CMTPPROXYDATAPROVIDER_SESSIONCLOSEDL_ENTRY );
   265     TInt count = iActiveProcessors.Count();
   259     TInt count = iActiveProcessors.Count();
   266     while(count--)
   260     while(count--)
   267         {
   261         {
   268         MMTPRequestProcessor* processor = iActiveProcessors[count];
   262         MMTPRequestProcessor* processor = iActiveProcessors[count];
   269         TUint32 sessionId = processor->SessionId();
   263         TUint32 sessionId = processor->SessionId();
   278     			{    			
   272     			{    			
   279     			processor->Release();
   273     			processor->Release();
   280     			} 
   274     			} 
   281             }
   275             }
   282         }  
   276         }  
       
   277     OstTraceFunctionExit0( CMTPPROXYDATAPROVIDER_SESSIONCLOSEDL_EXIT );
   283     }
   278     }
   284 
   279 
   285 /**
   280 /**
   286 Prepares for a newly-opened session.
   281 Prepares for a newly-opened session.
   287 @param aSession notification parameter block
   282 @param aSession notification parameter block
   288 */
   283 */
   289 #ifdef __FLOG_ACTIVE
   284 #ifdef OST_TRACE_COMPILER_IN_USE
   290 void CMTPProxyDataProvider::SessionOpenedL(const TMTPNotificationParamsSessionChange& /*aSession*/)
   285 void CMTPProxyDataProvider::SessionOpenedL(const TMTPNotificationParamsSessionChange& /*aSession*/)
   291 #else
   286 #else
   292 void CMTPProxyDataProvider::SessionOpenedL(const TMTPNotificationParamsSessionChange& /*aSession*/)
   287 void CMTPProxyDataProvider::SessionOpenedL(const TMTPNotificationParamsSessionChange& /*aSession*/)
   293 #endif
   288 #endif
   294     {
   289     {
   295     __FLOG(_L8("SessionOpenedL - Entry"));
   290     OstTraceFunctionEntry0( CMTPPROXYDATAPROVIDER_SESSIONOPENEDL_ENTRY );
   296     __FLOG(_L8("SessionOpenedL - Exit"));
   291     OstTraceFunctionExit0( CMTPPROXYDATAPROVIDER_SESSIONOPENEDL_EXIT );
   297     }
   292     }
   298 
   293