summaryrefslogtreecommitdiffstats
path: root/plugins/contacts/symbian/contactsmodel/tsrc/cntmodel2/t_packager.h
blob: 993a95145a1a0eeb8d86d28ea6c7122d243cf20e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*
*/


#ifndef __T_PACKAGER_H__
#define __T_PACKAGER_H__

#include <badesca.h>
#include "t_cnttest.h"

namespace nsCntTest
	{	
	_LIT(KPl, "Pl");
	_LIT(KCnt,"Cnt");
	}

class CContactItem;
class CCntPackager;

// CPackagerTests - the class implementing the 
// Contact Packaging Tests. 
class CPackagerTests : public CCntTest
	{
public:
	static CPackagerTests* NewLC (CCntTestImplementor& aCntTestImpl);
	~CPackagerTests();

	void ConstructL();

	//Test procedures
	void AllTestsL();
	void ContactItemTestL();
	void EmptyContactItemTestL();
	void ContentTypeTestL();
	void CntTextDefTestL();
	void CntItemViewDefTestL();
	void CntViewDefTestL();	
	void DescArrayTestL();
	void MessageBufferTestL();
	void CContactIdArrayTestL();
	void CCntFilterTestL();
	TInt CompareContactItemTestL(CContactItem* item1, CContactItem* item2);
	TInt CompareContactItemFieldTestL(CContactItemField* itemField1, CContactItemField* itemField2);
	TInt CompareContentTypeTestL(const CContentType& contentType1, const CContentType& contentType2);
	TInt CompareCntTextDefL(CContactTextDef* textDef1, CContactTextDef* textDef2);
	TInt CompareCntItemViewDefTestL(CContactItemViewDef* viewDef1, CContactItemViewDef* viewDef2);
	TInt CompareCntViewDefTestL(CContactViewDef* def1, CContactViewDef* def2);	
	TInt CompareDescArrayTestL(CDesCArray* testArray1, CDesCArray* testArray2);
	TInt CompareCContactIdArrayTestL(CContactIdArray* idArray1, CContactIdArray* idArray2);
	TInt CompareCCntFilterTestL(CCntFilter* filter1, CCntFilter* filter2);
	

	virtual void HandleDatabaseEventL(TContactDbObserverEvent /*aEvent*/)
		{};
	virtual void DeleteNotifyL(TContactItemId /*aContactId*/)
		{};

private:
	inline CPackagerTests (CCntTestImplementor& aCntTestImpl);
	CContactItemViewDef* iMatchAll;
	RFs iFs;
	};

CPackagerTests::CPackagerTests (CCntTestImplementor& aCntTestImpl):CCntTest(aCntTestImpl) {};

	

#endif //__T_PACKAGER_H__