gloox  1.0.28
Public Member Functions | List of all members
VCardUpdate Class Reference

#include <vcardupdate.h>

Inheritance diagram for VCardUpdate:
Inheritance graph
[legend]

Public Member Functions

 VCardUpdate ()
 
 VCardUpdate (const std::string &hash)
 
 VCardUpdate (const Tag *tag)
 
virtual ~VCardUpdate ()
 
const std::string & hash () const
 
bool hasPhoto ()
 
virtual const std::string & filterString () const
 
virtual StanzaExtensionnewInstance (const Tag *tag) const
 
Tagtag () const
 
virtual StanzaExtensionclone () const
 
- Public Member Functions inherited from StanzaExtension
 StanzaExtension (int type)
 
virtual ~StanzaExtension ()
 
virtual StanzaembeddedStanza () const
 
virtual TagembeddedTag () const
 
int extensionType () const
 

Detailed Description

This is an abstraction of a vcard-temp:x:update namespace element, as used in XEP-0153 (vCard-Based Avatars).

XEP version: 1.0

Author
Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
Since
0.9

Definition at line 35 of file vcardupdate.h.

Constructor & Destructor Documentation

◆ VCardUpdate() [1/3]

Constructs an empty VCardUpdate object.

Definition at line 20 of file vcardupdate.cpp.

◆ VCardUpdate() [2/3]

VCardUpdate ( const std::string &  hash)

Constructs a new object with the given hash.

Parameters
hashThe current avatar's SHA hash.

Definition at line 26 of file vcardupdate.cpp.

◆ VCardUpdate() [3/3]

VCardUpdate ( const Tag tag)

Constructs an VCardUpdate object from the given Tag. To be recognized properly, the Tag should have a name of 'x' in the vcard-temp:x:update namespace.

Parameters
tagThe Tag to parse.

Definition at line 34 of file vcardupdate.cpp.

◆ ~VCardUpdate()

~VCardUpdate ( )
virtual

Virtual destructor.

Definition at line 54 of file vcardupdate.cpp.

Member Function Documentation

◆ clone()

virtual StanzaExtension* clone ( ) const
inlinevirtual

Returns an identical copy of the current StanzaExtension.

Returns
An identical copy of the current StanzaExtension.

Implements StanzaExtension.

Definition at line 90 of file vcardupdate.h.

◆ filterString()

const std::string & filterString ( ) const
virtual

Returns an XPath expression that describes a path to child elements of a stanza that an extension handles.

Returns
The extension's filter string.

Implements StanzaExtension.

Definition at line 58 of file vcardupdate.cpp.

◆ hash()

const std::string& hash ( ) const
inline

Returns the avatar's hash.

Returns
The avatar's SHA hash.

Definition at line 65 of file vcardupdate.h.

◆ hasPhoto()

bool hasPhoto ( )
inline

Indicates whether the VCard update contained a photo tag (which might have been empty). This function is only useful for incoming VCardUpdate objects.

Returns
True if the VCard update contained a photo tag (empty or non-empty), false otherwise.
Since
1.0.3

Definition at line 75 of file vcardupdate.h.

◆ newInstance()

virtual StanzaExtension* newInstance ( const Tag tag) const
inlinevirtual

Returns a new Instance of the derived type. Usually, for a derived class FooExtension, the implementation of this function looks like:

StanzaExtension* FooExtension::newInstance( const Tag* tag ) const
{
return new FooExtension( tag );
}
Tag * tag() const
Definition: vcardupdate.cpp:64
Returns
The derived extension's new instance.

Implements StanzaExtension.

Definition at line 81 of file vcardupdate.h.

◆ tag()

Tag * tag ( ) const
virtual

Returns a Tag representation of the extension.

Returns
A Tag representation of the extension.

Implements StanzaExtension.

Definition at line 64 of file vcardupdate.cpp.


The documentation for this class was generated from the following files: