<refentry id="streamtuner-STPlugin">
<refmeta>
<refentrytitle>STPlugin</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>STREAMTUNER Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>STPlugin</refname><refpurpose>an object for describing a plugin.</refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>

<synopsis>



struct      <link linkend="STPlugin">STPlugin</link>;
<link linkend="void">void</link>        <link linkend="st-plugin-set-name">st_plugin_set_name</link>              (<link linkend="STPlugin">STPlugin</link> *plugin,
                                             const <link linkend="char">char</link> *name);
<link linkend="void">void</link>        <link linkend="st-plugin-set-label">st_plugin_set_label</link>             (<link linkend="STPlugin">STPlugin</link> *plugin,
                                             const <link linkend="char">char</link> *label);
<link linkend="void">void</link>        <link linkend="st-plugin-set-icon-from-pixbuf">st_plugin_set_icon_from_pixbuf</link>  (<link linkend="STPlugin">STPlugin</link> *plugin,
                                             <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);
<link linkend="gboolean">gboolean</link>    (<link linkend="STPluginGetInfoCallback">*STPluginGetInfoCallback</link>)      (<link linkend="STPlugin">STPlugin</link> *plugin,
                                             <link linkend="GError">GError</link> **err);
<link linkend="gboolean">gboolean</link>    (<link linkend="STPluginInitCallback">*STPluginInitCallback</link>)         (<link linkend="GError">GError</link> **err);

</synopsis>
</refsynopsisdiv>









<refsect1>
<title>Description</title>
<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="STPlugin"/>struct STPlugin</title>
<indexterm><primary>STPlugin</primary></indexterm><programlisting>struct STPlugin {

  GObject		object;

  STPluginPrivate	*priv;

  gpointer		reserved[16];
};
</programlisting>
<para>

</para></refsect2>
<refsect2>
<title><anchor id="st-plugin-set-name"/>st_plugin_set_name ()</title>
<indexterm><primary>st_plugin_set_name</primary></indexterm><programlisting><link linkend="void">void</link>        st_plugin_set_name              (<link linkend="STPlugin">STPlugin</link> *plugin,
                                             const <link linkend="char">char</link> *name);</programlisting>
<para>
Sets the plugin internal name.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>plugin</parameter>&nbsp;:</term>
<listitem><simpara> a plugin.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> the plugin name.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="st-plugin-set-label"/>st_plugin_set_label ()</title>
<indexterm><primary>st_plugin_set_label</primary></indexterm><programlisting><link linkend="void">void</link>        st_plugin_set_label             (<link linkend="STPlugin">STPlugin</link> *plugin,
                                             const <link linkend="char">char</link> *label);</programlisting>
<para>
Sets the plugin label, which will be used in the plugins
preferences, and in various other places of the user interface.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>plugin</parameter>&nbsp;:</term>
<listitem><simpara> a plugin.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>label</parameter>&nbsp;:</term>
<listitem><simpara> the plugin label.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="st-plugin-set-icon-from-pixbuf"/>st_plugin_set_icon_from_pixbuf ()</title>
<indexterm><primary>st_plugin_set_icon_from_pixbuf</primary></indexterm><programlisting><link linkend="void">void</link>        st_plugin_set_icon_from_pixbuf  (<link linkend="STPlugin">STPlugin</link> *plugin,
                                             <link linkend="GdkPixbuf">GdkPixbuf</link> *pixbuf);</programlisting>
<para>
Sets the plugin icon from a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>plugin</parameter>&nbsp;:</term>
<listitem><simpara> a plugin.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pixbuf</parameter>&nbsp;:</term>
<listitem><simpara> an icon.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="STPluginGetInfoCallback"/>STPluginGetInfoCallback ()</title>
<indexterm><primary>STPluginGetInfoCallback</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    (*STPluginGetInfoCallback)      (<link linkend="STPlugin">STPlugin</link> *plugin,
                                             <link linkend="GError">GError</link> **err);</programlisting>
<para>
Specifies the type of the plugin information function.
</para>
<para>
If a plugin contains a function named <link linkend="plugin-get-info"><function>plugin_get_info()</function></link>, it will be
called before <link linkend="plugin-init"><function>plugin_init()</function></link>. The function should set the plugin
information using <link linkend="st-plugin-set-name"><function>st_plugin_set_name()</function></link>, <link linkend="st-plugin-set-label"><function>st_plugin_set_label()</function></link>, etc.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>plugin</parameter>&nbsp;:</term>
<listitem><simpara> a plugin.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>err</parameter>&nbsp;:</term>
<listitem><simpara> a location to store errors.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the function should return <literal>FALSE</literal> if streamtuner must
not initialize the plugin. In such case it should also set <parameter>err</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="STPluginInitCallback"/>STPluginInitCallback ()</title>
<indexterm><primary>STPluginInitCallback</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>    (*STPluginInitCallback)         (<link linkend="GError">GError</link> **err);</programlisting>
<para>
Specifies the type of the plugin initialization function.
</para>
<para>
A plugin must contain a function named <link linkend="plugin-init"><function>plugin_init()</function></link>, which will be
called when the plugin is loaded.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>err</parameter>&nbsp;:</term>
<listitem><simpara> a location to store errors.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> the function should return <literal>FALSE</literal> if the plugin could
not be initialized. In such case it should also set <parameter>err</parameter>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>



<refsect1>
<title>See Also</title>
<para>
<link linkend="STHandler"><type>STHandler</type></link>, <link linkend="streamtuner-st-version-api">st-version</link>
</para>
</refsect1>

</refentry>
