datacommsserver/esockserver/test/CapTests/RConnServ/Common/CStep.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2005-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  @file
       
    18  @internalComponent
       
    19 */
       
    20 
       
    21 #ifndef PARAM_MESS_NAME_H_
       
    22 #define PARAM_MESS_NAME_H_
       
    23 
       
    24 //Include the suite header
       
    25 #include "CSuite.h"
       
    26 #include <ss_std.h>
       
    27 #include <comms-infras\es_connectionservermessages.h>
       
    28 #include <comms-infras/es_connectionserv.h>
       
    29 #include <comms-infras/cs_connservparams.h>
       
    30 #include <comms-infras/cs_connservparams_internal.h>
       
    31 #include <comms-infras/es_availability.h>
       
    32 #include <comms-infras/es_accesspointstatus.h>
       
    33 #include <nifman.h>
       
    34 #include <CommDbConnPref.h>
       
    35 
       
    36 PARAM_FOREACH_LIST_BEGIN
       
    37 #include "PARAM_SVR_LISTHEADERFILE"
       
    38 PARAM_FOREACH_LIST_END
       
    39 
       
    40 using namespace ConnectionServ;
       
    41 
       
    42 class CPARAM_MESS_NAMEStep: public CCapabilityTestStep
       
    43 	{
       
    44 
       
    45 public:
       
    46 
       
    47 	//Get the version of the server to be called
       
    48 	TVersion Version()
       
    49 		{
       
    50 		return TVersion(PARAM_SVR_MAJORNAME, PARAM_SVR_MINORNAME, PARAM_SVR_BUILDNAME);
       
    51 		}
       
    52 
       
    53 
       
    54 	//Constructor called from the respective Suite.cpp from their "AddTestStep" function
       
    55 	CPARAM_MESS_NAMEStep() ;
       
    56 
       
    57 	//Always clean your mess
       
    58 	~CPARAM_MESS_NAMEStep()
       
    59 		{
       
    60 		tChildThread.Close();
       
    61 		iQueryBuffer.Close();
       
    62 		iResultBuffer.Close();
       
    63 		iBadBuffer.Close();
       
    64 		//delete iQueryBundle;
       
    65 		}
       
    66 
       
    67 	//This is the Function called from "doTestStepL" by the test Suite,and it creates an
       
    68 	//child thread which internally calls the corresponding Exec_SendReceive_SERVERNAME fn.
       
    69 	TVerdict MainThread();
       
    70 
       
    71 	//Here's where the connection and testing the message takes place
       
    72 	TInt Exec_SendReceive();
       
    73 	TInt iSessionRef;
       
    74 	
       
    75 private:
       
    76 	TInt do_execute(Int2Type<ECMAccessPointStatusQuery_Cancel>);
       
    77 	TInt do_execute(Int2Type<ECMAccessPointNotification_SetupThenAwaitThenGetResultOrSize>);
       
    78 	TInt do_execute(Int2Type<ECMAccessPointNotification_AwaitThenGetResultOrSize>);
       
    79 	TInt do_execute(Int2Type<ECMAccessPointNotification_GetResult>);
       
    80 	TInt do_execute(Int2Type<ECMAccessPointNotification_Cancel>);
       
    81 	TInt do_execute(Int2Type<ECMCreate>);
       
    82 	TInt do_execute(Int2Type<ECMClose>);
       
    83 	TInt do_execute(Int2Type<ECMAttachToTierManager>);
       
    84 	TInt do_execute(Int2Type<ECMAccessPointStatusQuery_DoThenGetResultOrSize>);
       
    85 	TInt do_execute(Int2Type<ECMAccessPointStatusQuery_GetResult>);
       
    86 	TInt ConnectToServer(TUint aTierId = 271064560);
       
    87 	TInt AccessPointQuery(RBuf8& aBuf);
       
    88 	TAccessPointStatusFilter BuildQuery(TFilterType aType = ERegular);
       
    89    	void AddFilterToQueryL(CConnectionServParameterBundle& aBundle, TAccessPointStatusFilter& aFilter);
       
    90     void NotificationQueryL(TRequestStatus& aStatus, RBuf8& aBuf, TFilterType aType = ERegular);
       
    91    	TInt OpenConn();
       
    92    	
       
    93 private:
       
    94 	RConnection iConn;
       
    95 	RSocketServ iSockServ;
       
    96 	CConnectionServParameterBundle* iQueryBundle;
       
    97 	RBuf8 iQueryBuffer;
       
    98 	RBuf8 iResultBuffer;
       
    99 	RBuf8 iBadBuffer;
       
   100 	};
       
   101 
       
   102 #endif
       
   103 
       
   104