2003-03-12 21:03:32 +01:00
|
|
|
%%%----------------------------------------------------------------------
|
|
|
|
%%% File : jlib.hrl
|
|
|
|
%%% Author : Alexey Shchepin <alexey@sevcom.net>
|
|
|
|
%%% Purpose :
|
|
|
|
%%% Created : 5 Mar 2003 by Alexey Shchepin <alexey@sevcom.net>
|
|
|
|
%%%----------------------------------------------------------------------
|
|
|
|
|
2003-07-07 21:45:22 +02:00
|
|
|
-define(NS_DISCO_ITEMS, "http://jabber.org/protocol/disco#items").
|
|
|
|
-define(NS_DISCO_INFO, "http://jabber.org/protocol/disco#info").
|
|
|
|
-define(NS_VCARD, "vcard-temp").
|
|
|
|
-define(NS_AUTH, "jabber:iq:auth").
|
|
|
|
-define(NS_AUTH_ERROR, "jabber:iq:auth:error").
|
|
|
|
-define(NS_REGISTER, "jabber:iq:register").
|
|
|
|
-define(NS_SEARCH, "jabber:iq:search").
|
|
|
|
-define(NS_ROSTER, "jabber:iq:roster").
|
2003-07-21 22:01:22 +02:00
|
|
|
-define(NS_PRIVACY, "jabber:iq:privacy").
|
2003-07-07 21:45:22 +02:00
|
|
|
-define(NS_PRIVATE, "jabber:iq:private").
|
|
|
|
-define(NS_VERSION, "jabber:iq:version").
|
|
|
|
-define(NS_TIME, "jabber:iq:time").
|
2003-10-24 21:21:07 +02:00
|
|
|
-define(NS_LAST, "jabber:iq:last").
|
2003-07-07 21:45:22 +02:00
|
|
|
-define(NS_XDATA, "jabber:x:data").
|
|
|
|
-define(NS_IQDATA, "jabber:iq:data").
|
|
|
|
-define(NS_DELAY, "jabber:x:delay").
|
2004-09-10 22:57:00 +02:00
|
|
|
-define(NS_EXPIRE, "jabber:x:expire").
|
2003-07-07 21:45:22 +02:00
|
|
|
-define(NS_EVENT, "jabber:x:event").
|
|
|
|
-define(NS_XCONFERENCE, "jabber:x:conference").
|
|
|
|
-define(NS_STATS, "http://jabber.org/protocol/stats").
|
|
|
|
-define(NS_MUC, "http://jabber.org/protocol/muc").
|
|
|
|
-define(NS_MUC_USER, "http://jabber.org/protocol/muc#user").
|
|
|
|
-define(NS_MUC_ADMIN, "http://jabber.org/protocol/muc#admin").
|
|
|
|
-define(NS_MUC_OWNER, "http://jabber.org/protocol/muc#owner").
|
|
|
|
-define(NS_PUBSUB, "http://jabber.org/protocol/pubsub").
|
|
|
|
-define(NS_PUBSUB_EVENT, "http://jabber.org/protocol/pubsub#event").
|
|
|
|
-define(NS_PUBSUB_OWNER, "http://jabber.org/protocol/pubsub#owner").
|
2003-07-09 20:58:43 +02:00
|
|
|
-define(NS_PUBSUB_NMI, "http://jabber.org/protocol/pubsub#node-meta-info").
|
2006-01-19 03:17:31 +01:00
|
|
|
-define(NS_COMMANDS, "http://jabber.org/protocol/commands").
|
2006-10-28 04:04:55 +02:00
|
|
|
-define(NS_BYTESTREAMS, "http://jabber.org/protocol/bytestreams").
|
2003-03-12 21:03:32 +01:00
|
|
|
|
2004-02-10 21:50:41 +01:00
|
|
|
-define(NS_EJABBERD_CONFIG, "ejabberd:config").
|
|
|
|
|
2003-07-07 21:45:22 +02:00
|
|
|
-define(NS_STREAM, "http://etherx.jabber.org/streams").
|
2003-03-12 21:03:32 +01:00
|
|
|
|
2003-07-07 21:45:22 +02:00
|
|
|
-define(NS_STANZAS, "urn:ietf:params:xml:ns:xmpp-stanzas").
|
|
|
|
-define(NS_STREAMS, "urn:ietf:params:xml:ns:xmpp-streams").
|
2003-03-12 21:03:32 +01:00
|
|
|
|
2004-08-01 22:12:20 +02:00
|
|
|
-define(NS_TLS, "urn:ietf:params:xml:ns:xmpp-tls").
|
2003-07-07 21:45:22 +02:00
|
|
|
-define(NS_SASL, "urn:ietf:params:xml:ns:xmpp-sasl").
|
|
|
|
-define(NS_SESSION, "urn:ietf:params:xml:ns:xmpp-session").
|
2003-11-07 21:51:23 +01:00
|
|
|
-define(NS_BIND, "urn:ietf:params:xml:ns:xmpp-bind").
|
2003-03-12 21:03:32 +01:00
|
|
|
|
2004-02-26 23:00:04 +01:00
|
|
|
-define(NS_FEATURE_IQAUTH, "http://jabber.org/features/iq-auth").
|
2004-09-25 22:52:20 +02:00
|
|
|
-define(NS_FEATURE_IQREGISTER, "http://jabber.org/features/iq-register").
|
2006-01-19 03:17:31 +01:00
|
|
|
-define(NS_FEATURE_COMPRESS, "http://jabber.org/features/compress").
|
|
|
|
|
|
|
|
-define(NS_COMPRESS, "http://jabber.org/protocol/compress").
|
2004-02-26 23:00:04 +01:00
|
|
|
|
2003-03-12 21:03:32 +01:00
|
|
|
% TODO: remove "code" attribute (currently it used for backward-compatibility)
|
2003-06-29 20:03:07 +02:00
|
|
|
-define(STANZA_ERROR(Code, Type, Condition),
|
2003-03-12 21:03:32 +01:00
|
|
|
{xmlelement, "error",
|
2003-06-29 20:03:07 +02:00
|
|
|
[{"code", Code}, {"type", Type}],
|
|
|
|
[{xmlelement, Condition, [{"xmlns", ?NS_STANZAS}], []}]}).
|
2003-03-12 21:03:32 +01:00
|
|
|
|
|
|
|
-define(ERR_BAD_REQUEST,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("400", "modify", "bad-request")).
|
2003-06-29 20:03:07 +02:00
|
|
|
-define(ERR_CONFLICT,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("409", "cancel", "conflict")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(ERR_FEATURE_NOT_IMPLEMENTED,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("501", "cancel", "feature-not-implemented")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(ERR_FORBIDDEN,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("403", "auth", "forbidden")).
|
|
|
|
-define(ERR_GONE,
|
|
|
|
?STANZA_ERROR("302", "modify", "gone")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(ERR_INTERNAL_SERVER_ERROR,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("500", "wait", "internal-server-error")).
|
2003-06-29 20:03:07 +02:00
|
|
|
-define(ERR_ITEM_NOT_FOUND,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("404", "cancel", "item-not-found")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(ERR_JID_MALFORMED,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("400", "modify", "jid-malformed")).
|
|
|
|
-define(ERR_NOT_ACCEPTABLE,
|
|
|
|
?STANZA_ERROR("406", "modify", "not-acceptable")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(ERR_NOT_ALLOWED,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("405", "cancel", "not-allowed")).
|
|
|
|
-define(ERR_NOT_AUTHORIZED,
|
|
|
|
?STANZA_ERROR("401", "auth", "not-authorized")).
|
|
|
|
-define(ERR_PAYMENT_REQUIRED,
|
|
|
|
?STANZA_ERROR("402", "auth", "payment-required")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(ERR_RECIPIENT_UNAVAILABLE,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("404", "wait", "recipient-unavailable")).
|
|
|
|
-define(ERR_REDIRECT,
|
|
|
|
?STANZA_ERROR("302", "modify", "redirect")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(ERR_REGISTRATION_REQUIRED,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("407", "auth", "registration-required")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(ERR_REMOTE_SERVER_NOT_FOUND,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("404", "cancel", "remote-server-not-found")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(ERR_REMOTE_SERVER_TIMEOUT,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("504", "wait", "remote-server-timeout")).
|
2003-06-29 20:03:07 +02:00
|
|
|
-define(ERR_RESOURCE_CONSTRAINT,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("500", "wait", "resource-constraint")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(ERR_SERVICE_UNAVAILABLE,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("503", "cancel", "service-unavailable")).
|
2003-06-29 20:03:07 +02:00
|
|
|
-define(ERR_SUBSCRIPTION_REQUIRED,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("407", "auth", "subscription-required")).
|
2003-06-29 20:03:07 +02:00
|
|
|
-define(ERR_UNEXPECTED_REQUEST,
|
2004-01-17 21:26:57 +01:00
|
|
|
?STANZA_ERROR("400", "wait", "unexpected-request")).
|
2003-03-12 21:03:32 +01:00
|
|
|
%-define(ERR_,
|
|
|
|
% ?STANZA_ERROR("", "", "")).
|
|
|
|
|
2004-03-02 22:16:55 +01:00
|
|
|
-define(STANZA_ERRORT(Code, Type, Condition, Lang, Text),
|
|
|
|
{xmlelement, "error",
|
|
|
|
[{"code", Code}, {"type", Type}],
|
|
|
|
[{xmlelement, Condition, [{"xmlns", ?NS_STANZAS}], []},
|
|
|
|
{xmlelement, "text", [{"xmlns", ?NS_STANZAS}],
|
|
|
|
[{xmlcdata, translate:translate(Lang, Text)}]}]}).
|
|
|
|
|
|
|
|
-define(ERRT_BAD_REQUEST(Lang, Text),
|
|
|
|
?STANZA_ERRORT("400", "modify", "bad-request", Lang, Text)).
|
|
|
|
-define(ERRT_CONFLICT(Lang, Text),
|
|
|
|
?STANZA_ERRORT("409", "cancel", "conflict", Lang, Text)).
|
|
|
|
-define(ERRT_FEATURE_NOT_IMPLEMENTED(Lang, Text),
|
|
|
|
?STANZA_ERRORT("501", "cancel", "feature-not-implemented", Lang, Text)).
|
|
|
|
-define(ERRT_FORBIDDEN(Lang, Text),
|
|
|
|
?STANZA_ERRORT("403", "auth", "forbidden", Lang, Text)).
|
|
|
|
-define(ERRT_GONE(Lang, Text),
|
|
|
|
?STANZA_ERRORT("302", "modify", "gone", Lang, Text)).
|
|
|
|
-define(ERRT_INTERNAL_SERVER_ERROR(Lang, Text),
|
|
|
|
?STANZA_ERRORT("500", "wait", "internal-server-error", Lang, Text)).
|
|
|
|
-define(ERRT_ITEM_NOT_FOUND(Lang, Text),
|
|
|
|
?STANZA_ERRORT("404", "cancel", "item-not-found", Lang, Text)).
|
|
|
|
-define(ERRT_JID_MALFORMED(Lang, Text),
|
|
|
|
?STANZA_ERRORT("400", "modify", "jid-malformed", Lang, Text)).
|
|
|
|
-define(ERRT_NOT_ACCEPTABLE(Lang, Text),
|
|
|
|
?STANZA_ERRORT("406", "modify", "not-acceptable", Lang, Text)).
|
|
|
|
-define(ERRT_NOT_ALLOWED(Lang, Text),
|
|
|
|
?STANZA_ERRORT("405", "cancel", "not-allowed", Lang, Text)).
|
|
|
|
-define(ERRT_NOT_AUTHORIZED(Lang, Text),
|
|
|
|
?STANZA_ERRORT("401", "auth", "not-authorized", Lang, Text)).
|
|
|
|
-define(ERRT_PAYMENT_REQUIRED(Lang, Text),
|
|
|
|
?STANZA_ERRORT("402", "auth", "payment-required", Lang, Text)).
|
|
|
|
-define(ERRT_RECIPIENT_UNAVAILABLE(Lang, Text),
|
|
|
|
?STANZA_ERRORT("404", "wait", "recipient-unavailable", Lang, Text)).
|
|
|
|
-define(ERRT_REDIRECT(Lang, Text),
|
|
|
|
?STANZA_ERRORT("302", "modify", "redirect", Lang, Text)).
|
|
|
|
-define(ERRT_REGISTRATION_REQUIRED(Lang, Text),
|
|
|
|
?STANZA_ERRORT("407", "auth", "registration-required", Lang, Text)).
|
|
|
|
-define(ERRT_REMOTE_SERVER_NOT_FOUND(Lang, Text),
|
|
|
|
?STANZA_ERRORT("404", "cancel", "remote-server-not-found", Lang, Text)).
|
|
|
|
-define(ERRT_REMOTE_SERVER_TIMEOUT(Lang, Text),
|
|
|
|
?STANZA_ERRORT("504", "wait", "remote-server-timeout", Lang, Text)).
|
|
|
|
-define(ERRT_RESOURCE_CONSTRAINT(Lang, Text),
|
|
|
|
?STANZA_ERRORT("500", "wait", "resource-constraint", Lang, Text)).
|
|
|
|
-define(ERRT_SERVICE_UNAVAILABLE(Lang, Text),
|
|
|
|
?STANZA_ERRORT("503", "cancel", "service-unavailable", Lang, Text)).
|
|
|
|
-define(ERRT_SUBSCRIPTION_REQUIRED(Lang, Text),
|
|
|
|
?STANZA_ERRORT("407", "auth", "subscription-required", Lang, Text)).
|
|
|
|
-define(ERRT_UNEXPECTED_REQUEST(Lang, Text),
|
|
|
|
?STANZA_ERRORT("400", "wait", "unexpected-request", Lang, Text)).
|
|
|
|
|
2004-09-25 22:52:20 +02:00
|
|
|
% Auth stanza errors
|
|
|
|
-define(ERR_AUTH_NO_RESOURCE_PROVIDED(Lang),
|
|
|
|
?ERRT_NOT_ACCEPTABLE(Lang, "No resource provided")).
|
|
|
|
-define(ERR_AUTH_BAD_RESOURCE_FORMAT(Lang),
|
|
|
|
?ERRT_NOT_ACCEPTABLE(Lang, "Illegal resource format")).
|
|
|
|
-define(ERR_AUTH_RESOURCE_CONFLICT(Lang),
|
|
|
|
?ERRT_CONFLICT(Lang, "Resource conflict")).
|
2003-04-08 21:32:01 +02:00
|
|
|
|
2003-03-12 21:03:32 +01:00
|
|
|
|
2003-06-29 20:03:07 +02:00
|
|
|
-define(STREAM_ERROR(Condition),
|
2003-03-12 21:03:32 +01:00
|
|
|
{xmlelement, "stream:error",
|
2003-06-29 20:03:07 +02:00
|
|
|
[],
|
2004-01-17 21:26:57 +01:00
|
|
|
[{xmlelement, Condition, [{"xmlns", ?NS_STREAMS}], []}]}).
|
2003-03-12 21:03:32 +01:00
|
|
|
|
2004-01-17 21:26:57 +01:00
|
|
|
-define(SERR_BAD_FORMAT,
|
|
|
|
?STREAM_ERROR("bad-format")).
|
|
|
|
-define(SERR_BAD_NAMESPACE_PREFIX,
|
|
|
|
?STREAM_ERROR("bad-namespace-prefix")).
|
|
|
|
-define(SERR_CONFLICT,
|
|
|
|
?STREAM_ERROR("conflict")).
|
|
|
|
-define(SERR_CONNECTION_TIMEOUT,
|
|
|
|
?STREAM_ERROR("connection-timeout")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(SERR_HOST_GONE,
|
2003-06-29 20:03:07 +02:00
|
|
|
?STREAM_ERROR("host-gone")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(SERR_HOST_UNKNOWN,
|
2003-06-29 20:03:07 +02:00
|
|
|
?STREAM_ERROR("host-unknown")).
|
|
|
|
-define(SERR_IMPROPER_ADDRESSING,
|
|
|
|
?STREAM_ERROR("improper-addressing")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(SERR_INTERNAL_SERVER_ERROR,
|
2003-06-29 20:03:07 +02:00
|
|
|
?STREAM_ERROR("internal-server-error")).
|
2004-01-17 21:26:57 +01:00
|
|
|
-define(SERR_INVALID_FROM,
|
|
|
|
?STREAM_ERROR("invalid-from")).
|
2003-06-29 20:03:07 +02:00
|
|
|
-define(SERR_INVALID_ID,
|
|
|
|
?STREAM_ERROR("invalid-id")).
|
2003-03-15 22:11:20 +01:00
|
|
|
-define(SERR_INVALID_NAMESPACE,
|
2003-06-29 20:03:07 +02:00
|
|
|
?STREAM_ERROR("invalid-namespace")).
|
2004-01-17 21:26:57 +01:00
|
|
|
-define(SERR_INVALID_XML,
|
|
|
|
?STREAM_ERROR("invalid-xml")).
|
2003-06-29 20:03:07 +02:00
|
|
|
-define(SERR_NOT_AUTHORIZED,
|
|
|
|
?STREAM_ERROR("not-authorized")).
|
2004-01-17 21:26:57 +01:00
|
|
|
-define(SERR_POLICY_VIOLATION,
|
|
|
|
?STREAM_ERROR("policy-violation")).
|
2003-06-29 20:03:07 +02:00
|
|
|
-define(SERR_REMOTE_CONNECTION_FAILED,
|
|
|
|
?STREAM_ERROR("remote-connection-failed")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(SERR_RESOURSE_CONSTRAINT,
|
2003-06-29 20:03:07 +02:00
|
|
|
?STREAM_ERROR("resource-constraint")).
|
2004-01-17 21:26:57 +01:00
|
|
|
-define(SERR_RESTRICTED_XML,
|
|
|
|
?STREAM_ERROR("restricted-xml")).
|
2003-03-12 21:03:32 +01:00
|
|
|
% TODO: include hostname or IP
|
|
|
|
-define(SERR_SEE_OTHER_HOST,
|
2003-06-29 20:03:07 +02:00
|
|
|
?STREAM_ERROR("see-other-host")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(SERR_SYSTEM_SHUTDOWN,
|
2003-06-29 20:03:07 +02:00
|
|
|
?STREAM_ERROR("system-shutdown")).
|
2004-01-17 21:26:57 +01:00
|
|
|
-define(SERR_UNSUPPORTED_ENCODING,
|
|
|
|
?STREAM_ERROR("unsupported-encoding")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(SERR_UNSUPPORTED_STANZA_TYPE,
|
2003-06-29 20:03:07 +02:00
|
|
|
?STREAM_ERROR("unsupported-stanza-type")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(SERR_UNSUPPORTED_VERSION,
|
2003-06-29 20:03:07 +02:00
|
|
|
?STREAM_ERROR("unsupported-version")).
|
2003-03-12 21:03:32 +01:00
|
|
|
-define(SERR_XML_NOT_WELL_FORMED,
|
2003-06-29 20:03:07 +02:00
|
|
|
?STREAM_ERROR("xml-not-well-formed")).
|
2003-03-12 21:03:32 +01:00
|
|
|
%-define(SERR_,
|
2003-06-29 20:03:07 +02:00
|
|
|
% ?STREAM_ERROR("")).
|
2003-03-12 21:03:32 +01:00
|
|
|
|
2004-12-05 21:54:55 +01:00
|
|
|
-define(STREAM_ERRORT(Condition, Lang, Text),
|
|
|
|
{xmlelement, "stream:error",
|
|
|
|
[],
|
|
|
|
[{xmlelement, Condition, [{"xmlns", ?NS_STREAMS}], []},
|
|
|
|
{xmlelement, "text", [{"xml:lang", Lang}, {"xmlns", ?NS_STREAMS}],
|
|
|
|
[{xmlcdata, translate:translate(Lang, Text)}]}]}).
|
|
|
|
|
|
|
|
-define(SERRT_BAD_FORMAT(Lang, Text),
|
|
|
|
?STREAM_ERRORT("bad-format", Lang, Text)).
|
|
|
|
-define(SERRT_BAD_NAMESPACE_PREFIX(Lang, Text),
|
|
|
|
?STREAM_ERRORT("bad-namespace-prefix", Lang, Text)).
|
|
|
|
-define(SERRT_CONFLICT(Lang, Text),
|
|
|
|
?STREAM_ERRORT("conflict", Lang, Text)).
|
|
|
|
-define(SERRT_CONNECTION_TIMEOUT(Lang, Text),
|
|
|
|
?STREAM_ERRORT("connection-timeout", Lang, Text)).
|
|
|
|
-define(SERRT_HOST_GONE(Lang, Text),
|
|
|
|
?STREAM_ERRORT("host-gone", Lang, Text)).
|
|
|
|
-define(SERRT_HOST_UNKNOWN(Lang, Text),
|
|
|
|
?STREAM_ERRORT("host-unknown", Lang, Text)).
|
|
|
|
-define(SERRT_IMPROPER_ADDRESSING(Lang, Text),
|
|
|
|
?STREAM_ERRORT("improper-addressing", Lang, Text)).
|
|
|
|
-define(SERRT_INTERNAL_SERVER_ERROR(Lang, Text),
|
|
|
|
?STREAM_ERRORT("internal-server-error", Lang, Text)).
|
|
|
|
-define(SERRT_INVALID_FROM(Lang, Text),
|
|
|
|
?STREAM_ERRORT("invalid-from", Lang, Text)).
|
|
|
|
-define(SERRT_INVALID_ID(Lang, Text),
|
|
|
|
?STREAM_ERRORT("invalid-id", Lang, Text)).
|
|
|
|
-define(SERRT_INVALID_NAMESPACE(Lang, Text),
|
|
|
|
?STREAM_ERRORT("invalid-namespace", Lang, Text)).
|
|
|
|
-define(SERRT_INVALID_XML(Lang, Text),
|
|
|
|
?STREAM_ERRORT("invalid-xml", Lang, Text)).
|
|
|
|
-define(SERRT_NOT_AUTHORIZED(Lang, Text),
|
|
|
|
?STREAM_ERRORT("not-authorized", Lang, Text)).
|
|
|
|
-define(SERRT_POLICY_VIOLATION(Lang, Text),
|
|
|
|
?STREAM_ERRORT("policy-violation", Lang, Text)).
|
|
|
|
-define(SERRT_REMOTE_CONNECTION_FAILED(Lang, Text),
|
|
|
|
?STREAM_ERRORT("remote-connection-failed", Lang, Text)).
|
|
|
|
-define(SERRT_RESOURSE_CONSTRAINT(Lang, Text),
|
|
|
|
?STREAM_ERRORT("resource-constraint", Lang, Text)).
|
|
|
|
-define(SERRT_RESTRICTED_XML(Lang, Text),
|
|
|
|
?STREAM_ERRORT("restricted-xml", Lang, Text)).
|
|
|
|
% TODO: include hostname or IP
|
|
|
|
-define(SERRT_SEE_OTHER_HOST(Lang, Text),
|
|
|
|
?STREAM_ERRORT("see-other-host", Lang, Text)).
|
|
|
|
-define(SERRT_SYSTEM_SHUTDOWN(Lang, Text),
|
|
|
|
?STREAM_ERRORT("system-shutdown", Lang, Text)).
|
|
|
|
-define(SERRT_UNSUPPORTED_ENCODING(Lang, Text),
|
|
|
|
?STREAM_ERRORT("unsupported-encoding", Lang, Text)).
|
|
|
|
-define(SERRT_UNSUPPORTED_STANZA_TYPE(Lang, Text),
|
|
|
|
?STREAM_ERRORT("unsupported-stanza-type", Lang, Text)).
|
|
|
|
-define(SERRT_UNSUPPORTED_VERSION(Lang, Text),
|
|
|
|
?STREAM_ERRORT("unsupported-version", Lang, Text)).
|
|
|
|
-define(SERRT_XML_NOT_WELL_FORMED(Lang, Text),
|
|
|
|
?STREAM_ERRORT("xml-not-well-formed", Lang, Text)).
|
|
|
|
%-define(SERRT_(Lang, Text),
|
|
|
|
% ?STREAM_ERRORT("", Lang, Text)).
|
|
|
|
|
2003-03-12 21:03:32 +01:00
|
|
|
|
2003-10-07 22:31:44 +02:00
|
|
|
-record(jid, {user, server, resource,
|
|
|
|
luser, lserver, lresource}).
|
2003-03-12 21:03:32 +01:00
|
|
|
|
2003-12-17 21:13:21 +01:00
|
|
|
-record(iq, {id = "",
|
|
|
|
type,
|
|
|
|
xmlns = "",
|
2004-02-26 23:00:04 +01:00
|
|
|
lang = "",
|
2003-12-17 21:13:21 +01:00
|
|
|
sub_el}).
|
|
|
|
|