websrv_pub/web_service_connection_api/tsrc/wsPolicyTester/inc/wsPolicyTester.h
changeset 0 62f9d29f7211
equal deleted inserted replaced
-1:000000000000 0:62f9d29f7211
       
     1 /*
       
     2 * Copyright (c) 2002 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: Header declaration
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 
       
    24 
       
    25 
       
    26 #ifndef WSPOLICYTESTER_H
       
    27 #define WSPOLICYTESTER_H
       
    28 
       
    29 //  EXTERNAL INCLUDES
       
    30 #include "SenBaseFragment.h"
       
    31 #include "SenBaseElement.h"
       
    32 #include "SenDomFragment.h"
       
    33 #include<flogger.h>
       
    34 //  INCLUDES
       
    35 #include <StifLogger.h>
       
    36 #include <TestScripterInternal.h>
       
    37 #include <StifTestModule.h>
       
    38 #include <TestclassAssert.h>
       
    39 
       
    40 // CONSTANTS
       
    41 //const ?type ?constant_var = ?constant;
       
    42 
       
    43 // MACROS
       
    44 //#define ?macro ?macro_def
       
    45 #define TEST_CLASS_VERSION_MAJOR 0
       
    46 #define TEST_CLASS_VERSION_MINOR 0
       
    47 #define TEST_CLASS_VERSION_BUILD 0
       
    48 
       
    49 // Logging path
       
    50 _LIT( KwsPolicyTesterLogPath, "\\logs\\testframework\\wsPolicyTester\\" ); 
       
    51 // Log file
       
    52 _LIT( KwsPolicyTesterLogFile, "wsPolicyTester.txt" ); 
       
    53 _LIT( KwsPolicyTesterLogFileWithTitle, "wsPolicyTester_[%S].txt" );
       
    54 
       
    55 // FUNCTION PROTOTYPES
       
    56 //?type ?function_name(?arg_list);
       
    57 
       
    58 // FORWARD DECLARATIONS
       
    59 //class ?FORWARD_CLASSNAME;
       
    60 class CwsPolicyTester;
       
    61 class CPolicyRegistry;
       
    62 class CWSPolicy;
       
    63 
       
    64 #include <e32def.h>
       
    65 #include <e32std.h>
       
    66 #include <f32file.h>
       
    67 #ifndef NONSHARABLE_CLASS
       
    68     #define NONSHARABLE_CLASS(x) class x
       
    69 #endif
       
    70 
       
    71 // DATA TYPES
       
    72 //enum ?declaration
       
    73 //typedef ?declaration
       
    74 //extern ?data_type;
       
    75 
       
    76 // CLASS DECLARATION
       
    77 
       
    78 /**
       
    79 *  CwsPolicyTester test class for STIF Test Framework TestScripter.
       
    80 *  ?other_description_lines
       
    81 *
       
    82 *  @lib ?library
       
    83 *  @since ?Series60_version
       
    84 */
       
    85 NONSHARABLE_CLASS(CwsPolicyTester) : public CScriptBase
       
    86     {
       
    87     public:  // Constructors and destructor
       
    88 
       
    89         /**
       
    90         * Two-phased constructor.
       
    91         */
       
    92         static CwsPolicyTester* NewL( CTestModuleIf& aTestModuleIf );
       
    93 
       
    94         /**
       
    95         * Destructor.
       
    96         */
       
    97         virtual ~CwsPolicyTester();
       
    98 
       
    99     public: // New functions
       
   100 
       
   101         /**
       
   102         * ?member_description.
       
   103         * @since ?Series60_version
       
   104         * @param ?arg1 ?description
       
   105         * @return ?description
       
   106         */
       
   107         //?type ?member_function( ?type ?arg1 );
       
   108 
       
   109     public: // Functions from base classes
       
   110 
       
   111         /**
       
   112         * From CScriptBase Runs a script line.
       
   113         * @since ?Series60_version
       
   114         * @param aItem Script line containing method name and parameters
       
   115         * @return Symbian OS error code
       
   116         */
       
   117         virtual TInt RunMethodL( CStifItemParser& aItem );
       
   118 
       
   119     protected:  // New functions
       
   120 
       
   121         /**
       
   122         * ?member_description.
       
   123         * @since ?Series60_version
       
   124         * @param ?arg1 ?description
       
   125         * @return ?description
       
   126         */
       
   127         //?type ?member_function( ?type ?arg1 );
       
   128 
       
   129     protected:  // Functions from base classes
       
   130 
       
   131         /**
       
   132         * From ?base_class ?member_description
       
   133         */
       
   134         //?type ?member_function();
       
   135 
       
   136     private:
       
   137 
       
   138         /**
       
   139         * C++ default constructor.
       
   140         */
       
   141         CwsPolicyTester( CTestModuleIf& aTestModuleIf );
       
   142 
       
   143         /**
       
   144         * By default Symbian 2nd phase constructor is private.
       
   145         */
       
   146         void ConstructL();
       
   147 
       
   148         // Prohibit copy constructor if not deriving from CBase.
       
   149         // ?classname( const ?classname& );
       
   150         // Prohibit assigment operator if not deriving from CBase.
       
   151         // ?classname& operator=( const ?classname& );
       
   152 
       
   153         /**
       
   154         * Frees all resources allocated from test methods.
       
   155         * @since ?Series60_version
       
   156         */
       
   157         void Delete();
       
   158 
       
   159         /**
       
   160         * Test methods are listed below. 
       
   161         */
       
   162     private:    // New methods
       
   163 
       
   164          void SetupL();
       
   165         
       
   166          void Teardown();
       
   167 
       
   168          TInt MT_CWSPolicyUtils_PolicyIdLL(CStifItemParser& aItem);
       
   169 
       
   170          TInt MT_CWSPolicyUtils_PolicyNameLL(CStifItemParser& aItem );
       
   171          TInt MT_CWSPolicyUtils_PolicyUriLL(CStifItemParser& aItem );
       
   172 
       
   173          TInt MT_CWSPolicyUtils_IsExpiredPolicyLL(CStifItemParser& aItem );
       
   174          
       
   175                                     
       
   176          TInt MT_CPolicyRegistry_NewLL(CStifItemParser& aItem );
       
   177         
       
   178         
       
   179          TInt MT_CPolicyRegistry_NewLCL(CStifItemParser& aItem );
       
   180         
       
   181         
       
   182          TInt MT_CPolicyRegistry_SetParentL(CStifItemParser& aItem );
       
   183         
       
   184         
       
   185          TInt MT_CPolicyRegistry_ParentL(CStifItemParser& aItem );
       
   186         
       
   187         
       
   188          TInt MT_CPolicyRegistry_LookupPolicyL(CStifItemParser& aItem );
       
   189         
       
   190         
       
   191          TInt MT_CPolicyRegistry_LookupPolicyByNameL(CStifItemParser& aItem );
       
   192         
       
   193         
       
   194          TInt MT_CPolicyRegistry_RegisterPolicyL(CStifItemParser& aItem );
       
   195         
       
   196         
       
   197          TInt MT_CPolicyRegistry_UnregisterPolicyL(CStifItemParser& aItem );
       
   198         
       
   199         
       
   200          TInt MT_CPolicyRegistry_PopulateRegistryL(CStifItemParser& aItem );
       
   201         
       
   202         
       
   203          TInt MT_CPolicyRegistry_ResetRegistryL(CStifItemParser& aItem );
       
   204         
       
   205         
       
   206          TInt MT_CWSPolicy_NewLL(CStifItemParser& aItem );
       
   207         
       
   208         
       
   209          TInt MT_CWSPolicy_NewLCL(CStifItemParser& aItem );
       
   210         
       
   211         
       
   212          TInt MT_CWSPolicy_NewL_1L(CStifItemParser& aItem );
       
   213         
       
   214         
       
   215          TInt MT_CWSPolicy_NewLC_1L(CStifItemParser& aItem );
       
   216         
       
   217         
       
   218          TInt MT_CWSPolicy_NormalizePolicyLL(CStifItemParser& aItem );
       
   219         
       
   220         
       
   221          TInt MT_CWSPolicy_IntersectPolicyLL(CStifItemParser& aItem );
       
   222         
       
   223         
       
   224          TInt MT_CWSPolicy_MergePolicyLL(CStifItemParser& aItem );
       
   225         
       
   226         
       
   227          TInt MT_CWSPolicy_NormalizedL(CStifItemParser& aItem );
       
   228         
       
   229         
       
   230          TInt MT_CWSPolicy_PolicyNormalizerL(CStifItemParser& aItem );
       
   231         
       
   232         
       
   233          TInt MT_CWSPolicy_PolicyAsXmlLL(CStifItemParser& aItem );
       
   234         
       
   235         
       
   236          TInt MT_CWSPolicy_Policy(CStifItemParser& aItem );
       
   237         
       
   238         
       
   239          TInt MT_CWSPolicy_NormalizedAsXmlLL(CStifItemParser& aItem );
       
   240         
       
   241         
       
   242          TInt MT_CWSPolicy_NormalizedPolicy(CStifItemParser& aItem );
       
   243         
       
   244         
       
   245          TInt MT_CWSPolicy_IsExpiredPolicyL(CStifItemParser& aItem );
       
   246          
       
   247          TInt MT_CSenInternalWsPolicy_NewLL(CStifItemParser& aItem );
       
   248          TInt MT_CSenInternalWsPolicy_NewLCL(CStifItemParser& aItem );
       
   249          TInt MT_CSenInternalWsPolicy_NewL_1L(CStifItemParser& aItem );
       
   250          TInt MT_CSenInternalWsPolicy_NewLC_1L(CStifItemParser& aItem );
       
   251          TInt MT_CSenInternalWsPolicy_NewL_2L(CStifItemParser& aItem );
       
   252          TInt MT_CSenInternalWsPolicy_NewLC_2L(CStifItemParser& aItem );
       
   253          TInt MT_CSenInternalWsPolicy_IsApplicableLL(CStifItemParser& aItem );
       
   254          TInt MT_CSenInternalWsPolicy_IsApplicableL_1L(CStifItemParser& aItem );
       
   255          TInt MT_CSenInternalWsPolicy_IsApplicableL_2L(CStifItemParser& aItem );
       
   256          TInt MT_CSenInternalWsPolicy_UpdateMetadataEndpointLL(CStifItemParser& aItem );
       
   257          TInt MT_CSenInternalWsPolicy_AddMetadataPolicyLL(CStifItemParser& aItem );
       
   258          TInt MT_CSenInternalWsPolicy_RemoveMetadataPolicyLL(CStifItemParser& aItem );
       
   259          TInt MT_CSenInternalWsPolicy_WsPolicyByUriLL(CStifItemParser& aItem );
       
   260          TInt MT_CSenInternalWsPolicy_WsPolicyByNameL(CStifItemParser& aItem );
       
   261          TInt MT_CSenInternalWsPolicy_ValidUntilLL(CStifItemParser& aItem );
       
   262          TInt MT_CSenWSPolicyIdentifier_NewLL(CStifItemParser& aItem );
       
   263          TInt MT_CSenWSPolicyIdentifier_NewLCL(CStifItemParser& aItem );
       
   264          TInt MT_CSenWSPolicyIdentifier_NewL_1L(CStifItemParser& aItem );
       
   265          TInt MT_CSenWSPolicyIdentifier_NewLC_1L(CStifItemParser& aItem );
       
   266          TInt MT_CSenWSPolicyIdentifier_NewL_2L(CStifItemParser& aItem );
       
   267          TInt MT_CSenWSPolicyIdentifier_NewLC_2L(CStifItemParser& aItem );
       
   268          TInt MT_CSenWSPolicyIdentifier_SetPropertyLL(CStifItemParser& aItem );         
       
   269          TInt MT_CSenWSPolicyIdentifier_PropertyLL(CStifItemParser& aItem );         
       
   270          TInt MT_CSenWSPolicyIdentifier_SetIdLL(CStifItemParser& aItem );         
       
   271          TInt MT_CSenWSPolicyIdentifier_IdLL(CStifItemParser& aItem );         
       
   272          TInt MT_CSenWSPolicyIdentifier_AddMetadataEndpointLL(CStifItemParser& aItem );         
       
   273          TInt MT_CSenWSPolicyIdentifier_MetadataEndpointLL(CStifItemParser& aItem );         
       
   274          TInt MT_CSenWSPolicyIdentifier_MetadataEndpointElementLL(CStifItemParser& aItem );    
       
   275          TInt MT_CSenWSPolicyIdentifier_ElementAttribValueLL(CStifItemParser& aItem );         
       
   276          TInt MT_CSenWSPolicyIdentifier_HasAttributeLL(CStifItemParser& aItem ); 
       
   277          TInt MT_CWSPolicyWriter_NewLL(CStifItemParser& aItem );
       
   278          TInt MT_CWSPolicyWriter_NewLCL(CStifItemParser& aItem );
       
   279          TInt MT_CWSPolicyWriter_WriteToFileAllLL(CStifItemParser& aItem );
       
   280          TInt MT_CWSPolicyWriter_WriteToFileAllL_1L(CStifItemParser& aItem );
       
   281          TInt MT_CWSPolicyWriter_WriteAllAsXmlLL(CStifItemParser& aItem );
       
   282          
       
   283          
       
   284          TInt MT_CWSPolicyReader_NewLL(CStifItemParser& aItem );
       
   285          TInt MT_CWSPolicyReader_NewLCL(CStifItemParser& aItem );
       
   286          TInt MT_CWSPolicyReader_GetPolicyLL(CStifItemParser& aItem );
       
   287         
       
   288         /**
       
   289          * Method used to log version of test class
       
   290          */
       
   291         void SendTestClassVersion();
       
   292 
       
   293         //ADD NEW METHOD DEC HERE
       
   294         //[TestMethods] - Do not remove
       
   295         void DoNormalizePolicyL(TFileName aFile, TInt count);
       
   296         void TestIntersectPolicyL(TInt i, TInt j);
       
   297     public:     // Data
       
   298         // ?one_line_short_description_of_data
       
   299         //?data_declaration;
       
   300 
       
   301     protected:  // Data
       
   302         // ?one_line_short_description_of_data
       
   303         //?data_declaration;
       
   304 
       
   305     private:    // Data
       
   306         
       
   307 //        RFs iFss;
       
   308 //		RFileLogger fL;
       
   309 
       
   310     public:     // Friend classes
       
   311         //?friend_class_declaration;
       
   312     protected:  // Friend classes
       
   313         //?friend_class_declaration;
       
   314     private:    // Friend classes
       
   315         //?friend_class_declaration;
       
   316 
       
   317     };
       
   318 
       
   319 #endif      // WSPOLICYTESTER_H
       
   320 
       
   321 // End of File