mmsharing/mmshengine/tsrc/ut_engine/inc/musengtestdefs.h
changeset 0 f0cf47e981f9
child 32 73a1feb507fb
equal deleted inserted replaced
-1:000000000000 0:f0cf47e981f9
       
     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 #ifndef MUSENGTESTDEFS_H
       
    21 #define MUSENGTESTDEFS_H
       
    22 
       
    23 #include <mcesession.h>
       
    24 #include <mcemanager.h>
       
    25 
       
    26 // Next row is to disable warning emerging from EUnit code.
       
    27 // Placement is due to a fact that most test case files
       
    28 // include this file. Directive can be removed when 
       
    29 // EUnit is fixed.  
       
    30 #pragma warn_illtokenpasting off
       
    31 
       
    32 // Test values
       
    33 
       
    34 _LIT( KTestRecipientSipUri, "sip:TestRecipient@host.domain" );
       
    35 _LIT( KTestRecipientSipUriPrefixUpperCase, "SIP:TestRecipient@host.domain" );
       
    36 _LIT( KTestRecipientSipUriNoSipPrefix, "TestRecipient@host.domain" );
       
    37 _LIT( KTestRecipientTelUri, "tel:+3581111111");
       
    38 _LIT( KTestRecipientTelUriNoTelPrefix, "+3581111111" );
       
    39 
       
    40 _LIT8( KTestRecipientSipUri8, "sip:TestRecipient@host.domain" );
       
    41 _LIT8( KTestRecipientSipUriPrefixUpperCase8, "SIP:TestRecipient@host.domain" );
       
    42 _LIT8( KTestRecipientSipUriNoSipPrefix8, "TestRecipient@host.domain" );
       
    43 _LIT8( KTestRecipientTelUri8, "tel:+3581111111");
       
    44 _LIT8( KTestRecipientTelUriNoTelPrefix8, "+3581111111" );
       
    45 
       
    46 _LIT8( KTestRecipientRandomText8, "sfjsfjklsjdkfsj" );
       
    47 _LIT8( KTestRecipientSipUriWithSpace8, "s:re cipi ent@" );
       
    48 _LIT8( KTestRecipientTelUriWithAtSign8, "tel:+3581111111@host.domain" ); //invalid
       
    49 _LIT8( KTestRecipientTelUriWithXCharAtEnd8, "tel:+3581111111X" ); //invalid
       
    50 _LIT8( KTestRecipientTelUriWithXCharAtStart8, "tel:+X3581111111" ); //invalid
       
    51 
       
    52 _LIT8( KTestRecipientLocalTelUriNoTelPrefix8, "3581111111" );
       
    53 _LIT8( KTestRecipientLocalTelUriNoTelPrefixWithXCharAtEnd8, "3581111111X" ); //invalid
       
    54 _LIT8( KTestRecipientLocalTelUriNoTelPrefixWithXCharAtStart8, "X3581111111" ); //invalid
       
    55 _LIT8( KTestRecipientLocalTelUriNoTelPrefixWithXCharAtMiddle8, "35811X11111" ); //invalid
       
    56 
       
    57 _LIT8( KTestRecipientLocalTelUri8, "tel:3581111111");
       
    58 _LIT8( KTestRecipientLocalTelUriPrefixUpperCase8, "TEL:3581111111");
       
    59 _LIT8( KTestRecipientLocalTelUriWithXCharAtEnd8, "tel:3581111111X" ); //invalid
       
    60 _LIT8( KTestRecipientLocalTelUriWithXCharAtStart8, "tel:X3581111111" ); //invalid
       
    61 _LIT8( KTestRecipientLocalTelUriWithXCharAtMiddle8, "tel:35811X11111" ); //invalid
       
    62 _LIT8( KTestRecipientLocalTelUriTelPrefixAtMiddle8, "358tel:11X11111" ); //invalid
       
    63 
       
    64 _LIT8( KTestOriginator, "Frank Swis" );
       
    65 
       
    66 _LIT( KTestAudioFileName, "audiofile" );
       
    67 _LIT( KTestVideoFileName, "H263videofile" );
       
    68 _LIT( KTestAvcVideoFileName, "H264videofile" );
       
    69 
       
    70 const TInt KSipStatusCodeNoCodeSet = 0;
       
    71 const TInt KSipStatusCode200OK = 200;
       
    72 const TInt KSipStatusCode400BadRequest = 400;
       
    73 const TInt KSipStatusCode401Unauthorized = 401;
       
    74 const TInt KSipStatusCode402PaymentRequired = 402;
       
    75 const TInt KSipStatusCode404RecipientNotFound = 404;
       
    76 const TInt KSipStatusCode407ProxyAuthenticationRequired = 407;
       
    77 const TInt KSipStatusCode408ConnectionTimeOut = 408;
       
    78 const TInt KSipStatusCode415UnsupportedMediaType = 415;
       
    79 const TInt KSipStatusCode416UnsupportedUriScheme = 416;
       
    80 const TInt KSipStatusCode479NotAbleToProcessURI = 479;
       
    81 const TInt KSipStatusCode480TemporarilyNotAvailable = 480;
       
    82 const TInt KSipStatusCode486BusyHere = 486;
       
    83 const TInt KSipStatusCode487RequestCancelled = 487;
       
    84 const TInt KSipStatusCode488NotAcceptableHere = 488;
       
    85 const TInt KSipStatusCode603Decline = 603;
       
    86 const TInt KSipStatusCode606NotAcceptable = 606;
       
    87 const TInt KSipStatusCodeUnknown = 10000;
       
    88 
       
    89 const TInt KTelephonyVolumeMinValue = 1;
       
    90 const TInt KTelephonyVolumeDefaultValue = 4;
       
    91 const TInt KTelephonyVolumeMaxValue = 1;
       
    92 
       
    93 const TTimeIntervalMicroSeconds KMusEngTestFileDuration( 120000000 ); // 2 min
       
    94 const TTimeIntervalMicroSeconds KMusEngTestFilePosition( 60000000 ); // 2 min
       
    95 
       
    96 const TInt KTestMaxBrightness = 100;
       
    97 const TInt KTestMoreThanMaxBrightness = 101;
       
    98 const TInt KTestDefaultBrightness = 0;
       
    99 const TInt KTestMinBrightness = -100;
       
   100 const TInt KTestLessThanMinBrightness = -101;
       
   101 const TInt KTestSomeBrightness = 25;
       
   102 const TInt KTestBrightnessStepSize = 10;
       
   103 
       
   104 
       
   105 // Values originally introduced in telephonydomaincrkeys.h
       
   106 
       
   107 const TUid KCRUidInCallVolume = {0x102828B1};
       
   108 const TUint32 KTelIncallEarVolume                           = 0x00000001;
       
   109 const TUint32 KTelIncallLoudspeakerVolume                   = 0x00000002;
       
   110 
       
   111 
       
   112 // Helper macros
       
   113 
       
   114 #define MUS_TEST_FORWARD_ALLOC_FAILURE( error )\
       
   115     if ( error == KErrNoMemory )\
       
   116         {\
       
   117         User::Leave( error );\
       
   118         }
       
   119 
       
   120 #define ESTABLISH_OUT_SESSION( outSession )\
       
   121     outSession->InviteL( KTestRecipientSipUri );\
       
   122     outSession->iSession->iState = CMceSession::EEstablished;\
       
   123     for ( TInt i = 0; i < outSession->iSession->Streams().Count(); ++i )\
       
   124             {\
       
   125             outSession->iSession->Streams()[i]->iState =\
       
   126                                                 CMceMediaStream::EStreaming;\
       
   127             }\
       
   128     if ( outSession->iSession->iManager &&\
       
   129          outSession->iSession->iManager->iSessionObserver )\
       
   130         {\
       
   131         outSession->iSession->iManager->iSessionObserver->SessionStateChanged(\
       
   132             *(outSession->iSession),\
       
   133             outSession->iSession->iManager->iContainer );\
       
   134         }
       
   135 
       
   136 #define ESTABLISH_OUT_SESSION_AND_START_STREAMING( outSession )\
       
   137     ESTABLISH_OUT_SESSION( outSession );\
       
   138     outSession->EnableDisplayL( ETrue );\
       
   139     outSession->PlayL();
       
   140     
       
   141     
       
   142 #endif // MUSENGTESTDEFS_H
       
   143 
       
   144