summaryrefslogtreecommitdiffstats
path: root/tdeprint/cups/kmwfax.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-08-10 16:51:25 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-08-10 16:51:25 -0500
commit9bc0d2cd9d38750658770e69bf0445dc5162beb7 (patch)
tree64d13ba540404b0dc3a05d3dccc68006ab42c4b0 /tdeprint/cups/kmwfax.cpp
parent6f181849bb63876ad03f8fa156b9fd5310bc9d29 (diff)
downloadtdelibs-9bc0d2cd9d38750658770e69bf0445dc5162beb7.tar.gz
tdelibs-9bc0d2cd9d38750658770e69bf0445dc5162beb7.zip
Update to new CUPS 1.6 API
Diffstat (limited to 'tdeprint/cups/kmwfax.cpp')
-rw-r--r--tdeprint/cups/kmwfax.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tdeprint/cups/kmwfax.cpp b/tdeprint/cups/kmwfax.cpp
index a9a120b6c..51ecbab73 100644
--- a/tdeprint/cups/kmwfax.cpp
+++ b/tdeprint/cups/kmwfax.cpp
@@ -30,6 +30,8 @@
#include <kiconloader.h>
#include <kurl.h>
+#include "config.h"
+
KMWFax::KMWFax(TQWidget *parent, const char *name)
: KMWizardPage(parent,name)
{
@@ -55,11 +57,19 @@ KMWFax::KMWFax(TQWidget *parent, const char *name)
ipp_attribute_t *attr = req.first();
while (attr)
{
+#ifdef HAVE_CUPS_1_6
+ if (ippGetName(attr) && strcmp(ippGetName(attr),"device-uri") == 0 && strncmp(ippGetString(attr, 0, NULL),"fax",3) == 0)
+ {
+ m_list->insertItem(SmallIcon("blockdevice"),TQString::fromLatin1(ippGetString(attr, 0, NULL)));
+ }
+ attr = ippNextAttribute(req.request());
+#else // HAVE_CUPS_1_6
if (attr->name && strcmp(attr->name,"device-uri") == 0 && strncmp(attr->values[0].string.text,"fax",3) == 0)
{
m_list->insertItem(SmallIcon("blockdevice"),TQString::fromLatin1(attr->values[0].string.text));
}
attr = attr->next;
+#endif // HAVE_CUPS_1_6
}
}
}