datacommsserver/esockserver/test/TE_EsockTestSteps/inc/Sockets.TestSteps.h
changeset 0 dfb7c4ff071f
child 1 21d2ab05f085
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 /**
       
     2 * Copyright (c) 2006-2009 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 /**
       
    21  @file Sockets.TestSteps.h
       
    22 */
       
    23 #if (!defined SOCKETS_TESTSTEPS_H)
       
    24 #define SOCKETS_TESTSTEPS_H
       
    25 
       
    26 #include <test/testexecutestepbase.h>
       
    27 #include "Te_EsockStepBase.h"
       
    28 
       
    29 
       
    30 // General constants
       
    31 //------------------
       
    32 _LIT(KTe_SocketName,"SocketName");
       
    33 _LIT(KTe_Protocol,"Protocol");
       
    34 _LIT(KTe_ProtocolName,"ProtocolName");
       
    35 _LIT(KTe_SourceAddressName,"SrcAddr");
       
    36 _LIT(KTe_SourcePortName,"SrcPort");
       
    37 _LIT(KTe_DestinationAddressName,"DstAddr");
       
    38 _LIT(KTe_DestinationPortName,"DstPort");
       
    39 _LIT(KTe_PacketSizeName,"PacketSize");
       
    40 _LIT(KTe_NrOfPacketsName,"NrOfPackets");
       
    41 _LIT(KTe_ShutdownTypeName,"ShutdownType");
       
    42 _LIT(KTe_BearerName,"Bearer");
       
    43 _LIT(KTe_IAPIndexName,"IAP");
       
    44 _LIT(KTe_SNAPIndexName,"SNAP");
       
    45 _LIT(KTe_ConnPrefListIndexName,"CONNPREFLIST");
       
    46 _LIT(KTe_AsynchIndexName,"Asynch");
       
    47 _LIT(KTe_DummyPrefIndexName,"DUMMYPREF");
       
    48 _LIT(KTe_AutoStartPrefName,"AUTOPREF");
       
    49 
       
    50 _LIT(KTe_ShutdownNormal,"ENormal");
       
    51 _LIT(KTe_ShutdownStopInput,"EStopInput");
       
    52 _LIT(KTe_ShutdownStopOutput,"EStopOutput");
       
    53 _LIT(KTe_ShutdownImmediate,"EImmediate");
       
    54 
       
    55 // Protocol types
       
    56 _LIT(KTe_TCPName,"TCP");
       
    57 _LIT(KTe_UDPName,"UDP");
       
    58 _LIT(KDummyProtocolName,"Dummy");
       
    59 
       
    60 static const TInt KProtocolInetDummy = 253;
       
    61 
       
    62 _LIT(KSocketDataCheckTransformType, "SocketDataCheckTransformType");
       
    63 
       
    64 /**
       
    65 Class implementing ConnectRSocketStep
       
    66 
       
    67 @internalComponent
       
    68 */
       
    69 class CConnectRSocketStep : public CTe_EsockStepBase
       
    70 	{
       
    71 public:
       
    72 	CConnectRSocketStep(CCEsockTestBase*& aEsockTest);
       
    73 	TVerdict doSingleTestStep();
       
    74 	TInt ConfigureFromIni();
       
    75 
       
    76 private:
       
    77     TBool iCancelFlag;
       
    78     TRSocketParams iParams; //current params (.ini)
       
    79 	};
       
    80 
       
    81 _LIT(KConnectRSocketStep,"ConnectRSocketStep");
       
    82 
       
    83 
       
    84 /**
       
    85 Class implementing AddRSocketToRSubConnectionOOMStep
       
    86 
       
    87 @internalComponent
       
    88 */
       
    89 
       
    90 class CAddRSocketToRSubConnectionOOMStep : public CTe_EsockStepBase
       
    91 	{
       
    92 public:
       
    93 	CAddRSocketToRSubConnectionOOMStep(CCEsockTestBase*& aEsockTest);
       
    94 	TVerdict doSingleTestStep();
       
    95 	TInt ConfigureFromIni();
       
    96 	TInt AddSocketToSubConnectionOOM();
       
    97 
       
    98 private:
       
    99 	TRSubConnectionParams iParams; //current params (.ini)
       
   100 	};
       
   101 
       
   102 _LIT(KAddRSocketToRSubConnectionOOMStep,"AddRSocketToRSubConnectionOOMStep");
       
   103 
       
   104 
       
   105 /**
       
   106 Class implementing AddRSocketToRSubConnectionStep
       
   107 
       
   108 @internalComponent
       
   109 */
       
   110 class CAddRSocketToRSubConnectionStep : public CTe_EsockStepBase
       
   111 	{
       
   112 public:
       
   113 	CAddRSocketToRSubConnectionStep(CCEsockTestBase*& aEsockTest);
       
   114 	TVerdict doSingleTestStep();
       
   115 	TInt ConfigureFromIni();
       
   116 
       
   117 private:
       
   118     TRSubConnectionParams iParams; //current params (.ini)
       
   119 	};
       
   120 
       
   121 _LIT(KAddRSocketToRSubConnectionStep,"AddRSocketToRSubConnectionStep");
       
   122 
       
   123 
       
   124 /**
       
   125 Class implementing CAddRSocketToRSubConNoWaitStep
       
   126 
       
   127 @internalComponent
       
   128 */
       
   129 class CAddRSocketToRSubConNoWaitStep : public CTe_EsockStepBase
       
   130     {
       
   131 public:
       
   132     CAddRSocketToRSubConNoWaitStep(CCEsockTestBase*& aEsockTest);
       
   133     TVerdict doSingleTestStep();
       
   134     TInt ConfigureFromIni();
       
   135 
       
   136 private:
       
   137     TRSubConnectionParams iParams; //current params (.ini)
       
   138     };
       
   139 
       
   140 _LIT(KAddRSocketToRSubConNoWaitStep,"AddRSocketToRSubConNoWaitStep");
       
   141 
       
   142 
       
   143 /**
       
   144 Class implementing creatersocketStep
       
   145 
       
   146 @internalComponent
       
   147 */
       
   148 class CCreateRSocketStep : public CTe_EsockStepBase
       
   149 	{
       
   150 public:
       
   151 	CCreateRSocketStep(CCEsockTestBase*& aEsockTest);
       
   152 	TVerdict doTestStepPreambleL();
       
   153 	TVerdict doSingleTestStep();
       
   154 	TInt ConfigureFromIni();
       
   155 
       
   156 private:
       
   157     TRSocketParams iParams; //current params (.ini)
       
   158 	};
       
   159 
       
   160 
       
   161 _LIT(KCreateRSocketStep,"creatersocketStep");
       
   162 
       
   163 
       
   164 /**
       
   165 Class implementing ShutdownRSocketStep
       
   166 
       
   167 @internalComponent
       
   168 */
       
   169 class CShutdownRSocketStep : public CTe_EsockStepBase
       
   170 	{
       
   171 public:
       
   172 	CShutdownRSocketStep(CCEsockTestBase*& aEsockTest);
       
   173 	TVerdict doSingleTestStep();
       
   174 	TInt ConfigureFromIni();
       
   175 
       
   176 private:
       
   177     TRSocketParams iParams; //current params (.ini)
       
   178 	};
       
   179 
       
   180 _LIT(KShutdownRSocketStep,"ShutdownRSocketStep");
       
   181 
       
   182 
       
   183 /**
       
   184 Class implementing CCloseRSocketStep
       
   185 
       
   186 @internalComponent
       
   187 */
       
   188 class CCloseRSocketStep : public CTe_EsockStepBase
       
   189 	{
       
   190 public:
       
   191 	CCloseRSocketStep(CCEsockTestBase*& aEsockTest);
       
   192 	TVerdict doSingleTestStep();
       
   193 	TInt ConfigureFromIni();
       
   194 
       
   195 private:
       
   196     TPtrC iSocketName;
       
   197 	};
       
   198 
       
   199 _LIT(KCloseRSocketStep,"CloseRSocketStep");
       
   200 
       
   201 
       
   202 /**
       
   203 Class implementing OpenRSocketStep
       
   204 
       
   205 @internalComponent
       
   206 */
       
   207 class COpenRSocketStep : public CTe_EsockStepBase
       
   208 	{
       
   209 public:
       
   210 	COpenRSocketStep(CCEsockTestBase*& aEsockTest);
       
   211 	TVerdict doSingleTestStep();
       
   212 	TInt ConfigureFromIni();
       
   213 
       
   214 private:
       
   215     TRSocketParams iParams; //current params (.ini)
       
   216 	};
       
   217 
       
   218 _LIT(KOpenRSocketStep,"OpenRSocketStep");
       
   219 
       
   220 
       
   221 /**
       
   222 Class implementing CConfirmSocketDataTransferStep
       
   223 
       
   224 @internalComponent
       
   225 */
       
   226 class CConfirmSocketDataTransferStep : public CTe_EsockStepBase
       
   227 	{
       
   228 public:
       
   229 	CConfirmSocketDataTransferStep(CCEsockTestBase*& aEsockTest);
       
   230 	TVerdict doSingleTestStep();
       
   231 	TInt ConfigureFromIni();
       
   232 
       
   233 private:
       
   234 	TSocketDataCheckParams iParams; //current params (.ini)
       
   235 	};
       
   236 
       
   237 _LIT(KConfirmSocketDataTransferStep,"ConfirmSocketDataTransferStep");
       
   238 _LIT(KErrorExpected,"ErrorExpected");
       
   239 
       
   240 
       
   241 /**
       
   242 Class implementing sendreceiversocketStep
       
   243 
       
   244 @internalComponent
       
   245 */
       
   246 class CSendReceiveRSocketStep : public CTe_EsockStepBase
       
   247 	{
       
   248 public:
       
   249 	CSendReceiveRSocketStep(CCEsockTestBase*& aEsockTest);
       
   250 	TVerdict doSingleTestStep();
       
   251 	TInt ConfigureFromIni();
       
   252 
       
   253 private:
       
   254     TRSocketParams iParams; //current params (.ini)
       
   255 	};
       
   256 
       
   257 _LIT(KSendReceiveRSocketStep,"SendReceiveRSocketStep");
       
   258 
       
   259 
       
   260 /**
       
   261 Class implementing MultipleAddRSubConnectionStep
       
   262 
       
   263 @internalComponent
       
   264 */
       
   265 class CMultipleAddRSubConnectionStep : public CTe_EsockStepBase
       
   266 	{
       
   267 public:
       
   268 	CMultipleAddRSubConnectionStep(CCEsockTestBase*& aEsockTest);
       
   269 	TVerdict doSingleTestStep();
       
   270 	TInt ConfigureFromIni();
       
   271 
       
   272 private:
       
   273 	TRSubConnectionParams iParams; //current params (.ini)
       
   274 	};
       
   275 
       
   276 _LIT(KMultipleAddRSubConnectionStep,"MultipleAddRSubConnectionStep");
       
   277 
       
   278 
       
   279 /**
       
   280 Class implementing RemoveRSocketFromRSubConnectionOOMStep
       
   281 
       
   282 @internalComponent
       
   283 */
       
   284 class CRemoveRSocketFromRSubConnectionOOMStep : public CTe_EsockStepBase
       
   285 	{
       
   286 public:
       
   287 	CRemoveRSocketFromRSubConnectionOOMStep(CCEsockTestBase*& aEsockTest);
       
   288 	TVerdict doSingleTestStep();
       
   289 	TInt ConfigureFromIni();
       
   290 	TInt RemoveSocketFromSubConnectionOOM();
       
   291 
       
   292 private:
       
   293 	TRSubConnectionParams iParams; //current params (.ini)
       
   294 	};
       
   295 
       
   296 _LIT(KRemoveRSocketFromRSubConnectionOOMStep,"RemoveRSocketFromRSubConnectionOOMStep");
       
   297 
       
   298 
       
   299 /**
       
   300 Class implementing RemoveRSocketFromRSubConnectionStep
       
   301 
       
   302 @internalComponent
       
   303 */
       
   304 class CRemoveRSocketFromRSubConnectionStep : public CTe_EsockStepBase
       
   305 	{
       
   306 public:
       
   307 	CRemoveRSocketFromRSubConnectionStep(CCEsockTestBase*& aEsockTest);
       
   308 	TVerdict doSingleTestStep();
       
   309 	TInt ConfigureFromIni();
       
   310 
       
   311 private:
       
   312 	TRSubConnectionParams iParams; //current params (.ini)
       
   313 	};
       
   314 
       
   315 _LIT(KRemoveRSocketFromRSubConnectionStep,"RemoveRSocketFromRSubConnectionStep");
       
   316 
       
   317 
       
   318 /**
       
   319 Class implementing moveConnectedSocketToSubconnectionStep
       
   320 
       
   321 @internalComponent
       
   322 */
       
   323 class CmoveConnectedSocketToSubconnectionStep : public CTe_EsockStepBase
       
   324 	{
       
   325 public:
       
   326 	CmoveConnectedSocketToSubconnectionStep(CCEsockTestBase*& aEsockTest);
       
   327 	TVerdict doTestStepPreambleL();
       
   328 	TVerdict doSingleTestStep();
       
   329 	TInt ConfigureFromIni();
       
   330 
       
   331 private:
       
   332     TInt moveConnectedSocketToSubconnection();
       
   333 
       
   334 private:
       
   335 	TRSubConnectionParams iParams; //current params (.ini)
       
   336 	};
       
   337 
       
   338 _LIT(KmoveConnectedSocketToSubconnectionStep,"moveConnectedSocketToSubconnectionStep");
       
   339 
       
   340 
       
   341 /**
       
   342 Class implementing control and confirmation of RSocket::Ioctl() calls
       
   343 
       
   344 @internalComponent
       
   345 */
       
   346 class CSendReceiveIoctlStep : public CTe_EsockStepBase
       
   347 	{
       
   348 public:
       
   349 	CSendReceiveIoctlStep(CCEsockTestBase*& aEsockTest);
       
   350 	TVerdict doSingleTestStep();
       
   351 	TInt ConfigureFromIni();
       
   352 
       
   353 private:
       
   354     TRSocketIoctlParams iParams; //current params (.ini)
       
   355 	};
       
   356 
       
   357 _LIT(KSendReceiveIoctlStep, "SendReceiveIoctlStep");
       
   358 
       
   359 
       
   360 /**
       
   361 Class implementing control and confirmation of RSocket::Ioctl() calls
       
   362 
       
   363 @internalComponent
       
   364 */
       
   365 class CSocketGetOptionStep : public CTe_EsockStepBase
       
   366 	{
       
   367 public:
       
   368 	CSocketGetOptionStep(CCEsockTestBase*& aEsockTest);
       
   369 	TVerdict doSingleTestStep();
       
   370 	TInt ConfigureFromIni();
       
   371 
       
   372 private:
       
   373     TRSocketGetOptParams iParams;
       
   374 	};
       
   375 
       
   376 _LIT(KSocketGetOptionStep, "SocketGetOptionStep");
       
   377 
       
   378 
       
   379 /**
       
   380 Class implementing confirmation of protocol description retrieved from a socket with:
       
   381 	RSocket::Info()
       
   382 
       
   383 @internalComponent
       
   384 */
       
   385 class CSocketProtocolDescriptionStep : public CTe_EsockStepBase
       
   386 	{
       
   387 public:
       
   388 	CSocketProtocolDescriptionStep(CCEsockTestBase*& aEsockTest);
       
   389 	TVerdict doSingleTestStep();
       
   390 	TInt ConfigureFromIni();
       
   391 
       
   392 private:
       
   393     TSocketProtocolDescriptionParams iParams;
       
   394 	};
       
   395 
       
   396 _LIT(KSocketProtocolDescriptionStep, "SocketProtocolDescriptionStep");
       
   397 
       
   398 
       
   399 #endif // SOCKETS_TESTSTEPS_H
       
   400