/usr/share/gtk-doc/html/bonobo-activation/bonobo-activation-Registration.html is in libbonobo2-dev 2.32.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Registration</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" 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-Utilities.html" title="Utilities">
<link rel="next" href="bonobo-activation-Debugging.html" title="Debugging">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</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-Utilities.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-Debugging.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#bonobo-activation-Registration.synopsis" class="shortcut">Top</a>
|
<a href="#bonobo-activation-Registration.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="bonobo-activation-Registration"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="bonobo-activation-Registration.top_of_page"></a>Registration</span></h2>
<p>Registration — Registering CORBA objects to Bonobo Activation.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="bonobo-activation-Registration.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <bonobo-activation/bonobo-activation.h>
<a class="link" href="bonobo-activation-Registration.html#Bonobo-RegistrationResult" title="Bonobo_RegistrationResult">Bonobo_RegistrationResult</a>;
<span class="returnvalue">void</span> <a class="link" href="bonobo-activation-Registration.html#bonobo-activation-unregister-active-server" title="bonobo_activation_unregister_active_server ()">bonobo_activation_unregister_active_server</a>
(<em class="parameter"><code>const <span class="type">char</span> *iid</code></em>,
<em class="parameter"><code><span class="type">CORBA_Object</span> obj</code></em>);
<span class="returnvalue">void</span> <a class="link" href="bonobo-activation-Registration.html#bonobo-activation-registration-env-free" title="bonobo_activation_registration_env_free ()">bonobo_activation_registration_env_free</a>
(<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *reg_env</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * <a class="link" href="bonobo-activation-Registration.html#bonobo-activation-registration-env-set" title="bonobo_activation_registration_env_set ()">bonobo_activation_registration_env_set</a>
(<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *reg_env</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *value</code></em>);
<span class="returnvalue">void</span> <a class="link" href="bonobo-activation-Registration.html#bonobo-activation-registration-env-set-global" title="bonobo_activation_registration_env_set_global ()">bonobo_activation_registration_env_set_global</a>
(<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *reg_env</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> append_if_existing</code></em>);
<a class="link" href="bonobo-activation-Registration.html#Bonobo-RegistrationResult" title="Bonobo_RegistrationResult"><span class="returnvalue">Bonobo_RegistrationResult</span></a> <a class="link" href="bonobo-activation-Registration.html#bonobo-activation-register-active-server" title="bonobo_activation_register_active_server ()">bonobo_activation_register_active_server</a>
(<em class="parameter"><code>const <span class="type">char</span> *iid</code></em>,
<em class="parameter"><code><span class="type">CORBA_Object</span> obj</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *reg_env</code></em>);
const <span class="returnvalue">char</span> * <a class="link" href="bonobo-activation-Registration.html#bonobo-activation-iid-get" title="bonobo_activation_iid_get ()">bonobo_activation_iid_get</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="bonobo-activation-Registration.html#BonoboActivationPlugin" title="BonoboActivationPlugin">BonoboActivationPlugin</a>;
<a class="link" href="bonobo-activation-Registration.html#BonoboActivationPluginObject" title="BonoboActivationPluginObject">BonoboActivationPluginObject</a>;
<span class="returnvalue">void</span> <a class="link" href="bonobo-activation-Registration.html#bonobo-activation-plugin-use" title="bonobo_activation_plugin_use ()">bonobo_activation_plugin_use</a> (<em class="parameter"><code><span class="type">PortableServer_Servant</span> servant</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> impl_ptr</code></em>);
<span class="returnvalue">void</span> <a class="link" href="bonobo-activation-Registration.html#bonobo-activation-plugin-unuse" title="bonobo_activation_plugin_unuse ()">bonobo_activation_plugin_unuse</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> impl_ptr</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="bonobo-activation-Registration.description"></a><h2>Description</h2>
<p>
When writing a component which can be activated through
Bonobo Activation by clients, you need to be register your component
to Bonobo Activation once it is created.
</p>
</div>
<div class="refsect1">
<a name="bonobo-activation-Registration.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="Bonobo-RegistrationResult"></a><h3>Bonobo_RegistrationResult</h3>
<pre class="programlisting">typedef struct {
CORBA_unsigned_long _maximum, _length; Bonobo_ServerInfo* _buffer; CORBA_boolean _release; } CORBA_sequence_Bonobo_ServerInfo;
#endif
#if !defined(TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_0)
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_0 'B'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_1 'o'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_2 'n'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_3 'o'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_4 'b'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_5 'o'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_6 '_'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_7 'A'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_8 'c'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_9 't'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_10 'i'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_11 'v'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_12 'a'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_13 't'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_14 'i'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_15 'o'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_16 'n'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_17 '_'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_18 't'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_19 'y'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_20 'p'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_21 'e'
#define TC_IMPL_TC_CORBA_sequence_Bonobo_ServerInfo_22 's'
#ifdef ORBIT_IDL_C_IMODULE_Bonobo_Activation_types
static
#else
extern
#endif
ORBIT2_MAYBE_CONST struct CORBA_TypeCode_struct TC_CORBA_sequence_Bonobo_ServerInfo_struct;
#define TC_CORBA_sequence_Bonobo_ServerInfo ((CORBA_TypeCode)&TC_CORBA_sequence_Bonobo_ServerInfo_struct)
#endif
#define CORBA_sequence_Bonobo_ServerInfo__alloc() ((CORBA_sequence_Bonobo_ServerInfo *)ORBit_small_alloc (TC_CORBA_sequence_Bonobo_ServerInfo))
#define CORBA_sequence_Bonobo_ServerInfo__freekids(m,d) ORBit_small_freekids (TC_CORBA_sequence_Bonobo_ServerInfo,(m),(d))
#define CORBA_sequence_Bonobo_ServerInfo_allocbuf(l) ((Bonobo_ServerInfo*)ORBit_small_allocbuf (TC_CORBA_sequence_Bonobo_ServerInfo, (l)))
#define CORBA_sequence_Bonobo_ServerInfo_allocbuf(l) ((Bonobo_ServerInfo*)ORBit_small_allocbuf (TC_CORBA_sequence_Bonobo_ServerInfo, (l)))
#endif
#if !defined(_Bonobo_ServerInfoList_defined)
#define _Bonobo_ServerInfoList_defined 1
typedef CORBA_sequence_Bonobo_ServerInfo Bonobo_ServerInfoList;
#define Bonobo_ServerInfoList_marshal(x,y,z) CORBA_sequence_Bonobo_ServerInfo_marshal((x),(y),(z))
#define Bonobo_ServerInfoList_demarshal(x,y,z,i) CORBA_sequence_Bonobo_ServerInfo_demarshal((x),(y),(z),(i))
#if !defined(TC_IMPL_TC_Bonobo_ServerInfoList_0)
#define TC_IMPL_TC_Bonobo_ServerInfoList_0 'B'
#define TC_IMPL_TC_Bonobo_ServerInfoList_1 'o'
#define TC_IMPL_TC_Bonobo_ServerInfoList_2 'n'
#define TC_IMPL_TC_Bonobo_ServerInfoList_3 'o'
#define TC_IMPL_TC_Bonobo_ServerInfoList_4 'b'
#define TC_IMPL_TC_Bonobo_ServerInfoList_5 'o'
#define TC_IMPL_TC_Bonobo_ServerInfoList_6 '_'
#define TC_IMPL_TC_Bonobo_ServerInfoList_7 'A'
#define TC_IMPL_TC_Bonobo_ServerInfoList_8 'c'
#define TC_IMPL_TC_Bonobo_ServerInfoList_9 't'
#define TC_IMPL_TC_Bonobo_ServerInfoList_10 'i'
#define TC_IMPL_TC_Bonobo_ServerInfoList_11 'v'
#define TC_IMPL_TC_Bonobo_ServerInfoList_12 'a'
#define TC_IMPL_TC_Bonobo_ServerInfoList_13 't'
#define TC_IMPL_TC_Bonobo_ServerInfoList_14 'i'
#define TC_IMPL_TC_Bonobo_ServerInfoList_15 'o'
#define TC_IMPL_TC_Bonobo_ServerInfoList_16 'n'
#define TC_IMPL_TC_Bonobo_ServerInfoList_17 '_'
#define TC_IMPL_TC_Bonobo_ServerInfoList_18 't'
#define TC_IMPL_TC_Bonobo_ServerInfoList_19 'y'
#define TC_IMPL_TC_Bonobo_ServerInfoList_20 'p'
#define TC_IMPL_TC_Bonobo_ServerInfoList_21 'e'
#define TC_IMPL_TC_Bonobo_ServerInfoList_22 's'
#ifdef ORBIT_IDL_C_IMODULE_Bonobo_Activation_types
static
#else
extern
#endif
ORBIT2_MAYBE_CONST struct CORBA_TypeCode_struct TC_Bonobo_ServerInfoList_struct;
#define TC_Bonobo_ServerInfoList ((CORBA_TypeCode)&TC_Bonobo_ServerInfoList_struct)
#endif
#define Bonobo_ServerInfoList__alloc() ((Bonobo_ServerInfoList *)ORBit_small_alloc (TC_CORBA_sequence_Bonobo_ServerInfo))
#define Bonobo_ServerInfoList__freekids(m,d) ORBit_small_freekids (TC_CORBA_sequence_Bonobo_ServerInfo,(m),(d))
#define Bonobo_ServerInfoList_allocbuf(l) ((Bonobo_ServerInfo*)ORBit_small_allocbuf (TC_CORBA_sequence_Bonobo_ServerInfo, (l)))
#endif
#if !defined(_Bonobo_RegistrationResult_defined)
#define _Bonobo_RegistrationResult_defined 1
typedef enum {
Bonobo_ACTIVATION_REG_SUCCESS,
Bonobo_ACTIVATION_REG_NOT_LISTED,
Bonobo_ACTIVATION_REG_ALREADY_ACTIVE,
Bonobo_ACTIVATION_REG_ERROR
} Bonobo_RegistrationResult;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-activation-unregister-active-server"></a><h3>bonobo_activation_unregister_active_server ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> bonobo_activation_unregister_active_server
(<em class="parameter"><code>const <span class="type">char</span> *iid</code></em>,
<em class="parameter"><code><span class="type">CORBA_Object</span> obj</code></em>);</pre>
<p>
Unregisters <em class="parameter"><code>obj</code></em> with <em class="parameter"><code>iid</code></em> with the local bonobo-activation-server
daemon.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iid</code></em> :</span></p></td>
<td>IID of the server to unregister.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>CORBA::Object to unregister.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-activation-registration-env-free"></a><h3>bonobo_activation_registration_env_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> bonobo_activation_registration_env_free
(<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *reg_env</code></em>);</pre>
<p>
Frees the registration environment list, <em class="parameter"><code>reg_env</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>reg_env</code></em> :</span></p></td>
<td>a GSList pointer.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-activation-registration-env-set"></a><h3>bonobo_activation_registration_env_set ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * bonobo_activation_registration_env_set
(<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *reg_env</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *value</code></em>);</pre>
<p>
Sets the environment variable <em class="parameter"><code>name</code></em> to <em class="parameter"><code>value</code></em> in the
registration environment list <em class="parameter"><code>reg_env</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>reg_env</code></em> :</span></p></td>
<td>a GSList pointer.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>the name of the env variable (must not be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>the value of the env variable (may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the new start of <em class="parameter"><code>reg_env</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-activation-registration-env-set-global"></a><h3>bonobo_activation_registration_env_set_global ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> bonobo_activation_registration_env_set_global
(<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *reg_env</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> append_if_existing</code></em>);</pre>
<p>
Sets the global registration environment list with the
contents of <em class="parameter"><code>reg_env</code></em>. If <em class="parameter"><code>append_if_existing</code></em> is set to
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, the an existing global list will be overwritten.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>reg_env</code></em> :</span></p></td>
<td>a GSList pointer.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>append_if_existing</code></em> :</span></p></td>
<td>whether or not to append to the global list.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-activation-register-active-server"></a><h3>bonobo_activation_register_active_server ()</h3>
<pre class="programlisting"><a class="link" href="bonobo-activation-Registration.html#Bonobo-RegistrationResult" title="Bonobo_RegistrationResult"><span class="returnvalue">Bonobo_RegistrationResult</span></a> bonobo_activation_register_active_server
(<em class="parameter"><code>const <span class="type">char</span> *iid</code></em>,
<em class="parameter"><code><span class="type">CORBA_Object</span> obj</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *reg_env</code></em>);</pre>
<p>
Registers <em class="parameter"><code>obj</code></em> with <em class="parameter"><code>iid</code></em> with the local bonobo-activation-server
daemon.
</p>
<p>
If <em class="parameter"><code>reg_env</code></em> is not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <em class="parameter"><code>obj</code></em> will be registered in such a
way that if a client who's environment differs from the
environment specified in <em class="parameter"><code>reg_env</code></em>, then another attempt
to activate <em class="parameter"><code>iid</code></em> will not result in a reference to <em class="parameter"><code>obj</code></em>
being returned, but rather another instance of <em class="parameter"><code>iid</code></em> being
activated.
</p>
<p>
So, for example, you can ensure that a seperate instance
of the component is activated for each distinct X display
(and screen) by:
</p>
<p>
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5</pre></td>
<td class="listing_code"><pre class="programlisting">display_name <span class="gtkdoc opt">=</span> <span class="function"><a href="/usr/share/gtk-doc/html/gdk3/GdkDisplay.html#gdk-display-get-name">gdk_display_get_name</a></span> <span class="gtkdoc opt">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gdk3/GdkDisplay.html#gdk-display-get-default">gdk_display_get_default</a></span><span class="gtkdoc opt">());</span>
reg_env <span class="gtkdoc opt">=</span> <span class="function"><a href="bonobo-activation-Registration.html#bonobo-activation-registration-env-set">bonobo_activation_registration_env_set</a></span> <span class="gtkdoc opt">(</span>
reg_env<span class="gtkdoc opt">,</span> <span class="string">"DISPLAY"</span><span class="gtkdoc opt">,</span> display_name<span class="gtkdoc opt">);</span>
<span class="function"><a href="bonobo-activation-Registration.html#bonobo-activation-register-active-server">bonobo_activation_register_active_server</a></span> <span class="gtkdoc opt">(</span>iid<span class="gtkdoc opt">,</span> active_server<span class="gtkdoc opt">,</span> reg_env<span class="gtkdoc opt">);</span>
<span class="function"><a href="bonobo-activation-Registration.html#bonobo-activation-registration-env-free">bonobo_activation_registration_env_free</a></span> <span class="gtkdoc opt">(</span>reg_env<span class="gtkdoc opt">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
</p>
<p>
If <em class="parameter"><code>reg_env</code></em> is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the global registration environment
list will be used if it is set. See
<a class="link" href="bonobo-activation-Registration.html#bonobo-activation-registration-env-set-global" title="bonobo_activation_registration_env_set_global ()"><code class="function">bonobo_activation_registration_env_set_global()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>iid</code></em> :</span></p></td>
<td>IID of the server to register.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>obj</code></em> :</span></p></td>
<td>CORBA::Object to register.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>reg_env</code></em> :</span></p></td>
<td>the registration environment.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>status of the registration.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-activation-iid-get"></a><h3>bonobo_activation_iid_get ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> * bonobo_activation_iid_get (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="BonoboActivationPlugin"></a><h3>BonoboActivationPlugin</h3>
<pre class="programlisting">typedef struct {
const BonoboActivationPluginObject *plugin_object_list;
const char *description;
gpointer dummy[8];
} BonoboActivationPlugin;
</pre>
<p>
Components which want to be activated as
shared libraries must export an BonoboActivationPlugin
structure of name <span class="structname">Bonobo_Plugin_info</span>.
An exmaple of how to use it folows:
</p>
<pre class="programlisting">
static CORBA_Object
hi_shlib_make_object (PortableServer_POA poa,
const char *iid,
gpointer impl_ptr,
CORBA_Environment *ev)
{
CORBA_Object object_ref;
object_ref = impl_Hi__create (poa, ev);
if (object_ref == CORBA_OBJECT_NIL
|| ev->_major != CORBA_NO_EXCEPTION) {
printf ("Server cannot get objref\n");
return CORBA_OBJECT_NIL;
}
bonobo_activation_plugin_use (poa, impl_ptr);
return object_ref;
}
static const BonoboActivationPluginObject hi_plugin_list[] = {
{
"OAFIID:Hi:20000923",
hi_shlib_make_object
},
{
NULL
}
};
const BonoboActivationPlugin Bonobo_Plugin_info = {
hi_plugin_list,
"Hi example"
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="BonoboActivationPluginObject"></a><h3>BonoboActivationPluginObject</h3>
<pre class="programlisting">typedef struct {
const char *iid;
/* This routine should call bonobo_activation_plugin_use(servant, impl_ptr),
* as should all routines which activate CORBA objects
* implemented by this shared library. This needs to be done
* before making any CORBA calls on the object, or
* passing that object around. First thing after servant creation
* always works. :)
*/
CORBA_Object (*activate) (PortableServer_POA poa,
const char *iid,
gpointer impl_ptr, /* This pointer should be stored by the implementation
* to be passed to bonobo_activation_plugin_unuse() in the
* implementation's destruction routine. */
CORBA_Environment *ev);
gpointer dummy[4];
} BonoboActivationPluginObject;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-activation-plugin-use"></a><h3>bonobo_activation_plugin_use ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> bonobo_activation_plugin_use (<em class="parameter"><code><span class="type">PortableServer_Servant</span> servant</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> impl_ptr</code></em>);</pre>
<p>
You should call this routine to activate a shared library-based
CORBA Object. It will be called by OAF if the component exports
correctly an <a class="link" href="bonobo-activation-Registration.html#BonoboActivationPlugin" title="BonoboActivationPlugin"><code class="literal">BonoboActivationPlugin</code></a> structure named "Bonobo_Plugin_info".
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>servant</code></em> :</span></p></td>
<td>The servant that was created</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>impl_ptr</code></em> :</span></p></td>
<td>The impl_ptr that was passed to the original activation routine</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-activation-plugin-unuse"></a><h3>bonobo_activation_plugin_unuse ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> bonobo_activation_plugin_unuse (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> impl_ptr</code></em>);</pre>
<p>
Side effects: May arrange for the shared library that the
implementation is in to be unloaded.
</p>
<p>
When a shlib plugin for a CORBA object is destroying an
implementation, it should call this function to make sure that the
shared library is unloaded as needed.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>impl_ptr</code></em> :</span></p></td>
<td>The impl_ptr that was passed to the activation routine</td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.19</div>
</body>
</html>
|