qhttpheaders.sip 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. // qhttpheaders.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtNetwork Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. %If (Qt_6_7_0 -)
  22. class QHttpHeaders
  23. {
  24. %TypeHeaderCode
  25. #include <qhttpheaders.h>
  26. %End
  27. public:
  28. enum class WellKnownHeader
  29. {
  30. AIM,
  31. Accept,
  32. AcceptAdditions,
  33. AcceptCH,
  34. AcceptDatetime,
  35. AcceptEncoding,
  36. AcceptFeatures,
  37. AcceptLanguage,
  38. AcceptPatch,
  39. AcceptPost,
  40. AcceptRanges,
  41. AcceptSignature,
  42. AccessControlAllowCredentials,
  43. AccessControlAllowHeaders,
  44. AccessControlAllowMethods,
  45. AccessControlAllowOrigin,
  46. AccessControlExposeHeaders,
  47. AccessControlMaxAge,
  48. AccessControlRequestHeaders,
  49. AccessControlRequestMethod,
  50. Age,
  51. Allow,
  52. ALPN,
  53. AltSvc,
  54. AltUsed,
  55. Alternates,
  56. ApplyToRedirectRef,
  57. AuthenticationControl,
  58. AuthenticationInfo,
  59. Authorization,
  60. CacheControl,
  61. CacheStatus,
  62. CalManagedID,
  63. CalDAVTimezones,
  64. CapsuleProtocol,
  65. CDNCacheControl,
  66. CDNLoop,
  67. CertNotAfter,
  68. CertNotBefore,
  69. ClearSiteData,
  70. ClientCert,
  71. ClientCertChain,
  72. Close,
  73. Connection,
  74. ContentDigest,
  75. ContentDisposition,
  76. ContentEncoding,
  77. ContentID,
  78. ContentLanguage,
  79. ContentLength,
  80. ContentLocation,
  81. ContentRange,
  82. ContentSecurityPolicy,
  83. ContentSecurityPolicyReportOnly,
  84. ContentType,
  85. Cookie,
  86. CrossOriginEmbedderPolicy,
  87. CrossOriginEmbedderPolicyReportOnly,
  88. CrossOriginOpenerPolicy,
  89. CrossOriginOpenerPolicyReportOnly,
  90. CrossOriginResourcePolicy,
  91. DASL,
  92. Date,
  93. DAV,
  94. DeltaBase,
  95. Depth,
  96. Destination,
  97. DifferentialID,
  98. DPoP,
  99. DPoPNonce,
  100. EarlyData,
  101. ETag,
  102. Expect,
  103. ExpectCT,
  104. Expires,
  105. Forwarded,
  106. From,
  107. Hobareg,
  108. Host,
  109. If,
  110. IfMatch,
  111. IfModifiedSince,
  112. IfNoneMatch,
  113. IfRange,
  114. IfScheduleTagMatch,
  115. IfUnmodifiedSince,
  116. IM,
  117. IncludeReferredTokenBindingID,
  118. KeepAlive,
  119. Label,
  120. LastEventID,
  121. LastModified,
  122. Link,
  123. Location,
  124. LockToken,
  125. MaxForwards,
  126. MementoDatetime,
  127. Meter,
  128. MIMEVersion,
  129. Negotiate,
  130. NEL,
  131. ODataEntityId,
  132. ODataIsolation,
  133. ODataMaxVersion,
  134. ODataVersion,
  135. OptionalWWWAuthenticate,
  136. OrderingType,
  137. Origin,
  138. OriginAgentCluster,
  139. OSCORE,
  140. OSLCCoreVersion,
  141. Overwrite,
  142. PingFrom,
  143. PingTo,
  144. Position,
  145. Prefer,
  146. PreferenceApplied,
  147. Priority,
  148. ProxyAuthenticate,
  149. ProxyAuthenticationInfo,
  150. ProxyAuthorization,
  151. ProxyStatus,
  152. PublicKeyPins,
  153. PublicKeyPinsReportOnly,
  154. Range,
  155. RedirectRef,
  156. Referer,
  157. Refresh,
  158. ReplayNonce,
  159. ReprDigest,
  160. RetryAfter,
  161. ScheduleReply,
  162. ScheduleTag,
  163. SecPurpose,
  164. SecTokenBinding,
  165. SecWebSocketAccept,
  166. SecWebSocketExtensions,
  167. SecWebSocketKey,
  168. SecWebSocketProtocol,
  169. SecWebSocketVersion,
  170. Server,
  171. ServerTiming,
  172. SetCookie,
  173. Signature,
  174. SignatureInput,
  175. SLUG,
  176. SoapAction,
  177. StatusURI,
  178. StrictTransportSecurity,
  179. Sunset,
  180. SurrogateCapability,
  181. SurrogateControl,
  182. TCN,
  183. TE,
  184. Timeout,
  185. Topic,
  186. Traceparent,
  187. Tracestate,
  188. Trailer,
  189. TransferEncoding,
  190. TTL,
  191. Upgrade,
  192. Urgency,
  193. UserAgent,
  194. VariantVary,
  195. Vary,
  196. Via,
  197. WantContentDigest,
  198. WantReprDigest,
  199. WWWAuthenticate,
  200. XContentTypeOptions,
  201. XFrameOptions,
  202. AcceptCharset,
  203. CPEPInfo,
  204. Pragma,
  205. ProtocolInfo,
  206. ProtocolQuery,
  207. };
  208. QHttpHeaders();
  209. QHttpHeaders(const QHttpHeaders &other);
  210. ~QHttpHeaders();
  211. void swap(QHttpHeaders &other /Constrained/);
  212. bool append(QAnyStringView name, QAnyStringView value);
  213. bool append(QHttpHeaders::WellKnownHeader name, QAnyStringView value);
  214. bool insert(qsizetype i, QAnyStringView name, QAnyStringView value);
  215. bool insert(qsizetype i, QHttpHeaders::WellKnownHeader name, QAnyStringView value);
  216. bool replace(qsizetype i, QAnyStringView name, QAnyStringView newValue);
  217. bool replace(qsizetype i, QHttpHeaders::WellKnownHeader name, QAnyStringView newValue);
  218. bool contains(QAnyStringView name) const;
  219. bool contains(QHttpHeaders::WellKnownHeader name) const;
  220. void clear();
  221. void removeAll(QAnyStringView name);
  222. void removeAll(QHttpHeaders::WellKnownHeader name);
  223. void removeAt(qsizetype i);
  224. QByteArrayView value(QAnyStringView name, QByteArrayView defaultValue = {}) const;
  225. QByteArrayView value(QHttpHeaders::WellKnownHeader name, QByteArrayView defaultValue = {}) const;
  226. QList<QByteArray> values(QAnyStringView name) const;
  227. QList<QByteArray> values(QHttpHeaders::WellKnownHeader name) const;
  228. QByteArrayView valueAt(qsizetype i) const;
  229. QString nameAt(qsizetype i) const [QLatin1StringView (qsizetype i)];
  230. QByteArray combinedValue(QAnyStringView name) const;
  231. QByteArray combinedValue(QHttpHeaders::WellKnownHeader name) const;
  232. qsizetype size() const;
  233. void reserve(qsizetype size);
  234. bool isEmpty() const;
  235. static QByteArrayView wellKnownHeaderName(QHttpHeaders::WellKnownHeader name);
  236. static QHttpHeaders fromListOfPairs(const QList<std::pair<QByteArray, QByteArray>> &headers);
  237. QList<std::pair<QByteArray, QByteArray>> toListOfPairs() const;
  238. %If (Qt_6_8_0 -)
  239. bool replaceOrAppend(QHttpHeaders::WellKnownHeader name, QAnyStringView newValue);
  240. %End
  241. %If (Qt_6_8_0 -)
  242. bool replaceOrAppend(QAnyStringView name, QAnyStringView newValue);
  243. %End
  244. %If (Qt_6_10_0 -)
  245. std::optional<qint64> intValue(QHttpHeaders::WellKnownHeader name) const;
  246. %End
  247. %If (Qt_6_10_0 -)
  248. std::optional<qint64> intValue(QAnyStringView name) const;
  249. %End
  250. %If (Qt_6_10_0 -)
  251. std::optional<QList<qint64>> intValues(QHttpHeaders::WellKnownHeader name) const;
  252. %End
  253. %If (Qt_6_10_0 -)
  254. std::optional<QList<qint64>> intValues(QAnyStringView name) const;
  255. %End
  256. %If (Qt_6_10_0 -)
  257. std::optional<qint64> intValueAt(qsizetype i) const;
  258. %End
  259. %If (Qt_6_10_0 -)
  260. std::optional<QDateTime> dateTimeValue(QHttpHeaders::WellKnownHeader name) const;
  261. %End
  262. %If (Qt_6_10_0 -)
  263. std::optional<QDateTime> dateTimeValue(QAnyStringView name) const;
  264. %End
  265. %If (Qt_6_10_0 -)
  266. std::optional<QList<QDateTime>> dateTimeValues(QHttpHeaders::WellKnownHeader name) const;
  267. %End
  268. %If (Qt_6_10_0 -)
  269. std::optional<QList<QDateTime>> dateTimeValues(QAnyStringView name) const;
  270. %End
  271. %If (Qt_6_10_0 -)
  272. std::optional<QDateTime> dateTimeValueAt(qsizetype i) const;
  273. %End
  274. %If (Qt_6_10_0 -)
  275. void setDateTimeValue(QHttpHeaders::WellKnownHeader name, const QDateTime &dateTime);
  276. %End
  277. %If (Qt_6_10_0 -)
  278. void setDateTimeValue(QAnyStringView name, const QDateTime &dateTime);
  279. %End
  280. };
  281. %End