2 # module to manage channel lists & data
4 # Copyright (c) 1998 - Dirk Koopman G1TLH
15 # create a new connection object [$obj = Connect->new($call, $msg_conn_obj, $user_obj)]
18 my ($pkg, $call, $conn, $user) = @_;
21 die "trying to create a duplicate Connect for call $call\n" if $connects{$call};
22 $self->{call} = $call;
23 $self->{conn} = $conn;
24 $self->{user} = $user;
28 return $connects{$call} = $self;
31 # obtain a connection object by callsign [$obj = Connect->get($call)]
34 my ($pkg, $call) = @_;
35 return $connect{$call};
38 # obtain all the connection objects
42 return values(%connects);
45 # obtain a connection object by searching for its connection reference
48 my ($pkg, $conn) = @_;
51 foreach $self (values(%connects)) {
52 return $self if ($self->{conn} == $conn);
57 # get rid of a connection object [$obj->del()]
61 delete $connects{$self->{call}};