24 #include <tqstringlist.h>
25 #include <tqtextstream.h>
41 void addMime(
int group,
const TQString& name,
const TQString& mime);
42 void addKeyword(
int group,
const TQString& name,
const TQString& key);
43 void addKeyword(
int group,
const TQString& name,
const TQStringList& keys);
44 void addURI(
int group,
const TQString& name,
const TQString& uri);
45 void addURI(
int group,
const TQString& name,
const TQStringList& uris);
46 void addText(
int group,
const TQString& name,
const TQString& txt);
47 void addText(
int group,
const TQString& name,
const TQStringList& txts);
48 void addName(
int group,
const TQString& name,
const TQString& nm);
49 void addName(
int group,
const TQString& name,
const TQStringList& nms);
50 void addInteger(
int group,
const TQString& name,
int value);
51 void addInteger(
int group,
const TQString& name,
const TQValueList<int>& values);
52 void addEnum(
int group,
const TQString& name,
int value);
53 void addEnum(
int group,
const TQString& name,
const TQValueList<int>& values);
54 void addBoolean(
int group,
const TQString& name,
bool value);
55 void addBoolean(
int group,
const TQString& name,
const TQValueList<bool>& values);
57 void setOperation(
int op);
58 void setHost(
const TQString& host);
63 TQString statusMessage();
64 bool integer(
const TQString& name,
int& value);
65 bool boolean(
const TQString& name,
bool& value);
66 bool enumvalue(
const TQString& name,
int& value);
67 bool name(
const TQString& name, TQString& value);
68 bool name(
const TQString& name, TQStringList& value);
69 bool text(
const TQString& name, TQString& value);
70 bool text(
const TQString& name, TQStringList& value);
71 bool uri(
const TQString& name, TQString& value);
72 bool uri(
const TQString& name, TQStringList& value);
73 bool keyword(
const TQString& name, TQString& value);
74 bool keyword(
const TQString& name, TQStringList& value);
75 bool mime(
const TQString& name, TQString& value);
76 ipp_attribute_t* first();
78 ipp_attribute_t* last();
81 TQMap<TQString,TQString> toMap(
int group = -1);
82 void setMap(
const TQMap<TQString,TQString>& opts);
85 bool doRequest(
const TQString& res);
86 bool doFileRequest(
const TQString& res,
const TQString& filename = TQString::null);
89 bool htmlReport(
int group, TQTextStream& output);
95 void addString_p(
int group,
int type,
const TQString& name,
const TQString& value);
96 void addStringList_p(
int group,
int type,
const TQString& name,
const TQStringList& values);
97 void addInteger_p(
int group,
int type,
const TQString& name,
int value);
98 void addIntegerList_p(
int group,
int type,
const TQString& name,
const TQValueList<int>& values);
99 bool stringValue_p(
const TQString& name, TQString& value,
int type);
100 bool stringListValue_p(
const TQString& name, TQStringList& values,
int type);
101 bool integerValue_p(
const TQString& name,
int& value,
int type);
111 inline void IppRequest::addMime(
int group,
const TQString& name,
const TQString& mime)
112 { addString_p(group, IPP_TAG_MIMETYPE, name, mime); }
114 inline void IppRequest::addKeyword(
int group,
const TQString& name,
const TQString& key)
115 { addString_p(group, IPP_TAG_KEYWORD, name, key); }
117 inline void IppRequest::addKeyword(
int group,
const TQString& name,
const TQStringList& keys)
118 { addStringList_p(group, IPP_TAG_KEYWORD, name, keys); }
120 inline void IppRequest::addURI(
int group,
const TQString& name,
const TQString& uri)
121 { addString_p(group, IPP_TAG_URI, name, uri); }
123 inline void IppRequest::addURI(
int group,
const TQString& name,
const TQStringList& uris)
124 { addStringList_p(group, IPP_TAG_URI, name, uris); }
126 inline void IppRequest::addText(
int group,
const TQString& name,
const TQString& txt)
127 { addString_p(group, IPP_TAG_TEXT, name, txt); }
129 inline void IppRequest::addText(
int group,
const TQString& name,
const TQStringList& txts)
130 { addStringList_p(group, IPP_TAG_TEXT, name, txts); }
132 inline void IppRequest::addName(
int group,
const TQString& name,
const TQString& nm)
133 { addString_p(group, IPP_TAG_NAME, name, nm); }
135 inline void IppRequest::addName(
int group,
const TQString& name,
const TQStringList& nms)
136 { addStringList_p(group, IPP_TAG_NAME, name, nms); }
138 inline void IppRequest::addInteger(
int group,
const TQString& name,
int value)
139 { addInteger_p(group, IPP_TAG_INTEGER, name, value); }
141 inline void IppRequest::addInteger(
int group,
const TQString& name,
const TQValueList<int>& values)
142 { addIntegerList_p(group, IPP_TAG_INTEGER, name, values); }
144 inline void IppRequest::addEnum(
int group,
const TQString& name,
int value)
145 { addInteger_p(group, IPP_TAG_ENUM, name, value); }
147 inline void IppRequest::addEnum(
int group,
const TQString& name,
const TQValueList<int>& values)
148 { addIntegerList_p(group, IPP_TAG_ENUM, name, values); }
150 inline bool IppRequest::integer(
const TQString& name,
int& value)
151 {
return integerValue_p(name, value, IPP_TAG_INTEGER); }
153 inline bool IppRequest::enumvalue(
const TQString& name,
int& value)
154 {
return integerValue_p(name, value, IPP_TAG_ENUM); }
156 inline bool IppRequest::name(
const TQString& name, TQString& value)
157 {
return stringValue_p(name, value, IPP_TAG_NAME); }
159 inline bool IppRequest::name(
const TQString& name, TQStringList& values)
160 {
return stringListValue_p(name, values, IPP_TAG_NAME); }
162 inline bool IppRequest::text(
const TQString& name, TQString& value)
163 {
return stringValue_p(name, value, IPP_TAG_TEXT); }
165 inline bool IppRequest::text(
const TQString& name, TQStringList& values)
166 {
return stringListValue_p(name, values, IPP_TAG_TEXT); }
168 inline bool IppRequest::uri(
const TQString& name, TQString& value)
169 {
return stringValue_p(name, value, IPP_TAG_URI); }
171 inline bool IppRequest::uri(
const TQString& name, TQStringList& values)
172 {
return stringListValue_p(name, values, IPP_TAG_URI); }
174 inline bool IppRequest::keyword(
const TQString& name, TQString& value)
175 {
return stringValue_p(name, value, IPP_TAG_KEYWORD); }
177 inline bool IppRequest::keyword(
const TQString& name, TQStringList& values)
178 {
return stringListValue_p(name, values, IPP_TAG_KEYWORD); }
180 inline bool IppRequest::mime(
const TQString& name, TQString& value)
181 {
return stringValue_p(name, value, IPP_TAG_MIMETYPE); }
183 inline bool IppRequest::doRequest(
const TQString& res)
184 {
return doFileRequest(res); }
186 #ifndef HAVE_CUPS_1_6
187 inline ipp_attribute_t* IppRequest::last()
188 {
return (request_ ? request_->last : NULL); }
191 inline void IppRequest::setHost(
const TQString& host)
194 inline void IppRequest::setPort(
int p)
197 inline void IppRequest::dump(
int state)
200 inline ipp_t* IppRequest::request()