dvrengine/CommonRecordingEngine/inc/MCRConnectionObserver.h
branchRCL_3
changeset 48 13a33d82ad98
parent 0 822a42b6c3f1
equal deleted inserted replaced
47:826cea16efd9 48:13a33d82ad98
       
     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 the License "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:    Observer class for wrapping RConnection.*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MCRCONNECTIONOBSERVER_H
       
    21 #define MCRCONNECTIONOBSERVER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // CONSTANTS
       
    27 // None
       
    28 
       
    29 // MACROS
       
    30 // None
       
    31 
       
    32 // DATA TYPES
       
    33 // None
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 // None
       
    37 
       
    38 // CLASS DECLARATION
       
    39 
       
    40 /**
       
    41 *  Observer for connection interface status.
       
    42 *
       
    43 *  @lib CommonRecordingEngine.lib
       
    44 *  @since Series 60 3.0
       
    45 */
       
    46 class MCRConnectionObserver
       
    47     {
       
    48 
       
    49 public: // Data types
       
    50     
       
    51     /**
       
    52     * TCRConnectionStatus is set of indications to be sent to client
       
    53     */
       
    54     enum TCRConnectionStatus
       
    55         {                        
       
    56     	ECRBearerChanged,        /**< Indicates change in network bearer */
       
    57 		ECRIapDown,				 /**< Network connection lost */
       
    58     	ECRConnectionError,      /**< Unable to open connection in RTP engine & CR engine */
       
    59     	ECRConnecting,			 /**< Indicates "connection on progress" state to ui */
       
    60     	ECRAuthenticationNeeded, /**< Used to request username/password from ui */
       
    61         ECRNotEnoughBandwidth,	 /**< Stream has too high bitrate for our network */
       
    62     	ECRNormalEndOfStream,    /**< Clip ends normally */
       
    63     	ECRSwitchingToTcp,       /**< Indicates a udp->tcp switch, client may need to reset player */
       
    64     	ECRStreamIsLiveStream,   /**< Indicates that we have stream that can't be paused */
       
    65     	ECRAttachCompleted,      /**< Sent when attached to RConnection */
       
    66     	ECRStreamIsRealMedia,    /**< Indicates that stream is (unsupported) realmedia format */
       
    67         ECRTestSinkData,         /**< Data from TestSink (former NullSink) to test client observer */
       
    68 		ECRSdpAvailable,         /**< Used to communicate availability of SDP */
       
    69         ECRReadyToSeek,          /**< Used to communicate seeking posibility */
       
    70         ECRRecordingStarted,     /**< Used to communicate recording state */
       
    71         ECRRecordingPaused,      /**< Used to communicate recording state */
       
    72         ECRRecordingEnded        /**< Used to communicate recording state */
       
    73         };     
       
    74     
       
    75     /**
       
    76     * This method is called after connection status changes or there is an error
       
    77     * @since Series 60 3.0
       
    78     * @param aSessionId Id to session generating the status change or message. 0 points to no session.
       
    79     * @param aConnection Reference to connection object being used.
       
    80     * @param aInterfaceUp flags if interface has gone up (ETrue)
       
    81     *        or down (EFalse).
       
    82     * @param aError error value associated.
       
    83     * @return none.
       
    84     */
       
    85     virtual void ConnectionStatusChange( TInt aSessionId,
       
    86                                          const TCRConnectionStatus aStatus,
       
    87                                          TInt aErr ) = 0;
       
    88     };
       
    89 
       
    90 #endif // MCRCONNECTIONOBSERVER_H
       
    91 
       
    92 // End of file