contentmgmt/referencedrmagent/tcaf/source/SupplierStep.h
changeset 15 da2ae96f639b
child 17 cd501b96611d
equal deleted inserted replaced
10:afc583cfa176 15:da2ae96f639b
       
     1 /*
       
     2 * Copyright (c) 2002-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 the License "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 #if (!defined __SUPPLIER_STEP_H__)
       
    22 #define __SUPPLIER_STEP_H__
       
    23 #include <test/testexecutestepbase.h>
       
    24 
       
    25 #include "cafstep.h"
       
    26 #include "importfile.h"
       
    27 
       
    28 #ifndef SYMBIAN_DISABLE_UPWARD_DEPENDENCY
       
    29 #include <http/mhttptransactioncallback.h>
       
    30 #endif
       
    31 
       
    32 // Constants used to name test cases 
       
    33 _LIT(KCAFSupplierStep,"CAFSupplierStep");
       
    34 _LIT(KCAFSupplierAsyncStep,"CAFSupplierAsyncStep");
       
    35 _LIT(KCAFSupplierSerializeStep,"CAFSupplierSerializeStep");
       
    36 _LIT(KCAFClientOutputSupplierStep,"CAFClientOutputSupplierStep");
       
    37 #ifndef SYMBIAN_DISABLE_UPWARD_DEPENDENCY
       
    38 _LIT(KCAFHTTPRequestHeadersStep,"CAFHTTPRequestHeaders");
       
    39 #endif
       
    40 class CCAFServer;
       
    41 
       
    42 
       
    43 /* 
       
    44 * Used to test the import DCF files into the Content Access Framework
       
    45 *
       
    46 * @internalComponent Exposure internally
       
    47 */
       
    48 class CCafSupplierStep : public CCAFStep
       
    49 	{
       
    50 public:
       
    51 	CCafSupplierStep(CCAFServer& aParent);
       
    52 	~CCafSupplierStep();
       
    53 	virtual TVerdict doTestStepL();
       
    54 private:
       
    55 	CCAFServer& iParent;
       
    56 	};
       
    57 
       
    58 
       
    59 /* 
       
    60 * Used to test the import DCF files into the Content Access Framework
       
    61 *
       
    62 * @internalComponent Exposure internally
       
    63 */
       
    64 class CCafSupplierAsyncStep : public CCAFStep
       
    65 	{
       
    66 public:
       
    67 	CCafSupplierAsyncStep(CCAFServer& aParent);
       
    68 	~CCafSupplierAsyncStep();
       
    69 	virtual TVerdict doTestStepL();
       
    70 private:
       
    71 	CCAFServer& iParent;
       
    72 	};
       
    73 
       
    74 
       
    75 /* 
       
    76 * Used to test CCafMimeHeader::ExternalizeL() and CCafMimeHeader::InternalizeL()
       
    77 *
       
    78 * @internalComponent Exposure internally
       
    79 */
       
    80 class CCAFSupplierSerializeStep : public CCAFStep
       
    81 	{
       
    82 public:
       
    83 	CCAFSupplierSerializeStep(CCAFServer& aParent);
       
    84 	~CCAFSupplierSerializeStep();
       
    85 	virtual TVerdict doTestStepL();
       
    86 private:
       
    87 	CCAFServer& iParent;
       
    88 	};
       
    89 
       
    90 
       
    91 /* 
       
    92 * Used to test the import DCF files into the Content Access Framework
       
    93 *
       
    94 * @internalComponent Exposure internally
       
    95 */
       
    96 class CCafClientOutputSupplierStep : public CCAFStep
       
    97 	{
       
    98 public:
       
    99 	CCafClientOutputSupplierStep(CCAFServer& aParent);
       
   100 	~CCafClientOutputSupplierStep();
       
   101 	virtual TVerdict doTestStepL();
       
   102 	void CheckContentMimeL(ContentAccess::CImportFile* aImport, TDes8& aContentMime, TDesC8& aExpectedContentMime);
       
   103 private:
       
   104 	CCAFServer& iParent;
       
   105 	};
       
   106 
       
   107 
       
   108 #ifndef SYMBIAN_DISABLE_UPWARD_DEPENDENCY
       
   109 /* 
       
   110 * Used to test that an application can retrieve HTTP request headers
       
   111 * @internalComponent Exposure internally
       
   112 */
       
   113 class CCAFHTTPRequestHeadersStep : public CCAFStep, public MHTTPTransactionCallback
       
   114 	{
       
   115 public:
       
   116 	CCAFHTTPRequestHeadersStep(CCAFServer& aParent);
       
   117 	~CCAFHTTPRequestHeadersStep();
       
   118 	virtual TVerdict doTestStepL();
       
   119 	
       
   120 	virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent &aEvent);
       
   121 	virtual TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent &aEvent);
       
   122 private:
       
   123 	CCAFServer& iParent;
       
   124 	};
       
   125 
       
   126 #endif
       
   127 
       
   128 #endif
       
   129