syncmlfw/syncmlnotifier/inc/SyncMLTimedMessageQuery.h
branchRCL_3
changeset 25 b183ec05bd8c
parent 24 13d7c31c74e0
child 26 19bba8228ff0
equal deleted inserted replaced
24:13d7c31c74e0 25:b183ec05bd8c
     1 /*
       
     2 * Copyright (c) 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:  Message query with timeout.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CSYNCMLTIMEDMESSAGEQUERY_H
       
    21 #define CSYNCMLTIMEDMESSAGEQUERY_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <aknmessagequerydialog.h>
       
    25 
       
    26 #include "SyncMLQueryTimer.h"
       
    27 
       
    28 // CONSTANTS
       
    29 const TInt  KSyncMLNNoTimeout  = 0; // The query does not time out
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  Message query with timeout.
       
    35 *
       
    36 *  @lib SyncMLNotifier
       
    37 *  @since Series 60 3.0
       
    38 */
       
    39 NONSHARABLE_CLASS ( CSyncMLTimedMessageQuery ) : public CAknMessageQueryDialog,
       
    40                                                  public MSyncMLQueryTimerObserver
       
    41     {
       
    42     public:  // Constructors and destructor
       
    43         
       
    44         /**
       
    45         * Two-phased constructor.
       
    46         */
       
    47         static CSyncMLTimedMessageQuery* NewL(
       
    48             const TDesC& aMessage,
       
    49                   TInt   aTimeout = KSyncMLNNoTimeout );
       
    50         
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CSyncMLTimedMessageQuery();
       
    55 
       
    56     public: // Functions from base classes
       
    57 
       
    58         /**
       
    59         * From MSyncMLQueryTimerObserver Is called when the timer
       
    60         * runs out.
       
    61         * @since Series 60 3.0
       
    62         * @param None
       
    63         * @return None
       
    64         */
       
    65         void TimerExpired();
       
    66         
       
    67     protected:  // Functions from base classes
       
    68         
       
    69         /**
       
    70         * From CEikDialog Starts the dialog timer.
       
    71         * Called after the dialog is laid out.
       
    72         * @since Series 60 3.0
       
    73         * @param None
       
    74         * @return None
       
    75         */
       
    76         void PostLayoutDynInitL();
       
    77 
       
    78         /**
       
    79         * From CEikDialog Determines if the dialog can be closed.
       
    80         * @since Series 60 3.0
       
    81         * @param aButtonId Identifier of the button pressed.
       
    82         * @return None
       
    83         */
       
    84         TBool OkToExitL( TInt aButtonId );
       
    85         
       
    86     private:
       
    87 
       
    88         /**
       
    89         * C++ default constructor.
       
    90         */
       
    91         CSyncMLTimedMessageQuery( TInt aTimeout = KSyncMLNNoTimeout );
       
    92 
       
    93     private:    // Data
       
    94         // Number of seconds before the query is timed out. 0 = no timeout.
       
    95         TInt               iTimeout;
       
    96 
       
    97         // Pointer to the timer instance
       
    98         CSyncMLQueryTimer*  iTimer;
       
    99     };
       
   100 
       
   101 #endif      // CSYNCMLTIMEDMESSAGEQUERY_H   
       
   102             
       
   103 // End of File