Index: client/Makefile
===================================================================
--- client/Makefile	(revision 30beeab008c68e1e024ed39a16b17a5d50ed07a3)
+++ client/Makefile	(revision 30beeab008c68e1e024ed39a16b17a5d50ed07a3)
@@ -0,0 +1,5 @@
+all:
+
+install:
+	mkdir -p $(DESTDIR)/usr/bin/
+	install -m 755 bin/* $(DESTDIR)/usr/bin/
Index: client/bin/gbq
===================================================================
--- client/bin/gbq	(revision 30beeab008c68e1e024ed39a16b17a5d50ed07a3)
+++ client/bin/gbq	(revision 30beeab008c68e1e024ed39a16b17a5d50ed07a3)
@@ -0,0 +1,54 @@
+#!/usr/bin/perl
+
+# Written by Jessica Hamrick (C) 2010
+
+use strict;
+use warnings;
+
+use Net::CUPS;
+use Net::CUPS::Destination;
+
+my $usage = "Usage: gbq QUEUE\n";
+
+my $q = $ARGV[0];
+
+if (!$q) {
+    print $usage;
+    exit 1
+}
+
+my $configpath = "$ENV{'HOME'}/.gutenbach/$q";
+if (! -e $configpath) {
+    print "Queue '$q' does not exist!\n";
+    exit 1;
+}
+
+my ($host, $queue);
+
+if (-r $configpath) {
+    local $/;
+    my $fh;
+    open $fh, $configpath;
+    eval <$fh>;
+}
+
+my $cups = Net::CUPS->new();
+$cups->setServer("$host");
+my $printer = $cups->getDestination("$queue");
+
+print "Queue listing for queue '$queue' on '$host'\n\n";
+print "Job ID\t\tOwner\t\tFile\n";
+print "-----------------------------------------------------------------\n";
+
+my @jobs = $printer->getJobs(0, 0);
+my ($job_ref, $jobid);
+
+foreach $jobid(@jobs) 
+{       
+	$job_ref = $printer->getJob($jobid);
+	my $id = $job_ref->{'id'};
+	my $user = $job_ref->{'user'};
+	my $title = $job_ref->{'title'};
+
+	print "$id\t\t$user\t\t$title\n";
+}
Index: client/bin/gbr
===================================================================
--- client/bin/gbr	(revision 30beeab008c68e1e024ed39a16b17a5d50ed07a3)
+++ client/bin/gbr	(revision 30beeab008c68e1e024ed39a16b17a5d50ed07a3)
@@ -0,0 +1,34 @@
+#!/usr/bin/perl
+
+# Written by Jessica Hamrick (C) 2010
+
+use strict;
+use warnings;
+
+my $usage = "Usage: gbr QUEUE FILE\n";
+
+my $q = $ARGV[0];
+my $file = $ARGV[1];
+
+if (!$q or !$file) {
+    print $usage;
+    exit 1
+}
+
+my $configpath = "$ENV{'HOME'}/.gutenbach/$q";
+if (! -e $configpath) {
+    print "Queue '$q' does not exist!\n";
+    exit 1;
+}
+
+my ($host, $queue);
+
+if (-r $configpath) {
+    local $/;
+    my $fh;
+    open $fh, $configpath;
+    eval <$fh>;
+}
+
+my @args = ("lp", "-h$host", "-d$queue", "$file");
+exec (@args) or die "Couldn't execute lp command";
Index: client/bin/gbrm
===================================================================
--- client/bin/gbrm	(revision 30beeab008c68e1e024ed39a16b17a5d50ed07a3)
+++ client/bin/gbrm	(revision 30beeab008c68e1e024ed39a16b17a5d50ed07a3)
@@ -0,0 +1,41 @@
+#!/usr/bin/perl
+
+# Written by Jessica Hamrick (C) 2010
+
+use strict;
+use warnings;
+
+my $usage = "Usage: gbq QUEUE ID\n";
+
+my $q = $ARGV[0];
+my $id = $ARGV[1];
+
+if (!$q or !$id) {
+    print $usage;
+    exit 1
+}
+
+my $configpath = "$ENV{'HOME'}/.gutenbach/$q";
+if (! -e $configpath) {
+    print "Queue '$q' does not exist!\n";
+    exit 1;
+}
+
+my ($host, $queue);
+
+if (-r $configpath) {
+    local $/;
+    my $fh;
+    open $fh, $configpath;
+    eval <$fh>;
+}
+
+my @args;
+
+if ($id eq "all") {
+    @args = ("cancel", "-a", "-h$host", "$queue");
+}
+else {
+    @args = ("cancel", "-h$host", "$id", "$queue");
+}
+exec (@args) or die "Couldn't execute cancel command";
Index: client/bin/gutenbach-client-config
===================================================================
--- client/bin/gutenbach-client-config	(revision 30beeab008c68e1e024ed39a16b17a5d50ed07a3)
+++ client/bin/gutenbach-client-config	(revision 30beeab008c68e1e024ed39a16b17a5d50ed07a3)
@@ -0,0 +1,84 @@
+#!/usr/bin/perl
+
+# Written by Jessica Hamrick, (C) 2010
+
+use strict;
+use warnings;
+use Getopt::Long;
+
+my $usage = 
+    "Usage: gutenbach-client-config [-l|--list|-a|--add|-d|--delete] [QUEUE] [--host=HOST]\n" .
+    "\n" .
+    "\t-l, --list\t\tList available queues\n" .
+    "\t-a, --add QUEUE\t\tAdd a queue (must be used with -h)\n" .
+    "\t-d, --delete QUEUE\tDelete a queue)\n" .
+    "\t-h, --host HOST\t\tHostname for the queue\n";
+
+my $list = 0;
+my $add = "";
+my $delete = "";
+my $host = "";
+
+GetOptions ('l|list' => \$list,
+            'a|add=s' => \$add,
+            'd|delete=s' => \$delete,
+	    'h|host=s' => \$host);
+
+my $configpath = "$ENV{'HOME'}/.gutenbach";
+
+if (! -e $configpath) {
+    mkdir "$configpath";
+}
+
+# list the existing queues
+if ($list and !$add and !$delete) {
+    my @queues = glob("$configpath/*") or die "Couldn't find configuration files at '$configpath'";
+
+    print "Queue\t\tHost\n";
+    foreach my $q (@queues) {
+	my ($host, $queue);
+
+	if (-r $q) {
+	    local $/;
+	    my $fh;
+	    open $fh, $q;
+	    eval <$fh>;
+	}
+
+	print "$queue\t\t$host\n";
+    }
+}
+
+# add a new queue
+elsif (!$list and $add and !$delete) {
+    if (!$host) {
+	print $usage;
+	exit 1;
+    }
+
+    if (-e "$configpath/$add") {
+	print "Warning: queue '$add' already exists\n";
+    }
+
+    open CONFIG, "> $configpath/$add" or die "Couldn't open config file '$configpath/$add'";
+    print CONFIG "\$host = \"$host\";\n";
+    print CONFIG "\$queue = \"$add\";\n";
+    close CONFIG;
+
+    print "Added queue '$add' on host '$host'\n"
+}
+
+# delete an existing queue
+elsif (!$list and !$add and $delete) {
+    if (! -e "$configpath/$delete") {
+	print "Error: queue '$delete' already exists\n";
+	exit 1;
+    }
+
+    unlink("$configpath/$delete") or die "Couldn't remove config file '$configpath/$delete'";
+}
+
+else {
+    print $usage;
+    exit 1;
+}
