multimediacommsengine/mmcesrv/mmcemediamanager/inc/mcemediadefs.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2002-2004 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:    Includes SDP-bounded enumerations etc.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef MCEMEDIADEFS_H
       
    23 #define MCEMEDIADEFS_H
       
    24 
       
    25 //  INCLUDES
       
    26 #include <stringpool.h>
       
    27 #include "mcesrv.h"
       
    28 
       
    29 // CONSTANTS
       
    30 
       
    31 _LIT8( KMceSdpDefaultSessionName, "-" );
       
    32 _LIT8( KMceSdpDefaultUserName, "-" );
       
    33 _LIT8( KMceSdpOptionalEncodingParam, "");
       
    34 _LIT8( KMceSdpNullFormatList, "0");
       
    35 _LIT8( KMceVideoFrameSizeFormat, "%u %d-%d" ); 
       
    36 _LIT8( KMceVideoFrameSizeAttribute, "framesize" );
       
    37 
       
    38 const TInt KMceSdpMaxMediaLineLength = 100;
       
    39 const TInt KMceSdpAmrFmtpAttributesLength = 150;
       
    40 const TInt KMceSdpFormatListLength = 30;
       
    41 const TInt KMceSdpNumericAttributeLength = 11;
       
    42 
       
    43 #define SDP_STRINGL( stringIndex )\
       
    44     SdpCodecStringPool::StringPoolL().\
       
    45     StringF( stringIndex, SdpCodecStringPool::StringTableL() )
       
    46 #define MCE_AUDIO( stream )\
       
    47     static_cast<CMceComAudioStream&>( stream )
       
    48 #define MCE_VIDEO( stream )\
       
    49     static_cast<CMceComVideoStream&>( stream )
       
    50 
       
    51 #define MCE_DEFINE_DECSTR( attr, value )\
       
    52     TBuf8<KMceSdpNumericAttributeLength> attr;\
       
    53     attr.Num( value, EDecimal );
       
    54 #define MCE_DEFINE_AUDIO( stream, mediaStream )\
       
    55     CMceComAudioStream& stream = MCE_AUDIO( mediaStream )
       
    56 #define MCE_DEFINE_AUDIO_CODEC( codec, aCodec )\
       
    57     CMceComAudioCodec& codec = static_cast<CMceComAudioCodec&>( aCodec )
       
    58 #define MCE_DEFINE_VIDEO( stream, mediaStream )\
       
    59     CMceComVideoStream& stream = MCE_VIDEO( mediaStream )
       
    60 #define MCE_DEFINE_VIDEO_CODEC( codec, aCodec )\
       
    61     CMceComVideoCodec& codec = static_cast<CMceComVideoCodec&>( aCodec )
       
    62 #define MCE_DEFINE_CODECS( codecs, stream )\
       
    63     RPointerArray< CMceComCodec >& codecs = reinterpret_cast< RPointerArray< CMceComCodec >& >( (stream).Codecs() )
       
    64 #define MCE_ITERATOR_FIND_NEXT( iterator, item, condition )\
       
    65         do { iterator.Next( item ); } while ( item && ! (condition) )
       
    66 
       
    67 typedef TUint TMceMMState;
       
    68 
       
    69 const TMceMMState KMceMediaIdle = 1;
       
    70 const TMceMMState KMceOfferingMedia = 2;
       
    71 const TMceMMState KMceAnsweringMedia = 3;
       
    72 const TMceMMState KMceAnsweringMediaUpdate = 4;
       
    73 const TMceMMState KMceMediaNegotiated = 5;
       
    74 
       
    75 const TMceMMState KMcePreparingOffererStreams = 6;
       
    76 const TMceMMState KMceStartingOffererReceiveStreams = 7;
       
    77 const TMceMMState KMceStartingOffererSendStreams = 8;
       
    78 const TMceMMState KMcePreparingAnswererStreams = 9;
       
    79 const TMceMMState KMceStartingAnswererStreams = 10;
       
    80 
       
    81 
       
    82 enum TMceNegotiationRole
       
    83     {
       
    84     EMceRoleOfferer,
       
    85     EMceRoleAnswerer
       
    86     };
       
    87 
       
    88 
       
    89 typedef TUint TMceNegotiationAnswerType;
       
    90 const TMceNegotiationAnswerType KMceNegotiationAnswerTypeNotDefined = 0;
       
    91 const TMceNegotiationAnswerType KMceNegotiationAnswerTypeIntermediate = 1;
       
    92 const TMceNegotiationAnswerType KMceNegotiationAnswerTypeFinal = 2;
       
    93 
       
    94 
       
    95 const TInt KMceNoSignalling = 0;
       
    96 const TInt KMceRequiresSipSignallingOnly = 1;
       
    97 const TInt KMceRequiresSignalling = 2;
       
    98     
       
    99 
       
   100 const TUint KMceFastForwardMultiplier = 5;
       
   101 
       
   102 const TUint KMceCodecSelectionOff = 0;
       
   103 const TUint KMceCodecSelectionMerge = 1;
       
   104 
       
   105 #endif      // MCEMEDIADEFS_H
       
   106             
       
   107 // End of File