usbengines/usblocodplugin/src/usblcdactive.cpp
changeset 61 acbdfeb56752
parent 48 625e74332ce2
child 80 e02eb84a14d2
equal deleted inserted replaced
60:7d710eb9330d 61:acbdfeb56752
    18 
    18 
    19 #include <e32property.h>
    19 #include <e32property.h>
    20 #include "usblcdactive.h"
    20 #include "usblcdactive.h"
    21 #include <UsbWatcherInternalPSKeys.h>
    21 #include <UsbWatcherInternalPSKeys.h>
    22 #include <usbpersonalityids.h>
    22 #include <usbpersonalityids.h>
       
    23 #include "debug.h"
    23 
    24 
    24 #ifdef __FLOG_ACTIVE
       
    25 _LIT8(KLogComponent, "USBLcdPlugin");
       
    26 #endif
       
    27 
    25 
    28 // ======== MEMBER FUNCTIONS ========
    26 // ======== MEMBER FUNCTIONS ========
    29 
    27 
    30 // ---------------------------------------------------------------------------
    28 // ---------------------------------------------------------------------------
    31 // Constructs a CUsbLcdActive object.
    29 // Constructs a CUsbLcdActive object.
    32 // ---------------------------------------------------------------------------
    30 // ---------------------------------------------------------------------------
    33 //
    31 //
    34 CUsbLcdActive* CUsbLcdActive::NewL(MLocodBearerPluginObserver& aObserver)
    32 CUsbLcdActive* CUsbLcdActive::NewL(MLocodBearerPluginObserver& aObserver)
    35     {
    33     {
    36     LOG_STATIC_FUNC_ENTRY
    34     LOG_FUNC
    37     CUsbLcdActive* self = new (ELeave) CUsbLcdActive(aObserver);
    35     CUsbLcdActive* self = new (ELeave) CUsbLcdActive(aObserver);
    38     CleanupStack::PushL(self);
    36     CleanupStack::PushL(self);
    39     self->ConstructL();
    37     self->ConstructL();
    40     CleanupStack::Pop(self);
    38     CleanupStack::Pop(self);
    41     return self;
    39     return self;
    72     LOG_FUNC
    70     LOG_FUNC
    73     TInt value;
    71     TInt value;
    74     
    72     
    75     if( iStatus != KErrNone )
    73     if( iStatus != KErrNone )
    76        {
    74        {
    77        LOGTEXT2(_L8("CUsbLcdActive::RunL() error = %d"),iStatus.Int());
    75        LOG1("CUsbLcdActive::RunL() iStatus = %d",iStatus.Int());
    78        }
    76        }
    79     else
    77     else
    80        {
    78        {
    81 
    79 
    82         TInt ret = iProperty.Get( value );
    80         TInt ret = iProperty.Get( value );
    83         LOGTEXT3(_L8("Personality: %d, ret: %d"), value, ret);  
    81         LOG2("Personality: %d, ret: %d", value, ret);  
    84         iProperty.Subscribe(iStatus);
    82         iProperty.Subscribe(iStatus);
    85         SetActive();
    83         SetActive();
    86         if (ret == KErrNone)
    84         if (ret == KErrNone)
    87             { 
    85             { 
    88             HandleUsbPersonalityChange( value );
    86             HandleUsbPersonalityChange( value );
   150 // ---------------------------------------------------------------------------
   148 // ---------------------------------------------------------------------------
   151 //
   149 //
   152 void CUsbLcdActive::HandleUsbPersonalityChange( TInt aNewPersonalityId )
   150 void CUsbLcdActive::HandleUsbPersonalityChange( TInt aNewPersonalityId )
   153     {
   151     {
   154     LOG_FUNC
   152     LOG_FUNC
   155     LOGTEXT2( _L8( "aNewPersonalityId: %d"), aNewPersonalityId );
   153     LOG1( "aNewPersonalityId: %d", aNewPersonalityId );
   156     TBool isPcSuiteActive( EFalse );
   154     TBool isPcSuiteActive( EFalse );
   157     if ( ( aNewPersonalityId == KUsbPersonalityIdPCSuite ) ||
   155     if ( ( aNewPersonalityId == KUsbPersonalityIdPCSuite ) ||
   158          ( aNewPersonalityId == KUsbPersonalityIdPCSuiteMTP ) )
   156          ( aNewPersonalityId == KUsbPersonalityIdPCSuiteMTP ) )
   159         {
   157         {
   160         isPcSuiteActive = ETrue;
   158         isPcSuiteActive = ETrue;