added Ids and changed the name of DXConnect to DXChannel
authordjk <djk>
Tue, 16 Jun 1998 10:57:31 +0000 (10:57 +0000)
committerdjk <djk>
Tue, 16 Jun 1998 10:57:31 +0000 (10:57 +0000)
perl/DXChannel.pm [new file with mode: 0644]
perl/DXConnect.pm [deleted file]
perl/DXUser.pm
perl/DXUtil.pm
perl/DXVars.pm
perl/Msg.pm
perl/client.pl
perl/cluster.pl
perl/persistent.pl

diff --git a/perl/DXChannel.pm b/perl/DXChannel.pm
new file mode 100644 (file)
index 0000000..d4b20a2
--- /dev/null
@@ -0,0 +1,65 @@
+#
+# module to manage channel lists & data
+#
+# Copyright (c) 1998 - Dirk Koopman G1TLH
+#
+# $Id$
+#
+package DXChannel;
+
+require Exporter;
+@ISA = qw(Exporter);
+
+%connects = undef;
+
+# create a new connection object [$obj = Connect->new($call, $msg_conn_obj, $user_obj)]
+sub new
+{
+  my ($pkg, $call, $conn, $user) = @_;
+  my $self = {};
+  
+  die "trying to create a duplicate Connect for call $call\n" if $connects{$call};
+  $self->{call} = $call;
+  $self->{conn} = $conn;
+  $self->{user} = $user;
+  $self->{t} = time;
+  $self->{state} = 0;
+  bless $self, $pkg; 
+  return $connects{$call} = $self;
+}
+
+# obtain a connection object by callsign [$obj = Connect->get($call)]
+sub get
+{
+  my ($pkg, $call) = @_;
+  return $connect{$call};
+}
+
+# obtain all the connection objects
+sub get_all
+{
+  my ($pkg) = @_;
+  return values(%connects);
+}
+
+# obtain a connection object by searching for its connection reference
+sub get_by_cnum
+{
+  my ($pkg, $conn) = @_;
+  my $self;
+  
+  foreach $self (values(%connects)) {
+    return $self if ($self->{conn} == $conn);
+  }
+  return undef;
+}
+
+# get rid of a connection object [$obj->del()]
+sub del
+{
+  my $self = shift;
+  delete $connects{$self->{call}};
+}
+
+1;
+__END__;
diff --git a/perl/DXConnect.pm b/perl/DXConnect.pm
deleted file mode 100644 (file)
index 0d48676..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-# module to manage connection lists & data
-#
-
-package DXConnect;
-
-require Exporter;
-@ISA = qw(Exporter);
-
-%connects = undef;
-
-# create a new connection object [$obj = Connect->new($call, $msg_conn_obj, $user_obj)]
-sub new
-{
-  my ($pkg, $call, $conn, $user) = @_;
-  my $self = {};
-  
-  die "trying to create a duplicate Connect for call $call\n" if $connects{$call};
-  $self->{call} = $call;
-  $self->{conn} = $conn;
-  $self->{user} = $user;
-  $self->{t} = time;
-  $self->{state} = 0;
-  bless $self, $pkg; 
-  return $connects{$call} = $self;
-}
-
-# obtain a connection object by callsign [$obj = Connect->get($call)]
-sub get
-{
-  my ($pkg, $call) = @_;
-  return $connect{$call};
-}
-
-# obtain all the connection objects
-sub get_all
-{
-  my ($pkg) = @_;
-  return values(%connects);
-}
-
-# obtain a connection object by searching for its connection reference
-sub get_by_cnum
-{
-  my ($pkg, $conn) = @_;
-  my $self;
-  
-  foreach $self (values(%connects)) {
-    return $self if ($self->{conn} == $conn);
-  }
-  return undef;
-}
-
-# get rid of a connection object [$obj->del()]
-sub del
-{
-  my $self = shift;
-  delete $connects{$self->{call}};
-}
-
-1;
-__END__;
index 6f7756ffd5c4f7965aeed905588e6edcb4bfe563..ac06615d3719f3e0f73a04d6f71b944ad121fc79 100644 (file)
@@ -1,6 +1,10 @@
 #
 # DX cluster user routines
 #
+# Copyright (c) 1998 - Dirk Koopman G1TLH
+#
+# $Id$
+#
 
 package DXUser;
 
index d7ddcf6263f28d7a2065b5da5cc192e654de0854..638a2bce28535c6a23d4aa951366f1283124e942 100644 (file)
@@ -1,6 +1,10 @@
 #
 # various utilities which are exported globally
 #
+# Copyright (c) 1998 - Dirk Koopman G1TLH
+#
+# $Id$
+#
 
 package DXUtil;
 
index df78142901df1450ee09102494ffa5345dc3ea1b..23367a144fde52452f5c20ff6dd9447ab6b1b178 100644 (file)
@@ -2,6 +2,10 @@
 # The system variables - those indicated will need to be changed to suit your
 # circumstances (and callsign)
 #
+# Copyright (c) 1998 - Dirk Koopman G1TLH
+#
+# $Id$
+#
 
 package main;
 
index 7114eba8b9eea3ad3e9133d921f162694fbb824b..20e000334ca5d72d103d51e63f17694ea643bc88 100644 (file)
@@ -5,6 +5,9 @@
 #
 # I have modified it to suit my devious purposes (Dirk Koopman G1TLH)
 #
+# $Id$
+#
+
 package Msg;
 
 require Exporter;
index c508d942e90cab67e8d43cc02c599b4cd61a3799..0cdbe9c2b3f1e57f26706389a47586de570b976b 100755 (executable)
@@ -9,6 +9,7 @@
 #
 # Copyright (c) 1998 Dirk Koopman G1TLH
 #
+# $Id$
 # 
 
 use Msg;
index c324930fad4b8ac9d9190b2fcd1bac07c6a31342..6fded2416f3decac8ccbf985a6c2ebf5061e6e1b 100755 (executable)
@@ -9,12 +9,13 @@
 #
 # Copyright (c) 1998 Dirk Koopman G1TLH
 #
+# $Id$
 # 
 
 use Msg;
 use DXVars;
 use DXUtil;
-use DXConnect;
+use DXChannel;
 use DXUser;
 
 package main;
@@ -55,7 +56,7 @@ sub disconnect
 sub rec
 {
   my ($conn, $msg, $err) = @_;
-  my $dxconn = DXConnect->get_by_cnum($conn);      # get the dxconnnect object for this message
+  my $dxconn = DXChannel->get_by_cnum($conn);      # get the dxconnnect object for this message
   
   if (defined $err && $err) {
     disconnect($dxconn);
@@ -78,7 +79,7 @@ sub login
 sub cease
 {
   my $dxconn;
-  foreach $dxconn (DXConnect->get_all()) {
+  foreach $dxconn (DXChannel->get_all()) {
     disconnect($dxconn);
   }
 }
index 39e993b5ea0b6c9b42b274aa77e04188ba6184ad..23b302eb77fca5a00232e773dd8352276cf9af30 100644 (file)
@@ -1,3 +1,12 @@
+#
+# This allows perl programs to call functions dynamically
+# 
+# This has been nicked directly from the perlembed pages
+# so has the perl copyright
+#
+# $Id$
+#
+
 package Embed::Persistent;
 #persistent.pl