sipvoipprovider/inc/svprtpobserver.h
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 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:  RTP observer for SVP
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SVPRTPOBSERVER_H
       
    20 #define SVPRTPOBSERVER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <mcesession.h>
       
    25 #include <mcertpobserver.h>
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CSVPSessionBase;
       
    29 class CSVPRtpObserverRequest;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34  * CSVPRtpObserver
       
    35  * 
       
    36  */
       
    37 class CSVPRtpObserver : public CBase, public MMceRtpObserver
       
    38     {
       
    39 public:     // Constructors and destructor
       
    40 
       
    41     /**
       
    42      * Destructor.
       
    43      */
       
    44     ~CSVPRtpObserver();
       
    45 
       
    46     /**
       
    47      * Two-phased constructor.
       
    48      */
       
    49     static CSVPRtpObserver* NewL();
       
    50 
       
    51     /**
       
    52      * Two-phased constructor.
       
    53      */
       
    54     static CSVPRtpObserver* NewLC();
       
    55 
       
    56 public:     // From MMceRtpObserver
       
    57     
       
    58     void SRReceived( CMceSession& aSession,
       
    59 					CMceMediaStream& aStream );
       
    60     
       
    61     void RRReceived( CMceSession& aSession,
       
    62 					CMceMediaStream& aStream );
       
    63     
       
    64     void InactivityTimeout( CMceMediaStream& aStream,
       
    65 					CMceRtpSource& aSource );
       
    66     
       
    67     void SsrcAdded( CMceMediaStream& aStream,
       
    68 					CMceRtpSource& aSource,
       
    69 					TUint aSsrc );
       
    70     
       
    71     void SsrcRemoved( CMceMediaStream& aStream,
       
    72 					 CMceRtpSource& aSource,
       
    73 					 TUint aSsrc );
       
    74     
       
    75 public:     // New functions
       
    76     
       
    77     /**
       
    78      * Adds a SVP session for observing RTCP (or RTCP timeouts).
       
    79      * @since S60 v3.2
       
    80      * @param aSession SVP session.
       
    81      */
       
    82     void AddSessionForObservingL( CSVPSessionBase* aSession );
       
    83     
       
    84     /**
       
    85      * Removes a SVP session from RTCP observer.
       
    86      * @since S60 v3.2
       
    87      * @param aSession SVP session.
       
    88      * @return TInt KErrNotFound if given session is not found,
       
    89      *              KErrNone otherwise.
       
    90      */
       
    91     TInt RemoveSessionFromObserving( CSVPSessionBase* aSession );
       
    92     
       
    93     /**
       
    94      * Resets(stops) session specific RTCP observing timers.
       
    95      * @since S60 3.2
       
    96      * @param aSession SVP session.
       
    97      * @return TInt KErrNotFound if given session is not found,
       
    98      *              KErrNone otherwise.
       
    99      */
       
   100     TInt ResetSessionInObserving( CSVPSessionBase* aSession );
       
   101 
       
   102 
       
   103 private:    // New functions
       
   104     
       
   105     /**
       
   106      * Finds a observer request by SVP session.
       
   107      * @since S60 v3.2
       
   108      * @param aSession SVP session
       
   109      * @return CSVPRtpObserverRequest or NULL if associated request not found
       
   110      */
       
   111     CSVPRtpObserverRequest* FindBySvpSession(
       
   112         const CSVPSessionBase* aSession );
       
   113     
       
   114     /**
       
   115      * Finds a observer request by MCE session.
       
   116      * @since S60 v3.2
       
   117      * @param aSession SVP session
       
   118      * @return CSVPRtpObserverRequest or NULL if associated request not found
       
   119      */
       
   120     CSVPRtpObserverRequest* FindByMceSession( const CMceSession* aSession );
       
   121     
       
   122 private:    // Consturctors
       
   123 
       
   124     /**
       
   125      * Constructor for performing 1st stage construction
       
   126      */
       
   127     CSVPRtpObserver();
       
   128 
       
   129     /**
       
   130      * EPOC default constructor for performing 2nd stage construction
       
   131      */
       
   132     void ConstructL();
       
   133 
       
   134 private:    // Data
       
   135     
       
   136     /**
       
   137      * Request array.
       
   138      * Own
       
   139      */
       
   140     RPointerArray<CSVPRtpObserverRequest> iRequestArray;
       
   141     
       
   142     };
       
   143 
       
   144 #endif // SVPRTPOBSERVER_H
       
   145