os/security/contentmgmt/referencedrmagent/tcaf/source/SupplierStep.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/*
sl@0
     2
* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
* All rights reserved.
sl@0
     4
* This component and the accompanying materials are made available
sl@0
     5
* under the terms of the License "Eclipse Public License v1.0"
sl@0
     6
* which accompanies this distribution, and is available
sl@0
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
*
sl@0
     9
* Initial Contributors:
sl@0
    10
* Nokia Corporation - initial contribution.
sl@0
    11
*
sl@0
    12
* Contributors:
sl@0
    13
*
sl@0
    14
* Description: 
sl@0
    15
*
sl@0
    16
*/
sl@0
    17
sl@0
    18
sl@0
    19
sl@0
    20
sl@0
    21
#if (!defined __SUPPLIER_STEP_H__)
sl@0
    22
#define __SUPPLIER_STEP_H__
sl@0
    23
#include <test/testexecutestepbase.h>
sl@0
    24
sl@0
    25
#include "cafstep.h"
sl@0
    26
#include "importfile.h"
sl@0
    27
sl@0
    28
#ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
sl@0
    29
#include <http/mhttptransactioncallback.h>
sl@0
    30
#endif
sl@0
    31
sl@0
    32
// Constants used to name test cases 
sl@0
    33
_LIT(KCAFSupplierStep,"CAFSupplierStep");
sl@0
    34
_LIT(KCAFSupplierAsyncStep,"CAFSupplierAsyncStep");
sl@0
    35
_LIT(KCAFSupplierSerializeStep,"CAFSupplierSerializeStep");
sl@0
    36
_LIT(KCAFClientOutputSupplierStep,"CAFClientOutputSupplierStep");
sl@0
    37
#ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
sl@0
    38
_LIT(KCAFHTTPRequestHeadersStep,"CAFHTTPRequestHeaders");
sl@0
    39
#endif
sl@0
    40
class CCAFServer;
sl@0
    41
sl@0
    42
sl@0
    43
/* 
sl@0
    44
* Used to test the import DCF files into the Content Access Framework
sl@0
    45
*
sl@0
    46
* @internalComponent Exposure internally
sl@0
    47
*/
sl@0
    48
class CCafSupplierStep : public CCAFStep
sl@0
    49
	{
sl@0
    50
public:
sl@0
    51
	CCafSupplierStep(CCAFServer& aParent);
sl@0
    52
	~CCafSupplierStep();
sl@0
    53
	virtual TVerdict doTestStepL();
sl@0
    54
private:
sl@0
    55
	CCAFServer& iParent;
sl@0
    56
	};
sl@0
    57
sl@0
    58
sl@0
    59
/* 
sl@0
    60
* Used to test the import DCF files into the Content Access Framework
sl@0
    61
*
sl@0
    62
* @internalComponent Exposure internally
sl@0
    63
*/
sl@0
    64
class CCafSupplierAsyncStep : public CCAFStep
sl@0
    65
	{
sl@0
    66
public:
sl@0
    67
	CCafSupplierAsyncStep(CCAFServer& aParent);
sl@0
    68
	~CCafSupplierAsyncStep();
sl@0
    69
	virtual TVerdict doTestStepL();
sl@0
    70
private:
sl@0
    71
	CCAFServer& iParent;
sl@0
    72
	};
sl@0
    73
sl@0
    74
sl@0
    75
/* 
sl@0
    76
* Used to test CCafMimeHeader::ExternalizeL() and CCafMimeHeader::InternalizeL()
sl@0
    77
*
sl@0
    78
* @internalComponent Exposure internally
sl@0
    79
*/
sl@0
    80
class CCAFSupplierSerializeStep : public CCAFStep
sl@0
    81
	{
sl@0
    82
public:
sl@0
    83
	CCAFSupplierSerializeStep(CCAFServer& aParent);
sl@0
    84
	~CCAFSupplierSerializeStep();
sl@0
    85
	virtual TVerdict doTestStepL();
sl@0
    86
private:
sl@0
    87
	CCAFServer& iParent;
sl@0
    88
	};
sl@0
    89
sl@0
    90
sl@0
    91
/* 
sl@0
    92
* Used to test the import DCF files into the Content Access Framework
sl@0
    93
*
sl@0
    94
* @internalComponent Exposure internally
sl@0
    95
*/
sl@0
    96
class CCafClientOutputSupplierStep : public CCAFStep
sl@0
    97
	{
sl@0
    98
public:
sl@0
    99
	CCafClientOutputSupplierStep(CCAFServer& aParent);
sl@0
   100
	~CCafClientOutputSupplierStep();
sl@0
   101
	virtual TVerdict doTestStepL();
sl@0
   102
	void CheckContentMimeL(ContentAccess::CImportFile* aImport, TDes8& aContentMime, TDesC8& aExpectedContentMime);
sl@0
   103
private:
sl@0
   104
	CCAFServer& iParent;
sl@0
   105
	};
sl@0
   106
sl@0
   107
sl@0
   108
#ifdef INTERNALLY_ENABLE_UPWARD_DEPENDENCY
sl@0
   109
/* 
sl@0
   110
* Used to test that an application can retrieve HTTP request headers
sl@0
   111
* @internalComponent Exposure internally
sl@0
   112
*/
sl@0
   113
class CCAFHTTPRequestHeadersStep : public CCAFStep, public MHTTPTransactionCallback
sl@0
   114
	{
sl@0
   115
public:
sl@0
   116
	CCAFHTTPRequestHeadersStep(CCAFServer& aParent);
sl@0
   117
	~CCAFHTTPRequestHeadersStep();
sl@0
   118
	virtual TVerdict doTestStepL();
sl@0
   119
	
sl@0
   120
	virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent &aEvent);
sl@0
   121
	virtual TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent &aEvent);
sl@0
   122
private:
sl@0
   123
	CCAFServer& iParent;
sl@0
   124
	};
sl@0
   125
sl@0
   126
#endif
sl@0
   127
sl@0
   128
#endif
sl@0
   129