ipappsrv_plat/multimedia_comms_api/inc/mcedefs.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MCEDEFS_H
       
    22 #define MCEDEFS_H
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 const TInt KMceMaxSdpNameLength = 20;
       
    27 const TInt KMceMaxFileNameLength = 512;
       
    28 const TUint8 KMceMaxPacketrate = 10;
       
    29 const TInt KMcePTimeFactor = 1000;
       
    30 const TUint8 KMcePayloadTypeUndefined = 128;
       
    31 
       
    32 const TInt KMceMaxSizeInReadStream = 1000;
       
    33 const TInt KMceMaxSizeInSessionAsDesc = 3000;
       
    34 const TInt KMceExternalizeBufferExpandSize = 100;
       
    35 const TInt KMceArrayGranularity = 5;
       
    36 
       
    37 
       
    38 _LIT8( KMceSDPNamePCMU, "PCMU" );
       
    39 _LIT8( KMceSDPNamePCMA, "PCMA" );
       
    40 _LIT8( KMceSDPNameAMR, "AMR" );
       
    41 _LIT8( KMceSDPNameAMRWB, "AMR-WB" );
       
    42 _LIT8( KMceSDPNameG729, "G729");
       
    43 _LIT8( KMceSDPNameiLBC, "iLBC");
       
    44 _LIT8( KMceSDPNameDtmf, "telephone-event" );
       
    45 _LIT8( KMceSDPNameCn, "CN" );
       
    46 _LIT8( KMceSDPNameRed, "red" );
       
    47 
       
    48 _LIT8( KMceSDPNameH263, "H263" );
       
    49 _LIT8( KMceSDPNameH2632000, "H263-2000" );
       
    50 _LIT8( KMceSDPNameH2631998, "H263-1998" );
       
    51 _LIT8( KMceSDPNameH264, "H264" );
       
    52 
       
    53 typedef TInt TMceReturnStatus;
       
    54 const TMceReturnStatus KMceAsync = 1;
       
    55 const TMceReturnStatus KMceReady = 0;
       
    56 
       
    57 const TInt KMceErrOldSchool = (-100);
       
    58 
       
    59 const TInt KMceAnswerCryptoCount = 1;
       
    60 
       
    61 #define MCE_NOT_NULL_PTR( ptr ) ( ptr ? ETrue : EFalse )
       
    62 #define MCE_IS_NULL_PTR( ptr ) ( !ptr ? ETrue : EFalse )
       
    63 
       
    64 /**
       
    65 * Data type for MCE transactions identifiers
       
    66 */
       
    67 typedef TUint32 TMceTransactionId;
       
    68 
       
    69 // SESSION MODIFIERS
       
    70 
       
    71 /**
       
    72 * Data type for session modifiers.
       
    73 */
       
    74 typedef TUint32 TMceSessionModifier;
       
    75 
       
    76 
       
    77 /** 
       
    78 * Usage of QOS preconditions within session;
       
    79 * This modifier can be set only when session is in state MceSession::EIdle. 
       
    80 * By default, session is in preconditions supported mode.
       
    81 *
       
    82 * KMcePreconditionsNotUsed indicates that preconditions are not used.
       
    83 * KMcePreconditionsSupported indicates that segmented qos preconditions are supported
       
    84 * KMcePreconditionsE2ESupported value is not supported by MCE qos precondition
       
    85 */
       
    86 // KEY
       
    87 const TMceSessionModifier KMcePreconditions = 0;
       
    88 // VALUES
       
    89 const TUint KMcePreconditionsNotUsed = 0;
       
    90 const TUint KMcePreconditionsSupported = 1;
       
    91 const TUint KMcePreconditionsE2ESupported = 2;
       
    92 
       
    93 
       
    94 /** 
       
    95 * Usage of reliable provisional responses (aka 100rel) within session.
       
    96 * This modifier can be set only when session is in state MceSession::EIdle 
       
    97 * or MceSession::EIncoming.
       
    98 * By default, session is in 100rel supported mode.
       
    99 * 
       
   100 * KMce100RelNotUsed indicates that 100rel is not used.
       
   101 * KMce100RelSupported indicates that 100rel is supported.
       
   102 * KMce100RelRequired indicates that 100rel is required.
       
   103 */
       
   104 
       
   105 // KEY
       
   106 const TMceSessionModifier KMce100Rel = 1;
       
   107 // VALUES
       
   108 const TUint KMce100RelNotUsed = 0;
       
   109 const TUint KMce100RelSupported = 1;
       
   110 const TUint KMce100RelRequired = 2;
       
   111 
       
   112 
       
   113 /** 
       
   114 * Usage of direction attribute within session.
       
   115 * This modifier can be set only when session is in state MceSession::EIdle 
       
   116 * or MceSession::EIncoming.
       
   117 * By default, session is in KMceMediaDirectionOnly.
       
   118 * 
       
   119 * KMceMediaDirectionOnly  indicates that only media direction attributes are
       
   120 *   accepted.
       
   121 * KMceMediaDirectionWithAddress indicates that media direction as well as
       
   122 *   Address indicator are accepted.
       
   123 */
       
   124 
       
   125 // KEY
       
   126 const TMceSessionModifier KMceMediaDirection = 2;
       
   127 
       
   128 // VALUES
       
   129 const TUint KMceMediaDirectionOnly = 0;
       
   130 const TUint KMceMediaDirectionWithAddress = 1;
       
   131 
       
   132 /** 
       
   133 * Usage of secure preconditon for SDP attribute within session.
       
   134 * This modifier can be set only when session is in state MceSession::EIdle 
       
   135 * or MceSession::EIncoming.
       
   136 * By default, session is in KMceSecureNormal
       
   137 * 
       
   138 * KMceSecureNormal  indicates that media is in secure mode with SAVP/SAVPF 
       
   139 *   profile.
       
   140 * KMceSecurePlainAVP indicates that media is in secure mode with AVP profile
       
   141 */
       
   142 // KEY
       
   143 const TMceSessionModifier KMceSecureSession = 3;
       
   144 // VALUES
       
   145 const TUint KMceSecureNormal = 0;
       
   146 const TUint KMceSecurePlainAVP = 1;
       
   147 
       
   148 /** 
       
   149 * Sets the KSoIpTOS socket option (see in_sock.h) for all signalling related
       
   150 * to the session when profile is not used. When profile is used, its settings
       
   151 * are used instead.
       
   152 */
       
   153 // KEY
       
   154 const TMceSessionModifier KMceSignallingTypeOfService = 4;
       
   155 // VALUES
       
   156 //The value is of type TUint and can be any supported type of service value.
       
   157 
       
   158 /** 
       
   159 * Sets the KSoIpTOS socket option (see in_sock.h) for all media related
       
   160 * to the session.
       
   161 */
       
   162 // KEY
       
   163 const TMceSessionModifier KMceMediaTypeOfService = 5;
       
   164 // VALUES
       
   165 //The value is of type TUint and can be any supported type of service value.
       
   166 
       
   167 
       
   168 /** 
       
   169 * Usage of security preconditions within session;
       
   170 * This modifier can be set only when session is in state MceSession::EIdle. 
       
   171 * If security precondition is turing on then qos precondtion will be off
       
   172 *
       
   173 * KMcePreconditionsNotUsed indicates that preconditions are not used.
       
   174 * KMcePreconditionsE2ESupported indicates that preconditions are supported
       
   175 */
       
   176 // KEY
       
   177 const TMceSessionModifier KMceSecPreconditions = 6;
       
   178 
       
   179 
       
   180 #ifdef __MWERKS__
       
   181 #pragma warn_emptydecl off
       
   182 #endif
       
   183 
       
   184 #ifdef MCE_UNIT_TEST
       
   185 #define MCE_UNIT_TEST_DEFS\
       
   186     friend class CMceManagerTest;\
       
   187     friend class CMceSessionTest;\
       
   188     friend class CMceInSessionTest;\
       
   189     friend class CMceOutSessionTest;\
       
   190     friend class CMceMediaStreamTest;\
       
   191     friend class CMceAudioStreamTest;\
       
   192     friend class CMceVideoStreamTest;\
       
   193     friend class CMceMediaSinkTest;\
       
   194     friend class CMceRtpSinkTest;\
       
   195     friend class CMceDisplaySinkTest;\
       
   196     friend class CMceMediaSourceTest;\
       
   197 	friend class CMceRtpSourceTest;\
       
   198 	friend class CMceCameraSourceTest;\
       
   199     friend class CMceFileSourceTest;\
       
   200     friend class CMceAudioCodecTest;\
       
   201     friend class CMceAmrCodecTest;\
       
   202     friend class CMceAmrWbCodecTest;\
       
   203     friend class CMceVideoCodecTest;\
       
   204     friend class CMceEventTest;\
       
   205     friend class CMceOutEventTest;\
       
   206     friend class CMceInEventTest;\
       
   207     friend class CMceReferTest;\
       
   208     friend class CMceOutReferTest;\
       
   209     friend class CMceInReferTest;\
       
   210     friend class CMceFcMsgExchangeTest;\
       
   211     friend class CMceStreamBundleTest;\
       
   212     friend class CMceFileSinkTest;\
       
   213     friend class CMceAvSinkTest;\
       
   214     friend class CMceH263CodecTest;\
       
   215     friend class CMceG711CodecTest;\
       
   216     friend class CMceSecureInSessionTest;\
       
   217     friend class CMceAvcCodecTest;\
       
   218     friend class CMceSecureOutSessionTest;
       
   219 #else
       
   220 #define MCE_UNIT_TEST_DEFS
       
   221 #endif
       
   222 
       
   223 #endif