Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Typedefs | Functions
nsVCardObj.h File Reference
#include "prtypes.h"
#include "nsFileSpec.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  ValueItem
struct  VObject
struct  StrItem
struct  OFile
struct  VObjectIterator

Defines

#define VC7bitProp   "7bit"
#define VC8bitProp   "8bit"
#define VCAAlarmProp   "aalarm"
#define VCAdditionalNamesProp   "addn"
#define VCAdrProp   "adr"
#define VCAgentProp   "agent"
#define VCAIFFProp   "aiff"
#define VCAOLProp   "aol"
#define VCAppleLinkProp   "applelink"
#define VCAttachProp   "attach"
#define VCAttendeeProp   "attendee"
#define VCATTMailProp   "attmail"
#define VCAudioContentProp   "audiocontent"
#define VCAVIProp   "avi"
#define VCBase64Prop   "base64"
#define VCBBSProp   "bbs"
#define VCBirthDateProp   "bday"
#define VCBMPProp   "bmp"
#define VCBodyProp   "body"
#define VCBusinessRoleProp   "role"
#define VCCalProp   "vcalendar"
#define VCCaptionProp   "cap"
#define VCCardProp   "vcard"
#define VCCarProp   "car"
#define VCCategoriesProp   "categories"
#define VCCellularProp   "cell"
#define VCCGMProp   "cgm"
#define VCCharSetProp   "cs"
#define VCCIDProp   "cid"
#define VCCISProp   "cis"
#define VCCityProp   "l"
#define VCClassProp   "class"
#define VCCommentProp   "note"
#define VCCompletedProp   "completed"
#define VCContentIDProp   "content-id"
#define VCCountryNameProp   "c"
#define VCDAlarmProp   "dalarm"
#define VCDataSizeProp   "datasize"
#define VCDayLightProp   "daylight"
#define VCDCreatedProp   "dcreated"
#define VCDeliveryLabelProp   "label"
#define VCDescriptionProp   "description"
#define VCDIBProp   "dib"
#define VCDisplayStringProp   "displaystring"
#define VCDomesticProp   "dom"
#define VCDTendProp   "dtend"
#define VCDTstartProp   "dtstart"
#define VCDueProp   "due"
#define VCEmailAddressProp   "email"
#define VCEncodingProp   "encoding"
#define VCEndProp   "end"
#define VCEventProp   "vevent"
#define VCEWorldProp   "eworld"
#define VCExNumProp   "exnum"
#define VCExpDateProp   "exdate"
#define VCExpectProp   "expect"
#define VCExtAddressProp   "ext add"
#define VCFamilyNameProp   "f"
#define VCFaxProp   "fax"
#define VCFullNameProp   "fn"
#define VCGeoProp   "geo"
#define VCGeoLocationProp   "geo"
#define VCGIFProp   "gif"
#define VCGivenNameProp   "g"
#define VCGroupingProp   "grouping"
#define VCHomeProp   "home"
#define VCIBMMailProp   "ibmmail"
#define VCInlineProp   "inline"
#define VCInternationalProp   "intl"
#define VCInternetProp   "internet"
#define VCISDNProp   "isdn"
#define VCJPEGProp   "jpeg"
#define VCLanguageProp   "lang"
#define VCLastModifiedProp   "last-modified"
#define VCLastRevisedProp   "rev"
#define VCLocationProp   "location"
#define VCLogoProp   "logo"
#define VCMailerProp   "mailer"
#define VCMAlarmProp   "malarm"
#define VCMCIMailProp   "mcimail"
#define VCMessageProp   "msg"
#define VCMETProp   "met"
#define VCModemProp   "modem"
#define VCMPEG2Prop   "mpeg2"
#define VCMPEGProp   "mpeg"
#define VCMSNProp   "msn"
#define VCNamePrefixesProp   "npre"
#define VCNameProp   "n"
#define VCNameSuffixesProp   "nsuf"
#define VCNoteProp   "note"
#define VCOrgNameProp   "orgname"
#define VCOrgProp   "org"
#define VCOrgUnit2Prop   "oun2"
#define VCOrgUnit3Prop   "oun3"
#define VCOrgUnit4Prop   "oun4"
#define VCOrgUnitProp   "oun"
#define VCPagerProp   "pager"
#define VCPAlarmProp   "palarm"
#define VCParcelProp   "parcel"
#define VCPartProp   "part"
#define VCPCMProp   "pcm"
#define VCPDFProp   "pdf"
#define VCPGPProp   "pgp"
#define VCPhotoProp   "photo"
#define VCPICTProp   "pict"
#define VCPMBProp   "pmb"
#define VCPostalBoxProp   "box"
#define VCPostalCodeProp   "pc"
#define VCPostalProp   "postal"
#define VCPowerShareProp   "powershare"
#define VCPreferredProp   "pref"
#define VCPriorityProp   "priority"
#define VCProcedureNameProp   "procedurename"
#define VCProdIdProp   "prodid"
#define VCProdigyProp   "prodigy"
#define VCPronunciationProp   "sound"
#define VCPSProp   "ps"
#define VCPublicKeyProp   "key"
#define VCQPProp   "qp"
#define VCQuickTimeProp   "qtime"
#define VCQuotedPrintableProp   "quoted-printable"
#define VCRDateProp   "rdate"
#define VCRegionProp   "r"
#define VCRelatedToProp   "related-to"
#define VCRepeatCountProp   "repeatcount"
#define VCResourcesProp   "resources"
#define VCRNumProp   "rnum"
#define VCRoleProp   "role"
#define VCRRuleProp   "rrule"
#define VCRSVPProp   "rsvp"
#define VCRunTimeProp   "runtime"
#define VCSequenceProp   "sequence"
#define VCSnoozeTimeProp   "snoozetime"
#define VCStartProp   "start"
#define VCStatusProp   "status"
#define VCStreetAddressProp   "street"
#define VCSubTypeProp   "subtype"
#define VCSummaryProp   "summary"
#define VCTelephoneProp   "tel"
#define VCTIFFProp   "tiff"
#define VCTimeZoneProp   "tz"
#define VCTitleProp   "title"
#define VCTLXProp   "tlx"
#define VCTodoProp   "vtodo"
#define VCTranspProp   "transp"
#define VCUniqueStringProp   "uid"
#define VCURLProp   "url"
#define VCURLValueProp   "urlval"
#define VCValueProp   "value"
#define VCVersionProp   "version"
#define VCVideoProp   "video"
#define VCVoiceProp   "voice"
#define VCWAVEProp   "wave"
#define VCWMFProp   "wmf"
#define VCWorkProp   "work"
#define VCX400Prop   "x400"
#define VCX509Prop   "x509"
#define VCXRuleProp   "xrule"
#define VCCooltalk   "x-mozilla-cpt"
#define VCCooltalkAddress   "x-moxilla-cpadr"
#define VCUseServer   "x-mozilla-cpsrv"
#define VCUseHTML   "x-mozilla-html"
#define VCVT_NOVALUE   0
#define VCVT_STRINGZ   1
#define VCVT_USTRINGZ   2
#define VCVT_UINT   3
#define VCVT_ULONG   4
#define VCVT_RAW   5
#define VCVT_VOBJECT   6
#define NAME_OF(o)   o->id
#define VALUE_TYPE(o)   o->valType
#define STRINGZ_VALUE_OF(o)   o->val.strs
#define USTRINGZ_VALUE_OF(o)   o->val.ustrs
#define INTEGER_VALUE_OF(o)   o->val.i
#define LONG_VALUE_OF(o)   o->val.l
#define ANY_VALUE_OF(o)   o->val.any
#define VOBJECT_VALUE_OF(o)   o->val.vobj
#define MAXPROPNAMESIZE   256
#define MAXMOZPROPNAMESIZE   16

Typedefs

typedef wchar_t vwchar_t
typedef struct VObject
typedef union ValueItem ValueItem
typedef struct StrItem
typedef struct OFile OFile
typedef struct VObjectIterator VObjectIterator

Functions

VObjectnewVObject (const char *id)
void deleteVObject (VObject *p)
char * dupStr (const char *s, unsigned int size)
void deleteString (char *p)
void unUseStr (const char *s)
void setVObjectName (VObject *o, const char *id)
void setVObjectStringZValue (VObject *o, const char *s)
void setVObjectStringZValue_ (VObject *o, const char *s)
void setVObjectUStringZValue (VObject *o, const vwchar_t *s)
void setVObjectUStringZValue_ (VObject *o, const vwchar_t *s)
void setVObjectIntegerValue (VObject *o, unsigned int i)
void setVObjectLongValue (VObject *o, unsigned long l)
void setVObjectAnyValue (VObject *o, void *t)
VObjectsetValueWithSize (VObject *prop, void *val, unsigned int size)
VObjectsetValueWithSize_ (VObject *prop, void *val, unsigned int size)
const char * vObjectName (VObject *o)
const char * vObjectStringZValue (VObject *o)
const vwchar_tvObjectUStringZValue (VObject *o)
unsigned int vObjectIntegerValue (VObject *o)
unsigned long vObjectLongValue (VObject *o)
voidvObjectAnyValue (VObject *o)
VObjectvObjectVObjectValue (VObject *o)
void setVObjectVObjectValue (VObject *o, VObject *p)
VObjectaddVObjectProp (VObject *o, VObject *p)
VObjectaddProp (VObject *o, const char *id)
VObjectaddProp_ (VObject *o, const char *id)
VObjectaddPropValue (VObject *o, const char *p, const char *v)
VObjectaddPropSizedValue_ (VObject *o, const char *p, const char *v, unsigned int size)
VObjectaddPropSizedValue (VObject *o, const char *p, const char *v, unsigned int size)
VObjectaddGroup (VObject *o, const char *g)
void addList (VObject **o, VObject *p)
VObjectisAPropertyOf (VObject *o, const char *id)
VObjectnextVObjectInList (VObject *o)
void initPropIterator (VObjectIterator *i, VObject *o)
int moreIteration (VObjectIterator *i)
VObjectnextVObject (VObjectIterator *i)
void printVObject (nsOutputFileStream *fp, VObject *o)
void printVObject_ (nsOutputFileStream *fp, VObject *o, int level)
void writeVObject (nsOutputFileStream *fp, VObject *o)
void writeVObject_ (OFile *fp, VObject *o)
char * writeMemVObject (char *s, int *len, VObject *o)
char * writeMemoryVObjects (char *s, int *len, VObject *list, PRBool expandSpaces)
const char * lookupStr (const char *s)
void cleanVObject (VObject *o)
void cleanVObjects (VObject *list)
const char * lookupProp (const char *str)
const char * lookupProp_ (const char *str)
vwchar_tfakeUnicode (const char *ps, int *bytes)
int uStrLen (const vwchar_t *u)
char * fakeCString (const vwchar_t *u)
void printVObjectToFile (nsFileSpec *fname, VObject *o)
void printVObjectsToFile (nsFileSpec *fname, VObject *list)
void writeVObjectToFile (nsFileSpec *fname, VObject *o)
void writeVObjectsToFile (nsFileSpec *fname, VObject *list)

Class Documentation

union ValueItem

Definition at line 330 of file nsVCardObj.h.

Collaboration diagram for ValueItem:
Class Members
void * any
unsigned int i
unsigned long l
const char * strs
const vwchar_t * ustrs
VObject * vobj
struct VObject

Definition at line 339 of file nsVCardObj.h.

Collaboration diagram for VObject:
Class Members
const char * id
VObject * next
VObject * prop
ValueItem val
unsigned short valType
struct StrItem

Definition at line 349 of file nsVCardObj.h.

Collaboration diagram for StrItem:
Class Members
StrItem * next
unsigned int refCnt
const char * s
struct OFile

Definition at line 355 of file nsVCardObj.h.

Collaboration diagram for OFile:
Class Members
int alloc:1
int fail:1
nsOutputFileStream * fp
int len
int limit
char * s
struct VObjectIterator

Definition at line 364 of file nsVCardObj.h.

Collaboration diagram for VObjectIterator:
Class Members
VObject * next
VObject * start

Define Documentation

#define ANY_VALUE_OF (   o)    o->val.any

Definition at line 325 of file nsVCardObj.h.

#define INTEGER_VALUE_OF (   o)    o->val.i

Definition at line 323 of file nsVCardObj.h.

#define LONG_VALUE_OF (   o)    o->val.l

Definition at line 324 of file nsVCardObj.h.

Definition at line 437 of file nsVCardObj.h.

Definition at line 436 of file nsVCardObj.h.

#define NAME_OF (   o)    o->id

Definition at line 319 of file nsVCardObj.h.

#define STRINGZ_VALUE_OF (   o)    o->val.strs

Definition at line 321 of file nsVCardObj.h.

#define USTRINGZ_VALUE_OF (   o)    o->val.ustrs

Definition at line 322 of file nsVCardObj.h.

#define VALUE_TYPE (   o)    o->valType

Definition at line 320 of file nsVCardObj.h.

#define VC7bitProp   "7bit"

Definition at line 140 of file nsVCardObj.h.

#define VC8bitProp   "8bit"

Definition at line 141 of file nsVCardObj.h.

#define VCAAlarmProp   "aalarm"

Definition at line 142 of file nsVCardObj.h.

Definition at line 143 of file nsVCardObj.h.

#define VCAdrProp   "adr"

Definition at line 144 of file nsVCardObj.h.

#define VCAgentProp   "agent"

Definition at line 145 of file nsVCardObj.h.

#define VCAIFFProp   "aiff"

Definition at line 146 of file nsVCardObj.h.

#define VCAOLProp   "aol"

Definition at line 147 of file nsVCardObj.h.

#define VCAppleLinkProp   "applelink"

Definition at line 148 of file nsVCardObj.h.

#define VCAttachProp   "attach"

Definition at line 149 of file nsVCardObj.h.

#define VCAttendeeProp   "attendee"

Definition at line 150 of file nsVCardObj.h.

#define VCATTMailProp   "attmail"

Definition at line 151 of file nsVCardObj.h.

#define VCAudioContentProp   "audiocontent"

Definition at line 152 of file nsVCardObj.h.

#define VCAVIProp   "avi"

Definition at line 153 of file nsVCardObj.h.

#define VCBase64Prop   "base64"

Definition at line 154 of file nsVCardObj.h.

#define VCBBSProp   "bbs"

Definition at line 155 of file nsVCardObj.h.

#define VCBirthDateProp   "bday"

Definition at line 156 of file nsVCardObj.h.

#define VCBMPProp   "bmp"

Definition at line 157 of file nsVCardObj.h.

#define VCBodyProp   "body"

Definition at line 158 of file nsVCardObj.h.

#define VCBusinessRoleProp   "role"

Definition at line 159 of file nsVCardObj.h.

#define VCCalProp   "vcalendar"

Definition at line 160 of file nsVCardObj.h.

#define VCCaptionProp   "cap"

Definition at line 161 of file nsVCardObj.h.

#define VCCardProp   "vcard"

Definition at line 162 of file nsVCardObj.h.

#define VCCarProp   "car"

Definition at line 163 of file nsVCardObj.h.

#define VCCategoriesProp   "categories"

Definition at line 164 of file nsVCardObj.h.

#define VCCellularProp   "cell"

Definition at line 165 of file nsVCardObj.h.

#define VCCGMProp   "cgm"

Definition at line 166 of file nsVCardObj.h.

#define VCCharSetProp   "cs"

Definition at line 167 of file nsVCardObj.h.

#define VCCIDProp   "cid"

Definition at line 168 of file nsVCardObj.h.

#define VCCISProp   "cis"

Definition at line 169 of file nsVCardObj.h.

#define VCCityProp   "l"

Definition at line 170 of file nsVCardObj.h.

#define VCClassProp   "class"

Definition at line 171 of file nsVCardObj.h.

#define VCCommentProp   "note"

Definition at line 172 of file nsVCardObj.h.

#define VCCompletedProp   "completed"

Definition at line 173 of file nsVCardObj.h.

#define VCContentIDProp   "content-id"

Definition at line 174 of file nsVCardObj.h.

#define VCCooltalk   "x-mozilla-cpt"

Definition at line 298 of file nsVCardObj.h.

#define VCCooltalkAddress   "x-moxilla-cpadr"

Definition at line 299 of file nsVCardObj.h.

Definition at line 175 of file nsVCardObj.h.

#define VCDAlarmProp   "dalarm"

Definition at line 176 of file nsVCardObj.h.

#define VCDataSizeProp   "datasize"

Definition at line 177 of file nsVCardObj.h.

#define VCDayLightProp   "daylight"

Definition at line 178 of file nsVCardObj.h.

#define VCDCreatedProp   "dcreated"

Definition at line 179 of file nsVCardObj.h.

#define VCDeliveryLabelProp   "label"

Definition at line 180 of file nsVCardObj.h.

#define VCDescriptionProp   "description"

Definition at line 181 of file nsVCardObj.h.

#define VCDIBProp   "dib"

Definition at line 182 of file nsVCardObj.h.

#define VCDisplayStringProp   "displaystring"

Definition at line 183 of file nsVCardObj.h.

#define VCDomesticProp   "dom"

Definition at line 184 of file nsVCardObj.h.

#define VCDTendProp   "dtend"

Definition at line 185 of file nsVCardObj.h.

#define VCDTstartProp   "dtstart"

Definition at line 186 of file nsVCardObj.h.

#define VCDueProp   "due"

Definition at line 187 of file nsVCardObj.h.

#define VCEmailAddressProp   "email"

Definition at line 188 of file nsVCardObj.h.

#define VCEncodingProp   "encoding"

Definition at line 189 of file nsVCardObj.h.

#define VCEndProp   "end"

Definition at line 190 of file nsVCardObj.h.

#define VCEventProp   "vevent"

Definition at line 191 of file nsVCardObj.h.

#define VCEWorldProp   "eworld"

Definition at line 192 of file nsVCardObj.h.

#define VCExNumProp   "exnum"

Definition at line 193 of file nsVCardObj.h.

#define VCExpDateProp   "exdate"

Definition at line 194 of file nsVCardObj.h.

#define VCExpectProp   "expect"

Definition at line 195 of file nsVCardObj.h.

#define VCExtAddressProp   "ext add"

Definition at line 196 of file nsVCardObj.h.

Definition at line 197 of file nsVCardObj.h.

#define VCFaxProp   "fax"

Definition at line 198 of file nsVCardObj.h.

#define VCFullNameProp   "fn"

Definition at line 199 of file nsVCardObj.h.

Definition at line 201 of file nsVCardObj.h.

#define VCGeoProp   "geo"

Definition at line 200 of file nsVCardObj.h.

#define VCGIFProp   "gif"

Definition at line 202 of file nsVCardObj.h.

Definition at line 203 of file nsVCardObj.h.

#define VCGroupingProp   "grouping"

Definition at line 204 of file nsVCardObj.h.

#define VCHomeProp   "home"

Definition at line 205 of file nsVCardObj.h.

#define VCIBMMailProp   "ibmmail"

Definition at line 206 of file nsVCardObj.h.

#define VCInlineProp   "inline"

Definition at line 207 of file nsVCardObj.h.

Definition at line 208 of file nsVCardObj.h.

#define VCInternetProp   "internet"

Definition at line 209 of file nsVCardObj.h.

#define VCISDNProp   "isdn"

Definition at line 210 of file nsVCardObj.h.

#define VCJPEGProp   "jpeg"

Definition at line 211 of file nsVCardObj.h.

#define VCLanguageProp   "lang"

Definition at line 212 of file nsVCardObj.h.

#define VCLastModifiedProp   "last-modified"

Definition at line 213 of file nsVCardObj.h.

Definition at line 214 of file nsVCardObj.h.

#define VCLocationProp   "location"

Definition at line 215 of file nsVCardObj.h.

#define VCLogoProp   "logo"

Definition at line 216 of file nsVCardObj.h.

#define VCMailerProp   "mailer"

Definition at line 217 of file nsVCardObj.h.

#define VCMAlarmProp   "malarm"

Definition at line 218 of file nsVCardObj.h.

#define VCMCIMailProp   "mcimail"

Definition at line 219 of file nsVCardObj.h.

#define VCMessageProp   "msg"

Definition at line 220 of file nsVCardObj.h.

#define VCMETProp   "met"

Definition at line 221 of file nsVCardObj.h.

#define VCModemProp   "modem"

Definition at line 222 of file nsVCardObj.h.

#define VCMPEG2Prop   "mpeg2"

Definition at line 223 of file nsVCardObj.h.

#define VCMPEGProp   "mpeg"

Definition at line 224 of file nsVCardObj.h.

#define VCMSNProp   "msn"

Definition at line 225 of file nsVCardObj.h.

#define VCNamePrefixesProp   "npre"

Definition at line 226 of file nsVCardObj.h.

#define VCNameProp   "n"

Definition at line 227 of file nsVCardObj.h.

#define VCNameSuffixesProp   "nsuf"

Definition at line 228 of file nsVCardObj.h.

#define VCNoteProp   "note"

Definition at line 229 of file nsVCardObj.h.

#define VCOrgNameProp   "orgname"

Definition at line 230 of file nsVCardObj.h.

#define VCOrgProp   "org"

Definition at line 231 of file nsVCardObj.h.

#define VCOrgUnit2Prop   "oun2"

Definition at line 232 of file nsVCardObj.h.

#define VCOrgUnit3Prop   "oun3"

Definition at line 233 of file nsVCardObj.h.

#define VCOrgUnit4Prop   "oun4"

Definition at line 234 of file nsVCardObj.h.

#define VCOrgUnitProp   "oun"

Definition at line 235 of file nsVCardObj.h.

#define VCPagerProp   "pager"

Definition at line 236 of file nsVCardObj.h.

#define VCPAlarmProp   "palarm"

Definition at line 237 of file nsVCardObj.h.

#define VCParcelProp   "parcel"

Definition at line 238 of file nsVCardObj.h.

#define VCPartProp   "part"

Definition at line 239 of file nsVCardObj.h.

#define VCPCMProp   "pcm"

Definition at line 240 of file nsVCardObj.h.

#define VCPDFProp   "pdf"

Definition at line 241 of file nsVCardObj.h.

#define VCPGPProp   "pgp"

Definition at line 242 of file nsVCardObj.h.

#define VCPhotoProp   "photo"

Definition at line 243 of file nsVCardObj.h.

#define VCPICTProp   "pict"

Definition at line 244 of file nsVCardObj.h.

#define VCPMBProp   "pmb"

Definition at line 245 of file nsVCardObj.h.

#define VCPostalBoxProp   "box"

Definition at line 246 of file nsVCardObj.h.

Definition at line 247 of file nsVCardObj.h.

#define VCPostalProp   "postal"

Definition at line 248 of file nsVCardObj.h.

#define VCPowerShareProp   "powershare"

Definition at line 249 of file nsVCardObj.h.

#define VCPreferredProp   "pref"

Definition at line 250 of file nsVCardObj.h.

#define VCPriorityProp   "priority"

Definition at line 251 of file nsVCardObj.h.

#define VCProcedureNameProp   "procedurename"

Definition at line 252 of file nsVCardObj.h.

#define VCProdIdProp   "prodid"

Definition at line 253 of file nsVCardObj.h.

#define VCProdigyProp   "prodigy"

Definition at line 254 of file nsVCardObj.h.

#define VCPronunciationProp   "sound"

Definition at line 255 of file nsVCardObj.h.

#define VCPSProp   "ps"

Definition at line 256 of file nsVCardObj.h.

#define VCPublicKeyProp   "key"

Definition at line 257 of file nsVCardObj.h.

#define VCQPProp   "qp"

Definition at line 258 of file nsVCardObj.h.

#define VCQuickTimeProp   "qtime"

Definition at line 259 of file nsVCardObj.h.

Definition at line 260 of file nsVCardObj.h.

#define VCRDateProp   "rdate"

Definition at line 261 of file nsVCardObj.h.

#define VCRegionProp   "r"

Definition at line 262 of file nsVCardObj.h.

#define VCRelatedToProp   "related-to"

Definition at line 263 of file nsVCardObj.h.

#define VCRepeatCountProp   "repeatcount"

Definition at line 264 of file nsVCardObj.h.

#define VCResourcesProp   "resources"

Definition at line 265 of file nsVCardObj.h.

#define VCRNumProp   "rnum"

Definition at line 266 of file nsVCardObj.h.

#define VCRoleProp   "role"

Definition at line 267 of file nsVCardObj.h.

#define VCRRuleProp   "rrule"

Definition at line 268 of file nsVCardObj.h.

#define VCRSVPProp   "rsvp"

Definition at line 269 of file nsVCardObj.h.

#define VCRunTimeProp   "runtime"

Definition at line 270 of file nsVCardObj.h.

#define VCSequenceProp   "sequence"

Definition at line 271 of file nsVCardObj.h.

#define VCSnoozeTimeProp   "snoozetime"

Definition at line 272 of file nsVCardObj.h.

#define VCStartProp   "start"

Definition at line 273 of file nsVCardObj.h.

#define VCStatusProp   "status"

Definition at line 274 of file nsVCardObj.h.

#define VCStreetAddressProp   "street"

Definition at line 275 of file nsVCardObj.h.

#define VCSubTypeProp   "subtype"

Definition at line 276 of file nsVCardObj.h.

#define VCSummaryProp   "summary"

Definition at line 277 of file nsVCardObj.h.

#define VCTelephoneProp   "tel"

Definition at line 278 of file nsVCardObj.h.

#define VCTIFFProp   "tiff"

Definition at line 279 of file nsVCardObj.h.

#define VCTimeZoneProp   "tz"

Definition at line 280 of file nsVCardObj.h.

#define VCTitleProp   "title"

Definition at line 281 of file nsVCardObj.h.

#define VCTLXProp   "tlx"

Definition at line 282 of file nsVCardObj.h.

#define VCTodoProp   "vtodo"

Definition at line 283 of file nsVCardObj.h.

#define VCTranspProp   "transp"

Definition at line 284 of file nsVCardObj.h.

Definition at line 285 of file nsVCardObj.h.

#define VCURLProp   "url"

Definition at line 286 of file nsVCardObj.h.

#define VCURLValueProp   "urlval"

Definition at line 287 of file nsVCardObj.h.

#define VCUseHTML   "x-mozilla-html"

Definition at line 301 of file nsVCardObj.h.

#define VCUseServer   "x-mozilla-cpsrv"

Definition at line 300 of file nsVCardObj.h.

#define VCValueProp   "value"

Definition at line 288 of file nsVCardObj.h.

#define VCVersionProp   "version"

Definition at line 289 of file nsVCardObj.h.

#define VCVideoProp   "video"

Definition at line 290 of file nsVCardObj.h.

#define VCVoiceProp   "voice"

Definition at line 291 of file nsVCardObj.h.

Definition at line 304 of file nsVCardObj.h.

#define VCVT_RAW   5

Definition at line 314 of file nsVCardObj.h.

Definition at line 306 of file nsVCardObj.h.

#define VCVT_UINT   3

Definition at line 310 of file nsVCardObj.h.

#define VCVT_ULONG   4

Definition at line 312 of file nsVCardObj.h.

Definition at line 308 of file nsVCardObj.h.

Definition at line 316 of file nsVCardObj.h.

#define VCWAVEProp   "wave"

Definition at line 292 of file nsVCardObj.h.

#define VCWMFProp   "wmf"

Definition at line 293 of file nsVCardObj.h.

#define VCWorkProp   "work"

Definition at line 294 of file nsVCardObj.h.

#define VCX400Prop   "x400"

Definition at line 295 of file nsVCardObj.h.

#define VCX509Prop   "x509"

Definition at line 296 of file nsVCardObj.h.

#define VCXRuleProp   "xrule"

Definition at line 297 of file nsVCardObj.h.

#define VOBJECT_VALUE_OF (   o)    o->val.vobj

Definition at line 326 of file nsVCardObj.h.


Typedef Documentation

typedef struct OFile OFile
typedef struct StrItem

Definition at line 347 of file nsVCardObj.h.

typedef union ValueItem ValueItem
typedef struct VObject

Definition at line 328 of file nsVCardObj.h.

typedef wchar_t vwchar_t

Definition at line 130 of file nsVCardObj.h.


Function Documentation

VObject* addGroup ( VObject o,
const char *  g 
)

Definition at line 427 of file nsVCardObj.cpp.

{
    /*
  a.b.c
  -->
  prop(c)
      prop(VCGrouping=b)
    prop(VCGrouping=a)
     */
    char *dot = PL_strrchr(g,'.');
    if (dot) {
  VObject *p, *t;
  char *gs, *n = dot+1;
  gs = dupStr(g,0); /* so we can write to it. */
  t = p = addProp_(o,lookupProp(n));
  dot = PL_strrchr(gs,'.');
  *dot = 0;
  do {
      dot = PL_strrchr(gs,'.');
      if (dot) {
    n = dot+1;
    *dot=0;
    }
      else
    n = gs;
      /* property(VCGroupingProp=n);
       *  and the value may have VCGrouping property
       */
      t = addProp(t,VCGroupingProp);
      setVObjectStringZValue(t,lookupProp_(n));
      } while (n != gs);
  deleteString(gs); 
  return p;
  }
    else
  return addProp_(o,lookupProp(g));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void addList ( VObject **  o,
VObject p 
)

Definition at line 346 of file nsVCardObj.cpp.

{
    p->next = 0;
    if (*o == 0) {
  *o = p;
  }
    else {
  VObject *t = *o;
  while (t->next) {
     t = t->next;
     }
  t->next = p;
  }
}
VObject* addProp ( VObject o,
const char *  id 
)

Definition at line 336 of file nsVCardObj.cpp.

{
    return addVObjectProp(o,newVObject(id));
}

Here is the call graph for this function:

Here is the caller graph for this function:

VObject* addProp_ ( VObject o,
const char *  id 
)

Definition at line 341 of file nsVCardObj.cpp.

{
    return addVObjectProp(o,newVObject_(id));
}

Here is the call graph for this function:

Here is the caller graph for this function:

VObject* addPropSizedValue ( VObject o,
const char *  p,
const char *  v,
unsigned int  size 
)

Definition at line 493 of file nsVCardObj.cpp.

Here is the call graph for this function:

VObject* addPropSizedValue_ ( VObject o,
const char *  p,
const char *  v,
unsigned int  size 
)

Definition at line 484 of file nsVCardObj.cpp.

{
    VObject *prop;
    prop = addProp(o,p);
    setValueWithSize_(prop, (void*)v, size);
    return prop;
}

Here is the call graph for this function:

Here is the caller graph for this function:

VObject* addPropValue ( VObject o,
const char *  p,
const char *  v 
)

Definition at line 465 of file nsVCardObj.cpp.

{
    VObject *prop;
    prop = addProp(o,p);
  if (v) {
    setVObjectUStringZValue_(prop, fakeUnicode(v,0));
    if (needsQuotedPrintable (v)) {
      if (PL_strcasecmp (VCCardProp, vObjectName(o)) == 0) 
        addProp (prop, VCQuotedPrintableProp);
      else
        addProp (o, VCQuotedPrintableProp);
    }
  }
  else
    setVObjectUStringZValue_(prop, fakeUnicode("",0));

    return prop;
}

Here is the call graph for this function:

Here is the caller graph for this function:

VObject* addVObjectProp ( VObject o,
VObject p 
)

Definition at line 301 of file nsVCardObj.cpp.

{
    /* circular link list pointed to tail */
    /*
    o {next,id,prop,val}
                V
  pn {next,id,prop,val}
             V
      ...
  p1 {next,id,prop,val}
             V
       pn
    -->
    o {next,id,prop,val}
                V
  pn {next,id,prop,val}
             V
  p {next,id,prop,val}
      ...
  p1 {next,id,prop,val}
             V
       pn
    */

    VObject *tail = o->prop;
    if (tail) {
  p->next = tail->next;
  o->prop = tail->next = p;
  }
    else {
  o->prop = p->next = p;
  }
    return p;
}

Here is the caller graph for this function:

Definition at line 659 of file nsVCardObj.cpp.

{
    if (o == 0) return;
    if (o->prop) {
  /* destroy time: cannot use the iterator here.
     Have to break the cycle in the circular link
     list and turns it into regular NULL-terminated
     list -- since at some point of destruction,
     the reference entry for the iterator to work
     will not longer be valid.
     */
  VObject *p;
  p = o->prop->next;
  o->prop->next = 0;
  do {
     VObject *t = p->next;
     cleanVObject(p);
     p = t;
     } while (p);
  }
    switch (VALUE_TYPE(o)) {
  case VCVT_USTRINGZ:
  case VCVT_STRINGZ:
  case VCVT_RAW:
      /* assume they are all allocated by malloc. */
      if ((char*) STRINGZ_VALUE_OF(o)) 
        PR_Free ((char*)STRINGZ_VALUE_OF(o));
      break;
  case VCVT_VOBJECT:
      cleanVObject(VOBJECT_VALUE_OF(o));
      break;
  }
    deleteVObject(o);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void cleanVObjects ( VObject list)

Definition at line 694 of file nsVCardObj.cpp.

{
    while (list) {
  VObject *t = list;
  list = nextVObjectInList(list);
  cleanVObject(t);
  }
}

Here is the call graph for this function:

void deleteString ( char *  p)

Definition at line 182 of file nsVCardObj.cpp.

{
    if (p) 
      PR_Free ((void*)p);
}

Definition at line 149 of file nsVCardObj.cpp.

{
    unUseStr(p->id);
    delete (p);
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* dupStr ( const char *  s,
unsigned int  size 
)

Definition at line 155 of file nsVCardObj.cpp.

{
    char *t;
    if  (size == 0) {
  size = PL_strlen(s);
  }
  t = (char*)PR_CALLOC(size+1);
  if (t) {
  memcpy(t,s,size);
  t[size] = 0;
  return t;
  }
    else {
  return (char*)0;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* fakeCString ( const vwchar_t u)

Definition at line 1542 of file nsVCardObj.cpp.

{
    char *s, *t;
    int len = uStrLen(u) + 1;
    t = s = (char*)PR_CALLOC(len);
    while (*u) {
  if (*u == (vwchar_t)0x2028)
      *t = '\n';
  else if (*u == (vwchar_t)0x2029)
      *t = '\r';
  else
      *t = (char)*u;
  u++; t++;
  }
    *t = 0;
    return s;
}

Here is the call graph for this function:

Here is the caller graph for this function:

vwchar_t* fakeUnicode ( const char *  ps,
int bytes 
)

Definition at line 1512 of file nsVCardObj.cpp.

{
    vwchar_t *r, *pw;
    int len = strlen(ps)+1;

    pw = r = (vwchar_t*)PR_CALLOC(sizeof(vwchar_t)*len);
    if (bytes)
  *bytes = len * sizeof(vwchar_t);

    while (*ps) { 
  if (*ps == '\n')
      *pw = (vwchar_t)0x2028;
  else if (*ps == '\r')
      *pw = (vwchar_t)0x2029;
  else
      *pw = (vwchar_t)(unsigned char)*ps;
  ps++; pw++;
  }        
    *pw = (vwchar_t)0;
  
    return r;
}

Here is the caller graph for this function:

Definition at line 381 of file nsVCardObj.cpp.

{
    i->start = o->prop; 
    i->next = 0;
}

Here is the caller graph for this function:

VObject* isAPropertyOf ( VObject o,
const char *  id 
)

Definition at line 415 of file nsVCardObj.cpp.

{
    VObjectIterator i;
    initPropIterator(&i,o);
    while (moreIteration(&i)) {
  VObject *each = nextVObject(&i);
  if (!PL_strcasecmp(id,each->id))
      return each;
  }
    return (VObject*)0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* lookupProp ( const char *  str)

Definition at line 1025 of file nsVCardObj.cpp.

{
    int i;
  
    for (i = 0; propNames[i].name; i++)
  if (PL_strcasecmp(str, propNames[i].name) == 0) {
      const char *s;
      fieldedProp = (char **)propNames[i].fields;
      s = propNames[i].alias?propNames[i].alias:propNames[i].name;
      return lookupStr(s);
      }
    fieldedProp = 0;
    return lookupStr(str);
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* lookupProp_ ( const char *  str)

Definition at line 1011 of file nsVCardObj.cpp.

{
    int i;
  
    for (i = 0; propNames[i].name; i++)
  if (PL_strcasecmp(str, propNames[i].name) == 0) {
      const char* s;
      s = propNames[i].alias?propNames[i].alias:propNames[i].name;
      return lookupStr(s);
      }
    return lookupStr(str);
}

Here is the call graph for this function:

Here is the caller graph for this function:

const char* lookupStr ( const char *  s)

Definition at line 1560 of file nsVCardObj.cpp.

{
    StrItem *t;
    unsigned int h = hashStr(s);
    if ((t = strTbl[h]) != 0) {
  do {
      if (PL_strcasecmp(t->s,s) == 0) {
    t->refCnt++;
    return t->s;
    }
      t = t->next;
      } while (t);
  }
    s = dupStr(s,0);
    strTbl[h] = newStrItem(s,strTbl[h]);
    return s;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 395 of file nsVCardObj.cpp.

{ 
    return (i->start && (i->next==0 || i->next!=i->start));
}

Here is the caller graph for this function:

VObject* newVObject ( const char *  id)

Definition at line 144 of file nsVCardObj.cpp.

{
    return newVObject_(lookupStr(id));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 400 of file nsVCardObj.cpp.

{
    if (i->start && i->next != i->start) {
  if (i->next == 0) {
      i->next = i->start->next;
      return i->next;
      }
  else {
      i->next = i->next->next;
      return i->next;
      }
  }
    else return (VObject*)0;
}

Here is the caller graph for this function:

Definition at line 361 of file nsVCardObj.cpp.

{
    return o->next;
}

Here is the caller graph for this function:

Definition at line 623 of file nsVCardObj.cpp.

{
  printVObject_(fp,o,0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void printVObject_ ( nsOutputFileStream fp,
VObject o,
int  level 
)

Definition at line 605 of file nsVCardObj.cpp.

{
  VObjectIterator t;
  if (o == 0) {
    fp->write("[NULL]\n", 7);
    return;
  }

  printNameValue(fp,o,level);
  initPropIterator(&t,o);

  while (moreIteration(&t)) 
  {
    VObject *eachProp = nextVObject(&t);
    printVObject_(fp,eachProp,level+1);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void printVObjectsToFile ( nsFileSpec fname,
VObject list 
)

Definition at line 642 of file nsVCardObj.cpp.

{
#if !defined(MOZADDRSTANDALONE)
  nsOutputFileStream *fp = new nsOutputFileStream(*fname, PR_WRONLY | PR_CREATE_FILE, 00600);
  if (fp) {
    while (list) {
      printVObject(fp,list);
      list = nextVObjectInList(list);
    }
    fp->close();
  }
#else
  NS_ASSERTION(PR_FALSE, "1.10 <rhp@netscape.com> 06 Jan 2000 08:01");
#endif
}

Here is the call graph for this function:

void printVObjectToFile ( nsFileSpec fname,
VObject o 
)

Definition at line 628 of file nsVCardObj.cpp.

{
#if !defined(MOZADDRSTANDALONE)
  nsOutputFileStream *fp = new nsOutputFileStream(*fname, PR_WRONLY | PR_CREATE_FILE, 00600);

  if (fp) {
    printVObject(fp,o);
    fp->close();
  }
#else
  NS_ASSERTION(PR_FALSE, "1.10 <rhp@netscape.com> 06 Jan 2000 08:01");
#endif
}

Here is the call graph for this function:

VObject* setValueWithSize ( VObject prop,
void val,
unsigned int  size 
)

Definition at line 375 of file nsVCardObj.cpp.

{
  void *p = dupStr((const char *)val,size);
    return setValueWithSize_(prop,p,p?size:0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

VObject* setValueWithSize_ ( VObject prop,
void val,
unsigned int  size 
)

Definition at line 366 of file nsVCardObj.cpp.

{
    VObject *sizeProp;
    setVObjectAnyValue(prop, val);
    sizeProp = addProp(prop,VCDataSizeProp);
    setVObjectLongValue(sizeProp, size);
    return prop;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void setVObjectAnyValue ( VObject o,
void t 
)

Definition at line 272 of file nsVCardObj.cpp.

Here is the caller graph for this function:

void setVObjectIntegerValue ( VObject o,
unsigned int  i 
)

Definition at line 250 of file nsVCardObj.cpp.

void setVObjectLongValue ( VObject o,
unsigned long  l 
)

Definition at line 261 of file nsVCardObj.cpp.

Here is the caller graph for this function:

void setVObjectName ( VObject o,
const char *  id 
)

Definition at line 206 of file nsVCardObj.cpp.

{
    NAME_OF(o) = id;
}
void setVObjectStringZValue ( VObject o,
const char *  s 
)

Definition at line 216 of file nsVCardObj.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void setVObjectStringZValue_ ( VObject o,
const char *  s 
)

Definition at line 222 of file nsVCardObj.cpp.

Definition at line 233 of file nsVCardObj.cpp.

{
    USTRINGZ_VALUE_OF(o) = (vwchar_t*) dupStr((char*)s,(uStrLen(s)+1)*2);
    VALUE_TYPE(o) = VCVT_USTRINGZ;
}

Here is the call graph for this function:

Definition at line 239 of file nsVCardObj.cpp.

Here is the caller graph for this function:

Definition at line 283 of file nsVCardObj.cpp.

void unUseStr ( const char *  s)

Definition at line 721 of file nsVCardObj.cpp.

{
  StrItem *t, *p;
  unsigned int h = hashStr(s);
  if ((t = strTbl[h]) != 0) {
    p = t;
    do {
      if (PL_strcasecmp(t->s,s) == 0) {
        t->refCnt--;
        if (t->refCnt == 0) {
          if (t == strTbl[h]) {
            strTbl[h] = t->next;
          }
          else {
            p->next = t->next;
          }
          deleteString((char *)t->s);
          deleteStrItem(t);
          return;
        }
      }
      p = t;
      t = t->next;
     } while (t);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1535 of file nsVCardObj.cpp.

{
    int i = 0;
    while (*u != (vwchar_t)0) { u++; i++; }
    return i;
}

Here is the caller graph for this function:

Definition at line 267 of file nsVCardObj.cpp.

{
    return ANY_VALUE_OF(o);
}
unsigned int vObjectIntegerValue ( VObject o)

Definition at line 245 of file nsVCardObj.cpp.

{
    return INTEGER_VALUE_OF(o);
}
unsigned long vObjectLongValue ( VObject o)

Definition at line 256 of file nsVCardObj.cpp.

{
    return LONG_VALUE_OF(o);
}
const char* vObjectName ( VObject o)

Definition at line 201 of file nsVCardObj.cpp.

{
    return NAME_OF(o);
}

Here is the caller graph for this function:

Definition at line 211 of file nsVCardObj.cpp.

{
    return STRINGZ_VALUE_OF(o);
}

Here is the caller graph for this function:

Definition at line 228 of file nsVCardObj.cpp.

{
    return USTRINGZ_VALUE_OF(o);
}

Here is the caller graph for this function:

Definition at line 278 of file nsVCardObj.cpp.

{
    return VOBJECT_VALUE_OF(o);
}
char* writeMemoryVObjects ( char *  s,
int len,
VObject list,
PRBool  expandSpaces 
)

Definition at line 1496 of file nsVCardObj.cpp.

{
    OFile ofp;
    initMemOFile(&ofp,s,len?*len:0);
    while (list) {
  writeVObject_(&ofp,list);
  list = nextVObjectInList(list);
  }
    if (len) *len = ofp.len;
    appendcOFile(&ofp,0);
    return ofp.s;
}

Here is the call graph for this function:

char* writeMemVObject ( char *  s,
int len,
VObject o 
)

Definition at line 1485 of file nsVCardObj.cpp.

{
    OFile ofp;
    initMemOFile(&ofp,s,len?*len:0);
    writeVObject_(&ofp,o);
    if (len) *len = ofp.len;
    appendcOFile(&ofp,0);
    return ofp.s;
}

Here is the call graph for this function:

Definition at line 1448 of file nsVCardObj.cpp.

{
    OFile ofp;
    initOFile(&ofp,fp);
    writeVObject_(&ofp,o);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void writeVObject_ ( OFile fp,
VObject o 
)

Definition at line 1423 of file nsVCardObj.cpp.

{
  //int ilen = 0;
    if (NAME_OF(o)) {
  struct PreDefProp *pi;
  pi = lookupPropInfo(NAME_OF(o));

  if (pi && ((pi->flags & PD_BEGIN) != 0)) {
      VObjectIterator t;
      const char *begin = NAME_OF(o);
      appendsOFile(fp,"begin:");
      appendsOFile(fp,begin);
      appendcOFile(fp,'\n');
      initPropIterator(&t,o);
      while (moreIteration(&t)) {
      VObject *eachProp = nextVObject(&t);
      writeProp(fp, eachProp);
    }
      appendsOFile(fp,"end:");
      appendsOFile(fp,begin);
      appendsOFile(fp,"\n\n");
      }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void writeVObjectsToFile ( nsFileSpec fname,
VObject list 
)

Definition at line 1469 of file nsVCardObj.cpp.

{
#if !defined(MOZADDRSTANDALONE)
  nsOutputFileStream *fp = new nsOutputFileStream(*fname, PR_WRONLY | PR_CREATE_FILE, 00600);
    if (fp) {
  while (list) {
      writeVObject(fp,list);
      list = nextVObjectInList(list);
      }
  fp->close();
  }
#else
  NS_ASSERTION(PR_FALSE, "1.10 <rhp@netscape.com> 06 Jan 2000 08:01");
#endif
}

Here is the call graph for this function:

void writeVObjectToFile ( nsFileSpec fname,
VObject o 
)

Definition at line 1455 of file nsVCardObj.cpp.

{
#if !defined(MOZADDRSTANDALONE)
  nsOutputFileStream *fp = new nsOutputFileStream(*fname, PR_WRONLY | PR_CREATE_FILE, 00600);
  
  if (fp) {
    writeVObject(fp,o);
    fp->close();
  }
#else
  NS_ASSERTION(PR_FALSE, "1.10 <rhp@netscape.com> 06 Jan 2000 08:01");
#endif
}

Here is the call graph for this function: