Index: /trunk/PS-IPP-PSFTP/lib/PS/IPP/PSFTP/Parser.pod
===================================================================
--- /trunk/PS-IPP-PSFTP/lib/PS/IPP/PSFTP/Parser.pod	(revision 5277)
+++ /trunk/PS-IPP-PSFTP/lib/PS/IPP/PSFTP/Parser.pod	(revision 5277)
@@ -0,0 +1,15 @@
+=pod
+
+=head1 name
+
+=head1 description
+
+=over 4
+
+=item * new
+
+=item * parse
+
+=back
+
+=cut
Index: /trunk/PS-IPP-PSFTP/lib/PS/IPP/PSFTP/Server.pm
===================================================================
--- /trunk/PS-IPP-PSFTP/lib/PS/IPP/PSFTP/Server.pm	(revision 5277)
+++ /trunk/PS-IPP-PSFTP/lib/PS/IPP/PSFTP/Server.pm	(revision 5277)
@@ -0,0 +1,64 @@
+# Copyright (C) 2005  Joshua Hoblitt
+#
+# $Id: Server.pm,v 1.1 2005-10-12 01:55:07 jhoblitt Exp $
+
+package PS::IPP::PSFTP::Server;
+
+use strict;
+use warnings FATAL => qw( all );
+
+use vars qw( $VERSION );
+$VERSION = '0.01';
+
+use CGI;
+
+sub run
+{
+    my ($class, $cgi) = @_;
+
+    $cgi ||= CGI->new;
+
+    my $mode = $cgi->url(-path_info=> 1, -relative=> 1);
+
+    if ($mode =~ /files_available/) {
+        $class->files_avaiable($cgi);
+    } elsif ($mode =~ /file_received/) {
+        $class->file_received($cgi);
+    } else {
+        $class->error($cgi);
+    }
+}
+
+sub files_avaiable
+{
+    my ($class, $cgi) = @_;
+
+    my $recipient = $cgi->param('recipient');
+
+    $class->error($cgi) unless $recip;
+
+    print $cgi->header('text/plain'), $class->list_files($recipient);
+}
+
+sub error
+{
+    my ($class, $cgi) = @_;
+
+    print $cgi->header(-status=> 403)
+}
+
+
+sub list_files
+{
+    my ($class, $recipient) = @_;
+
+    return <<END;
+2005-08-15|12:00:01|telescope_2005-08-15T12:00:01|metadata||8640|c462d570deb517d9bd92e5bb6a21cc86|http://flaxen.ifa.hawaii.edu/otis/data/metadata/telescope_2005-08-15T12:00:01
+2005-08-15|12:10:01|telescope_2005-08-15T12:10:01|metadata||8640|c462d570deb517d9bd92e5bb6a21cc86|http://flaxen.ifa.hawaii.edu/otis/data/metadata/telescope_2005-08-15T12:10:01
+2005-08-15|12:20:01|telescope_2005-08-15T12:20:01|metadata||8640|c462d570deb517d9bd92e5bb6a21cc86|http://flaxen.ifa.hawaii.edu/otis/data/metadata/telescope_2005-08-15T12:20:01
+END
+}
+
+1;
+
+__END__
