Use API for active connectors
[videosite.git] / videosite / Base.pm
index 11c7fa6..3c3dd70 100644 (file)
@@ -11,9 +11,6 @@ use Data::Dumper;
 sub new {
     my $class = shift;
     my $self = {'_DEBUG' => 0,
-                '_OUT' => sub {printf(@_)},
-                '_CONNECTORS' => sub { return ({ 'name' => 'direct',
-                                                 'schemas' => {} }) },
                 '_CONNECTOR' => undef,
                 API => {
                     io => sub { printf(@_) },
@@ -38,7 +35,7 @@ sub error {
 
     $data[0] = "(" . ref($self) . ") " . $data[0];
 
-    $self->{'_OUT'}(@data);
+    $self->{_API}->{io}->(@data);
 }
 
 sub debug {
@@ -99,13 +96,6 @@ sub setval {
     }
 }
 
-sub setio {
-    my $self = shift;
-    my $io = shift;
-
-    $self->{'_OUT'} = $io;
-}
-
 sub getconfstr {
     my $self = shift;
     my $s = 'Options for ' . $self->{'NAME'} . ":\n";
@@ -269,7 +259,7 @@ sub decode_querystring {
 sub connectors {
     my $self = shift;
     
-    return $self->{'_CONNECTORS'}->();
+    return $self->{_API}->{connectors}->();
 }
 
 sub selectconn {