summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-08-11 19:08:15 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-08-11 19:08:15 -0500
commit91bf63b43bf4cc9ff640bd3c11549644cef05e6e (patch)
tree6f1174cf9241e99a6c1514160fcc7c80f06b63dc
parentfc2d90d56cc7ebe8b0f402dd85e7e13ef47dcfa6 (diff)
downloadtdelibs-91bf63b43bf4cc9ff640bd3c11549644cef05e6e.tar.gz
tdelibs-91bf63b43bf4cc9ff640bd3c11549644cef05e6e.zip
Fix FTBFS on CUPS < 1.6
-rw-r--r--tdeprint/cups/ipprequest.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tdeprint/cups/ipprequest.h b/tdeprint/cups/ipprequest.h
index 11d7f4091..84a7c5b18 100644
--- a/tdeprint/cups/ipprequest.h
+++ b/tdeprint/cups/ipprequest.h
@@ -27,6 +27,8 @@
#include <cups/ipp.h>
+#include "config.h"
+
class IppRequest
{
public:
@@ -72,6 +74,9 @@ public:
bool keyword(const TQString& name, TQStringList& value);
bool mime(const TQString& name, TQString& value);
ipp_attribute_t* first();
+#ifndef HAVE_CUPS_1_6
+ ipp_attribute_t* last();
+#endif // HAVE_CUPS_1_6
ipp_t* request();
TQMap<TQString,TQString> toMap(int group = -1);
void setMap(const TQMap<TQString,TQString>& opts);
@@ -178,6 +183,11 @@ inline bool IppRequest::mime(const TQString& name, TQString& value)
inline bool IppRequest::doRequest(const TQString& res)
{ return doFileRequest(res); }
+#ifndef HAVE_CUPS_1_6
+inline ipp_attribute_t* IppRequest::last()
+{ return (request_ ? request_->last : NULL); }
+#endif // HAVE_CUPS_1_6
+
inline void IppRequest::setHost(const TQString& host)
{ host_ = host; }