<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="cutter-Convenience-HTTP-server-API">
<refmeta>
<refentrytitle role="top_of_page" id="cutter-Convenience-HTTP-server-API.top_of_page">便利なHTTPサーバーAPI</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>Cutterライブラリ</refmiscinfo>
</refmeta>
<refnamediv>
<refname>便利なHTTPサーバーAPI</refname>
<refpurpose>HTTPサーバーとして動作するためのAPI。</refpurpose>
</refnamediv>

<refsect1 id="cutter-Convenience-HTTP-server-API.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_return" colwidth="150px"/>
<colspec colname="functions_name"/>
<tbody>
<row><entry role="function_type"><link linkend="SoupServer"><returnvalue>SoupServer</returnvalue></link> *
</entry><entry role="function_name"><link linkend="soupcut-server-take">soupcut_server_take</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="SoupServer"><returnvalue>SoupServer</returnvalue></link> *
</entry><entry role="function_name"><link linkend="soupcut-server-take-new">soupcut_server_take_new</link> <phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *
</entry><entry role="function_name"><link linkend="soupcut-server-build-uri">soupcut_server_build_uri</link> <phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>


<refsect1 id="cutter-Convenience-HTTP-server-API.description" role="desc">
<title role="desc.title">説明</title>
<para><link linkend="SoupServer"><type>SoupServer</type></link>の便利なラッパー。</para>

</refsect1>
<refsect1 id="cutter-Convenience-HTTP-server-API.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="soupcut-server-take" role="function" condition="since:1.0.8">
<title>soupcut_server_take ()</title>
<indexterm zone="soupcut-server-take" role="1.0.8"><primary>soupcut_server_take</primary></indexterm>
<programlisting language="C"><link linkend="SoupServer"><returnvalue>SoupServer</returnvalue></link> *
soupcut_server_take (<parameter><link linkend="SoupServer"><type>SoupServer</type></link> *server</parameter>);</programlisting>
<para>サーバーは tear down 時に自動的にシャットダウンされ、<link linkend="g-object-unref"><function>g_object_unref()</function></link>により解放されます。</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>server</para></entry>
<entry role="parameter_description"><para><link linkend="SoupServer"><type>SoupServer</type></link>オブジェクト。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para><parameter>server</parameter>はCutterが所有権を持つので、<link linkend="g-object-unref"><function>g_object_unref()</function></link>を呼ばないでください。</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.8">1.0.8</link></para></refsect2>
<refsect2 id="soupcut-server-take-new" role="function" condition="since:1.0.8">
<title>soupcut_server_take_new ()</title>
<indexterm zone="soupcut-server-take-new" role="1.0.8"><primary>soupcut_server_take_new</primary></indexterm>
<programlisting language="C"><link linkend="SoupServer"><returnvalue>SoupServer</returnvalue></link> *
soupcut_server_take_new (<parameter><link linkend="GMainContext"><type>GMainContext</type></link> *context</parameter>);</programlisting>
<para>Creates and returns a new <link linkend="SoupServer"><type>SoupServer</type></link>, whose context is <parameter>context</parameter>
.
The server is shut down and unref when tear down.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>サーバーの<link linkend="GMainContext"><type>GMainContext</type></link>コンテキスト。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>新たに<link linkend="SoupServer"><type>SoupServer</type></link>オブジェクトを生成します。作成されたサーバーはCutterが所有権を持つので、<link linkend="g-object-unref"><function>g_object_unref()</function></link>を呼ばないでください。</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.8">1.0.8</link></para></refsect2>
<refsect2 id="soupcut-server-build-uri" role="function" condition="since:1.0.8">
<title>soupcut_server_build_uri ()</title>
<indexterm zone="soupcut-server-build-uri" role="1.0.8"><primary>soupcut_server_build_uri</primary></indexterm>
<programlisting language="C">const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> *
soupcut_server_build_uri (<parameter><link linkend="SoupServer"><type>SoupServer</type></link> *server</parameter>,
                          <parameter>const <link linkend="gchar"><type>gchar</type></link> *path</parameter>);</programlisting>
<para>an URI is built and returned with the base uri of <parameter>server</parameter>
 and <parameter>path</parameter>
.</para>
<refsect3 role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>server</para></entry>
<entry role="parameter_description"><para><link linkend="SoupServer"><type>SoupServer</type></link>オブジェクト。</para></entry>
<entry role="parameter_annotations"/></row>
<row><entry role="parameter_name"><para>path</para></entry>
<entry role="parameter_description"><para>パス。</para></entry>
<entry role="parameter_annotations"/></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 role="returns">
<title>Returns</title>
<para>Cutterが所有するURI文字列。解放しないで下さい。</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.0.8">1.0.8</link></para></refsect2>

</refsect1>
<refsect1 id="cutter-Convenience-HTTP-server-API.other_details" role="details">
<title role="details.title">Types and Values</title>

</refsect1>
<refsect1 id="cutter-Convenience-HTTP-server-API.see-also">
<title>参考</title>
<para><link linkend="cutter-Assertions-for-HTTP-client-and-server">HTTPクライアント・サーバ用の検証</link></para>

</refsect1>

</refentry>
