| 1 | =pod | ||
| 2 | |||
| 3 | =head1 NAME | ||
| 4 | |||
| 5 | Net::OSCAR::Constants -- internal Net::OSCAR constants | ||
| 6 | |||
| 7 | =head1 VERSION | ||
| 8 | |||
| 9 | version 1.928 | ||
| 10 | |||
| 11 | =cut | ||
| 12 | |||
| 13 | package Net::OSCAR::Constants; | ||
| 14 | 5 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 5 | $Net::OSCAR::Constants::VERSION = '1.928'; | |
| 16 | } | ||
| 17 | |||
| 18 | 5 | $REVISION = '$Revision$'; | |
| 19 | |||
| 20 | 5 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | 5 | ▶ | use vars qw(@ISA @EXPORT); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | 5 | ▶ | use Scalar::Util qw(dualvar); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 23 | 5 | ▶ | use Net::OSCAR::TLV; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 24 | 5 | require Exporter; | |
| 25 | 5 | @ISA = qw(Exporter); | |
| 26 | |||
| 27 | 5 | @EXPORT = qw( | |
| 28 | FLAP_CHAN_NEWCONN FLAP_CHAN_SNAC FLAP_CHAN_ERR FLAP_CHAN_CLOSE | ||
| 29 | CONNTYPE_LOGIN CONNTYPE_BOS CONNTYPE_ADMIN CONNTYPE_CHAT CONNTYPE_CHATNAV CONNTYPE_ICON CONNTYPE_DIRECT_IN CONNTYPE_DIRECT_OUT CONNTYPE_SERVER | ||
| 30 | OSCAR_CAPS OSCAR_CAPS_INVERSE OSCAR_CAPS_SHORT_INVERSE OSCAR_TOOLDATA | ||
| 31 | GROUP_PERMIT GROUP_DENY BUDTYPES ERRORS | ||
| 32 | |||
| 33 | ICQ_META_INFO ICQ_META_INFO_INVERSE | ||
| 34 | ); | ||
| 35 | |||
| 36 | |||
| 37 | 5 | ▶ | use constant FLAP_CHAN_NEWCONN => dualvar(0x01, "new connection"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 38 | 5 | ▶ | use constant FLAP_CHAN_SNAC => dualvar(0x02, "SNAC"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 39 | 5 | ▶ | use constant FLAP_CHAN_ERR => dualvar(0x03, "error"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 40 | 5 | ▶ | use constant FLAP_CHAN_CLOSE => dualvar(0x04, "close connection"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 41 | |||
| 42 | 5 | ▶ | use constant CONNTYPE_LOGIN => dualvar(0, "login service"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 43 | 5 | ▶ | use constant CONNTYPE_BOS => dualvar(0x2, "basic OSCAR services"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 44 | 5 | ▶ | use constant CONNTYPE_ADMIN => dualvar(0x7, "administrative service"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 45 | 5 | ▶ | use constant CONNTYPE_CHAT => dualvar(0xE, "chat connection"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 46 | 5 | ▶ | use constant CONNTYPE_CHATNAV => dualvar(0xD, "chat navigator"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 47 | 5 | ▶ | use constant CONNTYPE_ICON => dualvar(0x10, "icon service"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 48 | 5 | ▶ | use constant CONNTYPE_DIRECT_IN => dualvar(0xfe, "direct connect listener"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 49 | 5 | ▶ | use constant CONNTYPE_DIRECT_OUT => dualvar(0xff, "direct connect connection"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 50 | 5 | ▶ | use constant CONNTYPE_SERVER => dualvar(0xfd, "OSCAR server"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 51 | |||
| 52 | 5 | ▶ | use constant GROUP_PERMIT => 0x0002; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 53 | 5 | ▶ | use constant GROUP_DENY => 0x0003; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 54 | |||
| 55 | 5 | ▶ | use constant OSCAR_CAPS => { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 56 | 80 | chat => {description => "chatrooms", value => pack("C*", map{hex($_)} split(/[ \t\n]+/, | |
| 57 | "0x74 0x8F 0x24 0x20 0x62 0x87 0x11 0xD1 0x82 0x22 0x44 0x45 0x53 0x54 0x00 0x00"))}, | ||
| 58 | 80 | interoperate => {description => "ICQ/AIM interoperation", value => pack("C*", map{hex($_)} split(/[ \t\n]+/, | |
| 59 | "0x09 0x46 0x13 0x4d 0x4c 0x7f 0x11 0xd1 0x82 0x22 0x44 0x45 0x53 0x54 0x00 0x00"))}, | ||
| 60 | 80 | extstatus => {description => "iChat extended status messages", value => pack("C*", map{hex($_)} split(/[ \t\n]+/, | |
| 61 | "0x09 0x46 0x00 0x00 0x4c 0x7f 0x11 0xd1 0x82 0x22 0x44 0x45 0x53 0x54 0x00 0x00"))}, | ||
| 62 | 80 | buddyicon => {description => "buddy icons", value => pack("C*", map{hex($_)} split(/[ \t\n]+/, | |
| 63 | "0x09 0x46 0x13 0x46 0x4c 0x7f 0x11 0xd1 0x82 0x22 0x44 0x45 0x53 0x54 0x00 0x00"))}, | ||
| 64 | 80 | fileshare => {description => "file sharing", value => pack("C*", map{hex($_)} split(/[ \t\n]+/, | |
| 65 | "0x09 0x46 0x13 0x48 0x4c 0x7f 0x11 0xd1 0x82 0x22 0x44 0x45 0x53 0x54 0x00 0x00"))}, | ||
| 66 | 80 | filexfer => {description => "file transfers", value => pack("C*", map{hex($_)} split(/[ \t\n]+/, | |
| 67 | "0x09 0x46 0x13 0x43 0x4c 0x7f 0x11 0xd1 0x82 0x22 0x44 0x45 0x53 0x54 0x00 0x00"))}, | ||
| 68 | 80 | secureim => {description => "encrypted IM", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 69 | "0x09, 0x46, 0x00, 0x01, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00"))}, | ||
| 70 | 80 | hiptop => {description => "hiptop", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 71 | "0x09, 0x46, 0x13, 0x23, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00"))}, | ||
| 72 | 80 | voice => {description => "voice chat", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 73 | "0x09, 0x46, 0x13, 0x41, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00"))}, | ||
| 74 | 80 | icq => {description => "EveryBuddy ICQ support", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 75 | "0x09, 0x46, 0x13, 0x44, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00"))}, | ||
| 76 | 80 | directim => {description => "direct IM", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 77 | "0x09, 0x46, 0x13, 0x45, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00"))}, | ||
| 78 | 80 | addins => {description => "add-ins", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 79 | "0x09, 0x46, 0x13, 0x47, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00"))}, | ||
| 80 | 80 | icqrelay => {description => "ICQ server relay", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 81 | "0x09, 0x46, 0x13, 0x49, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00"))}, | ||
| 82 | 80 | games => {description => "games", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 83 | "0x09, 0x46, 0x13, 0x4a, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00"))}, | ||
| 84 | 80 | games2 => {description => "games 2", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 85 | "0x09, 0x46, 0x13, 0x4a, 0x4c, 0x7f, 0x11, 0xd1, 0x22, 0x82, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00"))}, | ||
| 86 | 80 | sendlist => {description => "buddy list sending", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 87 | "0x09, 0x46, 0x13, 0x4b, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00"))}, | ||
| 88 | 80 | icqutf8 => {description => "ICQ UTF-8", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 89 | "0x09, 0x46, 0x13, 0x4e, 0x4c, 0x7f, 0x11, 0xd1, 0x82, 0x22, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00"))}, | ||
| 90 | 80 | icqutf8old => {description => "old ICQ UTF-8", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 91 | "0x2e, 0x7a, 0x64, 0x75, 0xfa, 0xdf, 0x4d, 0xc8, 0x88, 0x6f, 0xea, 0x35, 0x95, 0xfd, 0xb6, 0xdf"))}, | ||
| 92 | 80 | icqrtf => {description => "ICQ RTF", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 93 | "0x97, 0xb1, 0x27, 0x51, 0x24, 0x3c, 0x43, 0x34, 0xad, 0x22, 0xd6, 0xab, 0xf7, 0x3f, 0x14, 0x92"))}, | ||
| 94 | 80 | apinfo => {description => "AP info", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 95 | "0xaa, 0x4a, 0x32, 0xb5, 0xf8, 0x84, 0x48, 0xc6, 0xa3, 0xd7, 0x8c, 0x50, 0x97, 0x19, 0xfd, 0x5b"))}, | ||
| 96 | 80 | trilliancrypt => {description => "Trillian encryption", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 97 | "0xf2, 0xe7, 0xc7, 0xf4, 0xfe, 0xad, 0x4d, 0xfb, 0xb2, 0x35, 0x36, 0x79, 0x8b, 0xdf, 0x00, 0x00"))}, | ||
| 98 | 80 | secureim => {description => "SecureIM encryption", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 99 | "0x09 0x46 0x01 0xff 0x4c 0x7f 0x11 0xd1 0x82 0x22 0x44 0x45 0x53 0x54 0x00 0x00"))}, | ||
| 100 | 5 | video => {description => "A/V chat", value => pack("C*", map{hex($_)} split(/[ \t\n,]+/, | |
| 101 | "0x09 0x46 0x01 0x05 0x4c 0x7f 0x11 0xd1 0x82 0x22 0x44 0x45 0x53 0x54 0x00 0x00"))}, | ||
| 102 | 5 | }; | |
| 103 | 5 | ▶ | use constant OSCAR_CAPS_INVERSE => { map { OSCAR_CAPS()->{$_}->{value} => $_ } keys %{OSCAR_CAPS()} }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 104 | 5 | ▶ | use constant OSCAR_CAPS_SHORT_INVERSE => { map { substr(OSCAR_CAPS()->{$_}->{value}, 2, 2) => $_ } keys %{OSCAR_CAPS()} }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 105 | |||
| 106 | 5 | ▶ | use constant OSCAR_TOOLDATA => tlv( |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 107 | 0x0001 => {version => 0x0004, toolid => 0x0110, toolversion => 0x08E5}, | ||
| 108 | 0x0013 => {version => 0x0003, toolid => 0x0110, toolversion => 0x08E5}, | ||
| 109 | 0x0002 => {version => 0x0001, toolid => 0x0110, toolversion => 0x08E5}, | ||
| 110 | 0x0003 => {version => 0x0001, toolid => 0x0110, toolversion => 0x08E5}, | ||
| 111 | 0x0004 => {version => 0x0001, toolid => 0x0110, toolversion => 0x08E5}, | ||
| 112 | 0x0005 => {version => 0x0001, toolid => 0x0001, toolversion => 0x0001, nobos => 1}, | ||
| 113 | 0x0006 => {version => 0x0001, toolid => 0x0110, toolversion => 0x08E5}, | ||
| 114 | 0x0007 => {version => 0x0001, toolid => 0x0010, toolversion => 0x08E5, nobos => 1}, | ||
| 115 | 0x0008 => {version => 0x0001, toolid => 0x0104, toolversion => 0x0001}, | ||
| 116 | 0x0009 => {version => 0x0001, toolid => 0x0110, toolversion => 0x08E5}, | ||
| 117 | 0x000A => {version => 0x0001, toolid => 0x0110, toolversion => 0x08E5}, | ||
| 118 | 0x000B => {version => 0x0001, toolid => 0x0110, toolversion => 0x08E5}, | ||
| 119 | 0x000C => {version => 0x0001, toolid => 0x0104, toolversion => 0x0001, nobos => 1}, | ||
| 120 | 0x000D => {version => 0x0001, toolid => 0x0010, toolversion => 0x08E5, nobos => 1}, | ||
| 121 | 0x000E => {version => 0x0001, toolid => 0x0010, toolversion => 0x08E5, nobos => 1}, | ||
| 122 | 0x000F => {version => 0x0001, toolid => 0x0010, toolversion => 0x08E5, nobos => 1}, | ||
| 123 | 0x0010 => {version => 0x0001, toolid => 0x0010, toolversion => 0x08E5, nobos => 1}, | ||
| 124 | 0x0015 => {version => 0x0001, toolid => 0x0110, toolversion => 0x047C, nobos => 1}, | ||
| 125 | 0x0017 => {version => 0x0000, toolid => 0x0000, toolversion => 0x0000, nobos => 1}, | ||
| 126 | 0x0018 => {version => 0x0001, toolid => 0x0010, toolversion => 0x08E5, nobos => 1}, | ||
| 127 | 0xFFFF => {version => 0x0000, toolid => 0x0000, toolversion => 0x0000, nobos => 1}, | ||
| 128 | 5 | ); | |
| 129 | |||
| 130 | 5 | ▶ | use constant BUDTYPES => ("buddy", "group", "permit entry", "deny entry", "visibility/misc. data", "presence", undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, "buddy icon data"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 131 | |||
| 132 | 5 | ▶ | use constant ERRORS => split(/\n/, <<EOF); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 133 | Invalid error | ||
| 134 | Invalid SNAC | ||
| 135 | Sending too fast to host | ||
| 136 | Sending too fast to client | ||
| 137 | %s is not logged in, so the attempted operation (sending an IM, getting user information) was unsuccessful | ||
| 138 | Service unavailable | ||
| 139 | Service not defined | ||
| 140 | Obsolete SNAC | ||
| 141 | Not supported by host | ||
| 142 | Not supported by client | ||
| 143 | Refused by client | ||
| 144 | Reply too big | ||
| 145 | Responses lost | ||
| 146 | Request denied | ||
| 147 | Busted SNAC payload | ||
| 148 | Insufficient rights | ||
| 149 | %s is in your permit or deny list | ||
| 150 | Too evil (sender) | ||
| 151 | Too evil (receiver) | ||
| 152 | User temporarily unavailable | ||
| 153 | No match | ||
| 154 | List overflow | ||
| 155 | Request ambiguous | ||
| 156 | Queue full | ||
| 157 | Not while on AOL | ||
| 158 | Unknown error 25 | ||
| 159 | Unknown error 26 | ||
| 160 | Unknown error 27 | ||
| 161 | Unknown error 28 | ||
| 162 | There have been too many recent signons from this address. Please wait a few minutes and try again. | ||
| 163 | EOF | ||
| 164 | |||
| 165 | |||
| 166 | 5 | ▶ | use constant ICQ_META_INFO => { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 167 | basic => 200, | ||
| 168 | office => 210, | ||
| 169 | background => 220, | ||
| 170 | notes => 230, | ||
| 171 | email => 235, | ||
| 172 | interests => 240, | ||
| 173 | affiliations => 250, | ||
| 174 | homepage => 270 | ||
| 175 | 5 | }; | |
| 176 | 5 | ▶ | use constant ICQ_META_INFO_INVERSE => { map { ICQ_META_INFO()->{$_} => $_ } keys %{ICQ_META_INFO()} }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 177 | |||
| 178 | 5 | 1; | |