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