linklayercontrol/nullagt/TS_nullagt/inc/NullAgentTestSteps.h
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2002-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 // Contains declarations of the test step classes for the Null Agent
       
    15 // test suite.
       
    16 // 
       
    17 //
       
    18 
       
    19 #ifndef __NULLAGENTTESTSTEPS_H__
       
    20 #define __NULLAGENTTESTSTEPS_H__
       
    21 
       
    22 #include "TestSuiteNullAgent.h"
       
    23 #include <networking/teststep.h>
       
    24 #include "es_sock.h"
       
    25 
       
    26 
       
    27 class NullAgentTestStep : public CTestStep
       
    28 {
       
    29 public:
       
    30 	NullAgentTestStep();
       
    31 	virtual ~NullAgentTestStep();
       
    32 
       
    33 private:
       
    34 	enum TVerdict doTestStepPreambleL();
       
    35 	
       
    36 protected:					
       
    37 	
       
    38 	// to all of these methods pass in a pointer to objects you have created on the stack...
       
    39 	// lots of them will also create temporary automatics but don't worry about that
       
    40 
       
    41 
       
    42 	// connection specific stuff
       
    43 	TInt OpenConnection(RConnection& conn, RSocketServ& ss);
       
    44 	void CloseConnection(RConnection& conn);
       
    45 	TInt EnumerateConnections(RConnection& conn, TUint& num);
       
    46 	TInt WaitForAllInterfacesToCloseL(RSocketServ& ss);
       
    47 
       
    48 };
       
    49 
       
    50 //
       
    51 // the classes which follow are the steps themselves...
       
    52 //
       
    53 
       
    54 
       
    55 
       
    56 _LIT(KSrcPath, "z:\\testdata\\configs\\agentdialog.ini");
       
    57 _LIT(KDestPath, "c:\\private\\101f7989\\esock\\agentdialog.ini");
       
    58 
       
    59 
       
    60 //
       
    61 // Test Copy Test
       
    62 NONSHARABLE_CLASS (CNullAgentPreCopy) : public NullAgentTestStep
       
    63 {
       
    64 public:
       
    65 	CNullAgentPreCopy();
       
    66 	virtual ~CNullAgentPreCopy();
       
    67 
       
    68 	virtual enum TVerdict doTestStepL( void );
       
    69 	void copyFileL (const TDesC& anOld,const TDesC& aNew);
       
    70 };
       
    71 
       
    72 //
       
    73 // Test Post Delete
       
    74 NONSHARABLE_CLASS (CNullAgentPostDelete) : public NullAgentTestStep
       
    75 {
       
    76 public:
       
    77 	CNullAgentPostDelete();
       
    78 	virtual ~CNullAgentPostDelete();
       
    79 
       
    80 	virtual enum TVerdict doTestStepL( void );
       
    81 	void deleteFileL (const TDesC& aFileName);
       
    82 };
       
    83 
       
    84 
       
    85 class CTestStepNullAgtSimpleConnection : public NullAgentTestStep
       
    86 {
       
    87 public:
       
    88 	CTestStepNullAgtSimpleConnection(TPtrC aName);
       
    89 	void ConstructL() {};
       
    90 	virtual ~CTestStepNullAgtSimpleConnection() {};
       
    91 	
       
    92 	// called by framework to do the test
       
    93 	virtual enum TVerdict doTestStepL(void);
       
    94 private:
       
    95 };
       
    96 
       
    97 class CTestStepNullAgtConnectionCancel : public NullAgentTestStep
       
    98 {
       
    99 public:
       
   100 	CTestStepNullAgtConnectionCancel(TPtrC aName);
       
   101 	void ConstructL() {};
       
   102 	virtual ~CTestStepNullAgtConnectionCancel() {};
       
   103 	
       
   104 	// called by framework to do the test
       
   105 	virtual enum TVerdict doTestStepL(void);
       
   106 private:
       
   107 };
       
   108 
       
   109 class CTestStepNullAgtLoopbackTest : public NullAgentTestStep
       
   110 {
       
   111 public:
       
   112 	CTestStepNullAgtLoopbackTest(TPtrC aName);
       
   113 	void ConstructL() {};
       
   114 	virtual ~CTestStepNullAgtLoopbackTest() {};
       
   115 
       
   116 	// called by the framework to do the test
       
   117 	virtual enum TVerdict doTestStepL(void);
       
   118 private:
       
   119 };
       
   120 
       
   121 class CTestStepNullAgtReconnect: public NullAgentTestStep
       
   122 {
       
   123 public:
       
   124 	CTestStepNullAgtReconnect(TPtrC aName);
       
   125 	void ConstructL() {};
       
   126 	virtual ~CTestStepNullAgtReconnect() {};
       
   127 
       
   128 	// called by the framework to do the test
       
   129 	virtual enum TVerdict doTestStepL(void);
       
   130 private:
       
   131 };
       
   132 
       
   133 class CTestStepNullAgtNotifications: public NullAgentTestStep
       
   134 {
       
   135 public:
       
   136 	CTestStepNullAgtNotifications(TPtrC aName);
       
   137 	void ConstructL() {};
       
   138 	virtual ~CTestStepNullAgtNotifications() {};
       
   139 
       
   140 	// called by the framework to do the test
       
   141 	virtual enum TVerdict doTestStepL(void);
       
   142 private:
       
   143 };
       
   144 
       
   145 class CTestStepNullAgtOverrides: public NullAgentTestStep
       
   146 {
       
   147 public:
       
   148 	CTestStepNullAgtOverrides(TPtrC aName);
       
   149 	void ConstructL() {};
       
   150 	virtual ~CTestStepNullAgtOverrides() {};
       
   151 
       
   152 	// called by the framework to do the test
       
   153 	virtual enum TVerdict doTestStepL(void);
       
   154 private:
       
   155 };
       
   156 
       
   157 class CTestStepNullAgtMultipleConnections: public NullAgentTestStep
       
   158 {
       
   159 public:
       
   160 	CTestStepNullAgtMultipleConnections(TPtrC aName);
       
   161 	void ConstructL() {};
       
   162 	virtual ~CTestStepNullAgtMultipleConnections() {};
       
   163 
       
   164 	// called by the framework to do the test
       
   165 	virtual enum TVerdict doTestStepL(void);
       
   166 private:
       
   167 };
       
   168 
       
   169 class CTestStepNullAgtCommDbIf: public NullAgentTestStep
       
   170 {
       
   171 public:
       
   172 	CTestStepNullAgtCommDbIf(TPtrC aName);
       
   173 	void ConstructL() {};
       
   174 	virtual ~CTestStepNullAgtCommDbIf() {};
       
   175 
       
   176 	// called by the framework to do the test
       
   177 	virtual enum TVerdict doTestStepL(void);
       
   178 private:
       
   179 };
       
   180 
       
   181 //
       
   182 // the next section of this file contains declarations and definitions 
       
   183 // common to many of the steps
       
   184 //
       
   185 
       
   186 const TUint KPortNo = 7;
       
   187 const TUint KBufferLength = 512;
       
   188 
       
   189 
       
   190 #endif /* __TESTSTEPNULLAGT_H__ */