uifw/EikStd/srvuiinc/EIKNFYUI.H
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 /*
       
     2 * Copyright (c) 2002-2008 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:  Alert dialog for EIKON Server.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_EIKNFYUI_H
       
    20 #define C_EIKNFYUI_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <aknmessagequerydialog.h>
       
    24 
       
    25 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    26 #include <uikon/eiksvfty.h>
       
    27 #else
       
    28 #include <uikon/eiksvfty.h>
       
    29 #include <uikon/eiknotifyalert.h>
       
    30 #endif
       
    31 
       
    32 /**
       
    33 *  EIKON Server alert dialog.
       
    34 *  Used as the UI implementation of a @c RNotifier::Notify dialog.
       
    35 *
       
    36 *  This class implements a basic the two-line dialog.
       
    37 *
       
    38 *  @lib eiksrvui.lib
       
    39 */
       
    40 NONSHARABLE_CLASS( CEikServNotifyAlert ) : public CAknMessageQueryDialog,
       
    41                                            public MEikServNotifyAlert
       
    42     {
       
    43 public:
       
    44     
       
    45     /**
       
    46     * Default constructor.
       
    47     */
       
    48     CEikServNotifyAlert();
       
    49 
       
    50     /**
       
    51     * Second-phase constructor.
       
    52     */
       
    53     void ConstructL();
       
    54 
       
    55 public: // From base class @c MEikServNotifyAlert.
       
    56     
       
    57     /**
       
    58     * Completes and releases the notifier.
       
    59     */
       
    60     void Release();
       
    61     
       
    62     /**
       
    63     * Displays the two-line notifier dialog.
       
    64     *
       
    65     * @param  aTitle     Text to be shown on the first row.
       
    66     * @param  aLabel     Text to be shown on the second row.
       
    67     * @param  aBut1      Text to be shown on the left softkey.
       
    68     * @param  aBut2      Text to be shown on the right softkey.
       
    69     * @param  aObserver  Pointer to the completion observer.
       
    70     */
       
    71     void DisplayNotifier(
       
    72         const TDesC& aTitle, 
       
    73         const TDesC& aLabel, 
       
    74         const TDesC& aBut1, 
       
    75         const TDesC& aBut2, 
       
    76         MEikNotifyAlertCompletionObserver* aObserver );
       
    77 
       
    78 public: // From base class @c CEikDialog.
       
    79 
       
    80     /**
       
    81     * Handles a dialog button press for the specified button.
       
    82     *
       
    83     * @param   aButtonId  Button that was pressed.
       
    84     *
       
    85     * @return  @c ETrue it it's ok to exit,
       
    86     *          @c EFalse to keep the dialog active.
       
    87     */
       
    88     TBool OkToExitL( TInt aButtonId );
       
    89 
       
    90 public:
       
    91 
       
    92     /**
       
    93     * Displays the note underneath when this is completed.
       
    94     */
       
    95     void DisplayNextNoteL();
       
    96     
       
    97 private: 
       
    98     void DoLeavingSettingsL(
       
    99         const TDesC& aTitle, 
       
   100         const TDesC& aLabel, 
       
   101         const TDesC& aBut1, 
       
   102         const TDesC& aBut2);
       
   103     
       
   104     /**
       
   105     * Resets member variables when their ownership is transferred.
       
   106     */
       
   107     void Reset();
       
   108     
       
   109 private:
       
   110 
       
   111     /**
       
   112     * Destructor.
       
   113     */
       
   114     ~CEikServNotifyAlert();
       
   115     
       
   116 private: // Member data
       
   117 
       
   118     MEikNotifyAlertCompletionObserver*  iObserver;
       
   119     HBufC*                              iTitle;
       
   120     HBufC*                              iLabel;
       
   121     HBufC*                              iBut1;
       
   122     HBufC*                              iBut2;
       
   123     CAsyncCallBack*                     iDisplayCallback; 
       
   124     };
       
   125 
       
   126 #endif