usbuis/usbuinotif/src/usbuincableconnectednotifier.cpp
changeset 58 c3241a5ac9ff
parent 52 831068540b07
equal deleted inserted replaced
53:ff06ad965fd1 58:c3241a5ac9ff
     1 /*
     1 /*
     2  * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
     3  * All rights reserved.
     3  * All rights reserved.
     4  * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5  * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6  * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    96     return iInfo;
    96     return iInfo;
    97     }
    97     }
    98 
    98 
    99 // ----------------------------------------------------------------------------
    99 // ----------------------------------------------------------------------------
   100 // CUSBUICableConnectedNotifier::StartDialogL
   100 // CUSBUICableConnectedNotifier::StartDialogL
   101 //  Jump to RunL as soon as possible.
       
   102 // ----------------------------------------------------------------------------
   101 // ----------------------------------------------------------------------------
   103 //
   102 //
   104 void CUSBUICableConnectedNotifier::StartDialogL(const TDesC8& /*aBuffer*/,
   103 void CUSBUICableConnectedNotifier::StartDialogL(const TDesC8& /*aBuffer*/,
   105         TInt aReplySlot, const RMessagePtr2& aMessage)
   104         TInt aReplySlot, const RMessagePtr2& aMessage)
   106     {
   105     {
   113     InitializeTextResolver();
   112     InitializeTextResolver();
   114 
   113 
   115     iMessage = aMessage;
   114     iMessage = aMessage;
   116     iNeedToCompleteMessage = ETrue;
   115     iNeedToCompleteMessage = ETrue;
   117     iReplySlot = aReplySlot;
   116     iReplySlot = aReplySlot;
       
   117     if (iDialog)
       
   118         {
       
   119         FLOG(_L("[USBUINOTIF]\t CUSBUICableConnectedNotifier::StartDialogL() deleting previous dialog"));
       
   120         delete iDialog;
       
   121         iDialog = NULL;
       
   122         }
   118     iDialog = CHbDeviceNotificationDialogSymbian::NewL(this);
   123     iDialog = CHbDeviceNotificationDialogSymbian::NewL(this);
   119       
   124       
   120     HBufC* header = NULL;
   125     HBufC* header = NULL;
   121     HBufC* description =NULL;   
   126     HBufC* description =NULL;   
   122     GetPersonalityStringLC(header, description);
   127     GetPersonalityStringLC(header, description);
   152     FLOG(_L("[USBUINOTIF]\t CUSBUICableConnectedNotifier::Cancel() completed"));
   157     FLOG(_L("[USBUINOTIF]\t CUSBUICableConnectedNotifier::Cancel() completed"));
   153     }
   158     }
   154 
   159 
   155 // -----------------------------------------------------------------------------------------------------------
   160 // -----------------------------------------------------------------------------------------------------------
   156 // CUSBUICableConnectedNotifier::GetPersonalityStringL
   161 // CUSBUICableConnectedNotifier::GetPersonalityStringL
   157 // Get the strings for ask on connection message query 
   162 // Get the strings for the discreet popup dialog
   158 // -----------------------------------------------------------------------------------------------------------
   163 // -----------------------------------------------------------------------------------------------------------
   159 //
   164 //
   160 void CUSBUICableConnectedNotifier::GetPersonalityStringLC(
   165 void CUSBUICableConnectedNotifier::GetPersonalityStringLC(
   161        HBufC*& aHeader,HBufC*& aDescription )
   166        HBufC*& aHeader,HBufC*& aDescription )
   162     {
   167     {