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

#include <pubsubitem.h>

Public Member Functions

 Item ()
 
 Item (const Tag *tag)
 
 Item (const Item &item)
 
 ~Item ()
 
const Tagpayload () const
 
void setPayload (Tag *tag)
 
const std::string & id () const
 
void setID (const std::string &id)
 
Tagtag () const
 

Detailed Description

Abstracts a PubSub Item (XEP-0060).

XEP Version: 1.12

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

Definition at line 37 of file pubsubitem.h.

Constructor & Destructor Documentation

◆ Item() [1/3]

Item ( )

Constructs a new empty Item.

Definition at line 23 of file pubsubitem.cpp.

◆ Item() [2/3]

Item ( const Tag tag)

Constructs a new Item from the given Tag.

Parameters
tagThe Tag to parse.

Definition at line 28 of file pubsubitem.cpp.

◆ Item() [3/3]

Item ( const Item item)

Copy constructor.

Parameters
itemThe Item to be copied.

Definition at line 40 of file pubsubitem.cpp.

◆ ~Item()

~Item ( )

Destructor.

Definition at line 46 of file pubsubitem.cpp.

Member Function Documentation

◆ id()

const std::string& id ( ) const
inline

Returns the item ID.

Returns
The item ID.

Definition at line 78 of file pubsubitem.h.

◆ payload()

const Tag* payload ( ) const
inline

Returns the Item's payload.

Returns
The layload.

Definition at line 66 of file pubsubitem.h.

◆ setID()

void setID ( const std::string &  id)
inline

Sets the item's ID.

Parameters
idThe item's ID.

Definition at line 84 of file pubsubitem.h.

◆ setPayload()

void setPayload ( Tag tag)

Sets the item's payload.

Parameters
tagA payload tag.

Definition at line 51 of file pubsubitem.cpp.

◆ tag()

Tag * tag ( ) const

Creates and returns a Tag representation of the Item.

Returns
An XML representation of the Item.

Definition at line 57 of file pubsubitem.cpp.


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