1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>st-action</title><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="streamtuner Developers Manual"><link rel="up" href="api-reference.html" title="API Reference"><link rel="prev" href="api-reference.html" title="API Reference"><link rel="next" href="streamtuner-st-category-api.html" title="STCategory"><meta name="generator" content="GTK-Doc V1.2 (XML mode)"><style type="text/css">
.synopsis, .classsynopsis {
background: #eeeeee;
border: solid 1px #aaaaaa;
padding: 0.5em;
}
.programlisting {
background: #feffde;
border: solid 1px #e9ed1c;
padding: 0.5em;
}
.variablelist {
padding: 4px;
margin-left: 3em;
}
.navigation {
background: #daffd1;
border: solid 1px #74ff54;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.navigation a {
color: #2fba0f;
}
.navigation a:visited {
color: #22850b;
}
.navigation .title {
font-size: 200%;
}
</style></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="api-reference.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="api-reference.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">streamtuner Developers Manual</th><td><a accesskey="n" href="streamtuner-st-category-api.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="streamtuner-st-action-api"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">st-action</span></h2><p>st-action — functions for defining and executing actions.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
void <a href="streamtuner-st-action-api.html#st-action-register">st_action_register</a> (const char *id,
const char *label,
const char *command);
gboolean <a href="streamtuner-st-action-api.html#st-action-run">st_action_run</a> (const char *id,
const char *uri,
GError **err);
</pre></div><div class="refsect1" lang="en"><a name="id2535208"></a><h2>Description</h2><p>
These functions provide support for defining actions which can be
customized from the streamtuner preferences, and for running them with
an URI parameter.
</p></div><div class="refsect1" lang="en"><a name="id2535218"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2535701"></a><h3><a name="st-action-register"></a>st_action_register ()</h3><a class="indexterm" name="id2535709"></a><pre class="programlisting">void st_action_register (const char *id,
const char *label,
const char *command);</pre><p>
Registers a new action. The action will appear in the applications
page of the streamtuner preferences, and the user will be able to
modify its associated command.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>id</tt></i>:</span></td><td> an unique id for the action.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>label</tt></i>:</span></td><td> a human-readable label for the action.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>command</tt></i>:</span></td><td> the default command for the action, or <tt class="literal">NULL</tt>.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2535801"></a><h3><a name="st-action-run"></a>st_action_run ()</h3><a class="indexterm" name="id2535810"></a><pre class="programlisting">gboolean st_action_run (const char *id,
const char *uri,
GError **err);</pre><p>
Runs action <i class="parameter"><tt>id</tt></i> with <i class="parameter"><tt>uri</tt></i> as parameter. The action must have been
previously registered with <a href="streamtuner-st-action-api.html#st-action-register"><tt class="function">st_action_register()</tt></a>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>id</tt></i>:</span></td><td> the id of the action to run.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>uri</tt></i>:</span></td><td> the URI to run the action on.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>err</tt></i>:</span></td><td> a location to report errors, or <tt class="literal">NULL</tt>.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <tt class="literal">TRUE</tt> on success, <tt class="literal">FALSE</tt> on failure.
</td></tr></tbody></table></div></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="api-reference.html"><b><<API Reference</b></a></td><td align="right"><a accesskey="n" href="streamtuner-st-category-api.html"><b>STCategory>></b></a></td></tr></table></body></html>
|