multimediacommsengine/mmcesrv/mmcemediamanager/inc/mceadoptedsrvstream.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CMCEADOPTEDSRVSTREAM_H
       
    22 #define CMCEADOPTEDSRVSTREAM_H
       
    23 
       
    24 #include "mcesrvstream.h"
       
    25 #include "mceclientserver.h"
       
    26 #include "mcesrv.h"
       
    27 
       
    28 
       
    29 /**
       
    30  * 
       
    31  *
       
    32  * @lib 
       
    33  */
       
    34 class CMceAdoptedSrvStream : public CMceSrvStream
       
    35     {
       
    36 
       
    37 public: // Constructors & Destructor
       
    38 
       
    39 
       
    40     /**
       
    41     * Constructor
       
    42     * This is factory method
       
    43     * @return array of server streams
       
    44     */
       
    45     static CMceAdoptedSrvStream* NewL( const CMceSrvStream& aStream );
       
    46     
       
    47     /**
       
    48     * Destructor.
       
    49     */
       
    50      ~CMceAdoptedSrvStream();
       
    51 
       
    52     
       
    53 public: //from CMceSrvStream
       
    54 
       
    55 
       
    56     /**
       
    57     * Is adopted
       
    58     */
       
    59     TBool IsAdopted() const;
       
    60 
       
    61     /**
       
    62     * Returns state of stream, which depends on states of
       
    63     * sink and source
       
    64     * @return the state
       
    65     */
       
    66     CMceSrvStream::TState State() const;
       
    67 
       
    68     /**
       
    69     * Checks, if this is equal to another stream
       
    70     * @param aStream an another stream
       
    71     * @return ETrue, if this is equal
       
    72     */
       
    73     TBool IsEqual( const CMceSrvStream& aStream ) const;
       
    74 
       
    75     /**
       
    76     * Is Prepared by MCC
       
    77     * @return ETrue, if so
       
    78     */
       
    79     TBool IsMccPrepared() const;
       
    80 
       
    81     /**
       
    82     * Invalidates the stream
       
    83     */
       
    84     void Invalidate();
       
    85 
       
    86     /**
       
    87     * Gets session id
       
    88     * @return session id
       
    89     */
       
    90     TUint32 SessionId() const;
       
    91     
       
    92     /**
       
    93     * Gets link id
       
    94     * @return link id
       
    95     */
       
    96     TUint32 LinkId() const;
       
    97 
       
    98     /**
       
    99     * Sets link id
       
   100     * @param aLinkId link id
       
   101     */
       
   102     void SetLinkId( TUint32 aLinkId );
       
   103 
       
   104     /**
       
   105     * Gets IAP id
       
   106     * @return IAP id
       
   107     */
       
   108     TUint32 IapId() const;
       
   109     
       
   110     /**
       
   111     * Gets local media port of stream
       
   112     * @return local media port of stream
       
   113     */
       
   114     TUint LocalMediaPort() const;
       
   115 
       
   116     /**
       
   117     * Cleans up unused sinks/sources from mcc
       
   118     */
       
   119     void Cleanup();
       
   120     
       
   121 private://methods
       
   122 
       
   123     /**
       
   124      * C++ default constructor.
       
   125      */
       
   126     CMceAdoptedSrvStream( const CMceSrvStream& aStream );
       
   127 
       
   128 private: // owned data
       
   129     
       
   130     TMceMediaId iCodecId;
       
   131     TMceMediaId iSinkId;
       
   132     TMceMediaId iSourceId;
       
   133 
       
   134     TUint32 iSessionId;
       
   135     TUint32 iLinkId;
       
   136     TUint32 iIapId;
       
   137     TUint32 iSourceEndpointId;
       
   138     TUint32 iSinkEndpointId;
       
   139     TUint iLocalMediaPort;
       
   140 
       
   141 	//definitions for unit testing
       
   142 	MCEMM_UT_DEFINITIONS
       
   143 
       
   144     
       
   145     };
       
   146 
       
   147 
       
   148 
       
   149 #endif //CMCEADOPTEDSRVSTREAM_H