cbsref/telephonyrefplugins/atltsy/handler/inc/ltsymacros.h
changeset 49 f50f4094acd7
equal deleted inserted replaced
48:14460bf2a402 49:f50f4094acd7
       
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // 
       
    15 
       
    16 /**
       
    17  * This file contains macros to allow the LTSY skeleton to be used with
       
    18  * the Mock LTSY.
       
    19  */
       
    20 
       
    21 #ifndef __LTSYMACROS_H_
       
    22 #define __LTSYMACROS_H_
       
    23 
       
    24 	#ifdef BUILD_AS_LTSY_STUB
       
    25 #define MOCKLTSYREQ(A)//to remove
       
    26 		#define MTEST_ISSUE_MOCKLTSYENGINE_REQ(A, B, C, ARGS...)  A = iMockLtsy->ExtFuncL(B,C,##ARGS)
       
    27 		#define MTEST_DECLARE_MOCKLTSYENGINE CMockLtsyEngine* iMockLtsy;
       
    28 		#define MTEST_FORWARD_DECLARE_MOCKLTSYENGINE class CMockLtsyEngine;
       
    29 		#define MTEST_DELETE_MOCKLTSYENGINE delete iMockLtsy
       
    30 		#define MTEST_CREATE_MOCKLTSYENGINE(A)  iMockLtsy = CMockLtsyEngine::NewL(A);
       
    31 		#define MTEST_INCLUDE_MOCKLTSYENGINE_HEADER "cmockltsyengine.h"
       
    32 		#define MTEST_SET_MOCKLTSYENGINE(A) A->iMockLtsy = iMockLtsy
       
    33 		#define MTEST_QUERY_SUPPORT_MOCKLTSYENGINE(A,B) return iMockLtsy->IsInterfaceSupported(A, B)
       
    34 		#define MTEST_QUERY_IND_SUPPORT_MOCKLTSYENGINE(A,B, C) return iMockLtsy->IsCallbackIndSupported(A, B, C)
       
    35 		#define MTEST_DECLARE_EVENT_COUNTER TInt iCounter;
       
    36 //all we are doing is is simulating "events from received from baseband occuring at interval of 5s.
       
    37 		#define MTEST_WAIT_FOR_NEXT_EVENT	User::After(500000);iCounter++;	
       
    38 				
       
    39 		#define MTEST_LOG_RECEIVE_EVENT_NO LOG(_L8("LtsyReceiveThread simulated event = %d"), iCounter);
       
    40 		#define MTEST_COUNTER_EXCEEDED_SHUTDOWN_RECEIVETHREAD   if(iCounter>3) err = KShutdownLtsyReceiveThread;
       
    41 
       
    42 	#else
       
    43 #define MOCKLTSYREQ(A) //to remove
       
    44 		#define MTEST_ISSUE_MOCKLTSYENGINE_REQ(A, B, C, ARGS...)
       
    45 		#define MTEST_DECLARE_MOCKLTSYENGINE 
       
    46 		#define MTEST_FORWARD_DECLARE_MOCKLTSYENGINE
       
    47 		#define MTEST_DELETE_MOCKLTSYENGINE
       
    48 		#define MTEST_CREATE_MOCKLTSYENGINE(A)
       
    49 		#define MTEST_INCLUDE_MOCKLTSYENGINE_HEADER <e32std.h> //does not reallymatter what header is put here
       
    50 		#define MTEST_SET_MOCKLTSYENGINE(A)
       
    51 		#define MTEST_QUERY_SUPPORT_MOCKLTSYENGINE(A,B)
       
    52 		#define MTEST_QUERY_IND_SUPPORT_MOCKLTSYENGINE(A,B, C)
       
    53 		#define MTEST_DECLARE_EVENT_COUNTER
       
    54 		#define MTEST_WAIT_FOR_NEXT_EVENT
       
    55 		#define MTEST_LOG_RECEIVE_EVENT_NO
       
    56 		#define MTEST_COUNTER_EXCEEDED_SHUTDOWN_RECEIVETHREAD   
       
    57 	#endif
       
    58 
       
    59 #endif // __LTSYMACROS_H_