applayerpluginsandutils/bookmarksupport/test/Integration/TestBookmarksSuite/TestBookmarksServer.h
changeset 0 b16258d2340f
equal deleted inserted replaced
-1:000000000000 0:b16258d2340f
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Contains declaration of CTestBookmarksServer class and common constants
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __TEST_BOOKMARKS_SERVER_H__
       
    19 #define __TEST_BOOKMARKS_SERVER_H__
       
    20 
       
    21 // System Includes
       
    22 #include <testexecuteserverbase.h>
       
    23 
       
    24 /*@{*/
       
    25 // Literal constants for INI file field-names
       
    26 _LIT(KIniDbMode, 				"dbmode"		);
       
    27 _LIT(KIniTypeOfItem, 			"typeofitem"	);
       
    28 _LIT(KIniRecursive, 			"recursive"		);
       
    29 _LIT(KIniTitle, 				"title"			);
       
    30 _LIT(KIniParent, 				"parent"		);
       
    31 _LIT(KIniProperty,				"property"		);
       
    32 _LIT(KIniValue,					"value"			);
       
    33 _LIT(KIniExpectedValue,			"expectedvalue"	);
       
    34 _LIT(KIniOperation,				"operation"		);
       
    35 _LIT(KIniCategory,				"category"		);
       
    36 _LIT(KIniDataType,				"datatype"		);
       
    37 _LIT(KIniUid,					"uid"			);
       
    38 _LIT(KIniAuthName,				"name"			);
       
    39 _LIT(KIniAuthPassword,			"password"		);
       
    40 _LIT(KIniAuthMethod,			"method"		);
       
    41 _LIT(KIniMajor,					"major"			);
       
    42 _LIT(KIniMinor,					"minor"			);
       
    43 _LIT(KIniBuild,					"build"			);
       
    44 /*@}*/
       
    45 
       
    46 /*@{*/
       
    47 // Literal constants denoting the DB modes
       
    48 _LIT(KDbModePublic, 			"public"		);
       
    49 _LIT(KDbModePrivate, 			"private"		);
       
    50 _LIT(KDbModeAll, 				"all"			);
       
    51 _LIT(KDbModeManager, 			"manager"		);
       
    52 /*@}*/
       
    53 
       
    54 /*@{*/
       
    55 // Literal constant for the main test folder
       
    56 _LIT(KMainTestFolder, 			"testbookmarkssuitemaintestfolder");
       
    57 /*@}*/
       
    58 
       
    59 /*@{*/
       
    60 // Literal constants used by some test steps
       
    61 _LIT(KRegisterOperation, 		"register"		);
       
    62 _LIT(KDeRegisterOperation, 		"deregister"	);
       
    63 _LIT(KGetOperation, 			"get"			);
       
    64 _LIT(KSetOperation, 			"set"			);
       
    65 
       
    66 _LIT(KTypeInt, 					"int"			);
       
    67 _LIT(KTypeReal, 				"real"			);
       
    68 _LIT(KTypeDes8, 				"des8"			);
       
    69 _LIT(KTypeDes16, 				"des16"			);
       
    70 
       
    71 _LIT(KDb, 						"db"			);
       
    72 _LIT(KFolder, 					"folder"		);
       
    73 _LIT(KBookmark, 				"bookmark"		);
       
    74 
       
    75 _LIT(KRoot,						"root"			);
       
    76 
       
    77 _LIT(KMethodBasic,				"basic"			);
       
    78 _LIT(KMethodDigest,				"digest"		);
       
    79 
       
    80 _LIT(KTrue,						"TRUE"			);
       
    81 _LIT(KFalse,					"FALSE"			);
       
    82 /*@}*/
       
    83 
       
    84 const TInt KItemBoolPropertiesStart		=	0;
       
    85 const TInt KItemGeneralPropertiesStart 	=	100;
       
    86 const TInt KDbGeneralPropertiesStart	=	200;
       
    87 
       
    88 /**
       
    89 Enumerations denoting Boolean properties that have to be Set or Got
       
    90 The property numbers in the ini file are based on these.
       
    91 @internalTechnology
       
    92 @test
       
    93 */
       
    94 enum TItemBoolProperties
       
    95 	{
       
    96 	/**	Public attribute */
       
    97 	EItemPublic				= KItemBoolPropertiesStart + 1,
       
    98 	/**	Writable attribute */
       
    99 	EItemWritable			= KItemBoolPropertiesStart + 2,
       
   100 	/**	Is homepage flag */
       
   101 	EBookmarkIsHome			= KItemBoolPropertiesStart + 3,
       
   102 	};
       
   103 
       
   104 /**
       
   105 Enumerations denoting Other general properties that have to be Set or Got
       
   106 The property numbers in the ini file are based on these.
       
   107 @internalTechnology
       
   108 */
       
   109 enum TItemGeneralProperties
       
   110 	{
       
   111 	/**	Item Description attribute */
       
   112 	EItemDescription		= KItemGeneralPropertiesStart + 1,
       
   113 	/**	Item Parent attribute */
       
   114 	EItemParent				= KItemGeneralPropertiesStart + 2,
       
   115 	/**	Item Title attribute */
       
   116 	EItemTitle				= KItemGeneralPropertiesStart + 3,
       
   117 	/**	Bookmark NAP attribute */
       
   118 	EBookmarkNap			= KItemGeneralPropertiesStart + 4,
       
   119 	/**	Item Owner attribute */
       
   120 	EItemOwner				= KItemGeneralPropertiesStart + 5,
       
   121 	/**	Bookmark URI attribute */
       
   122 	EBookmarkUri			= KItemGeneralPropertiesStart + 6,
       
   123 	/**	Bookmark Authentication attribute */
       
   124 	EBookmarkAuth			= KItemGeneralPropertiesStart + 7,
       
   125 	/**	Bookmark Last visited time attribute */
       
   126 	EBookmarkLastVisited	= KItemGeneralPropertiesStart + 8,
       
   127 	/**	Bookmark Proxy attribute */
       
   128 	EBookmarkProxy			= KItemGeneralPropertiesStart + 9,
       
   129 	/**	Bookmark Last modified time attribute */
       
   130 	EBookmarkLastModified	= KItemGeneralPropertiesStart + 10,
       
   131 	};
       
   132 
       
   133 /**
       
   134 Enumerations denoting properties of the DB that have to be Set or Got
       
   135 The property numbers in the ini file are based on these.
       
   136 @internalTechnology
       
   137 @test
       
   138 */
       
   139 enum TDbGeneralProperties
       
   140 	{
       
   141 	/**	DB Default NAP attribute */
       
   142 	EDbDefaultNap			= KDbGeneralPropertiesStart + 1,
       
   143 	/**	DB Default Proxy attribute */
       
   144 	EDbDefaultProxy			= KDbGeneralPropertiesStart + 2,
       
   145 	/**	DB Homepage attribute */
       
   146 	EDbHome					= KDbGeneralPropertiesStart + 3,
       
   147 	/**	DB Homepage text attribute */
       
   148 	EDbHomePageText			= KDbGeneralPropertiesStart + 4,
       
   149 	/**	DB Search URI attribute */
       
   150 	EDbSearchUri			= KDbGeneralPropertiesStart + 5,
       
   151 	/**	DB Version attribute */
       
   152 	EDbVersion				= KDbGeneralPropertiesStart + 6,
       
   153 	};
       
   154 
       
   155 /**
       
   156 The test server.
       
   157 @internalTechnology
       
   158 @test
       
   159 */
       
   160 class CTestBookmarksServer : public CTestServer
       
   161 	{
       
   162 public:
       
   163 	// Construction
       
   164 	static	CTestBookmarksServer* 	NewL();
       
   165 
       
   166 	// Destruction
       
   167 	~CTestBookmarksServer();
       
   168 
       
   169 	// Base class pure virtual
       
   170 	virtual CTestStep* 				CreateTestStep(const TDesC& aStepName);
       
   171 
       
   172 	const TPtrC 					ServerName();
       
   173 
       
   174 	static TBool 					GetBool(const TPtrC& aString);
       
   175 	static TUint32					GetTUint32(const TPtrC& aValue);
       
   176 	static TInt 					GetTInt(const TPtrC& aValue);
       
   177 	static TReal 					GetTReal(const TPtrC& aValue);
       
   178 
       
   179 public:
       
   180 	/** Array to store the titles of items created */
       
   181 	RPointerArray<HBufC> 			iTitles;
       
   182 	/** Array to store the ids of items created    */
       
   183 	RArray<TUint> 					iIds;
       
   184 	};
       
   185 
       
   186 #endif		// __TEST_BOOKMARKS_SERVER_H__
       
   187