1.1 --- a/epoc32/include/vtoken.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/vtoken.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,366 @@
1.4 -vtoken.h
1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// 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
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @publishedAll
1.25 + @released
1.26 +*/
1.27 +
1.28 +#ifndef __VTOKEN_H__
1.29 +#define __VTOKEN_H__
1.30 +
1.31 +#include <e32base.h>
1.32 +
1.33 +#define KMaxExternalizedTokenLength 70
1.34 +#define KMinLineLengthToWriteTo 1
1.35 +
1.36 +/** A colon string. */
1.37 +_LIT8(KVersitTokenColon, ":");
1.38 +/** A Unicode colon string. */
1.39 +_LIT(KVersitTokenColonUnicode, ":");
1.40 +/** A semi-colon string. */
1.41 +_LIT8(KVersitTokenSemiColon, ";");
1.42 +/** A Unicode semi-colon string. */
1.43 +_LIT(KVersitTokenSemiColonUnicode, ";");
1.44 +/** A backslash string (escaped). */
1.45 +_LIT8(KVersitBackSlash, "\\");
1.46 +/** An escaped semi-colon string. */
1.47 +_LIT8(KVersitEscapedSemiColon, "\\;");
1.48 +/** An escaped Unicode semi-colon string. */
1.49 +_LIT(KVersitEscapedSemiColonUnicode, "\\;");
1.50 +/** An equals sign string. */
1.51 +_LIT8(KVersitTokenEquals, "=");
1.52 +/** A full stop string. */
1.53 +_LIT8(KVersitTokenPeriod, ".");
1.54 +/** A space string. */
1.55 +_LIT8(KVersitTokenSpace, " ");
1.56 +/** A minus sign string. */
1.57 +_LIT8(KVersitTokenMinus, "-");
1.58 +/** A plus sign string. */
1.59 +_LIT8(KVersitTokenPlus, "+");
1.60 +/** A line break string. */
1.61 +_LIT8(KVersitLineBreak, "\r\n ");
1.62 +/** The string used at the start of a time interval string. */
1.63 +_LIT8(KVersitTimePeriodBegin, "P");
1.64 +/** The string appended to the number of years when encoding a time interval. */
1.65 +_LIT8(KVersitTimePeriodYear, "Y");
1.66 +/** The string appended to the number of months when encoding a time interval. */
1.67 +_LIT8(KVersitTimePeriodMonth, "M");
1.68 +/** Not used. */
1.69 +_LIT8(KVersitTimePeriodWeek, "W"); //unused
1.70 +/** The string appended to the number of days when encoding a time interval. */
1.71 +_LIT8(KVersitTimePeriodDay, "D");
1.72 +/** The string added before the time of day when encoding a Versit date/time.
1.73 +
1.74 +Also the string added before the time of day when encoding a time interval. */
1.75 +_LIT8(KVersitTimePeriodTime, "T");
1.76 +/** The string appended to the hour value when encoding a time interval. */
1.77 +_LIT8(KVersitTimePeriodHour, "H");
1.78 +/** The string appended to the minutes value when encoding a time interval. */
1.79 +_LIT8(KVersitTimePeriodMinute, "M");
1.80 +/** The string appended to the seconds value when encoding a time interval. */
1.81 +_LIT8(KVersitTimePeriodSecond, "S");
1.82 +/** The string appended to a date/time when encoding a Versit
1.83 +date/time, if the value is in universal time. */
1.84 +_LIT8(KVersitTokenUniversalTime, "Z");
1.85 +
1.86 +/** A colon character. */
1.87 +const TUint KVersitTokenColonVal =':';
1.88 +/** A semi-colon character. */
1.89 +const TUint KVersitTokenSemiColonVal =';';
1.90 +/** A backslash character. */
1.91 +const TUint KVersitTokenBackslashVal ='\\';
1.92 +/** An equals sign character. */
1.93 +const TUint KVersitTokenEqualsVal ='=';
1.94 +/** A full stop character. */
1.95 +const TUint KVersitTokenPeriodVal ='.';
1.96 +/** A comma character. */
1.97 +const TUint KVersitTokenCommaVal =',';
1.98 +/** A left square bracket character. */
1.99 +const TUint KVersitTokenLSquareBracketVal ='[';
1.100 +/** A right square bracket character. */
1.101 +const TUint KVersitTokenRSquareBracketVal =']';
1.102 +/** A minus sign character. */
1.103 +const TUint KVersitTokenMinusVal ='-';
1.104 +/** A plus sign character. */
1.105 +const TUint KVersitTokenPlusVal ='+';
1.106 +/** A Yen character: the escape character for the 'ShiftJis' character set. */
1.107 +const TUint KVersitTokenYenVal =0xa5;
1.108 +/** The character at the beginning of a time interval string. */
1.109 +const TUint KVersitTimePeriodBeginVal ='P';
1.110 +/** The character following the number of years in a time interval string. */
1.111 +const TUint KVersitTimePeriodYearVal ='Y';
1.112 +/** The character following the number of months in a time interval string. */
1.113 +const TUint KVersitTimePeriodMonthVal ='M';
1.114 +/** The character following the number of weeks in a time interval string. */
1.115 +const TUint KVersitTimePeriodWeekVal ='W';
1.116 +/** The character following the number of days in a time interval string. */
1.117 +const TUint KVersitTimePeriodDayVal ='D';
1.118 +/** The character preceding a length of day (hours,minutes and seconds) in a time
1.119 +interval string.
1.120 +
1.121 +Also the character preceding the time of day in a date/time string. */
1.122 +const TUint KVersitTimePeriodTimeVal ='T';
1.123 +/** The character following the number of hours in a time interval string. */
1.124 +const TUint KVersitTimePeriodHourVal ='H';
1.125 +/** The character following the number of minutes in a time interval string. */
1.126 +const TUint KVersitTimePeriodMinuteVal ='M';
1.127 +/** The character following the number of seconds in a time interval string. */
1.128 +const TUint KVersitTimePeriodSecondVal ='S';
1.129 +/** The character at the end of a universal date/time string. */
1.130 +const TUint KVersitTokenUniversalTimeVal ='Z';
1.131 +/** The character at the start of a daily recurring entity string. */
1.132 +const TUint KVersitRecurrenceDailyVal ='D';
1.133 +/** The character at the start of a weekly recurring entity string. */
1.134 +const TUint KVersitRecurrenceWeeklyVal ='W';
1.135 +/** The character which precedes the number of recurrences, when specified, in
1.136 +a recurring entity. */
1.137 +const TUint KVersitRecurrenceNumberOfVal ='#';
1.138 +/** The string at the beginning of a 'monthly by position' recurring entity
1.139 +(see CVersitRecurrenceMonthlyByPos). Used when internalising. */
1.140 +_LIT(KVersitRecurrenceMonthlyByPos, "MP");
1.141 +/** Not used. */
1.142 +_LIT(KVersitRecurrenceMonthlyByDay, "MD");
1.143 +/** Not used. */
1.144 +_LIT(KVersitRecurrenceYearlyByMonth, "YM");
1.145 +/** The string at the beginning of a 'yearly by day' recurring entity,
1.146 +(see CVersitRecurrenceYearlyByDay). Used when internalising. */
1.147 +_LIT(KVersitRecurrenceYearlyByDay, "YD");
1.148 +/** A string in the date list (if a date list is defined) of an entity
1.149 +that recurs either weekly or 'monthly by position' on Mondays. Used when
1.150 +internalising. */
1.151 +_LIT(KVersitRecurrenceMonday, "MO");
1.152 +/** A string in the date list (if a date list is defined) of an entity
1.153 +that recurs either weekly or 'monthly by position' on Tuesdays. Used when internalising. */
1.154 +_LIT(KVersitRecurrenceTuesday, "TU");
1.155 +/** A string in the date list (if a date list is defined) of an entity
1.156 +that recurs either weekly or 'monthly by position' on Wednesdays. Used when internalising. */
1.157 +_LIT(KVersitRecurrenceWednesday, "WE");
1.158 +/** A string in the date list (if a date list is defined) of an entity that
1.159 +recurs either weekly or 'monthly by position' on Thursdays. Used when internalising. */
1.160 +_LIT(KVersitRecurrenceThursday, "TH");
1.161 +/** A string in the date list (if a date list is defined) of an entity that
1.162 +recurs either weekly or 'monthly by position' on Fridays. Used when internalising. */
1.163 +_LIT(KVersitRecurrenceFriday, "FR");
1.164 +/** A string in the date list (if a date list is defined) of an entity that
1.165 +recurs either weekly or 'monthly by position' on Saturdays. Used when internalising. */
1.166 +_LIT(KVersitRecurrenceSaturday, "SA");
1.167 +/** A string in the date list (if a date list is defined) of an entity that
1.168 +recurs either weekly or 'monthly by position' on Sundays. Used when internalising. */
1.169 +_LIT(KVersitRecurrenceSunday, "SU");
1.170 +/** The string appended to the 'occurrence list' section of an entity that
1.171 +recurs on the last day of the month. Used when internalising. */
1.172 +_LIT(KVersitRecurrenceLastDay, "LD");
1.173 +
1.174 +/** The string used at the start of a daily recurring entity. */
1.175 +_LIT8(KVersitRecurrenceDaily, "D");
1.176 +/** The string used at the start of a weekly recurring entity. */
1.177 +_LIT8(KVersitRecurrenceWeekly, "W");
1.178 +/** The string appended just before the number of occurrences, when encoding a recurring
1.179 +entity as a descriptor. */
1.180 +_LIT8(KVersitRecurrenceNumberOf, "#");
1.181 +/** The string used at the start of a 'monthly by position' recurring entity,
1.182 +(see CVersitRecurrenceMonthlyByPos). Used when externalising. */
1.183 +_LIT8(KVersitRecurrenceMonthlyByPos8, "MP");
1.184 +/** Not used. */
1.185 +_LIT8(KVersitRecurrenceMonthlyByDay8, "MD");
1.186 +/** Not used. */
1.187 +_LIT8(KVersitRecurrenceYearlyByMonth8, "YM");
1.188 +/** The string used at the start of a 'yearly by day' recurring entity,
1.189 +(see CVersitRecurrenceYearlyByDay). Used when externalising. */
1.190 +_LIT8(KVersitRecurrenceYearlyByDay8, "YD");
1.191 +/** The string appended to the 'occurrence list' section of an entity that recurs on Mondays.
1.192 +Used when externalising. */
1.193 +_LIT8(KVersitRecurrenceMonday8, "MO");
1.194 +/** The string appended to the 'occurrence list' section of an entity that recurs on Tuesdays.
1.195 +Used when externalising. */
1.196 +_LIT8(KVersitRecurrenceTuesday8, "TU");
1.197 +/** The string appended to the 'occurrence list' section of an entity that recurs on Wednesdays.
1.198 +Used when externalising. */
1.199 +_LIT8(KVersitRecurrenceWednesday8, "WE");
1.200 +/** The string appended to the 'occurrence list' section of an entity that recurs on Thursdays.
1.201 +Used when externalising. */
1.202 +_LIT8(KVersitRecurrenceThursday8, "TH");
1.203 +/** The string appended to the 'occurrence list' section of an entity that recurs on Fridays.
1.204 +Used when externalising. */
1.205 +_LIT8(KVersitRecurrenceFriday8, "FR");
1.206 +/** The string appended to the 'occurrence list' section of an entity that recurs on Saturdays.
1.207 +Used when externalising. */
1.208 +_LIT8(KVersitRecurrenceSaturday8, "SA");
1.209 +/** The string appended to the 'occurrence list' section of an entity that recurs on Sundays.
1.210 +Used when externalising. */
1.211 +_LIT8(KVersitRecurrenceSunday8, "SU");
1.212 +/** The string appended to the 'occurrence list' section of an entity that recurs on the last day of
1.213 +the month. Used when externalising. */
1.214 +_LIT8(KVersitRecurrenceLastDay8, "LD");
1.215 +/** The string at the start of an entity encoded in a stream.
1.216 +
1.217 +This is implemented as the name of a property, but this property is not stored in the entity's array
1.218 +of properties. */
1.219 +_LIT8(KVersitTokenBEGIN, "BEGIN");
1.220 +/** The string at the start of an agent vCard entity encoded in a stream.
1.221 +
1.222 +The reason for needing a Unicode version, is that the agent vCard is held in a
1.223 +property value in the parent vCard, and all property values are converted
1.224 +to Unicode when they are internalised, in order to make them character set-independent.
1.225 +
1.226 +This is implemented as the name of a property, but this property is not stored in the
1.227 +entity's array of properties. */
1.228 +_LIT(KVersitVarTokenBEGIN, "BEGIN");
1.229 +/** The string which follows the body of data of a vCard/vCalendar encoded in a stream.
1.230 +It is followed only by the entity name.
1.231 +
1.232 +This is implemented as the name of a property, but this property is not stored in the
1.233 +entity's array of properties. */
1.234 +_LIT8(KVersitTokenEND, "END");
1.235 +/** A carriage return and line feed */
1.236 +_LIT8(KVersitTokenCRLF, "\r\n"); // carriage return, line feed
1.237 +/** A boolean true value. Not used. */
1.238 +_LIT8(KVersitTokenTRUE, "TRUE");
1.239 +/** A boolean true value. */
1.240 +_LIT(KVersitVarTokenTRUE, "TRUE");
1.241 +/** A boolean false value. Not used. */
1.242 +_LIT8(KVersitTokenFALSE, "FALSE");
1.243 +/** A boolean false value. */
1.244 +_LIT(KVersitVarTokenFALSE, "FALSE");
1.245 +/** The symbol added to the beginning of an unrecognised property name while
1.246 +internalising from a stream. */
1.247 +_LIT8(KVersitTokenXDashEPOC, "X-EPOC");
1.248 +_LIT8(KVersitTokenXDash, "X-");
1.249 +/** An empty string. */
1.250 +_LIT8(KVersitTokenEmptyNarrow, "");
1.251 +/** An empty string. */
1.252 +_LIT(KVersitTokenEmpty, "");
1.253 +
1.254 +//The following names should not be used, versit now uses CharConv character set names.
1.255 +// params
1.256 +_LIT8(KVersitTokenENCODING, "ENCODING");
1.257 +_LIT8(KVersitTokenBASE64, "BASE64");
1.258 +_LIT8(KVersitTokenQUOTEDPRINTABLE, "QUOTED-PRINTABLE");
1.259 +_LIT8(KVersitToken8BIT, "8-BIT");
1.260 +_LIT8(KVersitTokenCHARSET, "CHARSET");
1.261 +_LIT8(KVersitTokenUTF8, "UTF-8");
1.262 +_LIT8(KVersitTokenUTF7, "UTF-7");
1.263 +_LIT8(KVersitTokenISO1, "ISO-8859-1");
1.264 +_LIT8(KVersitTokenISO2, "ISO-8859-2");
1.265 +_LIT8(KVersitTokenISO4, "ISO-8859-4");
1.266 +_LIT8(KVersitTokenISO5, "ISO-8859-5");
1.267 +_LIT8(KVersitTokenISO7, "ISO-8859-7");
1.268 +_LIT8(KVersitTokenISO9, "ISO-8859-9");
1.269 +_LIT8(KVersitTokenTYPE, "TYPE"); //used for photo format type
1.270 +
1.271 +// parameters for the X-EPOCALARM
1.272 +_LIT8(KVersitTokenVALUE, "VALUE");
1.273 +_LIT8(KVersitTokenCONTENTTYPE, "X-CONTENTTYPE");
1.274 +_LIT8(KVersitTokenINLINE, "INLINE");
1.275 +_LIT8(KVersitTokenBINARY, "BINARY");
1.276 +
1.277 +// additional character sets
1.278 +_LIT8(KVersitTokenISO3, "ISO-8859-3");
1.279 +_LIT8(KVersitTokenISO10, "ISO-8859-10");
1.280 +_LIT8(KVersitTokenShiftJIS, "SHIFT_JIS");
1.281 +_LIT8(KVersitTokenGB2312, "GB 2312-80"); //This and the following contain the wrong name.
1.282 +_LIT8(KVersitTokenGBK, "GBK");
1.283 +_LIT8(KVersitTokenBIG5, "BIG5 level 1 and 2");
1.284 +_LIT8(KVersitTokenISO2022JP, "ISO 2022-JP");
1.285 +_LIT8(KVersitTokenEUCJP, "EUC-JP");
1.286 +_LIT8(KVersitTokenJIS, "JIS");
1.287 +
1.288 +
1.289 +// entities
1.290 +_LIT8(KVersitTokenVCALENDAR, "VCALENDAR");
1.291 +_LIT8(KVersitTokenVCARD, "VCARD");
1.292 +_LIT(KVersitVarTokenVCALENDAR, "VCALENDAR");
1.293 +_LIT(KVersitVarTokenVCARD, "VCARD");
1.294 +_LIT(KVersitVarTokenVEVENT, "VEVENT");
1.295 +_LIT(KVersitVarTokenVTODO, "VTODO");
1.296 +
1.297 +// properties
1.298 +_LIT8(KVersitTokenXALARM, "X-EPOCALARM");
1.299 +_LIT8(KVersitTokenAALARM, "AALARM");
1.300 +_LIT8(KVersitTokenDALARM, "DALARM");
1.301 +_LIT8(KVersitTokenPALARM, "PALARM");
1.302 +_LIT8(KVersitTokenMALARM, "MALARM");
1.303 +_LIT8(KVersitTokenDAYLIGHT, "DAYLIGHT");
1.304 +_LIT(KVersitVarTokenDAYLIGHT, "DAYLIGHT");
1.305 +_LIT8(KVersitTokenVERSION, "VERSION");
1.306 +_LIT8(KVersitTokenCATEGORIES, "CATEGORIES");
1.307 +_LIT8(KVersitTokenRESOURCES, "RESOURCES");
1.308 +_LIT8(KVersitTokenDCREATED, "DCREATED");
1.309 +_LIT8(KVersitTokenDTSTART, "DTSTART");
1.310 +_LIT8(KVersitTokenDTEND, "DTEND");
1.311 +_LIT8(KVersitTokenLASTMODIFIED, "LAST-MODIFIED");
1.312 +_LIT8(KVersitTokenCOMPLETED, "COMPLETED");
1.313 +_LIT8(KVersitTokenDUE, "DUE");
1.314 +_LIT8(KVersitTokenEXDATE, "EXDATE");
1.315 +_LIT8(KVersitTokenEXRULE, "EXRULE");
1.316 +_LIT8(KVersitTokenRDATE, "RDATE");
1.317 +_LIT8(KVersitTokenRRULE, "RRULE");
1.318 +_LIT8(KVersitTokenRNUM, "RNUM");
1.319 +_LIT8(KVersitTokenPRIORITY, "PRIORITY");
1.320 +_LIT8(KVersitTokenSEQUENCE, "SEQUENCE");
1.321 +_LIT8(KVersitTokenTRANSP, "TRANSP");
1.322 +_LIT8(KVersitTokenBDAY, "BDAY");
1.323 +_LIT8(KVersitTokenAGENT, "AGENT");
1.324 +_LIT8(KVersitTokenLABEL, "LABEL");
1.325 +_LIT8(KVersitTokenPHOTO, "PHOTO");
1.326 +_LIT8(KVersitTokenEMAIL, "EMAIL");
1.327 +_LIT8(KVersitTokenINTERNET, "INTERNET");
1.328 +_LIT8(KVersitTokenTITLE, "TITLE");
1.329 +_LIT8(KVersitTokenROLE, "ROLE");
1.330 +_LIT8(KVersitTokenLOGO, "LOGO");
1.331 +_LIT8(KVersitTokenNOTE, "NOTE");
1.332 +_LIT8(KVersitTokenSOUND, "SOUND");
1.333 +_LIT8(KVersitTokenMAILER, "MAILER");
1.334 +_LIT8(KVersitTokenPRODID, "PRODID");
1.335 +_LIT8(KVersitTokenATTACH, "ATTACH");
1.336 +_LIT8(KVersitTokenATTENDEE, "ATTENDEE");
1.337 +_LIT8(KVersitTokenCLASS, "CLASS");
1.338 +_LIT8(KVersitTokenDESCRIPTION, "DESCRIPTION");
1.339 +_LIT8(KVersitTokenLOCATION, "LOCATION");
1.340 +_LIT8(KVersitTokenRELATEDTO, "RELATED-TO");
1.341 +_LIT8(KVersitTokenSTATUS, "STATUS");
1.342 +_LIT8(KVersitTokenSUMMARY, "SUMMARY");
1.343 +_LIT8(KVersitTokenN, "N");
1.344 +_LIT8(KVersitTokenTZ, "TZ");
1.345 +_LIT8(KVersitTokenADR, "ADR");
1.346 +_LIT8(KVersitTokenORG, "ORG");
1.347 +_LIT8(KVersitTokenREV, "REV");
1.348 +_LIT8(KVersitTokenFN, "FN");
1.349 +_LIT8(KVersitTokenTEL, "TEL");
1.350 +_LIT8(KVersitTokenURL, "URL");
1.351 +_LIT8(KVersitTokenGEO, "GEO");
1.352 +_LIT8(KVersitTokenUID, "UID");
1.353 +_LIT8(KVersitTokenKEY, "KEY");
1.354 +_LIT8(KVersitTokenSECONDNAME, "X-EPOCSECONDNAME");
1.355 +_LIT8(KVersitTokenXMETHOD, "X-METHOD"); // For Group Scheduling
1.356 +_LIT8(KVersitTokenXRECURRENCEID, "X-RECURRENCE-ID"); // For Group Scheduling
1.357 +_LIT8(KVersitTokenXLOCALUID, "X-SYMBIAN-LUID");
1.358 +_LIT8(KVersitTokenXDTSTAMP, "X-SYMBIAN-DTSTAMP");
1.359 +_LIT(KVersitVarTokenINTERNET, "INTERNET"); //Used by Jave Phone and not by versit
1.360 +_LIT8(KVersitTokenAssistant, "X-ASSISTANT");
1.361 +_LIT8(KVersitTokenAssistantTel, "X-ASSISTANT-TEL");
1.362 +_LIT8(KVersitTokenAnniversary, "X-ANNIVERSARY");
1.363 +_LIT8(KVersitTokenSpouse, "X-SPOUSE");
1.364 +_LIT8(KVersitTokenChildren, "X-CHILDREN");
1.365 +_LIT8(KVersitTokenClass, "X-CLASS");
1.366 +_LIT8(KVersitAttachLabel, "X-NAME");
1.367 +_LIT8(KVersitAttachMimeType, "X-FMTTYPE");
1.368 +_LIT8(KVersitXUserIntType, "X-SYMBIAN-USERINT");
1.369 +
1.370 +#endif