powered by Jive Software

VCard and VCardEvent Updates

Just updated VCard and VCardEvent with the following:

VCard updates:

  • All references to avatar replaced with photo to match spec.

  • Added EXTVAL support to photo (now supports urls as well as binary).

  • Added variable vCard cache flush interval (see:http://www.igniterealtime.org/community/thread/41260)

  • Added additional properties (description, role, uid).

  • Added comments.

  • Fixed a few bugs (formattedName was called fullName, version was a number instead of a string, and home address was not parsing out)

VCardEvent updates:

  • AVATAR_SENT now SAVED (meant for entire vCard not just photo)

  • ERROR -> SAVE_ERROR (to be more descriptive)

  • AVATAR_LOADED (removed - no need for extra event, photo is not loaded inside class)

Good stuff

Further VCard updates:

Organized class

New vCard data classes to encompass similar properties:
VCardAddress (country, extendedAddress, locality, poBox, postalCode, region, street)
VCardGeographicalPosition (latitude, longitude)
VCardName (family, given, middle, prefix, suffix)
VCardOrganization (name, unit)
VCardPhoto (binaryValue, bytes, externalValue, type)
VCardSound (binaryValue, bytes, externalValue, phonetic)
VCardTelephone (cell, fax, msg, pager, video, voice)

New properties:
geographicalPosition:VCardGeographicalPosition
homeAddress:VCardAddress
homeAddressLabel:String
homeTelephone:VCardTelephone
logo:VCardPhoto
mailer:String
name:VCardName
note:String
organization:VCardOrganization
photo:VCardPhoto
privacyClass:String
productID:String
revision:Date
sortString:String
sound:VCardSound
timezone:Date
workAddress:VCardAddress
workAddressLabel:String
workTelephone:VCardTelephone

Removed properties:
gender -> not in spec
maritalStatus -> not in spec

Updated properties:
birthDay -> birthday
company -> organization.name
department -> organization.unit
firstName -> name.given
homeAddress -> homeAddress.street
homeCellNumber -> homeTelephone.cell
homeCity -> homeAddress.locality
homeCountry -> homeAddress.country
homeFaxNumber -> homeTelephone.fax
homePagerNumber -> homeTelephone.pager
homePostalCode -> homeAddress.postalCode
homeStateProvince -> homeAddress.region
homeVoiceNumber -> homeTelephone.voice
lastName -> name.family
middleName -> name.middle
namePrefix -> name.prefix
nameSuffix -> name.suffix
workAddress -> workAddress.street
workCellNumber -> workTelephone.cell
workCity -> workAddress.locality
workCountry -> workAddress.country
workFaxNumber -> workTelephone.fax
workPagerNumber -> workTelephone.pager
workPostalCode -> workAddress.postalCode
workStateProvince -> workAddress.region
workVoiceNumber -> workTelephone.voice

TODO:
The only properties not yet implemented from the spec:
agent
categories
key

Even further VCard updates:

  • getVCard() now requires a jid:

The contact param has been removed.

Using an UnescapedJID instead of a RosterItemVO allows for vCard requests on chat room participants that aren’t necessarily in the user’s roster.

To request the vCard of the current user, pass the user’s jid just like any other request. Passing null will no longer request the current user’s vCard.

  • Made cache a dictionary instead of generic object.

  • Added clearCache() method to immediately remove all cached vCard references.