VCardEnum.h
00001 /* 00002 libvcard - vCard parsing library for vCard version 3.0 00003 00004 Copyright (C) 1999 Rik Hemsley rik@kde.org 00005 00006 Permission is hereby granted, free of charge, to any person obtaining a copy 00007 of this software and associated documentation files (the "Software"), to 00008 deal in the Software without restriction, including without limitation the 00009 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 00010 sell copies of the Software, and to permit persons to whom the Software is 00011 furnished to do so, subject to the following conditions: 00012 00013 The above copyright notice and this permission notice shall be included in 00014 all copies or substantial portions of the Software. 00015 00016 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00017 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00018 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00019 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 00020 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 00021 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00022 */ 00023 00024 #ifndef ENUM_H 00025 #define ENUM_H 00026 00027 #include <tqcstring.h> 00028 00029 #include <tdelibs_export.h> 00030 00031 namespace VCARD 00032 { 00033 00034 extern const TQCString paramNames []; 00035 00036 enum EntityType { 00037 EntityName, 00038 EntityProfile, 00039 EntitySource, 00040 EntityFullName, 00041 EntityN, 00042 EntityNickname, 00043 EntityPhoto, 00044 EntityBirthday, 00045 EntityAddress, 00046 EntityLabel, 00047 EntityTelephone, 00048 EntityEmail, 00049 EntityMailer, 00050 EntityTimeZone, 00051 EntityGeo, 00052 EntityTitle, 00053 EntityRole, 00054 EntityLogo, 00055 EntityAgent, 00056 EntityOrganisation, 00057 EntityCategories, 00058 EntityNote, 00059 EntityProductID, 00060 EntityRevision, 00061 EntitySortString, 00062 EntitySound, 00063 EntityUID, 00064 EntityURI, 00065 EntityURL, 00066 EntityVersion, 00067 EntityClass, 00068 EntityKey, 00069 EntityExtension, 00070 EntityUnknown 00071 }; 00072 00073 enum ValueType { 00074 ValueSound, 00075 ValueAgent, 00076 ValueAddress, 00077 ValueTel, 00078 ValueTextBin, 00079 ValueOrg, 00080 ValueN, 00081 ValueUTC, 00082 ValueURI, 00083 ValueClass, 00084 ValueFloat, 00085 ValueImage, 00086 ValueDate, 00087 ValueTextList, 00088 ValueText, 00089 ValueGeo, 00090 ValueUnknown 00091 }; 00092 00093 enum ParamType { 00094 ParamUnknown, 00095 ParamNone, 00096 ParamSource, 00097 ParamText, 00098 ParamImage, 00099 ParamDate, 00100 ParamAddrText, 00101 ParamTel, 00102 ParamEmail, 00103 ParamMailer, 00104 ParamAgent, 00105 ParamTextBin, 00106 ParamTextNS, 00107 ParamSound 00108 }; 00109 00110 extern const ParamType paramTypesTable[]; 00111 00112 KVCARD_EXPORT ParamType EntityTypeToParamType(EntityType); 00113 KVCARD_EXPORT ValueType EntityTypeToValueType(EntityType); 00114 KVCARD_EXPORT TQCString EntityTypeToParamName(EntityType); 00115 KVCARD_EXPORT EntityType EntityNameToEntityType(const TQCString &); 00116 00117 KVCARD_EXPORT char * encodeBase64(const char *, unsigned long, unsigned long &); 00118 KVCARD_EXPORT char * decodeBase64(const char *, unsigned long, unsigned long &); 00119 00120 } 00121 00122 #endif 00123