gloox  1.1-svn
Public Member Functions | List of all members
BOB Class Reference

#include <bob.h>

Inheritance diagram for BOB:
Inheritance graph
[legend]

Public Member Functions

 BOB (const Tag *tag=0)
 BOB (const std::string &cid, const std::string &type, const std::string &data, int maxage)
virtual ~BOB ()
const std::string data () const
const std::string cid () const
const std::string & type () const
int maxage () const
virtual const std::string & filterString () const
virtual StanzaExtensionnewInstance (const Tag *tag) const
virtual Tagtag () const
virtual StanzaExtensionclone () const
- Public Member Functions inherited from StanzaExtension
 StanzaExtension (int type)
virtual ~StanzaExtension ()
int extensionType () const

Detailed Description

This is an implementation of XEP-0231 as a StanzaExtension.

XEP Version: 1.0

Author
Jakob Schroeter js@ca.nosp@m.maya.nosp@m..net
Since
1.1

Definition at line 35 of file bob.h.

Constructor & Destructor Documentation

BOB ( const Tag tag = 0)

Constructs a new object from the given Tag.

Parameters
tagThe Tag to parse.

Definition at line 24 of file bob.cpp.

BOB ( const std::string &  cid,
const std::string &  type,
const std::string &  data,
int  maxage 
)

Constructs a new object with the given namespace and priority.

Parameters
cidA mandatory Content-ID that can be mapped to a cid: URL as specified in RFC 2111 [10]. The 'cid' value SHOULD be of the form algo+.nosp@m.hash.nosp@m.@bob..nosp@m.xmpp.nosp@m..org, where the "algo" is the hashing algorithm used (e.g., "sha1" for the SHA-1 algorithm as specified in RFC 3174) and the "hash" is the hex output of the algorithm applied to the binary data itself.
typeThe value of the 'type' attribute MUST match the syntax specified in RFC 2045. That is, the value MUST include a top-level media type, the "/" character, and a subtype; in addition, it MAY include one or more optional parameters (e.g., the "audio/ogg" MIME type in the example shown below includes a "codecs" parameter as specified in RFC 4281 [14]). The "type/subtype" string SHOULD be registered in the IANA MIME Media Types Registry, but MAY be an unregistered or yet-to-be-registered value.
dataThe binary data. It will be Base64-encoded for you.
maxageA suggestion regarding how long (in seconds) to cache the data; the meaning matches the Max-Age attribute from RFC 2965.

Definition at line 36 of file bob.cpp.

virtual ~BOB ( )
inlinevirtual

Virtual Destructor.

Definition at line 69 of file bob.h.

Member Function Documentation

const std::string cid ( ) const
inline

Returns the content ID.

Returns
The content ID.

Definition at line 81 of file bob.h.

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 108 of file bob.h.

const std::string data ( ) const

Returns the binary data.

Returns
The binary data.

Definition at line 43 of file bob.cpp.

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 48 of file bob.cpp.

int maxage ( ) const
inline

Returns the maximum cache time in seconds.

Returns
The maximum cache time in seconds..

Definition at line 93 of file bob.h.

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:

{
return new FooExtension( tag );
}
Returns
The derived extension's new instance.

Implements StanzaExtension.

Definition at line 99 of file bob.h.

Tag * tag ( ) const
virtual

Returns a Tag representation of the extension.

Returns
A Tag representation of the extension.

Implements StanzaExtension.

Definition at line 56 of file bob.cpp.

const std::string& type ( ) const
inline

Returns the content type.

Returns
The content type.

Definition at line 87 of file bob.h.


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