Applied Mike's nice -d option thing.
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / Connection.pm
index 86a8f84..0e32c8b 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Connection.pm,v 1.4 2006-10-12 16:54:13 mike Exp $
+# $Id: Connection.pm,v 1.7 2006-11-16 17:18:43 mike Exp $
 
 package ZOOM::IRSpy::Connection;
 
@@ -11,6 +11,7 @@ our @ISA = qw(ZOOM::Connection);
 
 use ZOOM::IRSpy::Task::Connect;
 use ZOOM::IRSpy::Task::Search;
+use ZOOM::IRSpy::Task::Retrieve;
 
 
 =head1 NAME
@@ -104,18 +105,29 @@ sub log {
 
 sub irspy_connect {
     my $this = shift();
-    my($udata, %cb) = @_;
+    my($udata, $options, %cb) = @_;
 
-    my $task = new ZOOM::IRSpy::Task::Connect($this, $udata, %cb);
+    my $task = new ZOOM::IRSpy::Task::Connect($this, $udata, $options, %cb);
     $this->add_task($task);
 }
 
 
 sub irspy_search_pqf {
     my $this = shift();
-    my($query, $udata, %cb) = @_;
+    my($query, $udata, $options, %cb) = @_;
 
-    my $task = new ZOOM::IRSpy::Task::Search($query, $this, $udata, %cb);
+    my $task = new ZOOM::IRSpy::Task::Search($query,
+                                            $this, $udata, $options, %cb);
+    $this->add_task($task);
+}
+
+
+sub irspy_rs_record {
+    my $this = shift();
+    my($rs, $index0, $udata, $options, %cb) = @_;
+
+    my $task = new ZOOM::IRSpy::Task::Retrieve($rs, $index0,
+                                              $this, $udata, $options, %cb);
     $this->add_task($task);
 }
 
@@ -131,6 +143,14 @@ sub add_task {
 }
 
 
+sub render {
+    my $this = shift();
+    return ref($this) . "(" . $this->option("host") . ")";
+}
+
+use overload '""' => \&render;
+
+
 =head1 SEE ALSO
 
 ZOOM::IRSpy