diff --git a/source/lobby/GlooxConversion.cpp b/source/lobby/GlooxConversion.cpp
new file mode 100644
index 0000000000..9f5cf9e0bf
--- /dev/null
+++ b/source/lobby/GlooxConversion.cpp
@@ -0,0 +1,187 @@
+/* Copyright (C) 2026 Wildfire Games.
+ * This file is part of 0 A.D.
+ *
+ * 0 A.D. is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 0 A.D. is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with 0 A.D. If not, see .
+ */
+
+#include "precompiled.h"
+
+#include "lib/config2.h"
+#if CONFIG2_LOBBY
+#include "GlooxConversion.h"
+
+#include "i18n/L10n.h"
+#include "ps/CLogger.h"
+
+const char* GetPresenceString(const gloox::Presence::PresenceType presenceType)
+{
+ switch (presenceType)
+ {
+#define CASE(X,Y) case gloox::Presence::X: return Y
+ CASE(Available, "available");
+ CASE(Chat, "chat");
+ CASE(Away, "away");
+ CASE(DND, "playing");
+ CASE(XA, "away");
+ CASE(Unavailable, "offline");
+ CASE(Probe, "probe");
+ CASE(Error, "error");
+ CASE(Invalid, "invalid");
+ default:
+ LOGERROR("Unknown presence type '%d'", static_cast(presenceType));
+ return "";
+#undef CASE
+ }
+}
+
+const char* GetRoleString(const gloox::MUCRoomRole role)
+{
+ switch (role)
+ {
+#define CASE(X, Y) case gloox::X: return Y
+ CASE(RoleNone, "none");
+ CASE(RoleVisitor, "visitor");
+ CASE(RoleParticipant, "participant");
+ CASE(RoleModerator, "moderator");
+ CASE(RoleInvalid, "invalid");
+ default:
+ LOGERROR("Unknown role type '%d'", static_cast(role));
+ return "";
+#undef CASE
+ }
+}
+
+std::string StanzaErrorToString(gloox::StanzaError err)
+{
+#define CASE(X, Y) case gloox::X: return Y
+#define DEBUG_CASE(X, Y) case gloox::X: return g_L10n.Translate("Error") + " (" + Y + ")"
+ switch (err)
+ {
+ CASE(StanzaErrorUndefined, g_L10n.Translate("No error"));
+ DEBUG_CASE(StanzaErrorBadRequest, "Server received malformed XML");
+ CASE(StanzaErrorConflict, g_L10n.Translate("Player already logged in"));
+ DEBUG_CASE(StanzaErrorFeatureNotImplemented, "Server does not implement requested feature");
+ CASE(StanzaErrorForbidden, g_L10n.Translate("Forbidden"));
+ DEBUG_CASE(StanzaErrorGone, "Unable to find message receipiant");
+ CASE(StanzaErrorInternalServerError, g_L10n.Translate("Internal server error"));
+ DEBUG_CASE(StanzaErrorItemNotFound, "Message receipiant does not exist");
+ DEBUG_CASE(StanzaErrorJidMalformed, "JID (XMPP address) malformed");
+ DEBUG_CASE(StanzaErrorNotAcceptable, "Receipiant refused message. Possible policy issue");
+ CASE(StanzaErrorNotAllowed, g_L10n.Translate("Not allowed"));
+ CASE(StanzaErrorNotAuthorized, g_L10n.Translate("Not authorized"));
+ DEBUG_CASE(StanzaErrorNotModified, "Requested item has not changed since last request");
+ DEBUG_CASE(StanzaErrorPaymentRequired, "This server requires payment");
+ CASE(StanzaErrorRecipientUnavailable, g_L10n.Translate("Recipient temporarily unavailable"));
+ DEBUG_CASE(StanzaErrorRedirect, "Request redirected");
+ CASE(StanzaErrorRegistrationRequired, g_L10n.Translate("Registration required"));
+ DEBUG_CASE(StanzaErrorRemoteServerNotFound, "Remote server not found");
+ DEBUG_CASE(StanzaErrorRemoteServerTimeout, "Remote server timed out");
+ DEBUG_CASE(StanzaErrorResourceConstraint,
+ "The recipient is unable to process the message due to resource constraints");
+ CASE(StanzaErrorServiceUnavailable, g_L10n.Translate("Service unavailable"));
+ DEBUG_CASE(StanzaErrorSubscribtionRequired, "Service requires subscription");
+ DEBUG_CASE(StanzaErrorUnexpectedRequest, "Attempt to send from invalid stanza address");
+ DEBUG_CASE(StanzaErrorUnknownSender, "Invalid 'from' address");
+ default:
+ return g_L10n.Translate("Unknown error");
+ }
+#undef DEBUG_CASE
+#undef CASE
+}
+
+std::string ConnectionErrorToString(gloox::ConnectionError err)
+{
+#define CASE(X, Y) case gloox::X: return Y
+#define DEBUG_CASE(X, Y) case gloox::X: return g_L10n.Translate("Error") + " (" + Y + ")"
+ switch (err)
+ {
+ CASE(ConnNoError, g_L10n.Translate("No error"));
+ CASE(ConnStreamError, g_L10n.Translate("Stream error"));
+ CASE(ConnStreamVersionError, g_L10n.Translate("The incoming stream version is unsupported"));
+ CASE(ConnStreamClosed, g_L10n.Translate("The stream has been closed by the server"));
+ DEBUG_CASE(ConnProxyAuthRequired, "The HTTP/SOCKS5 proxy requires authentication");
+ DEBUG_CASE(ConnProxyAuthFailed, "HTTP/SOCKS5 proxy authentication failed");
+ DEBUG_CASE(ConnProxyNoSupportedAuth,
+ "The HTTP/SOCKS5 proxy requires an unsupported authentication mechanism");
+ CASE(ConnIoError, g_L10n.Translate("An I/O error occurred"));
+ DEBUG_CASE(ConnParseError, "An XML parse error occurred");
+ CASE(ConnConnectionRefused, g_L10n.Translate("The connection was refused by the server"));
+ CASE(ConnDnsError, g_L10n.Translate("Resolving the server's hostname failed"));
+ CASE(ConnOutOfMemory, g_L10n.Translate("This system is out of memory"));
+ DEBUG_CASE(ConnNoSupportedAuth, "The authentication mechanisms the server offered are not supported "
+ "or no authentication mechanisms were available");
+ CASE(ConnTlsFailed, g_L10n.Translate("The server's certificate could not be verified or the TLS "
+ "handshake did not complete successfully"));
+ CASE(ConnTlsNotAvailable, g_L10n.Translate("The server did not offer required TLS encryption"));
+ DEBUG_CASE(ConnCompressionFailed, "Negotiation/initializing compression failed");
+ CASE(ConnAuthenticationFailed,
+ g_L10n.Translate("Authentication failed. Incorrect password or account does not exist"));
+ CASE(ConnUserDisconnected, g_L10n.Translate("The user or system requested a disconnect"));
+ CASE(ConnNotConnected, g_L10n.Translate("There is no active connection"));
+ default:
+ return g_L10n.Translate("Unknown error");
+ }
+#undef DEBUG_CASE
+#undef CASE
+}
+
+std::string RegistrationResultToString(gloox::RegistrationResult res)
+{
+#define CASE(X, Y) case gloox::X: return Y
+#define DEBUG_CASE(X, Y) case gloox::X: return g_L10n.Translate("Error") + " (" + Y + ")"
+ switch (res)
+ {
+ CASE(RegistrationSuccess, g_L10n.Translate("Your account has been successfully registered"));
+ CASE(RegistrationNotAcceptable, g_L10n.Translate("Not all necessary information provided"));
+ CASE(RegistrationConflict, g_L10n.Translate("Username already exists"));
+ DEBUG_CASE(RegistrationNotAuthorized, "Account removal timeout or insufficiently secure channel for password change");
+ DEBUG_CASE(RegistrationBadRequest, "Server received an incomplete request");
+ DEBUG_CASE(RegistrationForbidden, "Registration forbidden");
+ DEBUG_CASE(RegistrationRequired, "Account cannot be removed as it does not exist");
+ DEBUG_CASE(RegistrationUnexpectedRequest, "This client is unregistered with the server");
+ DEBUG_CASE(RegistrationNotAllowed, "Server does not permit password changes");
+ default:
+ return "";
+ }
+#undef DEBUG_CASE
+#undef CASE
+}
+
+std::string CertificateErrorToString(gloox::CertStatus status)
+{
+ std::map certificateErrorStrings = {
+ { gloox::CertInvalid, g_L10n.Translate("The certificate is not trusted.") },
+ { gloox::CertSignerUnknown, g_L10n.Translate("The certificate hasn't got a known issuer.") },
+ { gloox::CertRevoked, g_L10n.Translate("The certificate has been revoked.") },
+ { gloox::CertExpired, g_L10n.Translate("The certificate has expired.") },
+ { gloox::CertNotActive, g_L10n.Translate("The certificate is not yet active.") },
+ { gloox::CertWrongPeer,
+ g_L10n.Translate("The certificate has not been issued for the peer connected to.") },
+ { gloox::CertSignerNotCa,
+ g_L10n.Translate("The certificate signer is not a certificate authority.") }
+ };
+
+ std::string result;
+
+ for (std::map::iterator it = certificateErrorStrings.begin();
+ it != certificateErrorStrings.end(); ++it)
+ {
+ if (status & it->first)
+ result += "\n" + it->second;
+ }
+
+ return result;
+}
+
+#endif // CONFIG2_LOBBY
diff --git a/source/lobby/GlooxConversion.h b/source/lobby/GlooxConversion.h
new file mode 100644
index 0000000000..7b135f8a58
--- /dev/null
+++ b/source/lobby/GlooxConversion.h
@@ -0,0 +1,70 @@
+/* Copyright (C) 2026 Wildfire Games.
+ * This file is part of 0 A.D.
+ *
+ * 0 A.D. is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * 0 A.D. is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with 0 A.D. If not, see .
+ */
+
+#ifndef GLOOX_CONVERSION_H
+#define GLOOX_CONVERSION_H
+
+#include "lib/external_libraries/gloox.h"
+
+#include
+
+/**
+ * Convert a gloox presence type to an untranslated string literal to be used
+ * as an identifier by the scripts.
+ */
+const char* GetPresenceString(const gloox::Presence::PresenceType presenceType);
+
+/**
+ * Convert a gloox role type to an untranslated string literal to be used as an
+ * identifier by the scripts.
+ */
+const char* GetRoleString(const gloox::MUCRoomRole role);
+
+/**
+ * Convert a gloox stanza error type to string.
+ * Keep in sync with Gloox documentation
+ *
+ * @param err Error to be converted
+ * @return Converted error string
+ */
+std::string StanzaErrorToString(gloox::StanzaError err);
+
+/**
+ * Convert a gloox connection error enum to string
+ * Keep in sync with Gloox documentation
+ *
+ * @param err Error to be converted
+ * @return Converted error string
+ */
+std::string ConnectionErrorToString(gloox::ConnectionError err);
+
+/**
+ * Convert a gloox registration result enum to string
+ * Keep in sync with Gloox documentation
+ *
+ * @param err Enum to be converted
+ * @return Converted string
+ */
+std::string RegistrationResultToString(gloox::RegistrationResult res);
+
+/**
+ * Translates a gloox certificate error codes, i.e. gloox certificate statuses except CertOk.
+ * Keep in sync with specifications.
+ */
+std::string CertificateErrorToString(gloox::CertStatus status);
+
+#endif // GLOOX_CONVERSION_H
diff --git a/source/lobby/XmppClient.cpp b/source/lobby/XmppClient.cpp
index 9ccfba9220..5d334f8e22 100644
--- a/source/lobby/XmppClient.cpp
+++ b/source/lobby/XmppClient.cpp
@@ -23,6 +23,7 @@
#include "i18n/L10n.h"
#include "lib/external_libraries/gloox.h"
#include "lib/utf8.h"
+#include "lobby/GlooxConversion.h"
#include "lobby/IXmppClient.h"
#include "network/NetClient.h"
#include "network/NetServer.h"
@@ -1323,187 +1324,6 @@ std::time_t XmppClient::ComputeTimestamp(const gloox::Message& msg)
return std::time(nullptr);
}
-/**
- * Convert a gloox presence type to an untranslated string literal to be used as an identifier by the scripts.
- */
-const char* XmppClient::GetPresenceString(const gloox::Presence::PresenceType presenceType)
-{
- switch (presenceType)
- {
-#define CASE(X,Y) case gloox::Presence::X: return Y
- CASE(Available, "available");
- CASE(Chat, "chat");
- CASE(Away, "away");
- CASE(DND, "playing");
- CASE(XA, "away");
- CASE(Unavailable, "offline");
- CASE(Probe, "probe");
- CASE(Error, "error");
- CASE(Invalid, "invalid");
- default:
- LOGERROR("Unknown presence type '%d'", static_cast(presenceType));
- return "";
-#undef CASE
- }
-}
-
-/**
- * Convert a gloox role type to an untranslated string literal to be used as an identifier by the scripts.
- */
-const char* XmppClient::GetRoleString(const gloox::MUCRoomRole role)
-{
- switch (role)
- {
-#define CASE(X, Y) case gloox::X: return Y
- CASE(RoleNone, "none");
- CASE(RoleVisitor, "visitor");
- CASE(RoleParticipant, "participant");
- CASE(RoleModerator, "moderator");
- CASE(RoleInvalid, "invalid");
- default:
- LOGERROR("Unknown role type '%d'", static_cast(role));
- return "";
-#undef CASE
- }
-}
-
-/**
- * Translates a gloox certificate error codes, i.e. gloox certificate statuses except CertOk.
- * Keep in sync with specifications.
- */
-std::string XmppClient::CertificateErrorToString(gloox::CertStatus status)
-{
- std::map certificateErrorStrings = {
- { gloox::CertInvalid, g_L10n.Translate("The certificate is not trusted.") },
- { gloox::CertSignerUnknown, g_L10n.Translate("The certificate hasn't got a known issuer.") },
- { gloox::CertRevoked, g_L10n.Translate("The certificate has been revoked.") },
- { gloox::CertExpired, g_L10n.Translate("The certificate has expired.") },
- { gloox::CertNotActive, g_L10n.Translate("The certificate is not yet active.") },
- { gloox::CertWrongPeer, g_L10n.Translate("The certificate has not been issued for the peer connected to.") },
- { gloox::CertSignerNotCa, g_L10n.Translate("The certificate signer is not a certificate authority.") }
- };
-
- std::string result;
-
- for (std::map::iterator it = certificateErrorStrings.begin(); it != certificateErrorStrings.end(); ++it)
- if (status & it->first)
- result += "\n" + it->second;
-
- return result;
-}
-
-/**
- * Convert a gloox stanza error type to string.
- * Keep in sync with Gloox documentation
- *
- * @param err Error to be converted
- * @return Converted error string
- */
-std::string XmppClient::StanzaErrorToString(gloox::StanzaError err)
-{
-#define CASE(X, Y) case gloox::X: return Y
-#define DEBUG_CASE(X, Y) case gloox::X: return g_L10n.Translate("Error") + " (" + Y + ")"
- switch (err)
- {
- CASE(StanzaErrorUndefined, g_L10n.Translate("No error"));
- DEBUG_CASE(StanzaErrorBadRequest, "Server received malformed XML");
- CASE(StanzaErrorConflict, g_L10n.Translate("Player already logged in"));
- DEBUG_CASE(StanzaErrorFeatureNotImplemented, "Server does not implement requested feature");
- CASE(StanzaErrorForbidden, g_L10n.Translate("Forbidden"));
- DEBUG_CASE(StanzaErrorGone, "Unable to find message receipiant");
- CASE(StanzaErrorInternalServerError, g_L10n.Translate("Internal server error"));
- DEBUG_CASE(StanzaErrorItemNotFound, "Message receipiant does not exist");
- DEBUG_CASE(StanzaErrorJidMalformed, "JID (XMPP address) malformed");
- DEBUG_CASE(StanzaErrorNotAcceptable, "Receipiant refused message. Possible policy issue");
- CASE(StanzaErrorNotAllowed, g_L10n.Translate("Not allowed"));
- CASE(StanzaErrorNotAuthorized, g_L10n.Translate("Not authorized"));
- DEBUG_CASE(StanzaErrorNotModified, "Requested item has not changed since last request");
- DEBUG_CASE(StanzaErrorPaymentRequired, "This server requires payment");
- CASE(StanzaErrorRecipientUnavailable, g_L10n.Translate("Recipient temporarily unavailable"));
- DEBUG_CASE(StanzaErrorRedirect, "Request redirected");
- CASE(StanzaErrorRegistrationRequired, g_L10n.Translate("Registration required"));
- DEBUG_CASE(StanzaErrorRemoteServerNotFound, "Remote server not found");
- DEBUG_CASE(StanzaErrorRemoteServerTimeout, "Remote server timed out");
- DEBUG_CASE(StanzaErrorResourceConstraint, "The recipient is unable to process the message due to resource constraints");
- CASE(StanzaErrorServiceUnavailable, g_L10n.Translate("Service unavailable"));
- DEBUG_CASE(StanzaErrorSubscribtionRequired, "Service requires subscription");
- DEBUG_CASE(StanzaErrorUnexpectedRequest, "Attempt to send from invalid stanza address");
- DEBUG_CASE(StanzaErrorUnknownSender, "Invalid 'from' address");
- default:
- return g_L10n.Translate("Unknown error");
- }
-#undef DEBUG_CASE
-#undef CASE
-}
-
-/**
- * Convert a gloox connection error enum to string
- * Keep in sync with Gloox documentation
- *
- * @param err Error to be converted
- * @return Converted error string
- */
-std::string XmppClient::ConnectionErrorToString(gloox::ConnectionError err)
-{
-#define CASE(X, Y) case gloox::X: return Y
-#define DEBUG_CASE(X, Y) case gloox::X: return g_L10n.Translate("Error") + " (" + Y + ")"
- switch (err)
- {
- CASE(ConnNoError, g_L10n.Translate("No error"));
- CASE(ConnStreamError, g_L10n.Translate("Stream error"));
- CASE(ConnStreamVersionError, g_L10n.Translate("The incoming stream version is unsupported"));
- CASE(ConnStreamClosed, g_L10n.Translate("The stream has been closed by the server"));
- DEBUG_CASE(ConnProxyAuthRequired, "The HTTP/SOCKS5 proxy requires authentication");
- DEBUG_CASE(ConnProxyAuthFailed, "HTTP/SOCKS5 proxy authentication failed");
- DEBUG_CASE(ConnProxyNoSupportedAuth, "The HTTP/SOCKS5 proxy requires an unsupported authentication mechanism");
- CASE(ConnIoError, g_L10n.Translate("An I/O error occurred"));
- DEBUG_CASE(ConnParseError, "An XML parse error occurred");
- CASE(ConnConnectionRefused, g_L10n.Translate("The connection was refused by the server"));
- CASE(ConnDnsError, g_L10n.Translate("Resolving the server's hostname failed"));
- CASE(ConnOutOfMemory, g_L10n.Translate("This system is out of memory"));
- DEBUG_CASE(ConnNoSupportedAuth, "The authentication mechanisms the server offered are not supported or no authentication mechanisms were available");
- CASE(ConnTlsFailed, g_L10n.Translate("The server's certificate could not be verified or the TLS handshake did not complete successfully"));
- CASE(ConnTlsNotAvailable, g_L10n.Translate("The server did not offer required TLS encryption"));
- DEBUG_CASE(ConnCompressionFailed, "Negotiation/initializing compression failed");
- CASE(ConnAuthenticationFailed, g_L10n.Translate("Authentication failed. Incorrect password or account does not exist"));
- CASE(ConnUserDisconnected, g_L10n.Translate("The user or system requested a disconnect"));
- CASE(ConnNotConnected, g_L10n.Translate("There is no active connection"));
- default:
- return g_L10n.Translate("Unknown error");
- }
-#undef DEBUG_CASE
-#undef CASE
-}
-
-/**
- * Convert a gloox registration result enum to string
- * Keep in sync with Gloox documentation
- *
- * @param err Enum to be converted
- * @return Converted string
- */
-std::string XmppClient::RegistrationResultToString(gloox::RegistrationResult res)
-{
-#define CASE(X, Y) case gloox::X: return Y
-#define DEBUG_CASE(X, Y) case gloox::X: return g_L10n.Translate("Error") + " (" + Y + ")"
- switch (res)
- {
- CASE(RegistrationSuccess, g_L10n.Translate("Your account has been successfully registered"));
- CASE(RegistrationNotAcceptable, g_L10n.Translate("Not all necessary information provided"));
- CASE(RegistrationConflict, g_L10n.Translate("Username already exists"));
- DEBUG_CASE(RegistrationNotAuthorized, "Account removal timeout or insufficiently secure channel for password change");
- DEBUG_CASE(RegistrationBadRequest, "Server received an incomplete request");
- DEBUG_CASE(RegistrationForbidden, "Registration forbidden");
- DEBUG_CASE(RegistrationRequired, "Account cannot be removed as it does not exist");
- DEBUG_CASE(RegistrationUnexpectedRequest, "This client is unregistered with the server");
- DEBUG_CASE(RegistrationNotAllowed, "Server does not permit password changes");
- default:
- return "";
- }
-#undef DEBUG_CASE
-#undef CASE
-}
-
void XmppClient::SendStunEndpointToHost(const std::string& ip, u16 port, const std::string& hostJIDStr)
{
DbgXMPP("SendStunEndpointToHost " << hostJIDStr);
diff --git a/source/lobby/XmppClient.h b/source/lobby/XmppClient.h
index ac265901b2..355f8fce7e 100644
--- a/source/lobby/XmppClient.h
+++ b/source/lobby/XmppClient.h
@@ -112,14 +112,8 @@ public:
void SendStunEndpointToHost(const std::string& ip, u16 port, const std::string& hostJID) override;
/**
- * Convert gloox values to string or time.
+ * Convert gloox values to time.
*/
- static const char* GetPresenceString(const gloox::Presence::PresenceType presenceType);
- static const char* GetRoleString(const gloox::MUCRoomRole role);
- static std::string StanzaErrorToString(gloox::StanzaError err);
- static std::string RegistrationResultToString(gloox::RegistrationResult res);
- static std::string ConnectionErrorToString(gloox::ConnectionError err);
- static std::string CertificateErrorToString(gloox::CertStatus status);
static std::time_t ComputeTimestamp(const gloox::Message& msg);
protected:
diff --git a/source/lobby/scripting/GlooxScriptConversions.cpp b/source/lobby/scripting/GlooxScriptConversions.cpp
index cc703b9c69..4fc62e8fd6 100644
--- a/source/lobby/scripting/GlooxScriptConversions.cpp
+++ b/source/lobby/scripting/GlooxScriptConversions.cpp
@@ -21,7 +21,7 @@
#if CONFIG2_LOBBY
#include "lib/external_libraries/gloox.h"
#include "lib/utf8.h"
-#include "lobby/XmppClient.h"
+#include "lobby/GlooxConversion.h"
#include "scriptinterface/ScriptConversions.h"
#include
@@ -32,32 +32,32 @@ class ScriptRequest;
template<> void Script::ToJSVal(const ScriptRequest& rq, JS::MutableHandleValue ret, const gloox::Presence::PresenceType& val)
{
- ToJSVal(rq, ret, XmppClient::GetPresenceString(val));
+ ToJSVal(rq, ret, GetPresenceString(val));
}
template<> void Script::ToJSVal(const ScriptRequest& rq, JS::MutableHandleValue ret, const gloox::MUCRoomRole& val)
{
- ToJSVal(rq, ret, XmppClient::GetRoleString(val));
+ ToJSVal(rq, ret, GetRoleString(val));
}
template<> void Script::ToJSVal(const ScriptRequest& rq, JS::MutableHandleValue ret, const gloox::StanzaError& val)
{
- ToJSVal(rq, ret, wstring_from_utf8(XmppClient::StanzaErrorToString(val)));
+ ToJSVal(rq, ret, wstring_from_utf8(StanzaErrorToString(val)));
}
template<> void Script::ToJSVal(const ScriptRequest& rq, JS::MutableHandleValue ret, const gloox::ConnectionError& val)
{
- ToJSVal(rq, ret, wstring_from_utf8(XmppClient::ConnectionErrorToString(val)));
+ ToJSVal(rq, ret, wstring_from_utf8(ConnectionErrorToString(val)));
}
template<> void Script::ToJSVal(const ScriptRequest& rq, JS::MutableHandleValue ret, const gloox::RegistrationResult& val)
{
- ToJSVal(rq, ret, wstring_from_utf8(XmppClient::RegistrationResultToString(val)));
+ ToJSVal(rq, ret, wstring_from_utf8(RegistrationResultToString(val)));
}
template<> void Script::ToJSVal(const ScriptRequest& rq, JS::MutableHandleValue ret, const gloox::CertStatus& val)
{
- ToJSVal(rq, ret, wstring_from_utf8(XmppClient::CertificateErrorToString(val)));
+ ToJSVal(rq, ret, wstring_from_utf8(CertificateErrorToString(val)));
}
#endif // CONFIG2_LOBBY