usbuis/usbuinotif/src/usbuinotifotgwarning.cpp
changeset 25 8c311f9acc5e
parent 3 47c263f7e521
child 52 831068540b07
child 63 ef2686f7597e
equal deleted inserted replaced
8:7e15987c4500 25:8c311f9acc5e
    71     }
    71     }
    72 
    72 
    73 void CUsbUiNotifOtgWarning::ConstructL()
    73 void CUsbUiNotifOtgWarning::ConstructL()
    74     {
    74     {
    75     CUSBUINotifierBase::ConstructL();
    75     CUSBUINotifierBase::ConstructL();
    76     iStringIds.AppendL( R_USB_OTG_WARNING_PARTIAL_SUPPORTED);
    76     iStringIds.AppendL( R_USB_OTG_WARNING_PARTIAL_SUPPORT);
    77     }
    77     }
    78 
    78 
    79 // ----------------------------------------------------------------------------
    79 // ----------------------------------------------------------------------------
    80 // CUsbUiNotifOtgWarning::RegisterL
    80 // CUsbUiNotifOtgWarning::RegisterL
    81 // Register notifier.
    81 // Register notifier.
   121     {
   121     {
   122     FLOG(_L("[USBUINOTIF]\t CUsbUiNotifOtgWarning::GetParamsL"));
   122     FLOG(_L("[USBUINOTIF]\t CUsbUiNotifOtgWarning::GetParamsL"));
   123     if (iNote || iReplySlot != 0 || iNeedToCompleteMessage)
   123     if (iNote || iReplySlot != 0 || iNeedToCompleteMessage)
   124         {
   124         {
   125         User::Leave( KErrInUse );
   125         User::Leave( KErrInUse );
   126         }
   126         }    
   127 
       
   128     iMessage = aMessage;
       
   129     iNeedToCompleteMessage = ETrue;
       
   130     iReplySlot = aReplySlot;
       
   131 
   127 
   132     // Get parameters 
   128     // Get parameters 
   133     //    
   129     //    
   134     TPckgC<TInt> pckg( iNoteId );
   130     TPckgC<TInt> pckg( iNoteId );
   135     pckg.Set( aBuffer );
   131     pckg.Set( aBuffer );
   136     iNoteId = pckg();
   132     iNoteId = pckg();
       
   133     
       
   134     FTRACE(FPrint(_L("[USBUINOTIF]\t CUsbUiNotifOtgWarning::GetParamsL iNoteId: %d"), iNoteId ));  
       
   135     if ( iNoteId < 0 || iNoteId >= iStringIds.Count() )
       
   136         {        
       
   137         User::Leave( KErrArgument);        
       
   138         }   
   137 
   139 
       
   140     iMessage = aMessage;
       
   141     iNeedToCompleteMessage = ETrue;
       
   142     iReplySlot = aReplySlot;
       
   143     
   138     SetActive();
   144     SetActive();
   139     iStatus = KRequestPending;
   145     iStatus = KRequestPending;
   140     TRequestStatus* stat = &iStatus;
   146     TRequestStatus* stat = &iStatus;
   141     User::RequestComplete( stat, KErrNone );
   147     User::RequestComplete( stat, KErrNone );
   142     FLOG(_L("[USBUINOTIF]\t CUsbUiNotifOtgWarning::GetParamsL() completed"));
   148     FLOG(_L("[USBUINOTIF]\t CUsbUiNotifOtgWarning::GetParamsL() completed"));