usbuis/usbuinotif/inc/usbuinqueriesnotifier.h
branchRCL_3
changeset 64 8ecef05bbada
parent 3 47c263f7e521
equal deleted inserted replaced
8:7e15987c4500 64:8ecef05bbada
     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".
    20 
    20 
    21 // INCLUDES
    21 // INCLUDES
    22 
    22 
    23 #include "usbnotifier.h"      // Base class
    23 #include "usbnotifier.h"      // Base class
    24 #include <AknQueryDialog.h>   // AVKON component
    24 #include <AknQueryDialog.h>   // AVKON component
    25 #include <aknmemorycarddialog.h>
       
    26 
    25 
    27 // CLASS DECLARATION
    26 // CLASS DECLARATION
    28 
    27 
    29 /**
    28 /**
    30  *  This class is used to show USB query dialogs.
    29  *  This class is used to show USB query dialogs.
    31  *
    30  *
    32  *  @lib
    31  *  @lib
    33  */
    32  */
    34 NONSHARABLE_CLASS(CUSBUIQueriesNotifier) : public CUSBUINotifierBase,
    33 NONSHARABLE_CLASS(CUSBUIQueriesNotifier) : public CUSBUINotifierBase
    35         public MAknMemoryCardDialogObserver
       
    36     {
    34     {
    37 public:
    35 public:
    38     // Constructors and destructor
    36     // Constructors and destructor
    39 
    37 
    40     /**
    38     /**
    45     /**
    43     /**
    46      * Destructor.
    44      * Destructor.
    47      */
    45      */
    48     virtual ~CUSBUIQueriesNotifier();
    46     virtual ~CUSBUIQueriesNotifier();
    49 
    47 
    50 public:
       
    51     // from MAknMemoryCardDialogObserver
       
    52 
       
    53     /**
       
    54      * To be notified when unlock completed
       
    55      * @param TInt aResult
       
    56      * @return void
       
    57      */
       
    58     void UnlockComplete(TInt aResult);
       
    59 
    48 
    60 private:
    49 private:
    61     // Functions from base class
    50     // Functions from base class
    62 
    51 
    63     /**
    52     /**
   102     CUSBUIQueriesNotifier();
    91     CUSBUIQueriesNotifier();
   103 
    92 
   104 private:
    93 private:
   105     // New functions
    94     // New functions
   106 
    95 
   107     /**
       
   108      * Unlock the locked memory card
       
   109      * First inform user that the memory card is locked and then show the
       
   110      * memory card dialog for unlocking. 
       
   111      * @param aStringHolder   The string for the query. 
       
   112      * @param aCoverDialogId  The dialog ID for the cover UI.
       
   113      * @return KErrNone - user accepted, KErrCancel - End call key pressed
       
   114      */
       
   115     TInt UnlockMemoryCardL(const TDesC& aStringHolder, TInt aCoverDialogId);
       
   116 
    96 
   117     /**
    97     /**
   118      * Show query dialog 
    98      * Show query dialog 
   119      * @param aStringHolder   The string for the query. 
    99      * @param aStringHolder   The string for the query. 
   120      * @param aCoverDialogId  The dialog ID for the cover UI.
   100      * @param aCoverDialogId  The dialog ID for the cover UI.
   142      * Not own, destroys self when lauched.
   122      * Not own, destroys self when lauched.
   143      */
   123      */
   144     CAknQueryDialog* iUSBQueryDlg;  
   124     CAknQueryDialog* iUSBQueryDlg;  
   145     TUSBUIQueries iQueryType; // To store the type of the query
   125     TUSBUIQueries iQueryType; // To store the type of the query
   146     TInt iDriveLetter; // For MMC locked case
   126     TInt iDriveLetter; // For MMC locked case
   147     // Used for possible Cancel while the dialog is showing
       
   148     CAknMemoryCardDialog* iMemoryCardDialog;
       
   149 
   127 
   150     };
   128     };
   151 #endif // USBUINQUERIESNOTIFIER_H
   129 #endif // USBUINQUERIESNOTIFIER_H