gloox  1.0.21
Public Types | Public Member Functions | List of all members
Session::Reason Class Reference

#include <jinglesession.h>

Inheritance diagram for Session::Reason:
Inheritance graph
[legend]

Public Types

enum  Reasons {
  AlternativeSession, Busy, Cancel, ConnectivityError,
  Decline, Expired, FailedApplication, FailedTransport,
  GeneralError, Gone, IncompatibleParameters, MediaError,
  SecurityError, Success, Timeout, UnsupportedApplications,
  UnsupportedTransports, InvalidReason
}
 

Public Member Functions

 Reason (Reasons reason, const std::string &sid=EmptyString, const std::string &text=EmptyString)
 
 Reason (const Tag *tag=0)
 
virtual ~Reason ()
 
Reasons reason () const
 
const std::string & sid () const
 
const std::string & text () const
 
virtual const std::string & filterString () const
 
virtual Tagtag () const
 
virtual PluginnewInstance (const Tag *tag) const
 
virtual Pluginclone () const
 
- Public Member Functions inherited from Plugin
 Plugin (JinglePluginType type)
 
virtual ~Plugin ()
 
void addPlugin (const Plugin *plugin)
 
const PluginfindPlugin (int type) const
 
template<class T >
const T * findPlugin (int type) const
 
const PluginListplugins () const
 
virtual const StringList features () const
 
JinglePluginType pluginType () const
 

Detailed Description

An abstraction of a Jingle (XEP-0166) session terminate reason.

XEP Version: 1.1

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

Definition at line 104 of file jinglesession.h.

Member Enumeration Documentation

◆ Reasons

enum Reasons

Defined reasons for terminating a Jingle Session.

Enumerator
AlternativeSession 

An alternative session exists that should be used.

Busy 

The terminating party is busy.

Cancel 

The session has been canceled.

ConnectivityError 

Connectivity error.

Decline 

The terminating party formally declines the request.

Expired 

The session has expired.

FailedApplication 

Application type setup failed.

FailedTransport 

Transport setup has failed.

GeneralError 

General error.

Gone 

Participant went away.

IncompatibleParameters 

Offered or negotiated application type parameters not supported.

MediaError 

Media error.

SecurityError 

Security error.

Success 

Session terminated after successful call.

Timeout 

A timeout occured.

UnsupportedApplications 

The terminating party does not support any of the offered application formats.

UnsupportedTransports 

The terminating party does not support any of the offered transport methods.

InvalidReason 

Invalid reason.

Definition at line 110 of file jinglesession.h.

Constructor & Destructor Documentation

◆ Reason() [1/2]

Reason ( Reasons  reason,
const std::string &  sid = EmptyString,
const std::string &  text = EmptyString 
)

Constructor.

Parameters
reasonThe reason for the termination of the session.
sidAn optional session ID (only used if reason is AlternativeSession).
textAn optional human-readable text explaining the reason for the session termination.

Definition at line 78 of file jinglesession.cpp.

◆ Reason() [2/2]

Reason ( const Tag tag = 0)

Constructs a new element by parsing the given Tag.

Parameters
tagA tag to parse.

Definition at line 85 of file jinglesession.cpp.

◆ ~Reason()

~Reason ( )
virtual

Virtual destructor.

Definition at line 102 of file jinglesession.cpp.

Member Function Documentation

◆ clone()

Plugin * clone ( ) const
virtual

Creates an identical deep copy of the current instance.

Returns
An identical deep copy of the current instance.

Implements Plugin.

Definition at line 128 of file jinglesession.cpp.

◆ filterString()

const std::string & filterString ( ) const
virtual

Returns an XPath expression that describes a path to child elements of a jingle element that the plugin handles. The result should be a single Tag.

Returns
The plugin's filter string.

Implements Plugin.

Definition at line 106 of file jinglesession.cpp.

◆ newInstance()

virtual Plugin* newInstance ( const Tag tag) const
inlinevirtual

Returns a new instance of the same plugin type, based on the Tag provided.

Parameters
tagThe Tag to parse and create a new instance from.
Returns
The new plugin instance.

Implements Plugin.

Definition at line 179 of file jinglesession.h.

◆ reason()

Reasons reason ( ) const
inline

Returns the reason for the session termination.

Returns
The reason for the session termination.

Definition at line 156 of file jinglesession.h.

◆ sid()

const std::string& sid ( ) const
inline

Returns the session ID of the alternate session, if given (only applicable if reason() returns AlternativeSession).

Returns
The session ID of the alternative session, or an empty string.

Definition at line 163 of file jinglesession.h.

◆ tag()

Tag * tag ( ) const
virtual

Returns a Tag representation of the plugin.

Returns
A Tag representation of the plugin.

Implements Plugin.

Definition at line 112 of file jinglesession.cpp.

◆ text()

const std::string& text ( ) const
inline

Returns the content of an optional, human-readable <text> element.

Returns
An optional text describing the reason for the terminate action.

Definition at line 170 of file jinglesession.h.


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