messagingappbase/msgeditor/viewinc/MsgAsyncControlObserver.h
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     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:  MsgAsyncControlObserver  declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MMSGASYNCCONTROLOBSERVER_H
       
    21 #define MMSGASYNCCONTROLOBSERVER_H
       
    22 
       
    23 // ========== INCLUDE FILES ================================
       
    24 
       
    25 // ========== CONSTANTS ====================================
       
    26 
       
    27 // ========== MACROS =======================================
       
    28 
       
    29 // ========== DATA TYPES ===================================
       
    30 
       
    31 // Order is important. Do not change unless you know what you do.
       
    32 enum TMsgAsyncControlState
       
    33     {
       
    34     EMsgAsyncControlStateIdle = 0,
       
    35     EMsgAsyncControlStateOpening,
       
    36     EMsgAsyncControlStateBuffering,
       
    37     EMsgAsyncControlStateReady,
       
    38     EMsgAsyncControlStateAboutToPlay,
       
    39     EMsgAsyncControlStatePlaying,
       
    40     EMsgAsyncControlStatePaused,
       
    41     EMsgAsyncControlStateStopped,
       
    42     EMsgAsyncControlStateNoRights,
       
    43     EMsgAsyncControlStateCorrupt,       // cannot recover
       
    44     EMsgAsyncControlStateError
       
    45     };
       
    46 
       
    47 
       
    48 // ========== FUNCTION PROTOTYPES ==========================
       
    49 
       
    50 // ========== FORWARD DECLARATIONS =========================
       
    51 class CMsgBaseControl;
       
    52 
       
    53 // ========== CLASS DECLARATION ============================
       
    54 
       
    55 /**
       
    56 * MMsgAsyncControlObserver
       
    57 */
       
    58 class MMsgAsyncControlObserver
       
    59     {
       
    60     public: // new methods
       
    61 
       
    62         /**
       
    63         * Call back function for reporting asynchronous control state machine state has been changed
       
    64         * to observer.
       
    65         *
       
    66         * @param aControl - Changed asynchrnous control.
       
    67         * @param aNewState - New state of the control.
       
    68         * @param aOldState - Old state of the control.
       
    69         */
       
    70         virtual void MsgAsyncControlStateChanged( CMsgBaseControl& aControl,
       
    71                                                   TMsgAsyncControlState aNewState,
       
    72                                                   TMsgAsyncControlState aOldState ) = 0;
       
    73         
       
    74         /**
       
    75         * Call back function for reporting asynchronous control resource changes to observer.
       
    76         *
       
    77         * @param aControl - Changed MediaControl.
       
    78         */                                          
       
    79         virtual void MsgAsyncControlResourceChanged( CMsgBaseControl& aControl, TInt aType ) = 0;
       
    80     };
       
    81 
       
    82 #endif // MMSGASYNCCONTROLOBSERVER_H
       
    83 
       
    84 // End of File