servicediscoveryandcontrol/pnp/test/upnp/IntegTest/testupnp/inc/constants.h
changeset 0 f5a58ecadc66
equal deleted inserted replaced
-1:000000000000 0:f5a58ecadc66
       
     1 // Copyright (c) 2008-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 constants refered in test code
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __CONSTANTS_H__
       
    19 #define __CONSTANTS_H__
       
    20 
       
    21 // Constant literals
       
    22 _LIT(KTestUPnPManager, "TestUPnPManager");
       
    23 _LIT(KTestRControlChannel, "TestRControlChannel");
       
    24 
       
    25 
       
    26 const TInt KMaxLogSize 		= 1024;
       
    27 const TInt KMaxUriSize 		= 1024;
       
    28 const TUint KTierId 		= 0x2000D054;
       
    29 
       
    30 //Constants
       
    31 _LIT(KDiscovery, 			"discovery");
       
    32 _LIT(KDescribe, 			"describe");
       
    33 _LIT(KSubscribe, 			"subscribe");
       
    34 _LIT(KRegisterAnnouncement, "registernotify");
       
    35 _LIT(KUnsubscribe, 			"unsubscribe");
       
    36 _LIT(KPublishService, 		"publishservice");
       
    37 _LIT(KPublishDevice, 		"publishdevice");
       
    38 _LIT(KNotify, 				"notify");
       
    39 _LIT(KCancelDiscover, 		"canceldiscovery");
       
    40 _LIT(KCancelDescribe, 		"canceldescribe");
       
    41 _LIT(KCancelNotify,			"cancelnotify");
       
    42 _LIT(KUnKnown, 				"unknown");
       
    43 _LIT(KStartScheduler,		"startscheduler");
       
    44 _LIT(KStopScheduler,		"stopscheduler");
       
    45 _LIT(KPrintResults,			"printresults");
       
    46 _LIT(KPrintAnnouncements,	"printannouncements");
       
    47 _LIT(KStartTimer,			"starttimer");
       
    48 _LIT(KReadIni,				"readini");
       
    49 _LIT(KInitiateControl,		"initiateaction");
       
    50 _LIT(KDescribeService,		"describeservice");
       
    51 _LIT(KOpenDiscoverer,		"opendiscoverer");
       
    52 _LIT(KOpenPublisher,		"openpublisher");
       
    53 _LIT(KDefaultFileFormat,	"%c:\\describeoutput_");
       
    54 _LIT(KDefaultExtension, 	".txt");
       
    55 _LIT(KCancelAll,			"cancelall");
       
    56 _LIT(KCancelAllService,		"cancelallservicedescription");
       
    57 _LIT(KExpctedDescriptions,	"expecteddescriptions");
       
    58 _LIT(KPositiveCase,			"positivecase");
       
    59 _LIT(KServiceMaxDuration, 	"serviceduration");
       
    60 _LIT(KDescribeIcon, 		"describeicon");
       
    61 
       
    62 //Constant literals -- Discovery response 
       
    63 _LIT(KLocation,				"location");
       
    64 _LIT(KSearchTarget,			"searchtarget");
       
    65 _LIT(KServiceType,			"servicetype");
       
    66 _LIT(KCacheControl,			"cachecontrol");
       
    67 _LIT(KExpiryTime, 			"expirytime");
       
    68 _LIT(KDate,					"date");
       
    69 _LIT(KExtResponse,			"extresponse");
       
    70 _LIT(KServer,				"server");
       
    71 _LIT(KUsn,					"usn");
       
    72 _LIT(KOkResponse,			"okresponse");
       
    73 _LIT(KResponseTime, 		"responsetime");
       
    74 _LIT(KUSN, 					"usn");
       
    75 _LIT(KDescription, 			"description");
       
    76 _LIT(KServiceDescription, 	"servicedescription");
       
    77 _LIT(KDescriptionPath, 		"descriptionpath");
       
    78 _LIT(KTimeOut, 				"timeout");
       
    79 _LIT(KSid, 					"sid");
       
    80 _LIT(KNotification,			"notification");
       
    81 _LIT(KUri, 					"uri");
       
    82 _LIT(KSubscriptionUri, 		"subscriptionuri");
       
    83 _LIT(KDuration, 			"duration");
       
    84 _LIT8(KSsdpall,				"ssdp:all");
       
    85 _LIT(KOperationType,		"operationtype");
       
    86 _LIT8(KHeaderValue,			"%S:%d");
       
    87 _LIT(KIconRefer,			"iconRefer");
       
    88 _LIT(KMimeType,			"mimetype");
       
    89 _LIT(KWidth,				"width");
       
    90 _LIT(KHeight,				"height");
       
    91 _LIT(KDepth,				"depth");
       
    92 _LIT(KUrl,					"url");
       
    93 
       
    94 const TInt KMaxBufLength = 256;
       
    95 
       
    96 // constants for Device Register params
       
    97 
       
    98 _LIT(KBaseURL, "BaseURL");
       
    99 _LIT(KParentDeviceUid, "ParentDeviceUid");
       
   100 _LIT(KDeviceType, "DeviceType");
       
   101 _LIT(KFriendlyName, "FriendlyName");
       
   102 _LIT(KManufacturer, "Manufacturer");
       
   103 _LIT(KManufacturerURL, "ManufacturerURL");
       
   104 _LIT(KModelDescription, "ModelDescription");
       
   105 _LIT(KModelName, "ModelName");
       
   106 _LIT(KModelNumber, "ModelNumber");
       
   107 _LIT(KModelURL, "ModelURL");
       
   108 _LIT(KPresentationURL, "PresentationURL");
       
   109 _LIT(KSerialNumber, "SerialNumber");
       
   110 _LIT(KUDN, "UDN");
       
   111 _LIT(KUPC, "UPC");
       
   112 _LIT(KDescription_Path,"Description_Path %d");
       
   113 
       
   114 //Cntrl Url
       
   115 _LIT8(KStartCntrlUrl, "<controlURL>");
       
   116 _LIT8(KEndCntrlUrl, "</controlURL>");
       
   117 const TInt cntrlLength = 12;// 12 is the length of the <controlURL>
       
   118 
       
   119 _LIT8(KStartScpdUrl, "<SCPDURL>");
       
   120 _LIT8(KEndScpdUrl, "</SCPDURL>");
       
   121 const TInt scpdLength = 9;// 9 is the length of the <SCPDURL>
       
   122 
       
   123 //Event Url
       
   124 _LIT8(KStartEventUrl, "<eventSubURL>");
       
   125 _LIT8(KEndEventUrl, "</eventSubURL>");
       
   126 const TInt eventLength = 13;// 9 is the length of the <eventSubURL>
       
   127 
       
   128 _LIT8(KSlash, "/");
       
   129 _LIT8(KColonSlashSlash, "://");
       
   130 _LIT8(KColon, ":");
       
   131 
       
   132 
       
   133 //Panics
       
   134 _LIT(KDescribeTestPanicCategory,"Describe");
       
   135 _LIT(KDescoveryTestPanicCategory, "Discovery");
       
   136 
       
   137 _LIT(KExpectedURL, "expectedurl");
       
   138 _LIT(KExpectedCount, "expectedcount");
       
   139 	
       
   140 enum TestUPnPError
       
   141 	{
       
   142 	//No Description path found
       
   143 	KErrNoDescriptionPath 			= -1,
       
   144 	KErrNODiscoveryResponse 		= -2,
       
   145 	KErrNoServiceUris 				= -3,
       
   146 	KErrMissingURiOrResponceTime 	= -4
       
   147 	};
       
   148 
       
   149 enum TPublisherControl
       
   150 	{
       
   151 	KDevice,
       
   152 	KService,
       
   153 	KErrNoControl = -1
       
   154 	};
       
   155 
       
   156 #endif //__CONSTANTS_H__