epoc32/include/vtoken.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
     1 vtoken.h
     1 // Copyright (c) 1997-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 /**
       
    19  @file
       
    20  @publishedAll
       
    21  @released 
       
    22 */
       
    23  
       
    24 #ifndef __VTOKEN_H__
       
    25 #define __VTOKEN_H__
       
    26 
       
    27 #include <e32base.h>
       
    28 
       
    29 #define KMaxExternalizedTokenLength			70
       
    30 #define KMinLineLengthToWriteTo				1
       
    31 
       
    32 /** A colon string. */
       
    33 _LIT8(KVersitTokenColon,					":");
       
    34 /** A Unicode colon string. */
       
    35 _LIT(KVersitTokenColonUnicode,				":");
       
    36 /** A semi-colon string. */
       
    37 _LIT8(KVersitTokenSemiColon,				";");
       
    38 /** A Unicode semi-colon string. */
       
    39 _LIT(KVersitTokenSemiColonUnicode,			";");
       
    40 /** A backslash string (escaped). */
       
    41 _LIT8(KVersitBackSlash,						"\\");
       
    42 /** An escaped semi-colon string. */
       
    43 _LIT8(KVersitEscapedSemiColon,				"\\;");
       
    44 /** An escaped Unicode semi-colon string. */
       
    45 _LIT(KVersitEscapedSemiColonUnicode,		"\\;");
       
    46 /** An equals sign string. */
       
    47 _LIT8(KVersitTokenEquals,					"=");
       
    48 /** A full stop string. */
       
    49 _LIT8(KVersitTokenPeriod,					".");
       
    50 /** A space string. */
       
    51 _LIT8(KVersitTokenSpace,					" ");
       
    52 /** A minus sign string. */
       
    53 _LIT8(KVersitTokenMinus,					"-");
       
    54 /** A plus sign string. */
       
    55 _LIT8(KVersitTokenPlus,						"+");
       
    56 /** A line break string. */
       
    57 _LIT8(KVersitLineBreak,						"\r\n  ");
       
    58 /** The string used at the start of a time interval string. */
       
    59 _LIT8(KVersitTimePeriodBegin,				"P");
       
    60 /** The string appended to the number of years when encoding a time interval. */
       
    61 _LIT8(KVersitTimePeriodYear,				"Y");
       
    62 /** The string appended to the number of months when encoding a time interval. */
       
    63 _LIT8(KVersitTimePeriodMonth,				"M");
       
    64 /** Not used. */
       
    65 _LIT8(KVersitTimePeriodWeek,				"W");		//unused
       
    66 /** The string appended to the number of days when encoding a time interval. */
       
    67 _LIT8(KVersitTimePeriodDay,					"D");
       
    68 /** The string added before the time of day when encoding a Versit date/time.
       
    69 
       
    70 Also the string added before the time of day when encoding a time interval. */
       
    71 _LIT8(KVersitTimePeriodTime,				"T");
       
    72 /** The string appended to the hour value when encoding a time interval. */
       
    73 _LIT8(KVersitTimePeriodHour,				"H");
       
    74 /** The string appended to the minutes value when encoding a time interval. */
       
    75 _LIT8(KVersitTimePeriodMinute,				"M");
       
    76 /** The string appended to the seconds value when encoding a time interval. */
       
    77 _LIT8(KVersitTimePeriodSecond,				"S");
       
    78 /**  The string appended to a date/time when encoding a Versit 
       
    79 date/time, if the value is in universal time. */
       
    80 _LIT8(KVersitTokenUniversalTime,			"Z");
       
    81 
       
    82 /** A colon character. */
       
    83 const TUint KVersitTokenColonVal			=':';
       
    84 /** A semi-colon character. */
       
    85 const TUint KVersitTokenSemiColonVal		=';';
       
    86 /** A backslash character. */
       
    87 const TUint KVersitTokenBackslashVal		='\\';
       
    88 /** An equals sign character. */
       
    89 const TUint KVersitTokenEqualsVal			='=';
       
    90 /** A full stop character. */
       
    91 const TUint KVersitTokenPeriodVal			='.';
       
    92 /** A comma character. */
       
    93 const TUint KVersitTokenCommaVal			=',';
       
    94 /** A left square bracket character. */
       
    95 const TUint KVersitTokenLSquareBracketVal	='[';
       
    96 /** A right square bracket character. */
       
    97 const TUint KVersitTokenRSquareBracketVal	=']';
       
    98 /** A minus sign character. */
       
    99 const TUint KVersitTokenMinusVal			='-';
       
   100 /** A plus sign character. */
       
   101 const TUint KVersitTokenPlusVal				='+';
       
   102 /** A Yen character: the escape character for the 'ShiftJis' character set. */
       
   103 const TUint KVersitTokenYenVal				=0xa5;
       
   104 /** The character at the beginning of a time interval string. */
       
   105 const TUint KVersitTimePeriodBeginVal		='P';
       
   106 /** The character following the number of years in a time interval string. */
       
   107 const TUint KVersitTimePeriodYearVal		='Y';
       
   108 /** The character following the number of months in a time interval string. */
       
   109 const TUint KVersitTimePeriodMonthVal		='M';
       
   110 /** The character following the number of weeks in a time interval string. */
       
   111 const TUint KVersitTimePeriodWeekVal		='W';
       
   112 /** The character following the number of days in a time interval string. */
       
   113 const TUint KVersitTimePeriodDayVal			='D';
       
   114 /** The character preceding a length of day (hours,minutes and seconds) in a time 
       
   115 interval string.
       
   116 
       
   117 Also the character preceding the time of day in a date/time string. */
       
   118 const TUint KVersitTimePeriodTimeVal		='T';
       
   119 /** The character following the number of hours in a time interval string. */
       
   120 const TUint KVersitTimePeriodHourVal		='H';
       
   121 /** The character following the number of minutes in a time interval string. */
       
   122 const TUint KVersitTimePeriodMinuteVal		='M';
       
   123 /** The character following the number of seconds in a time interval string. */
       
   124 const TUint KVersitTimePeriodSecondVal		='S';
       
   125 /** The character at the end of a universal date/time string. */
       
   126 const TUint KVersitTokenUniversalTimeVal	='Z';
       
   127 /** The character at the start of a daily recurring entity string. */
       
   128 const TUint KVersitRecurrenceDailyVal		='D';
       
   129 /** The character at the start of a weekly recurring entity string. */
       
   130 const TUint KVersitRecurrenceWeeklyVal		='W';
       
   131 /** The character which precedes the number of recurrences, when specified, in 
       
   132 a recurring entity. */
       
   133 const TUint KVersitRecurrenceNumberOfVal	='#';
       
   134 /** The string at the beginning of a 'monthly by position' recurring entity 
       
   135 (see CVersitRecurrenceMonthlyByPos). Used when internalising. */
       
   136 _LIT(KVersitRecurrenceMonthlyByPos,		"MP");
       
   137 /** Not used. */
       
   138 _LIT(KVersitRecurrenceMonthlyByDay,		"MD");
       
   139 /** Not used. */
       
   140 _LIT(KVersitRecurrenceYearlyByMonth,		"YM");
       
   141 /** The string at the beginning of a 'yearly by day' recurring entity, 
       
   142 (see CVersitRecurrenceYearlyByDay). Used when internalising. */
       
   143 _LIT(KVersitRecurrenceYearlyByDay,			"YD");
       
   144 /** A string in the date list (if a date list is defined) of an entity 
       
   145 that recurs either weekly or 'monthly by position' on Mondays. Used when 
       
   146 internalising. */
       
   147 _LIT(KVersitRecurrenceMonday,				"MO");
       
   148 /** A string in the date list (if a date list is defined) of an entity 
       
   149 that recurs either weekly or 'monthly by position' on Tuesdays. Used when internalising. */
       
   150 _LIT(KVersitRecurrenceTuesday,				"TU");
       
   151 /** A string in the date list (if a date list is defined) of an entity 
       
   152 that recurs either weekly or 'monthly by position' on Wednesdays. Used when internalising. */
       
   153 _LIT(KVersitRecurrenceWednesday,			"WE");
       
   154 /** A string in the date list (if a date list is defined) of an entity that 
       
   155 recurs either weekly or 'monthly by position' on Thursdays. Used when internalising. */
       
   156 _LIT(KVersitRecurrenceThursday,				"TH");
       
   157 /** A string in the date list (if a date list is defined) of an entity that 
       
   158 recurs either weekly or 'monthly by position' on Fridays. Used when internalising. */
       
   159 _LIT(KVersitRecurrenceFriday,				"FR");
       
   160 /** A string in the date list (if a date list is defined) of an entity that 
       
   161 recurs either weekly or 'monthly by position' on Saturdays. Used when internalising. */
       
   162 _LIT(KVersitRecurrenceSaturday,				"SA");
       
   163 /** A string in the date list (if a date list is defined) of an entity that 
       
   164 recurs either weekly or 'monthly by position' on Sundays. Used when internalising. */
       
   165 _LIT(KVersitRecurrenceSunday,				"SU");
       
   166 /** The string appended to the 'occurrence list' section of an entity that 
       
   167 recurs on the last day of the month. Used when internalising. */
       
   168 _LIT(KVersitRecurrenceLastDay,				"LD");
       
   169 
       
   170 /** The string used at the start of a daily recurring entity. */
       
   171 _LIT8(KVersitRecurrenceDaily,				"D");
       
   172 /** The string used at the start of a weekly recurring entity. */
       
   173 _LIT8(KVersitRecurrenceWeekly,				"W");
       
   174 /** The string appended just before the number of occurrences, when encoding a recurring 
       
   175 entity as a descriptor. */
       
   176 _LIT8(KVersitRecurrenceNumberOf,			"#");
       
   177 /** The string used at the start of a 'monthly by position' recurring entity, 
       
   178 (see CVersitRecurrenceMonthlyByPos). Used when externalising. */
       
   179 _LIT8(KVersitRecurrenceMonthlyByPos8,		"MP");
       
   180 /** Not used. */
       
   181 _LIT8(KVersitRecurrenceMonthlyByDay8,		"MD");
       
   182 /** Not used. */
       
   183 _LIT8(KVersitRecurrenceYearlyByMonth8,		"YM");
       
   184 /** The string used at the start of a 'yearly by day' recurring entity, 
       
   185 (see CVersitRecurrenceYearlyByDay). Used when externalising. */
       
   186 _LIT8(KVersitRecurrenceYearlyByDay8,			"YD");
       
   187 /** The string appended to the 'occurrence list' section of an entity that recurs on Mondays. 
       
   188 Used when externalising. */
       
   189 _LIT8(KVersitRecurrenceMonday8,				"MO");
       
   190 /** The string appended to the 'occurrence list' section of an entity that recurs on Tuesdays. 
       
   191 Used when externalising. */
       
   192 _LIT8(KVersitRecurrenceTuesday8,				"TU");
       
   193 /** The string appended to the 'occurrence list' section of an entity that recurs on Wednesdays. 
       
   194 Used when externalising. */
       
   195 _LIT8(KVersitRecurrenceWednesday8,			"WE");
       
   196 /** The string appended to the 'occurrence list' section of an entity that recurs on Thursdays. 
       
   197 Used when externalising. */
       
   198 _LIT8(KVersitRecurrenceThursday8,				"TH");
       
   199 /** The string appended to the 'occurrence list' section of an entity that recurs on Fridays. 
       
   200 Used when externalising. */
       
   201 _LIT8(KVersitRecurrenceFriday8,				"FR");
       
   202 /** The string appended to the 'occurrence list' section of an entity that recurs on Saturdays. 
       
   203 Used when externalising. */
       
   204 _LIT8(KVersitRecurrenceSaturday8,				"SA");
       
   205 /** The string appended to the 'occurrence list' section of an entity that recurs on Sundays. 
       
   206 Used when externalising. */
       
   207 _LIT8(KVersitRecurrenceSunday8,				"SU");
       
   208 /** The string appended to the 'occurrence list' section of an entity that recurs on the last day of 
       
   209 the month. Used when externalising. */
       
   210 _LIT8(KVersitRecurrenceLastDay8,				"LD");
       
   211 /** The string at the start of an entity encoded in a stream. 
       
   212 
       
   213 This is implemented as the name of a property, but this property is not stored in the entity's array 
       
   214 of properties. */
       
   215 _LIT8(KVersitTokenBEGIN,					"BEGIN");
       
   216 /** The string at the start of an agent vCard entity encoded in a stream. 
       
   217 
       
   218 The reason for needing a Unicode version, is that the agent vCard is held in a 
       
   219 property value in the parent vCard, and all property values are converted 
       
   220 to Unicode when they are internalised, in order to make them character set-independent. 
       
   221 
       
   222 This is implemented as the name of a property, but this property is not stored in the 
       
   223 entity's array of properties. */
       
   224 _LIT(KVersitVarTokenBEGIN,					"BEGIN");
       
   225 /** The string which follows the body of data of a vCard/vCalendar encoded in a stream. 
       
   226 It is followed only by the entity name. 
       
   227 
       
   228 This is implemented as the name of a property, but this property is not stored in the 
       
   229 entity's array of properties. */
       
   230 _LIT8(KVersitTokenEND,						"END");
       
   231 /** A carriage return and line feed */
       
   232 _LIT8(KVersitTokenCRLF,						"\r\n"); // carriage return, line feed
       
   233 /** A boolean true value. Not used. */
       
   234 _LIT8(KVersitTokenTRUE,						"TRUE");
       
   235 /** A boolean true value. */
       
   236 _LIT(KVersitVarTokenTRUE,					"TRUE");
       
   237 /** A boolean false value. Not used. */
       
   238 _LIT8(KVersitTokenFALSE,					"FALSE");
       
   239 /** A boolean false value. */
       
   240 _LIT(KVersitVarTokenFALSE,					"FALSE");
       
   241 /** The symbol added to the beginning of an unrecognised property name while 
       
   242 internalising from a stream. */
       
   243 _LIT8(KVersitTokenXDashEPOC,				"X-EPOC");
       
   244 _LIT8(KVersitTokenXDash,					"X-");
       
   245 /** An empty string. */
       
   246 _LIT8(KVersitTokenEmptyNarrow,				"");
       
   247 /** An empty string. */
       
   248 _LIT(KVersitTokenEmpty,						"");
       
   249 
       
   250 //The following names should not be used, versit now uses CharConv character set names.
       
   251 // params
       
   252 _LIT8(KVersitTokenENCODING,					"ENCODING");
       
   253 _LIT8(KVersitTokenBASE64,					"BASE64");
       
   254 _LIT8(KVersitTokenQUOTEDPRINTABLE,			"QUOTED-PRINTABLE");
       
   255 _LIT8(KVersitToken8BIT,						"8-BIT");
       
   256 _LIT8(KVersitTokenCHARSET,					"CHARSET");
       
   257 _LIT8(KVersitTokenUTF8,						"UTF-8");
       
   258 _LIT8(KVersitTokenUTF7,						"UTF-7");
       
   259 _LIT8(KVersitTokenISO1,						"ISO-8859-1");
       
   260 _LIT8(KVersitTokenISO2,						"ISO-8859-2");
       
   261 _LIT8(KVersitTokenISO4,						"ISO-8859-4");
       
   262 _LIT8(KVersitTokenISO5,						"ISO-8859-5");
       
   263 _LIT8(KVersitTokenISO7,						"ISO-8859-7");
       
   264 _LIT8(KVersitTokenISO9,						"ISO-8859-9");
       
   265 _LIT8(KVersitTokenTYPE,						"TYPE");	//used for photo format type 
       
   266 
       
   267 // parameters for the X-EPOCALARM 
       
   268 _LIT8(KVersitTokenVALUE,					"VALUE");
       
   269 _LIT8(KVersitTokenCONTENTTYPE,				"X-CONTENTTYPE");
       
   270 _LIT8(KVersitTokenINLINE, 					"INLINE");
       
   271 _LIT8(KVersitTokenBINARY, 					"BINARY");
       
   272 
       
   273 // additional character sets
       
   274 _LIT8(KVersitTokenISO3,						"ISO-8859-3");
       
   275 _LIT8(KVersitTokenISO10,					"ISO-8859-10");
       
   276 _LIT8(KVersitTokenShiftJIS,					"SHIFT_JIS");
       
   277 _LIT8(KVersitTokenGB2312,					"GB 2312-80");		//This and the following contain the wrong name.
       
   278 _LIT8(KVersitTokenGBK,						"GBK");
       
   279 _LIT8(KVersitTokenBIG5,						"BIG5 level 1 and 2");
       
   280 _LIT8(KVersitTokenISO2022JP,				"ISO 2022-JP");
       
   281 _LIT8(KVersitTokenEUCJP,					"EUC-JP");
       
   282 _LIT8(KVersitTokenJIS,						"JIS");
       
   283 
       
   284 
       
   285 // entities
       
   286 _LIT8(KVersitTokenVCALENDAR,				"VCALENDAR");
       
   287 _LIT8(KVersitTokenVCARD,					"VCARD");
       
   288 _LIT(KVersitVarTokenVCALENDAR,				"VCALENDAR");
       
   289 _LIT(KVersitVarTokenVCARD,					"VCARD");
       
   290 _LIT(KVersitVarTokenVEVENT,					"VEVENT");
       
   291 _LIT(KVersitVarTokenVTODO,					"VTODO");
       
   292 
       
   293 // properties
       
   294 _LIT8(KVersitTokenXALARM,					"X-EPOCALARM");
       
   295 _LIT8(KVersitTokenAALARM,					"AALARM");
       
   296 _LIT8(KVersitTokenDALARM,					"DALARM");
       
   297 _LIT8(KVersitTokenPALARM,					"PALARM");
       
   298 _LIT8(KVersitTokenMALARM,					"MALARM");
       
   299 _LIT8(KVersitTokenDAYLIGHT,					"DAYLIGHT");
       
   300 _LIT(KVersitVarTokenDAYLIGHT,				"DAYLIGHT");
       
   301 _LIT8(KVersitTokenVERSION,					"VERSION");
       
   302 _LIT8(KVersitTokenCATEGORIES,				"CATEGORIES");
       
   303 _LIT8(KVersitTokenRESOURCES,				"RESOURCES");
       
   304 _LIT8(KVersitTokenDCREATED,					"DCREATED");
       
   305 _LIT8(KVersitTokenDTSTART,					"DTSTART");
       
   306 _LIT8(KVersitTokenDTEND,					"DTEND");
       
   307 _LIT8(KVersitTokenLASTMODIFIED,				"LAST-MODIFIED");
       
   308 _LIT8(KVersitTokenCOMPLETED,				"COMPLETED");
       
   309 _LIT8(KVersitTokenDUE,						"DUE");
       
   310 _LIT8(KVersitTokenEXDATE,					"EXDATE");
       
   311 _LIT8(KVersitTokenEXRULE,					"EXRULE");
       
   312 _LIT8(KVersitTokenRDATE,					"RDATE");
       
   313 _LIT8(KVersitTokenRRULE,					"RRULE");
       
   314 _LIT8(KVersitTokenRNUM,						"RNUM");
       
   315 _LIT8(KVersitTokenPRIORITY,					"PRIORITY");
       
   316 _LIT8(KVersitTokenSEQUENCE,					"SEQUENCE");
       
   317 _LIT8(KVersitTokenTRANSP,					"TRANSP");
       
   318 _LIT8(KVersitTokenBDAY,						"BDAY");
       
   319 _LIT8(KVersitTokenAGENT,					"AGENT");
       
   320 _LIT8(KVersitTokenLABEL,					"LABEL");
       
   321 _LIT8(KVersitTokenPHOTO,					"PHOTO");
       
   322 _LIT8(KVersitTokenEMAIL,					"EMAIL");
       
   323 _LIT8(KVersitTokenINTERNET,					"INTERNET");
       
   324 _LIT8(KVersitTokenTITLE,					"TITLE");
       
   325 _LIT8(KVersitTokenROLE,						"ROLE");
       
   326 _LIT8(KVersitTokenLOGO,						"LOGO");
       
   327 _LIT8(KVersitTokenNOTE,						"NOTE");
       
   328 _LIT8(KVersitTokenSOUND,					"SOUND");
       
   329 _LIT8(KVersitTokenMAILER,					"MAILER");
       
   330 _LIT8(KVersitTokenPRODID,					"PRODID");
       
   331 _LIT8(KVersitTokenATTACH,					"ATTACH");
       
   332 _LIT8(KVersitTokenATTENDEE,					"ATTENDEE");
       
   333 _LIT8(KVersitTokenCLASS,					"CLASS");
       
   334 _LIT8(KVersitTokenDESCRIPTION,				"DESCRIPTION");
       
   335 _LIT8(KVersitTokenLOCATION,					"LOCATION");
       
   336 _LIT8(KVersitTokenRELATEDTO,				"RELATED-TO");
       
   337 _LIT8(KVersitTokenSTATUS,					"STATUS");
       
   338 _LIT8(KVersitTokenSUMMARY,					"SUMMARY");
       
   339 _LIT8(KVersitTokenN,						"N");
       
   340 _LIT8(KVersitTokenTZ,						"TZ");
       
   341 _LIT8(KVersitTokenADR,						"ADR");
       
   342 _LIT8(KVersitTokenORG,						"ORG");
       
   343 _LIT8(KVersitTokenREV,						"REV");
       
   344 _LIT8(KVersitTokenFN,						"FN");
       
   345 _LIT8(KVersitTokenTEL,						"TEL");
       
   346 _LIT8(KVersitTokenURL,						"URL");
       
   347 _LIT8(KVersitTokenGEO,						"GEO");
       
   348 _LIT8(KVersitTokenUID,						"UID");
       
   349 _LIT8(KVersitTokenKEY,						"KEY");
       
   350 _LIT8(KVersitTokenSECONDNAME,				"X-EPOCSECONDNAME");
       
   351 _LIT8(KVersitTokenXMETHOD,					"X-METHOD");        // For Group Scheduling
       
   352 _LIT8(KVersitTokenXRECURRENCEID,			"X-RECURRENCE-ID"); // For Group Scheduling
       
   353 _LIT8(KVersitTokenXLOCALUID,				"X-SYMBIAN-LUID");
       
   354 _LIT8(KVersitTokenXDTSTAMP,					"X-SYMBIAN-DTSTAMP");
       
   355 _LIT(KVersitVarTokenINTERNET,				"INTERNET");		//Used by Jave Phone and not by versit
       
   356 _LIT8(KVersitTokenAssistant,				"X-ASSISTANT");
       
   357 _LIT8(KVersitTokenAssistantTel,				"X-ASSISTANT-TEL");
       
   358 _LIT8(KVersitTokenAnniversary,				"X-ANNIVERSARY");
       
   359 _LIT8(KVersitTokenSpouse,					"X-SPOUSE");
       
   360 _LIT8(KVersitTokenChildren,					"X-CHILDREN");
       
   361 _LIT8(KVersitTokenClass,					"X-CLASS");
       
   362 _LIT8(KVersitAttachLabel, 					"X-NAME");
       
   363 _LIT8(KVersitAttachMimeType, 				"X-FMTTYPE");
       
   364 _LIT8(KVersitXUserIntType, 				    "X-SYMBIAN-USERINT");
       
   365 
       
   366 #endif