omadm/omadmappui/inc/NSmlDMAuthQueryDlg.h
changeset 0 3ce708148e4d
equal deleted inserted replaced
-1:000000000000 0:3ce708148e4d
       
     1 /*
       
     2 * Copyright (c) 2002-2005 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:  Header file for CNSmlDMMultiQuery
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef NSMLDMAUTHQUERYDLG_H
       
    20 #define NSMLDMAUTHQUERYDLG_H
       
    21 
       
    22 #include <AknQueryDialog.h>
       
    23 
       
    24 #include "NSmlDMdef.h"
       
    25 #include "NSmlDMSyncAppEngine.h"
       
    26 
       
    27 class CNSmlDMQueryTimer;
       
    28 
       
    29 /**
       
    30 * CNSmlDMMultiQuery
       
    31 *  
       
    32 * Multi query
       
    33 */
       
    34 NONSHARABLE_CLASS (CNSmlDMMultiQuery) : public CAknMultiLineDataQueryDialog
       
    35 	{
       
    36 	public:
       
    37 
       
    38         /**
       
    39         * Two-phased constructor.
       
    40         *
       
    41         * @param aAppEngine pointer to app engine
       
    42 		* @param aProfileId profile id
       
    43 		* @param aText1     text for username
       
    44 		* @param aText2     text for password
       
    45         * @return CNSmlDMMultiQuery* new CNSmlDMMultiQuery object
       
    46         */
       
    47 		static CNSmlDMMultiQuery* NewL( CNSmlDMSyncAppEngine* aAppEngine,
       
    48 		                                TInt aProfileId, 
       
    49 		                                TBool aIsHttp );
       
    50 		
       
    51 		/**
       
    52 		* Destructor
       
    53 		*/
       
    54 		virtual ~CNSmlDMMultiQuery();
       
    55 
       
    56 		/**
       
    57         * Called during initialisation just before dialog is shown
       
    58 		* @param None
       
    59         * @return None
       
    60         */
       
    61 		void PostLayoutDynInitL();
       
    62 		
       
    63 		/**
       
    64 		* called when dialog button is clicked or timer has ended
       
    65 		* @param aButtonId  Id of button that was clicked
       
    66         * @return ETrue to close dialog
       
    67         */
       
    68 		virtual TBool OkToExitL( TInt aButtonId );
       
    69 		
       
    70 		/**
       
    71 		* Called whe timer has ended, calls TryExitL()
       
    72 		* @param None
       
    73         * @return None
       
    74         */
       
    75 		void HandleTimerEndL();
       
    76 	private:
       
    77 
       
    78 		/**
       
    79 		* Constructor
       
    80         * @param aAppEngine  pointer to app engine
       
    81 		* @param aProfileId  profile id
       
    82 		* @param aTone       sound when launching the dialog
       
    83         * @return None
       
    84         */
       
    85 		CNSmlDMMultiQuery( CNSmlDMSyncAppEngine* aAppEngine,
       
    86 		                   TInt aProfileId,
       
    87 		                   TBool aIsHttp,
       
    88 		                   TTone aTone = ENoTone );
       
    89 
       
    90 	private:
       
    91 	    // Application engine
       
    92 		CNSmlDMSyncAppEngine*           iAppEngine;
       
    93 		// Profile id
       
    94 		TInt                            iProfileId;
       
    95 		// user name
       
    96 		TBuf<KNSmlMaxUsernameLength>    iUsername;
       
    97 		// Password
       
    98 		TBuf<KNSmlMaxPasswordLength>    iPassword;
       
    99 		// Query timer
       
   100 		CNSmlDMQueryTimer*              iTimer;
       
   101 		TBool                           iIsHttp;
       
   102 	};
       
   103 
       
   104 /**
       
   105 * CNSmlDMQueryTimer
       
   106 *
       
   107 * Query timer  
       
   108 */
       
   109 NONSHARABLE_CLASS (CNSmlDMQueryTimer) : public CTimer
       
   110 	{
       
   111 	public:
       
   112 
       
   113         /**
       
   114         * Two-phased constructor.
       
   115         *
       
   116         * @param aAlertDialog  dialog to be closed after timer has ended
       
   117         * @return new CNSmlDMQueryTimer object
       
   118         */
       
   119 		static CNSmlDMQueryTimer* NewL( CNSmlDMMultiQuery* aAlertDialog );
       
   120 		
       
   121 		/**
       
   122 		* Method is called when time has passed
       
   123 		* @param None
       
   124         * @return None
       
   125         */
       
   126 		void RunL();
       
   127 
       
   128 		/**
       
   129 		* Destructor
       
   130         */
       
   131 		virtual ~CNSmlDMQueryTimer();
       
   132 
       
   133 	private:
       
   134         /**
       
   135         * By default Symbian 2nd phase constructor is private.
       
   136         * @param aAlertDialog  dialog to be closed after timer has ended
       
   137         * @return None
       
   138         */
       
   139 		void ConstructL( CNSmlDMMultiQuery* aAlertDialog );
       
   140 
       
   141 		/**
       
   142 		* Constructor
       
   143         * @param None
       
   144         * @return None
       
   145         */
       
   146 		CNSmlDMQueryTimer();
       
   147 
       
   148 	private:
       
   149 	    // multi query
       
   150 		CNSmlDMMultiQuery* iAlertDialog;
       
   151 	};
       
   152 
       
   153 #endif  // NSMLDMAUTHQUERYDLG_H
       
   154 
       
   155 // End of File