servicediscoveryandcontrol/pnp/test/upnp/Server/Flow/inc/upnpserverconstants.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 //
       
    15 
       
    16 #ifndef __UPNPSERVERCONSTANTS_H_
       
    17 #define __UPNPSERVERCONSTANTS_H_
       
    18 
       
    19 #include <in_sock.h>
       
    20 
       
    21 _LIT8(KXmlMimeType, "text/xml");
       
    22 _LIT8(KBody,"Body");
       
    23 _LIT8 ( KSoapFieldSeparator, "\n");
       
    24 _LIT8 ( KNotFound, "Not Found" );
       
    25 _LIT8 ( KUPnPCodecName, "HTTP/UPnP" );
       
    26 
       
    27 // These should be moved to the string table
       
    28 _LIT8 ( KSsdpAlive, "ssdp:alive" );
       
    29 _LIT8 ( KSsdpBye, "ssdp:byebye" );
       
    30 _LIT8 ( KSsdpAll, "ssdp:all" );
       
    31 _LIT8 ( KSsdpDiscover, "\"ssdp:discover\"");
       
    32 _LIT8 ( KSearchUri, "*" );
       
    33 _LIT8 ( KSeperator, "::" );
       
    34 _LIT8 ( KMultiCastAddr, "239.255.255.250:1900" );
       
    35 _LIT8 ( KRootDevice, "upnp:rootdevice" );
       
    36 _LIT8 ( KColon, ":" );
       
    37 _LIT8 ( KUnderScore, "_" );
       
    38 _LIT8 ( KUrnService, "urn:upnp-org:serviceId:" );
       
    39 _LIT8 ( KUrnSchema, "urn:schemas-upnp-org" );
       
    40 _LIT8 ( KHttpScheme, "http://" );
       
    41 
       
    42 _LIT(KUuidString,   "uuid:");
       
    43 
       
    44 const TUint KIPv6HostOpenBrace = '[';
       
    45 const TUint KIPv6HostCloseBrace = ']';
       
    46 
       
    47 const TUint KIdentifiersLen = sizeof ( TInt );
       
    48 
       
    49 // Option names. Used for Get & Set options from the socket.
       
    50 /*
       
    51 Set the absolute URI
       
    52 */
       
    53 const TUint KCHAbsoluteUri = 1;		// Note ! dont use 1 it is KSOLSocket used by TCP
       
    54 
       
    55 /*
       
    56 The maximum receive length that is expected. When it is called with GetOpt
       
    57 it can return KErrUnknown otherwise a valid length
       
    58 */
       
    59 const TUint KCHMaxLength = 2;
       
    60 
       
    61 /*
       
    62 The message is last or not
       
    63 */
       
    64 const TUint KCHLastMessage = 3;
       
    65 
       
    66 /*
       
    67 Option level --- Always 0.
       
    68 */
       
    69 const TUint KCHOptionLevel = 0; // Always 0.
       
    70 
       
    71 
       
    72 const TUint KFirstRegistration = 1;
       
    73 const TInt KSubscriptionCleanupFrequency = 1000000;
       
    74 
       
    75 /* Udp Upnp Multicast Port*/
       
    76 const TUint	KUpnpMCPort = 1900;
       
    77 /* Udp Upnp Port Number; [REF] DLNA Requirement-7.2.3.4 */
       
    78 const TUint	KUpnpUdpPort = 1025;
       
    79 const TInt KInvalidSeqStatusCode = 610;
       
    80 const TInt KRequestTimeoutStatusCode = 408;
       
    81 const TInt KRootDeviceRepublishFrequency = 605436607; // rounded-conversion of 600seconds to clockticks
       
    82 
       
    83 const TUint32 KCacheControl = 1800;
       
    84 const TUint32 KSsdpMulticastAddr = INET_ADDR ( 239, 255, 255, 250 );
       
    85 const TInt KPreConditionFailedStatusCode = 412;
       
    86 const TInt KOkStatusCode = 200;
       
    87 
       
    88 
       
    89 const TInt KMajorVersion = 1;
       
    90 const TInt KMinorVersion = 1;
       
    91 
       
    92 #endif /*UPNPSERVERCONSTANTS_H_*/