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