File: //usr/share/gtk-doc/html/bonobo-activation/bonobo-activation-Utilities.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Utilities</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="Bonobo Activation API Reference Manual">
<link rel="up" href="api-reference.html" title="API Reference">
<link rel="prev" href="bonobo-activation-Query-and-Activation.html" title="Query and Activation">
<link rel="next" href="bonobo-activation-Registration.html" title="Registration">
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="tutorial.html" title="Bonobo Activation tutorial">
<link rel="chapter" href="configuring.html" title="Configuring Bonobo Activation">
<link rel="chapter" href="architecture.html" title="Bonobo Activation Architecture">
<link rel="chapter" href="query-langage.html" title="Bonobo Activation Query Langage">
<link rel="chapter" href="server-xml-reference.html" title=".server file format reference">
<link rel="chapter" href="migrating.html" title="Migrating from gnorba to Bonobo-activation">
<link rel="chapter" href="api-reference.html" title="API Reference">
<link rel="article" href="lgpl.html" title="GNU Lesser General Public License">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="bonobo-activation-Query-and-Activation.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">Bonobo Activation API Reference Manual</th>
<td><a accesskey="n" href="bonobo-activation-Registration.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2976624" class="shortcut">Top</a>
 | 
<a href="#id2976894" class="shortcut">Description</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="bonobo-activation-Utilities"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2>
<a name="id2976624"></a><span class="refentrytitle">Utilities</span>
</h2>
<p>Utilities — Random misc utilities to manipulate Bonobo_ServerInfo structures.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">
#include <bonobo-activation/bonobo-activation.h>
enum <a href="bonobo-activation-Utilities.html#Bonobo-ActivationPropertyType">Bonobo_ActivationPropertyType</a>;
Bonobo_ActivationProperty* <a href="bonobo-activation-Utilities.html#bonobo-server-info-prop-find">bonobo_server_info_prop_find</a>
(Bonobo_ServerInfo *server,
const char *prop_name);
<a href="bonobo-activation-Query-and-Activation.html#Bonobo-ActivationID">Bonobo_ActivationID</a> <a href="bonobo-activation-Utilities.html#bonobo-activation-info-stringify">bonobo_activation_info_stringify</a>
(const BonoboActivationInfo *actinfo);
BonoboActivationInfo* <a href="bonobo-activation-Utilities.html#bonobo-activation-servinfo-to-actinfo">bonobo_activation_servinfo_to_actinfo</a>
(const Bonobo_ServerInfo *servinfo);
BonoboActivationInfo* <a href="bonobo-activation-Utilities.html#bonobo-activation-id-parse">bonobo_activation_id_parse</a>
(const CORBA_char *actid);
BonoboActivationInfo* <a href="bonobo-activation-Utilities.html#bonobo-activation-info-new">bonobo_activation_info_new</a>
(void);
void <a href="bonobo-activation-Utilities.html#bonobo-activation-info-free">bonobo_activation_info_free</a> (BonoboActivationInfo *actinfo);
const char* <a href="bonobo-activation-Utilities.html#bonobo-server-info-prop-lookup">bonobo_server_info_prop_lookup</a> (Bonobo_ServerInfo *server,
const char *prop_name,
<a
href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"
>GSList</a> *i18n_languages);
typedef <a href="bonobo-activation-Utilities.html#Bonobo-ServerInfoList">Bonobo_ServerInfoList</a>;
Bonobo_ServerInfo* <a href="bonobo-activation-Utilities.html#bonobo-activation-get-default-component-for-mime-type">bonobo_activation_get_default_component_for_mime_type</a>
(const char *mime_type);
<a
href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>* <a href="bonobo-activation-Utilities.html#bonobo-activation-get-all-components-for-mime-type">bonobo_activation_get_all_components_for_mime_type</a>
(const char *mime_type);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="id2976894"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1" lang="en">
<a name="id2976909"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2976919"></a><h3>
<a name="Bonobo-ActivationPropertyType"></a>enum Bonobo_ActivationPropertyType</h3>
<a class="indexterm" name="id2976932"></a><pre class="programlisting">typedef enum {
Bonobo_ACTIVATION_P_STRING,
Bonobo_ACTIVATION_P_NUMBER,
Bonobo_ACTIVATION_P_BOOLEAN,
Bonobo_ACTIVATION_P_STRINGV
} Bonobo_ActivationPropertyType;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2976950"></a><h3>
<a name="bonobo-server-info-prop-find"></a>bonobo_server_info_prop_find ()</h3>
<a class="indexterm" name="id2976963"></a><pre class="programlisting">Bonobo_ActivationProperty* bonobo_server_info_prop_find
(Bonobo_ServerInfo *server,
const char *prop_name);</pre>
<p>
Tries to find a server with the given property. Returns
NULL if not found.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>server</code></em> :</span></td>
<td> the server where to seek the data.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>prop_name</code></em> :</span></td>
<td> the data to seek in the server.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a pointer to the <code class="literal">Bonobo_ActivationProperty</code> structure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977061"></a><h3>
<a name="bonobo-activation-info-stringify"></a>bonobo_activation_info_stringify ()</h3>
<a class="indexterm" name="id2977077"></a><pre class="programlisting"><a href="bonobo-activation-Query-and-Activation.html#Bonobo-ActivationID">Bonobo_ActivationID</a> bonobo_activation_info_stringify
(const BonoboActivationInfo *actinfo);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">bonobo_activation_info_stringify</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Serializes <em class="parameter"><code>actinfo</code></em> into a char *. Should be freed with <a
href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"
><code class="function">g_free()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>actinfo</code></em> :</span></td>
<td> the <code class="literal">BonoboActivationInfo</code> to flatten.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the serialized version of <em class="parameter"><code>actinfo</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977186"></a><h3>
<a name="bonobo-activation-servinfo-to-actinfo"></a>bonobo_activation_servinfo_to_actinfo ()</h3>
<a class="indexterm" name="id2977202"></a><pre class="programlisting">BonoboActivationInfo* bonobo_activation_servinfo_to_actinfo
(const Bonobo_ServerInfo *servinfo);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">bonobo_activation_servinfo_to_actinfo</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
This function converts a <code class="literal">Bonobo_ServerInfo</code> structure to a
<code class="literal">BonoboActivationInfo</code> structure. The returned structure should
be freed with bonobo_activation_info_free.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>servinfo</code></em> :</span></td>
<td> An array of <code class="literal">Bonobo_ServerInfo</code> structures.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a newly allocated initialized <code class="literal">BonoboActivationInfo</code> structure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977324"></a><h3>
<a name="bonobo-activation-id-parse"></a>bonobo_activation_id_parse ()</h3>
<a class="indexterm" name="id2977340"></a><pre class="programlisting">BonoboActivationInfo* bonobo_activation_id_parse
(const CORBA_char *actid);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">bonobo_activation_id_parse</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Returns a pointer to a newly allocated <code class="literal">BonoboActivationInfo</code>
structure (to be freed with bonobo_activation_info_free) initialized
with the data of <em class="parameter"><code>actid</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>actid</code></em> :</span></td>
<td> the activation id structure.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the <code class="literal">BonoboActivationInfo</code> corresponding to <em class="parameter"><code>actid</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977450"></a><h3>
<a name="bonobo-activation-info-new"></a>bonobo_activation_info_new ()</h3>
<a class="indexterm" name="id2977466"></a><pre class="programlisting">BonoboActivationInfo* bonobo_activation_info_new
(void);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">bonobo_activation_info_new</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
This function allocates a <code class="literal">BonoboActicationInfo</code> structure and returns it.
Should NOT be called from outside of this code.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a newly allocated non-initialized <code class="literal">BonoboActicationInfo</code> structure.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977544"></a><h3>
<a name="bonobo-activation-info-free"></a>bonobo_activation_info_free ()</h3>
<a class="indexterm" name="id2977560"></a><pre class="programlisting">void bonobo_activation_info_free (BonoboActivationInfo *actinfo);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">bonobo_activation_info_free</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Frees <em class="parameter"><code>actinfo</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>actinfo</code></em> :</span></td>
<td> the <code class="literal">BonoboActivationInfo</code> structure to free.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977640"></a><h3>
<a name="bonobo-server-info-prop-lookup"></a>bonobo_server_info_prop_lookup ()</h3>
<a class="indexterm" name="id2977653"></a><pre class="programlisting">const char* bonobo_server_info_prop_lookup (Bonobo_ServerInfo *server,
const char *prop_name,
<a
href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"
>GSList</a> *i18n_languages);</pre>
<p>
</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>server</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>prop_name</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>i18n_languages</code></em> :</span></td>
<td>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977757"></a><h3>
<a name="Bonobo-ServerInfoList"></a>Bonobo_ServerInfoList</h3>
<a class="indexterm" name="id2977770"></a><pre class="programlisting">typedef CORBA_sequence_Bonobo_ServerInfo Bonobo_ServerInfoList;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977786"></a><h3>
<a name="bonobo-activation-get-default-component-for-mime-type"></a>bonobo_activation_get_default_component_for_mime_type ()</h3>
<a class="indexterm" name="id2977803"></a><pre class="programlisting">Bonobo_ServerInfo* bonobo_activation_get_default_component_for_mime_type
(const char *mime_type);</pre>
<p>
Query the MIME database for the default Bonobo component to be activated to
view files of MIME type <em class="parameter"><code>mime_type</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>mime_type</code></em> :</span></td>
<td> a const char * containing a mime type, e.g. "image/png".
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a <span class="type">Bonobo_ServerInfo</span> * representing the OAF server to be activated
to get a reference to the proper component.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.16.0
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2977888"></a><h3>
<a name="bonobo-activation-get-all-components-for-mime-type"></a>bonobo_activation_get_all_components_for_mime_type ()</h3>
<a class="indexterm" name="id2977904"></a><pre class="programlisting"><a
href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>* bonobo_activation_get_all_components_for_mime_type
(const char *mime_type);</pre>
<p>
Return an alphabetically sorted list of <span class="type">Bonobo_ServerInfo</span>
data structures representing all Bonobo components registered
to handle files of <em class="parameter"><code>mime_type</code></em> (and supertypes).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>mime_type</code></em> :</span></td>
<td> a const char * containing a mime type, e.g. "image/png".
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a <a
href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"
><span class="type">GList</span></a> * where the elements are <span class="type">Bonobo_ServerInfo</span> *
representing components that can handle <em class="parameter"><code>mime_type</code></em>.
</td>
</tr>
</tbody>
</table></div>
<p>Since 2.16.0
</p>
</div>
</div>
</div>
</body>
</html>