package TDS::Admin::WriteServer::Selector;
# $Id: Selector.pm,v 1.3 2000/10/18 17:22:07 tom Exp $
################################################################

use strict;
use vars qw(@ISA);

use TDS::Admin::WriteServer;

#TDS::Admin::WriteServer->GetWriteMethod();

if (TDS::Admin::WriteServer->GetWriteMethod() eq 'direct'){
    require TDS::Admin::WriteServer::Direct;
    @ISA = qw(TDS::Admin::WriteServer::Direct);
} else {
    require TDS::Admin::WriteServer::FTP;
    @ISA = qw(TDS::Admin::WriteServer::FTP);
}
    
sub new_temp
{
    my $write_method = TDS::Admin::WriteServer::GetWriteMethod();
    
    if ($write_method eq 'direct'){
	require TDS::Admin::WriteServer::Direct;
	return new TDS::Admin::WriteServer::Direct;
    } elsif ($write_method eq 'ftp'){
	require TDS::Admin::WriteServer::FTP;
	return new TDS::Admin::WriteServer::FTP;
    } else {
	die "illegal method: $write_method";
    }
}
1;

