alcatel_mseq_melody_file() implemented
authorshort <>
Fri, 4 Jan 2002 12:05:11 +0000 (12:05 +0000)
committershort <>
Fri, 4 Jan 2002 12:05:11 +0000 (12:05 +0000)
 - it is just MSEQ _encapsulation_, the input file has to start with ".SEQ"!

GSM/SMS/NBS/Alcatel.pm

index a7c90bf..f09021a 100644 (file)
@@ -13,8 +13,9 @@ use Carp;
 use vars qw($VERSION);
 $VERSION = '0.1';
 
-use constant IEI_ALCATEL_PICTURE   => 0b100;
-use constant IEI_ALCATEL_ANIMATION => 0b101;
+use constant IEI_ALCATEL_PICTURE     => 0b100;
+use constant IEI_ALCATEL_ANIMATION   => 0b101;
+use constant IEI_ALCATEL_MSEQ_MELODY => 0b010;
 
 
 # returns ($msg, $udh=[...])
@@ -75,4 +76,17 @@ sub alcatel_animation {
                        }]);
 }
 
+# returns ($msg, $udh=[...])
+sub alcatel_mseq_melody_file {
+       my ($class, $file_data) = @_;
+
+       return ($file_data, [
+                       {
+                               "type"=>"alcatel",
+                               "ems_compat"=>!!(0x20 & ord(substr($file_data,4,1))),
+                               "alcatel_type"=>IEI_ALCATEL_MSEQ_MELODY,
+                               "length"=>length($file_data),
+                       }]);
+}
+
 1;