multimediacommscontroller/tsrc/stubs/inc/mccresourcepool_STUB.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2006 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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MCCRESOURCEPOOLSTUB_H
       
    22 #define MCCRESOURCEPOOLSTUB_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 
       
    27 #include "mccresources.h"
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 // MACROS
       
    32 
       
    33 // DATA TYPES
       
    34 
       
    35 // FUNCTION PROTOTYPES
       
    36 
       
    37 // FORWARD DECLARATIONS
       
    38 class CMccResourceContainer;
       
    39 class CMccResourceItem;
       
    40 class MDataSink;
       
    41 class MDataSource;
       
    42 class CMccMultiplexer;
       
    43 class CMccTimerManager;
       
    44 
       
    45 // CLASS DECLARATION
       
    46 
       
    47 /**
       
    48 *
       
    49 */
       
    50 class CMccResourcePoolStub : public CBase, public MMccResources
       
    51     {
       
    52     public:  // Constructors and destructor
       
    53         
       
    54         /**
       
    55         * Two-phased constructor.
       
    56         */
       
    57         static CMccResourcePoolStub* NewL();
       
    58         
       
    59         /**
       
    60         * Destructor.
       
    61         */
       
    62         virtual ~CMccResourcePoolStub();
       
    63 
       
    64     public: // New functions
       
    65 
       
    66     public: // Functions from MMccResources
       
    67     
       
    68         void ReserveSinkL( MDataSink* aSink, TUint32 aEndpointId );
       
    69         
       
    70         void ReserveSourceL( MDataSource* aSource, TUint32 aEndpointId );
       
    71         
       
    72         void PrepareEndpointRemovalL( TUint32 aEndpointId, 
       
    73                                       RArray<TMccResourceParams>& aAffectedStreams );
       
    74         
       
    75         void RemoveEndpointL( TUint32 aEndpointId );
       
    76         
       
    77         void ReserveResourcesL( const TMccResourceParams& aParams );
       
    78                                  
       
    79         void FreeResources( TUint32 aStreamId );
       
    80         
       
    81         TBool IsResourceUsageAllowed( TUint32 aStreamId );                         
       
    82                                      
       
    83         void SetResourceStateL( TUint32 aStreamId,
       
    84                                 TUint32 aEndpointId, 
       
    85                                 MMccResources::TResourceState aState,
       
    86                                 TBool& aControlNetworkResources,
       
    87                                 RArray<TUint32>& aControlledEndpoints,
       
    88                                 RArray<TUint32>& aUncontrolledEndpoints );
       
    89                                 
       
    90         void ResourceStateSetL();
       
    91                                              
       
    92         TInt EventReceived( TMccEvent& aEvent, 
       
    93                             TBool& aDiscardEvent,
       
    94                             TBool& aEffectiveStandby,
       
    95                             TMccEvent** aAdditionalEvent );
       
    96         
       
    97         const RPointerArray<MDataSink>& Sinks( TBool aOnlyInternals );
       
    98         
       
    99         const RPointerArray<MDataSource>& Sources( TBool aOnlyInternals );
       
   100         
       
   101         CMccMultiplexer* MultiplexerL( MDataSource* aSource );
       
   102         
       
   103   
       
   104         TInt FindResource( TUint32 aLinkId,
       
   105                            TUint32 aEndpointId, 
       
   106                            TUid aResourceUid, 
       
   107                            MDataSource** aSource, 
       
   108                            MDataSink** aSink );
       
   109                                    
       
   110         TInt FindNetworkResourceByRtpStreamId( 
       
   111                                   const TUint32 aMccSessionId,
       
   112                                   const TRtpId& aRtpStreamId,
       
   113                                   MDataSource** aSource, 
       
   114                                   MDataSink** aSink );
       
   115                 
       
   116         TInt FindNetworkResourceByRtpSsrc( 
       
   117                                   const TRtpSSRC& aRtpSsrc,
       
   118                                   MDataSource** aSource, 
       
   119                                   MDataSink** aSink );
       
   120                                   
       
   121         MMccTimerManager& TimerManager();
       
   122         
       
   123         void StoreKeyFrameInfoL( TUint32 aEndpointId, CMMFBuffer& aKeyFrame );
       
   124                 
       
   125         TBool IsKeyFrame( TUint32 aEndpointId, CMMFBuffer& aBuffer );
       
   126         
       
   127         void EnableViewFinderL( TMccVideoSinkSetting& aSetting );
       
   128                 
       
   129         void DisableViewFinderL();
       
   130         
       
   131     protected:  // New functions
       
   132 
       
   133     protected:  // Functions from base classes
       
   134 
       
   135     private:
       
   136 
       
   137         /**
       
   138         * C++ default constructor.
       
   139         */
       
   140         CMccResourcePoolStub();
       
   141 
       
   142         /**
       
   143         * By default Symbian 2nd phase constructor is private.
       
   144         */
       
   145         void ConstructL();
       
   146 
       
   147     public:     // Data
       
   148     
       
   149         TBool iControlled;
       
   150         
       
   151         TInt64 iKeyFrameTimeStamp;
       
   152     
       
   153     protected:  // Data
       
   154 
       
   155     private:    // Data
       
   156     
       
   157         RPointerArray<MDataSink> iTempSinks;
       
   158         
       
   159         RPointerArray<MDataSource> iTempSources;
       
   160         
       
   161         CMccMultiplexer* iMultiplexer;
       
   162         
       
   163         CMccTimerManager* iTimerManager;
       
   164         
       
   165     public:     // Friend classes
       
   166 
       
   167     protected:  // Friend classes
       
   168 
       
   169     private:    // Friend classes
       
   170 
       
   171     };
       
   172 
       
   173 #endif      // MCCRESOURCEPOOLSTUB_H   
       
   174             
       
   175 // End of File