Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
GlooxConversion.cpp File Reference
#include "precompiled.h"
#include "lib/config2.h"
#include "GlooxConversion.h"
#include "i18n/L10n.h"
#include "ps/CLogger.h"
Include dependency graph for GlooxConversion.cpp:

Macros

#define CASE(X, Y)   case gloox::Presence::X: return Y
 
#define CASE(X, Y)   case gloox::X: return Y
 
#define CASE(X, Y)   case gloox::X: return Y
 
#define DEBUG_CASE(X, Y)   case gloox::X: return g_L10n.Translate("Error") + " (" + Y + ")"
 
#define CASE(X, Y)   case gloox::X: return Y
 
#define DEBUG_CASE(X, Y)   case gloox::X: return g_L10n.Translate("Error") + " (" + Y + ")"
 
#define CASE(X, Y)   case gloox::X: return Y
 
#define DEBUG_CASE(X, Y)   case gloox::X: return g_L10n.Translate("Error") + " (" + Y + ")"
 

Functions

const char * GetPresenceString (const gloox::Presence::PresenceType presenceType)
 Convert a gloox presence type to an untranslated string literal to be used as an identifier by the scripts. More...
 
const char * GetRoleString (const gloox::MUCRoomRole role)
 Convert a gloox role type to an untranslated string literal to be used as an identifier by the scripts. More...
 
std::string StanzaErrorToString (gloox::StanzaError err)
 Convert a gloox stanza error type to string. More...
 
std::string ConnectionErrorToString (gloox::ConnectionError err)
 Convert a gloox connection error enum to string Keep in sync with Gloox documentation. More...
 
std::string RegistrationResultToString (gloox::RegistrationResult res)
 Convert a gloox registration result enum to string Keep in sync with Gloox documentation. More...
 
std::string CertificateErrorToString (gloox::CertStatus status)
 Translates a gloox certificate error codes, i.e. More...
 

Macro Definition Documentation

◆ CASE [1/5]

#define CASE (   X,
  Y 
)    case gloox::Presence::X: return Y

◆ CASE [2/5]

#define CASE (   X,
  Y 
)    case gloox::X: return Y

◆ CASE [3/5]

#define CASE (   X,
  Y 
)    case gloox::X: return Y

◆ CASE [4/5]

#define CASE (   X,
  Y 
)    case gloox::X: return Y

◆ CASE [5/5]

#define CASE (   X,
  Y 
)    case gloox::X: return Y

◆ DEBUG_CASE [1/3]

#define DEBUG_CASE (   X,
  Y 
)    case gloox::X: return g_L10n.Translate("Error") + " (" + Y + ")"

◆ DEBUG_CASE [2/3]

#define DEBUG_CASE (   X,
  Y 
)    case gloox::X: return g_L10n.Translate("Error") + " (" + Y + ")"

◆ DEBUG_CASE [3/3]

#define DEBUG_CASE (   X,
  Y 
)    case gloox::X: return g_L10n.Translate("Error") + " (" + Y + ")"

Function Documentation

◆ CertificateErrorToString()

std::string CertificateErrorToString ( gloox::CertStatus  status)

Translates a gloox certificate error codes, i.e.

gloox certificate statuses except CertOk. Keep in sync with specifications.

◆ ConnectionErrorToString()

std::string ConnectionErrorToString ( gloox::ConnectionError  err)

Convert a gloox connection error enum to string Keep in sync with Gloox documentation.

Parameters
errError to be converted
Returns
Converted error string

◆ GetPresenceString()

const char * GetPresenceString ( const gloox::Presence::PresenceType  presenceType)

Convert a gloox presence type to an untranslated string literal to be used as an identifier by the scripts.

◆ GetRoleString()

const char * GetRoleString ( const gloox::MUCRoomRole  role)

Convert a gloox role type to an untranslated string literal to be used as an identifier by the scripts.

◆ RegistrationResultToString()

std::string RegistrationResultToString ( gloox::RegistrationResult  res)

Convert a gloox registration result enum to string Keep in sync with Gloox documentation.

Parameters
errEnum to be converted
Returns
Converted string

◆ StanzaErrorToString()

std::string StanzaErrorToString ( gloox::StanzaError  err)

Convert a gloox stanza error type to string.

Keep in sync with Gloox documentation

Parameters
errError to be converted
Returns
Converted error string