thrasherbird.pl: Item disco target config was missing.
[thrasher.git] / perl / lib / Thrasher / Constants.pm
blob90465f0fb629f3b2a888e437699b9b88992985ec
1 package Thrasher::Constants;
3 # I don't believe in "use constant"; see criticism in CPAN's
4 # "Readonly" module. And we don't use Readonly since that's just
5 # not worth requiring an additional module for. Just don't write
6 # over these.
8 use strict;
9 use warnings;
11 use base 'Exporter';
13 our @EXPORT_OK = qw($NS_XML $NS_XMLNS
15 %IQ_ERRORS
17 $NS_STREAM $NS_CLIENT $NS_COMPONENT $NS_REGISTER
18 $NS_DISCO $NS_TIME $NS_VERSION $NS_ERROR
19 $NS_GATEWAY $NS_TIME $NS_CAPS
20 $NS_DISCO_ITEMS $NS_DISCO_INFO
21 $NS_PUBSUB $NS_TUNE $NS_PEP_AVATAR
22 $NS_PEP_AVATAR_METADATA
23 $NS_LAST $NS_VCARD $NS_VCARD_UPDATE
24 $NS_ROSTER_EXCHANGE $NS_XHTML_IM
25 $NS_XHTML $NS_NICK $NS_BYTESTREAMS
26 $NS_FILE_TRANSFER $NS_FEATURE_NEG
27 $NS_DATA $NS_STREAM_INITIATION
28 $NS_CHATSTATES
30 $NS_THRASHER_PRESENCE
32 our %EXPORT_TAGS = (all => \@EXPORT_OK);
34 # Hash of 'friendly error name' to
35 # [error code, error type, tag name]
36 our %IQ_ERRORS =
38 bad_request => [400, 'modify', 'bad-request'],
39 conflict => [409, 'cancel', 'conflict'],
40 feature_not_implemented => [501, 'cancel', 'feature-not-implemented'],
41 forbidden => [403, 'auth', 'forbidden'],
42 gone => [302, 'modify', 'gone'],
43 item_not_found => [404, 'cancel', 'item-not-found'],
44 service_unavailable => [503, 'cancel', 'service-unavailable'],
45 not_acceptable => [406, 'modify', 'not-acceptable'],
46 remote_server_timeout => [504, 'wait', 'remote-server-timeout'],
47 registration_required => [407, 'auth', 'registration-required'],
48 not_authorized => [401, 'auth', 'not-authorized'],
49 internal_server_error => [500, 'wait', 'internal-server-error']
52 our $NS_XMLNS = 'http://www.w3.org/2000/xmlns';
53 our $NS_XML = 'http://www.w3.org/XML/1998/namespace';
55 our $NS_STREAM = 'http://etherx.jabber.org/streams';
56 our $NS_CLIENT = 'jabber:client';
57 our $NS_COMPONENT = 'jabber:component:accept';
58 our $NS_DISCO = 'http://jabber.org/protocol/disco';
59 our $NS_DISCO_ITEMS = $NS_DISCO . '#items';
60 our $NS_DISCO_INFO = $NS_DISCO . '#info';
61 our $NS_AGENT = 'jabber:iq:agents';
62 our $NS_REGISTER = 'jabber:iq:register';
63 our $NS_TIME = 'jabber:iq:time';
64 our $NS_VERSION = 'jabber:iq:version';
65 our $NS_ERROR = 'urn:ietf:params:xml:ns:xmpp-stanzas';
66 our $NS_GATEWAY = 'jabber:iq:gateway';
67 our $NS_CAPS = 'http://jabber.org/protocol/caps';
68 our $NS_PUBSUB = 'http://jabber.org/protocol/pubsub';
69 our $NS_TUNE = 'http://jabber.org/protocol/tune';
70 our $NS_PEP_AVATAR = 'urn:xmpp:avatar:data';
71 our $NS_PEP_AVATAR_METADATA = 'urn:xmpp:avatar:metadata';
72 our $NS_LAST = 'jabber:iq:last';
73 our $NS_VCARD = 'vcard-temp';
74 our $NS_VCARD_UPDATE = 'vcard-temp:x:update';
75 our $NS_ROSTER_EXCHANGE = 'http://jabber.org/protocol/rosterx';
76 our $NS_XHTML_IM = 'http://jabber.org/protocol/xhtml-im';
77 our $NS_XHTML = 'http://www.w3.org/1999/xhtml';
78 our $NS_NICK = 'http://jabber.org/protocol/nick';
79 our $NS_BYTESTREAMS = 'http://jabber.org/protocol/bytestreams';
80 our $NS_FILE_TRANSFER = 'http://jabber.org/protocol/si/profile/file-transfer';
81 our $NS_FEATURE_NEG = 'http://jabber.org/protocol/feature-neg';
82 our $NS_DATA = 'jabber:x:data';
83 our $NS_STREAM_INITIATION = 'http://jabber.org/protocol/si';
84 our $NS_CHATSTATES = 'http://jabber.org/protocol/chatstates';
86 our $NS_THRASHER_PRESENCE = 'xmpp:x:thrasher:presence';