usbengines/usbotgwatcher/src/cusbindicatornotifier.cpp
branchRCL_3
changeset 13 7068aba64af5
parent 3 47c263f7e521
child 20 a15c582fbf97
equal deleted inserted replaced
8:7e15987c4500 13:7068aba64af5
    58     // Unsubscribe from VBus change notifications
    58     // Unsubscribe from VBus change notifications
    59     if(iOtgWatcher)
    59     if(iOtgWatcher)
    60         {
    60         {
    61         if(iOtgWatcher->VBusObserver())
    61         if(iOtgWatcher->VBusObserver())
    62             {
    62             {
    63             TRAPD(err, iOtgWatcher->VBusObserver()->UnsubscribeL(this));
    63             TRAP_IGNORE(iOtgWatcher->VBusObserver()->UnsubscribeL(*this));
    64             err=err; // to avoid warning;
       
    65             }
    64             }
    66         
    65         
    67         // Unsubscribe from otg watcher states change notifications
    66         // Unsubscribe from otg watcher states change notifications
    68         TRAPD(err, iOtgWatcher->UnsubscribeL(this));
    67         TRAP_IGNORE(iOtgWatcher->UnsubscribeL(*this));
    69         err=err; // to avoid warning; 
       
    70         }
    68         }
    71     }
    69     }
    72 
    70 
    73 // ---------------------------------------------------------------------------
    71 // ---------------------------------------------------------------------------
    74 // C++ constructor
    72 // C++ constructor
    91 void CUsbIndicatorNotifier::ConstructL()
    89 void CUsbIndicatorNotifier::ConstructL()
    92     {
    90     {
    93     FLOG( _L( "[USBOTGWATCHER]\tCUsbIndicatorNotifier::ConstructL" ) );
    91     FLOG( _L( "[USBOTGWATCHER]\tCUsbIndicatorNotifier::ConstructL" ) );
    94     
    92     
    95     // Subscribe for VBus change notifications
    93     // Subscribe for VBus change notifications
    96     iOtgWatcher->VBusObserver()->SubscribeL(this);
    94     iOtgWatcher->VBusObserver()->SubscribeL(*this);
    97     
    95     
    98     // Subscribe for otg watcher states change notifications
    96     // Subscribe for otg watcher states change notifications
    99     iOtgWatcher->SubscribeL(this);
    97     iOtgWatcher->SubscribeL(*this);
   100 
    98 
   101     iIconBlinkingTimer = CUsbTimer::NewL(this, EIconBlinkingTimer);
    99     iIconBlinkingTimer = CUsbTimer::NewL(this, EIconBlinkingTimer);
   102     
   100     
   103     // check here for condition to set usb indicator
   101     // check here for condition to set usb indicator
   104     SetIndicatorL();
   102     SetIndicatorL();