:pserver:anonymous@intra.tektonica.com:/opt/cvs - gsmperl - Fri Dec 21 07:37 CET...
[gsmperl.git] / GSM / SMS / Transport / Transport.pm
1 package GSM::SMS::Transport::Transport;
2
3 $VERSION = '0.1';
4
5 # Abstract class defines the methods a transport interface must implement
6 ##########################################################################
7
8 # constructor
9 sub new($$) {
10
11     my $proto = shift;
12     my $class = ref($proto) || $proto;
13
14         my $self = {};
15         $self->{cfg} = shift;
16
17         bless($self, $class);
18         return $self;
19 }
20
21 # abstract method definitions
22 #
23
24 # Send a (PDU encoded) message  
25 sub send($$)    {};
26
27 # Receive a PDU encoded message
28 #       $ is a ref to a PDU string
29 #       return
30 #       0 if PDU received
31 #       -1 if no message pending  
32 sub receive($) {};      
33
34 # Close
35 sub close() {};
36
37 # A ping command .. just return an informative string on success
38 sub ping() {};
39
40 # get_config_parameters ... return the config parameters I expect here.
41 sub get_config_parameters() {};
42
43 # can we send to the following number?
44 sub has_valid_route($) {};
45
46 1;
47
48 =head1 NAME
49
50 GSM::SMS::Transport::Transport
51
52 Abstract class for the transport modules. Transport modules inherit from this class.
53
54 =head1 AUTHOR
55
56 Johan Van den Brande <johan@vandenbrande.com>