r8251 - in /trunk/libnet-cups-perl: CUPS.xs Changes MANIFEST README debian/changelog debian/control debian/examples debian/rules examples/ lib/Net/CUPS.pm lib/Net/CUPS/Destination.pm lib/Net/CUPS/IPP.pm lib/Net/CUPS/PPD.pm
tincho-guest at users.alioth.debian.org
tincho-guest at users.alioth.debian.org
Sat Oct 13 21:52:17 UTC 2007
Author: tincho-guest
Date: Sat Oct 13 21:52:16 2007
New Revision: 8251
URL: http://svn.debian.org/wsvn/?sc=1&rev=8251
Log:
* New upstream release.
* Added myself to uploaders.
* Added new examples from upstream.
Added:
trunk/libnet-cups-perl/debian/examples
trunk/libnet-cups-perl/examples/
- copied from r8250, branches/upstream/libnet-cups-perl/current/examples/
Modified:
trunk/libnet-cups-perl/CUPS.xs
trunk/libnet-cups-perl/Changes
trunk/libnet-cups-perl/MANIFEST
trunk/libnet-cups-perl/README
trunk/libnet-cups-perl/debian/changelog
trunk/libnet-cups-perl/debian/control
trunk/libnet-cups-perl/debian/rules
trunk/libnet-cups-perl/lib/Net/CUPS.pm
trunk/libnet-cups-perl/lib/Net/CUPS/Destination.pm
trunk/libnet-cups-perl/lib/Net/CUPS/IPP.pm
trunk/libnet-cups-perl/lib/Net/CUPS/PPD.pm
Modified: trunk/libnet-cups-perl/CUPS.xs
URL: http://svn.debian.org/wsvn/trunk/libnet-cups-perl/CUPS.xs?rev=8251&op=diff
==============================================================================
--- trunk/libnet-cups-perl/CUPS.xs (original)
+++ trunk/libnet-cups-perl/CUPS.xs Sat Oct 13 21:52:16 2007
@@ -105,13 +105,19 @@
void
NETCUPS_getDestination( name )
- const char* name;
+ char* name;
PPCODE:
cups_dest_t * destinations = NULL;
cups_dest_t * destination = NULL;
int count = 0;
SV* rv = NULL;
count = cupsGetDests( &destinations );
+ /* If we have a NULL for destination name, then we are going
+ to assume we want the default. */
+ if( !strlen( name ) )
+ {
+ name = cupsGetDefault();
+ }
destination = cupsGetDest( name, NULL, count, destinations );
rv = sv_newmortal();
sv_setref_pv( rv, "Net::CUPS::Destination", destination );
@@ -253,7 +259,7 @@
}
XSRETURN( count );
-HV*
+SV*
NETCUPS_getJob( dest, jobid )
const char* dest;
int jobid;
@@ -262,7 +268,8 @@
int count = 0;
HV* hv = NULL;
cups_job_t* jobs = NULL;
- RETVAL = NULL;
+ char *tstate = NULL;
+ RETVAL = &PL_sv_undef;
count = cupsGetJobs( &jobs, dest, 0, -1 );
for( loop = 0; loop < count; loop++ )
{
@@ -302,10 +309,13 @@
strlen( "processing_time" ),
newSVnv( jobs[loop].processing_time ), 0 );
-
hv_store( hv, "size",
strlen( "size" ),
newSViv( jobs[loop].size ), 0 );
+
+ hv_store( hv, "state",
+ strlen( "state" ),
+ newSViv( jobs[loop].state ), 0 );
hv_store( hv, "title",
strlen( "title" ),
@@ -317,7 +327,58 @@
newSVpv( jobs[loop].user,
strlen( jobs[loop].user ) ), 0 );
- RETVAL = hv;
+ switch( jobs[loop].state )
+ {
+ case IPP_JOB_PENDING:
+ {
+ tstate = "pending";
+ break;
+ }
+ case IPP_JOB_HELD:
+ {
+ tstate = "held";
+ break;
+ }
+ case IPP_JOB_PROCESSING:
+ {
+ tstate = "processing";
+ break;
+ }
+ case IPP_JOB_STOPPED:
+ {
+ tstate = "stopped";
+ break;
+ }
+ /* CANCELLED is not a TYPO! (Well, it is, but it
+ is not my fault! */
+ case IPP_JOB_CANCELLED:
+ {
+ tstate = "canceled";
+ break;
+ }
+ case IPP_JOB_ABORTED:
+ {
+ tstate = "aborted";
+ break;
+ }
+ case IPP_JOB_COMPLETED:
+ {
+ tstate = "completed";
+ break;
+ }
+ default:
+ {
+ tstate = "unknown";
+ break;
+ }
+ }
+
+ hv_store( hv, "state_text",
+ strlen( "state_text" ),
+ newSVpv( tstate,
+ strlen( tstate ) ), 0 );
+
+ RETVAL = newRV((SV*)hv);
}
}
OUTPUT:
Modified: trunk/libnet-cups-perl/Changes
URL: http://svn.debian.org/wsvn/trunk/libnet-cups-perl/Changes?rev=8251&op=diff
==============================================================================
--- trunk/libnet-cups-perl/Changes (original)
+++ trunk/libnet-cups-perl/Changes Sat Oct 13 21:52:16 2007
@@ -1,4 +1,13 @@
Revision history for Perl extension Net::CUPS.
+
+0.55 Tue Oct 09 20:46:58 2007
+ - Fixed a segfault in getJobs [Sven-Haegar Koch]
+ - The job hash from getJobs now returns the state!
+ - Added a human readable state to the job hash [Sven-Haegar Koch]
+ - Added basic examples of Net::CUPS operations.
+ - The method getDestination() will attempt to get the default
+ destination on the server if a destination is not provided.
+
0.51 Wed Mar 14 10:35:16 2007
- Attempt to rework the DESTROY method for Net::CUPS::Destination for
a bug reported by Graham Jenkins <graham at vpac.org>
Modified: trunk/libnet-cups-perl/MANIFEST
URL: http://svn.debian.org/wsvn/trunk/libnet-cups-perl/MANIFEST?rev=8251&op=diff
==============================================================================
--- trunk/libnet-cups-perl/MANIFEST (original)
+++ trunk/libnet-cups-perl/MANIFEST Sat Oct 13 21:52:16 2007
@@ -1,17 +1,19 @@
-t/02_cups.t
-t/01_use.t
+Changes
+CUPS.xs
+examples/list_dests.pl
+examples/print_file.pl
+fallback/const-c.inc
+fallback/const-xs.inc
+lib/Net/CUPS/Destination.pm
+lib/Net/CUPS/IPP.pm
lib/Net/CUPS.pm
lib/Net/CUPS/PPD.pm
-lib/Net/CUPS/Destination.pm
-lib/Net/CUPS/IPP.pm
+Makefile.PL
+MANIFEST
+packer.c
+ppport.h
+README
+t/01_use.t
+t/02_cups.t
+TODO
typemap
-TODO
-CUPS.xs
-README
-fallback/const-xs.inc
-fallback/const-c.inc
-ppport.h
-Changes
-Makefile.PL
-packer.c
-MANIFEST
Modified: trunk/libnet-cups-perl/README
URL: http://svn.debian.org/wsvn/trunk/libnet-cups-perl/README?rev=8251&op=diff
==============================================================================
--- trunk/libnet-cups-perl/README (original)
+++ trunk/libnet-cups-perl/README Sat Oct 13 21:52:16 2007
@@ -36,6 +36,11 @@
Copyright (C) 2003-2005 D. Hageman <dhageman at dracken.com>
Copyright (C) 2006-2007 Dracken Technology, Inc. (http://www.dracken.com/)
+SPECIAL THANKS
+
+Sven-Haegar Koch <haegar at sdinet.de> has graciously provided patches
+to fix issues and make improvements to Net::CUPS.
+
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Modified: trunk/libnet-cups-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libnet-cups-perl/debian/changelog?rev=8251&op=diff
==============================================================================
--- trunk/libnet-cups-perl/debian/changelog (original)
+++ trunk/libnet-cups-perl/debian/changelog Sat Oct 13 21:52:16 2007
@@ -1,3 +1,11 @@
+libnet-cups-perl (0.55-1) unstable; urgency=low
+
+ * New upstream release.
+ * Added myself to uploaders.
+ * Added new examples from upstream.
+
+ -- MartÃn Ferrari <martin.ferrari at gmail.com> Sat, 13 Oct 2007 18:44:47 -0300
+
libnet-cups-perl (0.51-2) UNRELEASED; urgency=low
* debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
Modified: trunk/libnet-cups-perl/debian/control
URL: http://svn.debian.org/wsvn/trunk/libnet-cups-perl/debian/control?rev=8251&op=diff
==============================================================================
--- trunk/libnet-cups-perl/debian/control (original)
+++ trunk/libnet-cups-perl/debian/control Sat Oct 13 21:52:16 2007
@@ -2,7 +2,8 @@
Section: perl
Priority: optional
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Rene Mayorga <rmayorga at debian.org.sv>
+Uploaders: Rene Mayorga <rmayorga at debian.org.sv>,
+ MartÃn Ferrari <martin.ferrari at gmail.com>
Build-Depends: perl (>=5.6.0-16), debhelper (>= 5), libcupsys2-dev, libcupsimage2-dev
Standards-Version: 3.7.2
Homepage: http://search.cpan.org/dist/Net-CUPS/
Added: trunk/libnet-cups-perl/debian/examples
URL: http://svn.debian.org/wsvn/trunk/libnet-cups-perl/debian/examples?rev=8251&op=file
==============================================================================
--- trunk/libnet-cups-perl/debian/examples (added)
+++ trunk/libnet-cups-perl/debian/examples Sat Oct 13 21:52:16 2007
@@ -1,0 +1,1 @@
+examples/*
Modified: trunk/libnet-cups-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libnet-cups-perl/debian/rules?rev=8251&op=diff
==============================================================================
--- trunk/libnet-cups-perl/debian/rules (original)
+++ trunk/libnet-cups-perl/debian/rules Sat Oct 13 21:52:16 2007
@@ -62,6 +62,7 @@
dh_testroot
dh_installchangelogs Changes
dh_installdocs
+ dh_installexamples
dh_strip
dh_compress
dh_fixperms
Modified: trunk/libnet-cups-perl/lib/Net/CUPS.pm
URL: http://svn.debian.org/wsvn/trunk/libnet-cups-perl/lib/Net/CUPS.pm?rev=8251&op=diff
==============================================================================
--- trunk/libnet-cups-perl/lib/Net/CUPS.pm (original)
+++ trunk/libnet-cups-perl/lib/Net/CUPS.pm Sat Oct 13 21:52:16 2007
@@ -959,7 +959,7 @@
PPD_VERSION
);
-our $VERSION = '0.51';
+our $VERSION = '0.55';
sub AUTOLOAD {
# This AUTOLOAD is used to 'autoload' constants from the constant()
@@ -1028,6 +1028,8 @@
{
my( $self, $name ) = @_;
+ $name = "" if( !defined( $name ) );
+
return( NETCUPS_getDestination( $name ) );
}
Modified: trunk/libnet-cups-perl/lib/Net/CUPS/Destination.pm
URL: http://svn.debian.org/wsvn/trunk/libnet-cups-perl/lib/Net/CUPS/Destination.pm?rev=8251&op=diff
==============================================================================
--- trunk/libnet-cups-perl/lib/Net/CUPS/Destination.pm (original)
+++ trunk/libnet-cups-perl/lib/Net/CUPS/Destination.pm Sat Oct 13 21:52:16 2007
@@ -961,7 +961,7 @@
PPD_VERSION
);
-our $VERSION = '0.51';
+our $VERSION = '0.55';
sub AUTOLOAD {
# This AUTOLOAD is used to 'autoload' constants from the constant()
Modified: trunk/libnet-cups-perl/lib/Net/CUPS/IPP.pm
URL: http://svn.debian.org/wsvn/trunk/libnet-cups-perl/lib/Net/CUPS/IPP.pm?rev=8251&op=diff
==============================================================================
--- trunk/libnet-cups-perl/lib/Net/CUPS/IPP.pm (original)
+++ trunk/libnet-cups-perl/lib/Net/CUPS/IPP.pm Sat Oct 13 21:52:16 2007
@@ -961,7 +961,7 @@
PPD_VERSION
);
-our $VERSION = '0.51';
+our $VERSION = '0.55';
sub AUTOLOAD {
# This AUTOLOAD is used to 'autoload' constants from the constant()
Modified: trunk/libnet-cups-perl/lib/Net/CUPS/PPD.pm
URL: http://svn.debian.org/wsvn/trunk/libnet-cups-perl/lib/Net/CUPS/PPD.pm?rev=8251&op=diff
==============================================================================
--- trunk/libnet-cups-perl/lib/Net/CUPS/PPD.pm (original)
+++ trunk/libnet-cups-perl/lib/Net/CUPS/PPD.pm Sat Oct 13 21:52:16 2007
@@ -964,7 +964,7 @@
PPD_VERSION
);
-our $VERSION = '0.51';
+our $VERSION = '0.55';
sub AUTOLOAD {
# This AUTOLOAD is used to 'autoload' constants from the constant()
More information about the Pkg-perl-cvs-commits
mailing list