Const/Message.pm

filter: Statementstmt 100% 160 / 160 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 52 / 52 Podpod n/a totaltotal 100% 212 / 212 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Message.pm ↑ Summary
1 #===============================================================================
2 #
3 # FILE: Message.pm
4 #
5 # DESCRIPTION: Common messaging constants
6 #
7 # NOTES: ---
8 # AUTHOR: Grigory Milev (Weekend), <week@altlinux.org>
9 # COMPANY: Net.Style
10 # CREATED: 25.07.2008 01:06:46 EEST
11 #===============================================================================
12  
13 =head1 NAME
14  
15 NetSDS::Const::Message - common constants for messaging
16  
17 =head1 SYNOPSIS
18  
19 use NetSDS::Const::Message;
20  
21 =head1 DESCRIPTION
22  
23 C<NetSDS::Const::Message> module contains based constants
24  
25 =cut
26  
27 package NetSDS::Const::Message;
28  
29 2 ▶use 5.8.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
30 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
31 2 ▶use warnings 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
32  
33 2 ▶use Exporter;
Subroutine BEGIN: called CC=1 SCAR=0.0
34 2 our @ISA = qw(
35 Exporter
36 );
37  
38 2 ▶use version; our $VERSION = '0.021';
Subroutine BEGIN: called CC=1 SCAR=0.0
39  
40 2 our @EXPORT = qw(
41 COD_7BIT
42 COD_GSM0338
43 COD_8BIT
44 COD_BINARY
45 COD_UNICODE
46 COD_UCS2
47  
48 ENC_7BIT
49 ENC_8BIT
50 ENC_BINARY
51 ENC_UNICODE
52  
53 DLR_DELIVERED
54 DLR_EXPIRED
55 DLR_DELETED
56 DLR_UNDELIVERABLE
57 DLR_ACCEPTED
58 DLR_UNKNOWN
59 DLR_REJECTED
60  
61 TRANSPORT_ANY
62 TRANSPORT_KANNEL
63 TRANSPORT_CPA2
64 TRANSPORT_UMC
65  
66 DCS_EMS
67 DCS_NOKIA
68 DCS_SIEMENS
69  
70 IEC_SPLIT8
71 IEC_SPLIT16
72 IEC_TEXTFMT
73 IEC_SOUND
74 IEC_MELODY
75 IEC_SMILES
76 IEC_ANIM16
77 IEC_ANIM8
78 IEC_ICON32
79 IEC_ICON16
80 IEC_PICTURE
81 IEC_UPI
82  
83 PORT_LOGO
84 PORT_CLI
85 PORT_RINGTONE
86 PORT_VCARD
87 PORT_VCALENDAR
88 PORT_ITEMS
89 PORT_PUSHWAP
90  
91 SMS_SIZE
92  
93 SEO_VER
94 SEO_FILL
95 SEO_LEN
96 );
97  
98 2 our @EXPORT_OK = qw(
99 );
100  
101 #-- SMS encoding
102 2 ▶use constant COD_7BIT => '0'; # GSM 03.38 default charset
Subroutine BEGIN: called CC=1 SCAR=0.0
103 2 ▶use constant COD_GSM0338 => COD_7BIT();
Subroutine BEGIN: called CC=1 SCAR=0.0
104 2 ▶use constant COD_8BIT => '1'; # Binary encoded message
Subroutine BEGIN: called CC=1 SCAR=0.0
105 2 ▶use constant COD_BINARY => COD_8BIT();
Subroutine BEGIN: called CC=1 SCAR=0.0
106 2 ▶use constant COD_UNICODE => '2'; # UCS-2BE Unicode message
Subroutine BEGIN: called CC=1 SCAR=0.0
107 2 ▶use constant COD_UCS2 => COD_UNICODE();
Subroutine BEGIN: called CC=1 SCAR=0.0
108  
109 #-- Charset encodings
110 2 ▶use constant ENC_7BIT => 'ISO-8859-1';
Subroutine BEGIN: called CC=1 SCAR=0.0
111 2 ▶use constant ENC_8BIT => '8-BIT';
Subroutine BEGIN: called CC=1 SCAR=0.0
112 2 ▶use constant ENC_BINARY => ENC_8BIT();
Subroutine BEGIN: called CC=1 SCAR=0.0
113 2 ▶use constant ENC_UNICODE => 'UTF-16BE';
Subroutine BEGIN: called CC=1 SCAR=0.0
114  
115 #-- Delivery status
116 2 ▶use constant DLR_DELIVERED => 'DELIVRD'; # Message is delivered to destination
Subroutine BEGIN: called CC=1 SCAR=0.0
117 2 ▶use constant DLR_EXPIRED => 'EXPIRED'; # Message validity period has expired.
Subroutine BEGIN: called CC=1 SCAR=0.0
118 2 ▶use constant DLR_DELETED => 'DELETED'; # Message has been deleted.
Subroutine BEGIN: called CC=1 SCAR=0.0
119 2 ▶use constant DLR_UNDELIVERABLE => 'UNDELIV'; # Message is undeliverable
Subroutine BEGIN: called CC=1 SCAR=0.0
120 2 ▶use constant DLR_ACCEPTED => 'ACCEPTD'; # Message is in accepted state (i.e. has been manually read on behalf of the subscriber by customer service)
Subroutine BEGIN: called CC=1 SCAR=0.0
121 2 ▶use constant DLR_UNKNOWN => 'UNKNOWN'; # Message is in invalid state
Subroutine BEGIN: called CC=1 SCAR=0.0
122 2 ▶use constant DLR_REJECTED => 'REJECTD'; # Message is in a rejected state
Subroutine BEGIN: called CC=1 SCAR=0.0
123  
124 #-- Transports
125 2 ▶use constant TRANSPORT_ANY => '';
Subroutine BEGIN: called CC=1 SCAR=0.0
126 2 ▶use constant TRANSPORT_KANNEL => 'kannel';
Subroutine BEGIN: called CC=1 SCAR=0.0
127 2 ▶use constant TRANSPORT_CPA2 => 'cpa2';
Subroutine BEGIN: called CC=1 SCAR=0.0
128 2 ▶use constant TRANSPORT_UMC => 'umc';
Subroutine BEGIN: called CC=1 SCAR=0.0
129  
130 #-- Data Coding Schemes
131 2 ▶use constant DCS_EMS => '64:245';
Subroutine BEGIN: called CC=1 SCAR=0.0
132 2 ▶use constant DCS_NOKIA => '64:245';
Subroutine BEGIN: called CC=1 SCAR=0.0
133 2 ▶use constant DCS_SIEMENS => '0:245';
Subroutine BEGIN: called CC=1 SCAR=0.0
134  
135 #-- EMS Constants
136 2 ▶use constant IEC_SPLIT8 => "\x00"; # Messages chain, 8-bit reference
Subroutine BEGIN: called CC=1 SCAR=0.0
137 2 ▶use constant IEC_SPLIT16 => "\x08"; # Messages chain, 16-bit reference
Subroutine BEGIN: called CC=1 SCAR=0.0
138 2 ▶use constant IEC_TEXTFMT => "\x0A"; # Text formatting
Subroutine BEGIN: called CC=1 SCAR=0.0
139 2 ▶use constant IEC_SOUND => "\x0B"; # Predefined sound
Subroutine BEGIN: called CC=1 SCAR=0.0
140 2 ▶use constant IEC_MELODY => "\x0C"; # User Defined iMelody
Subroutine BEGIN: called CC=1 SCAR=0.0
141 2 ▶use constant IEC_SMILES => "\x0D"; # Predefined animation
Subroutine BEGIN: called CC=1 SCAR=0.0
142 2 ▶use constant IEC_ANIM16 => "\x0E"; # User Defined 16x16x4 animation
Subroutine BEGIN: called CC=1 SCAR=0.0
143 2 ▶use constant IEC_ANIM8 => "\x0F"; # User Defined 8x8x4 animation
Subroutine BEGIN: called CC=1 SCAR=0.0
144 2 ▶use constant IEC_ICON32 => "\x10"; # User Defined 32x32 icon
Subroutine BEGIN: called CC=1 SCAR=0.0
145 2 ▶use constant IEC_ICON16 => "\x11"; # User Defined 16x16 icon
Subroutine BEGIN: called CC=1 SCAR=0.0
146 2 ▶use constant IEC_PICTURE => "\x12"; # User Defined variable size picture
Subroutine BEGIN: called CC=1 SCAR=0.0
147 2 ▶use constant IEC_UPI => "\x13"; # User Prompt Indicator
Subroutine BEGIN: called CC=1 SCAR=0.0
148  
149 #-- Nokia SmartMessaging ports
150 2 ▶use constant PORT_RINGTONE => "\x15\x81"; # Ringtone
Subroutine BEGIN: called CC=1 SCAR=0.0
151 2 ▶use constant PORT_LOGO => "\x15\x82"; # Operator Logo
Subroutine BEGIN: called CC=1 SCAR=0.0
152 2 ▶use constant PORT_CLI => "\x15\x83"; # CLI Icon
Subroutine BEGIN: called CC=1 SCAR=0.0
153 2 ▶use constant PORT_ITEMS => "\x15\x8A"; # Picture Message
Subroutine BEGIN: called CC=1 SCAR=0.0
154 2 ▶use constant PORT_VCARD => "\x23\xF4"; # VCard
Subroutine BEGIN: called CC=1 SCAR=0.0
155 2 ▶use constant PORT_VCALENDAR => "\x23\xF5"; # Operator Logo
Subroutine BEGIN: called CC=1 SCAR=0.0
156 2 ▶use constant PORT_PUSHWAP => "\x0B\x84"; # Wap push
Subroutine BEGIN: called CC=1 SCAR=0.0
157  
158 #-- Siemens OTA constants
159 2 ▶use constant SMS_SIZE => 140; # Maximum SMS size in bytes
Subroutine BEGIN: called CC=1 SCAR=0.0
160 2 ▶use constant SEO_VER => 1; # SEO version 1
Subroutine BEGIN: called CC=1 SCAR=0.0
161 2 ▶use constant SEO_FILL => "\0"; # SEO Chunk padding character
Subroutine BEGIN: called CC=1 SCAR=0.0
162 2 ▶use constant SEO_LEN => 22; # SEO Header length in bytes w/o strings
Subroutine BEGIN: called CC=1 SCAR=0.0
163  
164 #***********************************************************************
165  
166 2 1;
167  
168 __END__
« Message.pm ↑ Summary