Utility API

<refentry> <refmeta> <refentrytitle>DateTime Utilities</refentrytitle> <manvolnum>3</manvolnum> <refmiscinfo>LIBSOUP-3.0 Library</refmiscinfo> </refmeta>

<refentrytitle>DateTime Utilities</refentrytitle>

<refname>DateTime Utilities</refname> <refpurpose>Functions to help working with <type>GDateTime</type> and HTTP</refpurpose>

<refsect1> <title>Functions</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><returnvalue>GDateTime</returnvalue> * </entry><entry>soup_date_time_new_from_http_string <phrase>()</phrase></entry></row> <row><entry><returnvalue>char</returnvalue> * </entry><entry>soup_date_time_to_string <phrase>()</phrase></entry></row> </tbody> </tgroup> </informaltable> </refsect1> <refsect1> <title>Types and Values</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <tbody> <row><entry>enum</entry><entry>SoupDateFormat</entry></row> </tbody> </tgroup> </informaltable> </refsect1> <refsect1><title>Includes</title><synopsis>#include <libsoup/soup.h> </synopsis></refsect1> <refsect1> <title>Description</title> <para>These are simple utility functions to help using <type>GDateTime</type>.</para> </refsect1> <refsect1> <title>Functions</title> <refsect2> <title>soup_date_time_new_from_http_string ()</title> <programlisting><returnvalue>GDateTime</returnvalue> * soup_date_time_new_from_http_string (<parameter>const <type>char</type> *date_string</parameter>);</programlisting> <para>Parses <parameter>date_string</parameter> and tries to extract a date from it. This recognizes all of the "HTTP-date" formats from RFC 2616, RFC 2822 dates, and reasonable approximations thereof. (Eg, it is lenient about whitespace, leading "0"s, etc.)</para> <refsect3> <title>Parameters</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><para>date_string</para></entry> <entry><para>The date as a string</para></entry> <entry></entry></row> </tbody></tgroup></informaltable> </refsect3><refsect3> <title>Returns</title> <para>a new <type>GDateTime</type>, or <literal>NULL</literal> if <parameter>date_string</parameter> could not be parsed. </para> <para><emphasis>[nullable]</emphasis></para> </refsect3></refsect2>
<refsect2> <title>soup_date_time_to_string ()</title> <programlisting><returnvalue>char</returnvalue> * soup_date_time_to_string (<parameter><type>GDateTime</type> *date</parameter>, <parameter><type>SoupDateFormat</type> format</parameter>);</programlisting> <para>Converts <parameter>date</parameter> to a string in the format described by <parameter>format</parameter> .</para> <para>Return: (transfer full): <parameter>date</parameter> as a string or <literal>NULL</literal></para> <refsect3> <title>Parameters</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><para>date</para></entry> <entry><para>a <type>GDateTime</type></para></entry> <entry></entry></row> <row><entry><para>format</para></entry> <entry><para>the format to generate the date in</para></entry> <entry></entry></row> </tbody></tgroup></informaltable> </refsect3></refsect2> </refsect1>
<refsect1> <title>Types and Values</title> <refsect2> <title>enum SoupDateFormat</title> <para>Date formats that <function>soup_date_time_to_string()</function> can use.</para> <para><parameter>SOUP_DATE_HTTP</parameter> and <parameter>SOUP_DATE_COOKIE</parameter> always coerce the time to UTC.</para> <para>This enum may be extended with more values in future releases.</para> <refsect3> <title>Members</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><para>SOUP_DATE_HTTP</para></entry> <entry><para>RFC 1123 format, used by the HTTP "Date" header. Eg "Sun, 06 Nov 1994 08:49:37 GMT"</para> </entry> <entry></entry> </row> <row><entry><para>SOUP_DATE_COOKIE</para></entry> <entry><para>The format for the "Expires" timestamp in the Netscape cookie specification. Eg, "Sun, 06-Nov-1994 08:49:37 GMT".</para> </entry> <entry></entry> </row> </tbody></tgroup></informaltable> </refsect3></refsect2> </refsect1> </refentry>
<refentry> <refmeta> <refentrytitle>SoupTLD</refentrytitle> <manvolnum>3</manvolnum> <refmiscinfo>LIBSOUP-3.0 Library</refmiscinfo> </refmeta>

<refentrytitle>SoupTLD</refentrytitle>

<refname>SoupTLD</refname> <refpurpose>Top-Level Domain Utilities</refpurpose>

<refsect1> <title>Functions</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <tbody> <row><entry>const <returnvalue>char</returnvalue> * </entry><entry>soup_tld_get_base_domain <phrase>()</phrase></entry></row> <row><entry><returnvalue>gboolean</returnvalue> </entry><entry>soup_tld_domain_is_public_suffix <phrase>()</phrase></entry></row> </tbody> </tgroup> </informaltable> </refsect1> <refsect1> <title>Types and Values</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <tbody> <row><entry>#define</entry><entry>SOUP_TLD_ERROR</entry></row> <row><entry>enum</entry><entry>SoupTLDError</entry></row> </tbody> </tgroup> </informaltable> </refsect1> <refsect1><title>Includes</title><synopsis>#include <libsoup/soup.h> </synopsis></refsect1> <refsect1> <title>Description</title> <para>These functions can be used to parse hostnames to attempt to determine what part of the name belongs to the domain owner, and what part is simply a "public suffix" such as ".com".</para> </refsect1> <refsect1> <title>Functions</title> <refsect2> <title>soup_tld_get_base_domain ()</title> <programlisting>const <returnvalue>char</returnvalue> * soup_tld_get_base_domain (<parameter>const <type>char</type> *hostname</parameter>, <parameter><type>GError</type> **error</parameter>);</programlisting> <para>Finds the base domain for a given <parameter>hostname</parameter> . The base domain is composed by the top level domain (such as .org, .com, .co.uk, etc) plus the second level domain, for example for myhost.mydomain.com it will return mydomain.com.</para> <para>Note that <literal>NULL</literal> will be returned for private URLs (those not ending with any well known TLD) because choosing a base domain for them would be totally arbitrary.</para> <para>Prior to libsoup 2.46, this function required that <parameter>hostname</parameter> be in UTF-8 if it was an IDN. From 2.46 on, the name can be in either UTF-8 or ASCII format (and the return value will be in the same format).</para> <refsect3> <title>Parameters</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><para>hostname</para></entry> <entry><para>a hostname</para></entry> <entry></entry></row> <row><entry><para>error</para></entry> <entry><para>return location for a <type>GError</type>, or <literal>NULL</literal> to ignore errors. See <type>SoupTLDError</type> for the available error codes</para></entry> <entry></entry></row> </tbody></tgroup></informaltable> </refsect3><refsect3> <title>Returns</title> <para> a pointer to the start of the base domain in <parameter>hostname</parameter> . If an error occurs, <literal>NULL</literal> will be returned and <parameter>error</parameter> set.</para> </refsect3></refsect2>
<refsect2> <title>soup_tld_domain_is_public_suffix ()</title> <programlisting><returnvalue>gboolean</returnvalue> soup_tld_domain_is_public_suffix (<parameter>const <type>char</type> *domain</parameter>);</programlisting> <para>Looks whether the <parameter>domain</parameter> passed as argument is a public domain suffix (.org, .com, .co.uk, etc) or not.</para> <para>Prior to libsoup 2.46, this function required that <parameter>domain</parameter> be in UTF-8 if it was an IDN. From 2.46 on, the name can be in either UTF-8 or ASCII format.</para> <refsect3> <title>Parameters</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><para>domain</para></entry> <entry><para>a domain name</para></entry> <entry></entry></row> </tbody></tgroup></informaltable> </refsect3><refsect3> <title>Returns</title> <para> <literal>TRUE</literal> if it is a public domain, <literal>FALSE</literal> otherwise.</para> </refsect3></refsect2> </refsect1>
<refsect1> <title>Types and Values</title> <refsect2> <title>SOUP_TLD_ERROR</title> <programlisting>#define SOUP_TLD_ERROR soup_tld_error_quark() </programlisting> <para>The <type>GError</type> domain for soup-tld-related errors.</para> </refsect2>
<refsect2> <title>enum SoupTLDError</title> <para>Error codes for <literal>SOUP_TLD_ERROR</literal>.</para> <refsect3> <title>Members</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><para>SOUP_TLD_ERROR_INVALID_HOSTNAME</para></entry> <entry><para>A hostname was syntactically invalid.</para> </entry> <entry></entry> </row> <row><entry><para>SOUP_TLD_ERROR_IS_IP_ADDRESS</para></entry> <entry><para>The passed-in "hostname" was actually an IP address (and thus has no base domain or public suffix).</para> </entry> <entry></entry> </row> <row><entry><para>SOUP_TLD_ERROR_NOT_ENOUGH_DOMAINS</para></entry> <entry><para>The passed-in hostname did not have enough components. Eg, calling <function>soup_tld_get_base_domain()</function> on <literal>"co.uk"</literal>.</para> </entry> <entry></entry> </row> <row><entry><para>SOUP_TLD_ERROR_NO_BASE_DOMAIN</para></entry> <entry><para>The passed-in hostname has no recognized public suffix.</para> </entry> <entry></entry> </row> <row><entry><para>SOUP_TLD_ERROR_NO_PSL_DATA</para></entry> <entry><para>The Public Suffix List was not available.</para> </entry> <entry></entry> </row> </tbody></tgroup></informaltable> </refsect3></refsect2> </refsect1>
</refentry>
<refentry> <refmeta> <refentrytitle>URI Utilities</refentrytitle> <manvolnum>3</manvolnum> <refmiscinfo>LIBSOUP-3.0 Library</refmiscinfo> </refmeta>

<refentrytitle>URI Utilities</refentrytitle>

<refname>URI Utilities</refname> <refpurpose>Functions to help working with <type>GUri</type> and HTTP</refpurpose>

<refsect1> <title>Functions</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><returnvalue>gboolean</returnvalue> </entry><entry>soup_uri_equal <phrase>()</phrase></entry></row> <row><entry><returnvalue>GBytes</returnvalue> * </entry><entry>soup_uri_decode_data_uri <phrase>()</phrase></entry></row> <row><entry><returnvalue>GUri</returnvalue> * </entry><entry>soup_uri_copy <phrase>()</phrase></entry></row> </tbody> </tgroup> </informaltable> </refsect1> <refsect1> <title>Types and Values</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <tbody> <row><entry>#define</entry><entry>SOUP_HTTP_URI_FLAGS</entry></row> <row><entry>enum</entry><entry>SoupURIComponent</entry></row> </tbody> </tgroup> </informaltable> </refsect1> <refsect1><title>Includes</title><synopsis>#include <libsoup/soup.h> </synopsis></refsect1> <refsect1> <title>Description</title> <para>Utility functions and defines to help working with URIs.</para> </refsect1> <refsect1> <title>Functions</title> <refsect2> <title>soup_uri_equal ()</title> <programlisting><returnvalue>gboolean</returnvalue> soup_uri_equal (<parameter><type>GUri</type> *uri1</parameter>, <parameter><type>GUri</type> *uri2</parameter>);</programlisting> <para>Tests whether or not <parameter>uri1</parameter> and <parameter>uri2</parameter> are equal in all parts</para> <refsect3> <title>Parameters</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><para>uri1</para></entry> <entry><para>a <type>GUri</type></para></entry> <entry></entry></row> <row><entry><para>uri2</para></entry> <entry><para>another <type>GUri</type></para></entry> <entry></entry></row> </tbody></tgroup></informaltable> </refsect3><refsect3> <title>Returns</title> <para> <literal>TRUE</literal> if equal otherwise <literal>FALSE</literal></para> </refsect3></refsect2>
<refsect2> <title>soup_uri_decode_data_uri ()</title> <programlisting><returnvalue>GBytes</returnvalue> * soup_uri_decode_data_uri (<parameter>const <type>char</type> *uri</parameter>, <parameter><type>char</type> **content_type</parameter>);</programlisting> <para>Decodes the given data URI and returns its contents and <parameter>content_type</parameter> .</para> <refsect3> <title>Parameters</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><para>uri</para></entry> <entry><para>a data URI, in string form</para></entry> <entry></entry></row> <row><entry><para>content_type</para></entry> <entry><para>location to store content type, or <literal>NULL</literal>. </para></entry> <entry><emphasis>[out][nullable][transfer full]</emphasis></entry></row> </tbody></tgroup></informaltable> </refsect3><refsect3> <title>Returns</title> <para>a <type>GBytes</type> with the contents of <parameter>uri</parameter> , or <literal>NULL</literal> if <parameter>uri</parameter> is not a valid data URI. </para> <para><emphasis>[transfer full]</emphasis></para> </refsect3></refsect2>
<refsect2> <title>soup_uri_copy ()</title> <programlisting><returnvalue>GUri</returnvalue> * soup_uri_copy (<parameter><type>GUri</type> *uri</parameter>, <parameter><type>SoupURIComponent</type> first_component</parameter>, <parameter>...</parameter>);</programlisting> <para>Return a copy of <parameter>uri</parameter> with the given components updated</para> <para><emphasis>[skip]</emphasis></para><refsect3> <title>Parameters</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><para>uri</para></entry> <entry><para>the <type>GUri</type> to copy</para></entry> <entry></entry></row> <row><entry><para>first_component</para></entry> <entry><para>first <type>SoupURIComponent</type> to update</para></entry> <entry></entry></row> <row><entry><para>...</para></entry> <entry><para>value of <parameter>first_component</parameter> followed by additional components and values, terminated by <literal>SOUP_URI_NONE</literal></para></entry> <entry></entry></row> </tbody></tgroup></informaltable> </refsect3><refsect3> <title>Returns</title> <para>a new <type>GUri</type>. </para> <para><emphasis>[transfer full]</emphasis></para> </refsect3></refsect2> </refsect1>
<refsect1> <title>Types and Values</title> <refsect2> <title>SOUP_HTTP_URI_FLAGS</title> <programlisting>#define SOUP_HTTP_URI_FLAGS (G_URI_FLAGS_HAS_PASSWORD | G_URI_FLAGS_ENCODED_PATH | G_URI_FLAGS_ENCODED_QUERY | G_URI_FLAGS_ENCODED_FRAGMENT | G_URI_FLAGS_SCHEME_NORMALIZE) </programlisting> <para>The set of <type>GUriFlags</type> libsoup expects all <type>GUri</type> to use.</para> </refsect2>
<refsect2> <title>enum SoupURIComponent</title> <para>Enum values passed to <function>soup_uri_copy()</function> to indicate the components of the URI that should be updated with the given values.</para> <refsect3> <title>Members</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><para>SOUP_URI_NONE</para></entry> <entry><para>no component</para> </entry> <entry></entry> </row> <row><entry><para>SOUP_URI_SCHEME</para></entry> <entry><para>the URI scheme component</para> </entry> <entry></entry> </row> <row><entry><para>SOUP_URI_USER</para></entry> <entry><para>the URI user component</para> </entry> <entry></entry> </row> <row><entry><para>SOUP_URI_PASSWORD</para></entry> <entry><para>the URI password component</para> </entry> <entry></entry> </row> <row><entry><para>SOUP_URI_AUTH_PARAMS</para></entry> <entry><para>the URI authentication parameters component</para> </entry> <entry></entry> </row> <row><entry><para>SOUP_URI_HOST</para></entry> <entry><para>the URI host component</para> </entry> <entry></entry> </row> <row><entry><para>SOUP_URI_PORT</para></entry> <entry><para>the URI port component</para> </entry> <entry></entry> </row> <row><entry><para>SOUP_URI_PATH</para></entry> <entry><para>the URI path component</para> </entry> <entry></entry> </row> <row><entry><para>SOUP_URI_QUERY</para></entry> <entry><para>the URI query component</para> </entry> <entry></entry> </row> <row><entry><para>SOUP_URI_FRAGMENT</para></entry> <entry><para>the URI fragment component</para> </entry> <entry></entry> </row> </tbody></tgroup></informaltable> </refsect3></refsect2> </refsect1>
</refentry>
<refentry> <refmeta> <refentrytitle>Version Information</refentrytitle> <manvolnum>3</manvolnum> <refmiscinfo>LIBSOUP-3.0 Library</refmiscinfo> </refmeta>

<refentrytitle>Version Information</refentrytitle>

<refname>Version Information</refname> <refpurpose>Variables and functions to check the libsoup version</refpurpose>

<refsect1> <title>Functions</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><returnvalue>guint</returnvalue> </entry><entry>soup_get_major_version <phrase>()</phrase></entry></row> <row><entry><returnvalue>guint</returnvalue> </entry><entry>soup_get_minor_version <phrase>()</phrase></entry></row> <row><entry><returnvalue>guint</returnvalue> </entry><entry>soup_get_micro_version <phrase>()</phrase></entry></row> <row><entry><returnvalue>gboolean</returnvalue> </entry><entry>soup_check_version <phrase>()</phrase></entry></row> <row><entry>#define</entry><entry>SOUP_CHECK_VERSION<phrase>()</phrase></entry></row> </tbody> </tgroup> </informaltable> </refsect1> <refsect1> <title>Types and Values</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <tbody> <row><entry>#define</entry><entry>SOUP_MAJOR_VERSION</entry></row> <row><entry>#define</entry><entry>SOUP_MINOR_VERSION</entry></row> <row><entry>#define</entry><entry>SOUP_MICRO_VERSION</entry></row> <row><entry>#define</entry><entry>SOUP_VERSION_MIN_REQUIRED</entry></row> <row><entry>#define</entry><entry>SOUP_VERSION_MAX_ALLOWED</entry></row> <row><entry>#define</entry><entry>SOUP_VERSION_3_0</entry></row> </tbody> </tgroup> </informaltable> </refsect1> <refsect1><title>Includes</title><synopsis>#include <libsoup/soup.h> </synopsis></refsect1> <refsect1> <title>Description</title> <para>Variables and functions to check the libsoup version.</para> </refsect1> <refsect1> <title>Functions</title> <refsect2> <title>soup_get_major_version ()</title> <programlisting><returnvalue>guint</returnvalue> soup_get_major_version (<parameter><type>void</type></parameter>);</programlisting> <para>Returns the major version number of the libsoup library. (e.g. in libsoup version 2.42.0 this is 2.)</para> <para>This function is in the library, so it represents the libsoup library your code is running against. Contrast with the <type>SOUP_MAJOR_VERSION</type> macro, which represents the major version of the libsoup headers you have included when compiling your code.</para> <refsect3> <title>Returns</title> <para> the major version number of the libsoup library</para> </refsect3></refsect2>
<refsect2> <title>soup_get_minor_version ()</title> <programlisting><returnvalue>guint</returnvalue> soup_get_minor_version (<parameter><type>void</type></parameter>);</programlisting> <para>Returns the minor version number of the libsoup library. (e.g. in libsoup version 2.42.0 this is 42.)</para> <para>This function is in the library, so it represents the libsoup library your code is running against. Contrast with the <type>SOUP_MINOR_VERSION</type> macro, which represents the minor version of the libsoup headers you have included when compiling your code.</para> <refsect3> <title>Returns</title> <para> the minor version number of the libsoup library</para> </refsect3></refsect2>
<refsect2> <title>soup_get_micro_version ()</title> <programlisting><returnvalue>guint</returnvalue> soup_get_micro_version (<parameter><type>void</type></parameter>);</programlisting> <para>Returns the micro version number of the libsoup library. (e.g. in libsoup version 2.42.0 this is 0.)</para> <para>This function is in the library, so it represents the libsoup library your code is running against. Contrast with the <type>SOUP_MICRO_VERSION</type> macro, which represents the micro version of the libsoup headers you have included when compiling your code.</para> <refsect3> <title>Returns</title> <para> the micro version number of the libsoup library</para> </refsect3></refsect2>
<refsect2> <title>soup_check_version ()</title> <programlisting><returnvalue>gboolean</returnvalue> soup_check_version (<parameter><type>guint</type> major</parameter>, <parameter><type>guint</type> minor</parameter>, <parameter><type>guint</type> micro</parameter>);</programlisting> <para>Like SOUP_CHECK_VERSION, but the check for soup_check_version is at runtime instead of compile time. This is useful for compiling against older versions of libsoup, but using features from newer versions.</para> <refsect3> <title>Parameters</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><para>major</para></entry> <entry><para>the major version to check</para></entry> <entry></entry></row> <row><entry><para>minor</para></entry> <entry><para>the minor version to check</para></entry> <entry></entry></row> <row><entry><para>micro</para></entry> <entry><para>the micro version to check</para></entry> <entry></entry></row> </tbody></tgroup></informaltable> </refsect3><refsect3> <title>Returns</title> <para> <literal>TRUE</literal> if the version of the libsoup currently loaded is the same as or newer than the passed-in version.</para> </refsect3></refsect2>
<refsect2> <title>SOUP_CHECK_VERSION()</title> <programlisting>#define SOUP_CHECK_VERSION(major, minor, micro)</programlisting> <para>Macro to test the version of libsoup being compiled against.</para> <refsect3> <title>Parameters</title> <informaltable> <tgroup> <colspec></colspec> <colspec></colspec> <colspec></colspec> <tbody> <row><entry><para>major</para></entry> <entry><para>major version (e.g. 2 for version 2.42.0)</para></entry> <entry></entry></row> <row><entry><para>minor</para></entry> <entry><para>minor version (e.g. 42 for version 2.42.0)</para></entry> <entry></entry></row> <row><entry><para>micro</para></entry> <entry><para>micro version (e.g. 0 for version 2.42.0)</para></entry> <entry></entry></row> </tbody></tgroup></informaltable> </refsect3><refsect3> <title>Returns</title> <para> <literal>TRUE</literal> if the version of the libsoup header files is the same as or newer than the passed-in version.</para> </refsect3></refsect2> </refsect1>
<refsect1> <title>Types and Values</title> <refsect2> <title>SOUP_MAJOR_VERSION</title> <programlisting>#define SOUP_MAJOR_VERSION (3) </programlisting> <para>Like <function>soup_get_major_version()</function>, but from the headers used at application compile time, rather than from the library linked against at application run time.</para> </refsect2>
<refsect2> <title>SOUP_MINOR_VERSION</title> <programlisting>#define SOUP_MINOR_VERSION (0) </programlisting> <para>Like <function>soup_get_minor_version()</function>, but from the headers used at application compile time, rather than from the library linked against at application run time.</para> </refsect2>
<refsect2> <title>SOUP_MICRO_VERSION</title> <programlisting>#define SOUP_MICRO_VERSION (6) </programlisting> <para>Like <function>soup_get_micro_version()</function>, but from the headers used at application compile time, rather than from the library linked against at application run time.</para> </refsect2>
<refsect2> <title>SOUP_VERSION_MIN_REQUIRED</title> <programlisting># define SOUP_VERSION_MIN_REQUIRED (SOUP_VERSION_CUR_STABLE) </programlisting> <para>A macro that should be defined by the user prior to including libsoup.h. The definition should be one of the predefined libsoup version macros: <literal>SOUP_VERSION_2_24</literal>, <literal>SOUP_VERSION_2_26</literal>, ...</para> <para>This macro defines the earliest version of libsoup that the package is required to be able to compile against.</para> <para>If the compiler is configured to warn about the use of deprecated functions, then using functions that were deprecated in version <literal>SOUP_VERSION_MIN_REQUIRED</literal> or earlier will cause warnings (but using functions deprecated in later releases will not).</para> </refsect2>
<refsect2> <title>SOUP_VERSION_MAX_ALLOWED</title> <programlisting># define SOUP_VERSION_MAX_ALLOWED (SOUP_VERSION_CUR_STABLE) </programlisting> <para>A macro that should be defined by the user prior to including libsoup.h. The definition should be one of the predefined libsoup version macros: <literal>SOUP_VERSION_2_24</literal>, <literal>SOUP_VERSION_2_26</literal>, ...</para> <para>This macro defines the latest version of the libsoup API that the package is allowed to make use of.</para> <para>If the compiler is configured to warn about the use of deprecated functions, then using functions added after version <literal>SOUP_VERSION_MAX_ALLOWED</literal> will cause warnings.</para> <para>Unless you are using <function>SOUP_CHECK_VERSION()</function> or the like to compile different code depending on the libsoup version, then this should be set to the same value as <literal>SOUP_VERSION_MIN_REQUIRED</literal>.</para> </refsect2>
<refsect2> <title>SOUP_VERSION_3_0</title> <programlisting>#define SOUP_VERSION_3_0 (G_ENCODE_VERSION (3, 0)) </programlisting> <para>A macro that evaluates to the 3.0 version of libsoup, in a format that can be used by the C pre-processor.</para> <para>Since: 3.0</para></refsect2> </refsect1>
</refentry>