omads/omadsextensions/dsutils/nsmlfolderutils/inc/nsmlparserconstants.h
branchRCL_3
changeset 52 4f0867e42d62
parent 1 95fdac6ccb5c
equal deleted inserted replaced
51:8e7494275d3a 52:4f0867e42d62
       
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Folder parser constants
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __NSMLPARSERCONSTANTS_H__
       
    20 #define __NSMLPARSERCONSTANTS_H__
       
    21 
       
    22 // ------------------------------------------------------------------------------------------------
       
    23 // Defines for binary size optimization
       
    24 // ------------------------------------------------------------------------------------------------
       
    25 #define __NO_XML_COMMENTS_
       
    26 //#define __NO_EMPTY_ELEMENTS_
       
    27 
       
    28 
       
    29 // ------------------------------------------------------------------------------------------------
       
    30 // constants
       
    31 // ------------------------------------------------------------------------------------------------
       
    32 
       
    33 // the length of element start (<) and end (>)
       
    34 const TInt KElementStartEndWidth = 2;
       
    35 
       
    36 // constants used with files
       
    37 const TInt KReadDataLength = 512;
       
    38 const TUint KFileReadAccess	= EFileRead|EFileShareAny;
       
    39 const TUint KFileWriteAccess = EFileWrite|EFileShareExclusive;
       
    40 
       
    41 // Whitespace characters
       
    42 const TText KWhitespaceEmpty = ' ';
       
    43 const TText KWhitespaceLineFeed = '\r';
       
    44 const TText KWhitespaceNewLine = '\n';
       
    45 const TText KWhitespaceTabular = '\t';
       
    46 const TText KWhitespaceLineFeedNewLine = '\r\n';
       
    47 
       
    48 const TText KCharacterSlash = '/';
       
    49 
       
    50 // CData
       
    51 _LIT8(KCDataStart,		"<![CDATA[");
       
    52 _LIT8(KCDataEnd,		"]]>");
       
    53 _LIT8(KCDataInnerEnd,	"]]]]>&gt;<![CDATA[");
       
    54 
       
    55 #ifndef __NO_XML_COMMENTS_
       
    56 // Xml comments
       
    57 _LIT8(KCommentStart,	"<!--");
       
    58 _LIT8(KCommentEnd,		"-->");
       
    59 #endif
       
    60 
       
    61 const TText KElementStart = '<';
       
    62 const TText KElementEnd = '>';
       
    63 
       
    64 // Xml entities
       
    65 _LIT8(KEntityLT,	"&lt;");
       
    66 _LIT8(KEntityGT,	"&gt;");
       
    67 _LIT8(KEntityAMP,	"&amp;");
       
    68 _LIT8(KEntityAPOS,	"&apos;");
       
    69 _LIT8(KEntityQUOT,	"&quot;");
       
    70 
       
    71 // special characters
       
    72 _LIT8(KLessThan,	"<");
       
    73 _LIT8(KGreaterThan,	">");
       
    74 _LIT8(KAmpersand,	"&");
       
    75 _LIT8(KApostrophe,	"\'");
       
    76 _LIT8(KQuotation,	"\"");
       
    77 
       
    78 // boolean string representations
       
    79 _LIT8(KStringTrue,	"true");
       
    80 _LIT8(KStringFalse,	"false");
       
    81 
       
    82 // empty string
       
    83 _LIT8(KStringEmpty,	"");
       
    84 
       
    85 // truncated info spesific elements
       
    86 _LIT8(KTruncatedElement,		"truncated");
       
    87 _LIT8(KTruncatedBodyElement,	"body");
       
    88 _LIT8(KTruncatedAttachElement,	"attach");
       
    89 _LIT8(KTruncatedSizeElement,	"size");
       
    90 _LIT8(KTruncatedTypeElement,	"type");
       
    91 _LIT8(KTruncatedNameElement,	"name");
       
    92 
       
    93 // extension spesific elements
       
    94 _LIT8(KExtElement,		"Ext");
       
    95 _LIT8(KExtXNamElement,	"XNam");
       
    96 _LIT8(KExtXValElement,	"XVal");
       
    97 
       
    98 // folder spesific elements
       
    99 _LIT8(KFolderElement,			"Folder");
       
   100 _LIT8(KFolderNameElement,		"name");
       
   101 _LIT8(KFolderCreatedElement,	"created");
       
   102 _LIT8(KFolderModifiedElement,	"modified");
       
   103 _LIT8(KFolderAccessedElement,	"accessed");
       
   104 _LIT8(KFolderAttributesElement,	"attributes");
       
   105 _LIT8(KFolderRoleElement,		"role");
       
   106 
       
   107 // folder attributes
       
   108 _LIT8(KAttributeHiddenElement,		"h");
       
   109 _LIT8(KAttributeSystemElement,		"s");
       
   110 _LIT8(KAttributeArchivedElement,	"a");
       
   111 _LIT8(KAttributeDeleteElement,		"d");
       
   112 _LIT8(KAttributeWritableElement,	"w");
       
   113 _LIT8(KAttributeReadableElement,	"r");
       
   114 _LIT8(KAttributeExecutableElement,	"x");
       
   115 
       
   116 
       
   117 #endif // __NSMLPARSERCONSTANTS_H__