localconnectivityservice/dun/utils/inc/DunNoteHandler.h
branchRCL_3
changeset 19 0aa8cc770c8a
equal deleted inserted replaced
18:453dfc402455 19:0aa8cc770c8a
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Manages note showing in UI
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CDUNNOTEHANDLER_H
       
    20 #define C_CDUNNOTEHANDLER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <hb/hbwidgets/hbdevicemessageboxsymbian.h>
       
    24 #include "DunTransporter.h"
       
    25 
       
    26 /**
       
    27  *  Class for managing note showing in UI
       
    28  *
       
    29  *  @lib dunutils.lib
       
    30  *  @since S60 v3.2
       
    31  */
       
    32 NONSHARABLE_CLASS( CDunNoteHandler ) : public CBase,
       
    33                                        public MHbDeviceMessageBoxObserver
       
    34     {
       
    35 
       
    36 public:
       
    37 
       
    38     /**
       
    39      * Two-phased constructor.
       
    40      * @return Instance of self
       
    41      */
       
    42 	static CDunNoteHandler* NewL();
       
    43 
       
    44     /**
       
    45     * Destructor.
       
    46     */
       
    47     virtual ~CDunNoteHandler();
       
    48 
       
    49     /**
       
    50      * Resets data to initial values
       
    51      *
       
    52      * @since S60 3.2
       
    53      * @return None
       
    54      */
       
    55     void ResetData();
       
    56 
       
    57     /**
       
    58      * Issues request to start showing UI note
       
    59      *
       
    60      * @since S60 3.2
       
    61      * @return Symbian error code on error, KErrNone otherwise
       
    62      */
       
    63     TInt IssueRequest();
       
    64 
       
    65     /**
       
    66      * Stops showing UI note
       
    67      *
       
    68      * @since S60 3.2
       
    69      * @return Symbian error code on error, KErrNone otherwise
       
    70      */
       
    71     TInt Stop();
       
    72 
       
    73 private:
       
    74 
       
    75     CDunNoteHandler();
       
    76 
       
    77     void ConstructL();
       
    78 
       
    79     /**
       
    80      * Initializes this class
       
    81      *
       
    82      * @since S60 3.2
       
    83      * @return None
       
    84      */
       
    85     void Initialize();
       
    86 
       
    87     /**
       
    88      * Issues request to start showing UI note
       
    89      *
       
    90      * @since S60 3.2
       
    91      * @return None
       
    92      */
       
    93     void DoIssueRequestL();
       
    94 
       
    95 // from base class MHbDeviceMessageBoxObserver
       
    96 
       
    97 	// TODO: ADD DESCRIPTION HERE!
       
    98     void MessageBoxClosed( const CHbDeviceMessageBoxSymbian* aMessageBox,
       
    99                            CHbDeviceMessageBoxSymbian::TButtonId aButton );
       
   100 
       
   101 private:  // data
       
   102 
       
   103     /**
       
   104      * Note to show
       
   105      */
       
   106     CHbDeviceMessageBoxSymbian* iNote;
       
   107 
       
   108     /**
       
   109      * Current state of note showing: active or inactive
       
   110      */
       
   111     TDunState iNoteState;
       
   112 
       
   113     };
       
   114 
       
   115 #endif  // C_CDUNNOTEHANDLER_H