mmsharing/mmshui/tsrc/ut_ui/inc/musengtestdefs.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 0 f0cf47e981f9
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
       
     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( KTestRecipientSipUriNoSipPrefix, "TestRecipient@host.domain" );
       
    36 _LIT( KTestRecipientTelUri, "tel:+3581111111");
       
    37 _LIT( KTestRecipientTelUriNoTelPrefix, "+3581111111" );
       
    38 
       
    39 _LIT( KTestRecipientRandomText, "sfjsfjklsjdkfsj" );
       
    40 _LIT( KTestRecipientSipUriWithSpace, "s:re cipi ent@" );
       
    41 _LIT( KTestRecipientTelUriWithAtSign, "tel:+3581111111@host.domain" ); //invalid
       
    42 
       
    43 _LIT8( KTestRecipientSipUri8, "sip:TestRecipient@host.domain" );
       
    44 _LIT8( KTestRecipientTelUri8, "tel:+3581111111");
       
    45 _LIT8( KTestRecipientRandomText8, "sfjsfjklsjdkfsj" );
       
    46 
       
    47 _LIT8( KTestOriginator, "Frank Swis" );
       
    48 
       
    49 _LIT( KTestAudioFileName, "audiofile" );
       
    50 _LIT( KTestVideoFileName, "videofile" );
       
    51 _LIT( KTestAnotherVideoFileName, "another" );
       
    52 
       
    53 const TInt KSipStatusCodeNoCodeSet = 0;
       
    54 const TInt KSipStatusCode200OK = 200;
       
    55 const TInt KSipStatusCode400BadRequest = 400;
       
    56 const TInt KSipStatusCode401Unauthorized = 401;
       
    57 const TInt KSipStatusCode402PaymentRequired = 402;
       
    58 const TInt KSipStatusCode404RecipientNotFound = 404;
       
    59 const TInt KSipStatusCode407ProxyAuthenticationRequired = 407;
       
    60 const TInt KSipStatusCode408ConnectionTimeOut = 408;
       
    61 const TInt KSipStatusCode415UnsupportedMediaType = 415;
       
    62 const TInt KSipStatusCode487RequestCancelled = 487;
       
    63 const TInt KSipStatusCodeUnknown = 10000;
       
    64 const TInt KTelephonyVolumeMinValue = 1;
       
    65 const TInt KTelephonyVolumeDefaultValue = 4;
       
    66 const TInt KTelephonyVolumeMaxValue = 1;
       
    67 
       
    68 // Values originally introduced in telephonyinternalcrkeys.h
       
    69 
       
    70 const TUid KCRUidCallHandling = {0x101F8784};
       
    71 const TUint32 KTelephonyIncallEarVolume                           = 0x00000001;
       
    72 const TUint32 KTelephonyIncallLoudspeakerVolume                   = 0x00000002;
       
    73 
       
    74 
       
    75 // Helper macros
       
    76 
       
    77 #define MUS_TEST_FORWARD_ALLOC_FAILURE( error )\
       
    78     if ( error == KErrNoMemory )\
       
    79         {\
       
    80         User::Leave( error );\
       
    81         }
       
    82 
       
    83 #define ESTABLISH_OUT_SESSION( outSession )\
       
    84     outSession->InviteL( KTestRecipientSipUri );\
       
    85     outSession->iSession->iState = CMceSession::EEstablished;\
       
    86     if ( outSession->iSession->iManager &&\
       
    87          outSession->iSession->iManager->iSessionObserver )\
       
    88         {\
       
    89         outSession->iSession->iManager->iSessionObserver->SessionStateChanged(\
       
    90             *(outSession->iSession),\
       
    91             outSession->iSession->iManager->iContainer );\
       
    92         }
       
    93     
       
    94     
       
    95 #endif // MUSENGTESTDEFS_H
       
    96