The vcard-temp Namespace
The vcard-temp namespace represents the vCard
format. It’s a format used to
provide information about an entity—a
person, company, or even, in Jabber’s case, a piece of software—in the form of a virtual business card.
The idea behind the vCard format, which is an emerging but as yet
incomplete standard, is that it can be used to hold information
about something in a formalized and parcel-like way. vCards can be
attached to email messages and extracted from user directories
and address books. The fact that the format is not yet a standard
is reflected in the “temporary” namespace (vcard-temp) used to qualify
vCard exchanges.
Note
Jabber uses the vCard format to hold details about various parts of the Jabber server; each component can have a vCard, as seen in Section 4.3 in Chapter 4. Each Jabber user can have a vCard, too.
Retrievals of vCards, and updates, are made using IQs containing
extensions qualified by the vcard-temp
namespace. To request a vCard, send an IQ-get to the
holder of the vCard you want, like this:
SEND: <iq type='get' to='qmacro@jabber.org' id='73'>
<vcard xmlns='vcard-temp'/>
</iq>
Rather than the usual tag name of query,
vCard <iq/> extensions have the
name vcard (this is sometimes seen in all caps or as vCard).
In response to this request, the vCard belonging to qmacro will be returned as shown in Example 6-8.
RECV: <iq id='73' to='dj@gnu.mine.nu/home' type='result' from='qmacro@jabber.org'> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access