remotestoragefw/rsfwnotifierplugins/inc/rsfwnotpluginnamedialog.h
branchRCL_3
changeset 19 88ee4cf65e19
parent 16 87c71b25c937
child 20 1aa8c82cb4cb
equal deleted inserted replaced
16:87c71b25c937 19:88ee4cf65e19
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  File name query dialog for "save as" dialog
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_RSFWNOTPLUGINNAMEDIALOG_H
       
    20 #define C_RSFWNOTPLUGINNAMEDIALOG_H
       
    21 
       
    22 #include <AknQueryDialog.h>
       
    23 
       
    24 // CONSTANTS
       
    25 _LIT(KDot, ".");
       
    26 _LIT(KNotPluginResourcePath, "rsfwnotplugindlg.rsc");
       
    27 
       
    28 // CLASS DECLARATION
       
    29 
       
    30 /**
       
    31  * Dialog for "rename file" query in the Notifier plugin
       
    32  * This dialog is used to get a new name for a file from the user.
       
    33  * It only returns when user has entered a name that is legal in 
       
    34  * Symbian file system
       
    35  */
       
    36 class CRsfwNotPluginNameDialog : public CAknTextQueryDialog
       
    37     {
       
    38     public:  // Constructors and destructor
       
    39 
       
    40         /**
       
    41          * Two-phased constructor.
       
    42          * @param aOldName Old name of the file, this will be the default name
       
    43          *                 This contains the path, but the path is not shown to the user
       
    44          * @param aNewName On return, the user entered new name of the file.
       
    45          *                 Does not contain the path, as it is assumed to remain the same
       
    46          * @return Newly created query dialog.
       
    47          */
       
    48         IMPORT_C static CRsfwNotPluginNameDialog* NewL( const TDesC& aOldName, 
       
    49 											   TDes& aNewName,
       
    50 										    	RFs& aFs);
       
    51 
       
    52 		/**
       
    53         * Destructor.
       
    54         */
       
    55         ~CRsfwNotPluginNameDialog();
       
    56 
       
    57     protected: // from CAknTextQueryDialog
       
    58         /**
       
    59          * @see CAknTextQueryDialog
       
    60          */
       
    61     	TBool OkToExitL( TInt aButtonId );
       
    62 
       
    63 	private:
       
    64         /**
       
    65         * C++ default constructor.
       
    66         */
       
    67         CRsfwNotPluginNameDialog( TDes& aNewName, RFs& aFs  );
       
    68 
       
    69         /**
       
    70          * Symbian OS 2nd phase constructor.
       
    71          * @param aOldName Old name of the file, this will be the default name
       
    72          */
       
    73 		void ConstructL( const TDesC& aOldName );
       
    74 	
       
    75             
       
    76         /**
       
    77         * Show simple error note if something is wrong with the name the user chose
       
    78         * @param aTextId localized string
       
    79         */   
       
    80         void ShowSimpleInfoNoteL(
       
    81             const TInt aTextId);
       
    82 
       
    83     	
       
    84 
       
    85     private:    // Data
       
    86         /// Own: Old file name
       
    87         HBufC* iOldName;
       
    88         RFs& iFs;
       
    89     };
       
    90 
       
    91 #endif