/usr/share/gtk-doc/html/camel/camel-camel-object-bag.html is in evolution-data-server-doc 3.28.1-1ubuntu1.
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 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>camel-object-bag: Camel Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="Camel Reference Manual">
<link rel="up" href="Fundamentals.html" title="Fundamentals">
<link rel="prev" href="camel-CamelObject.html" title="CamelObject">
<link rel="next" href="camel-CamelOperation.html" title="CamelOperation">
<meta name="generator" content="GTK-Doc V1.27 (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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#camel-camel-object-bag.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="Fundamentals.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="camel-CamelObject.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="camel-CamelOperation.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="camel-camel-object-bag"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="camel-camel-object-bag.top_of_page"></a>camel-object-bag</span></h2>
<p>camel-object-bag</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="camel-camel-object-bag.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="camel-camel-object-bag.html#CamelCopyFunc" title="CamelCopyFunc ()">*CamelCopyFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="returnvalue">CamelObjectBag</span></a> *
</td>
<td class="function_name">
<a class="link" href="camel-camel-object-bag.html#camel-object-bag-new" title="camel_object_bag_new ()">camel_object_bag_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
</td>
<td class="function_name">
<a class="link" href="camel-camel-object-bag.html#camel-object-bag-get" title="camel_object_bag_get ()">camel_object_bag_get</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
</td>
<td class="function_name">
<a class="link" href="camel-camel-object-bag.html#camel-object-bag-peek" title="camel_object_bag_peek ()">camel_object_bag_peek</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
</td>
<td class="function_name">
<a class="link" href="camel-camel-object-bag.html#camel-object-bag-reserve" title="camel_object_bag_reserve ()">camel_object_bag_reserve</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="camel-camel-object-bag.html#camel-object-bag-add" title="camel_object_bag_add ()">camel_object_bag_add</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="camel-camel-object-bag.html#camel-object-bag-abort" title="camel_object_bag_abort ()">camel_object_bag_abort</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="camel-camel-object-bag.html#camel-object-bag-rekey" title="camel_object_bag_rekey ()">camel_object_bag_rekey</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
</td>
<td class="function_name">
<a class="link" href="camel-camel-object-bag.html#camel-object-bag-list" title="camel_object_bag_list ()">camel_object_bag_list</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="camel-camel-object-bag.html#camel-object-bag-remove" title="camel_object_bag_remove ()">camel_object_bag_remove</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="camel-camel-object-bag.html#camel-object-bag-destroy" title="camel_object_bag_destroy ()">camel_object_bag_destroy</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="camel-camel-object-bag.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag">CamelObjectBag</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="camel-camel-object-bag.description"></a><h2>Description</h2>
</div>
<div class="refsect1">
<a name="camel-camel-object-bag.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="CamelCopyFunc"></a><h3>CamelCopyFunc ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
<span class="c_punctuation">(</span>*CamelCopyFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> object</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="camel-object-bag-new"></a><h3>camel_object_bag_new ()</h3>
<pre class="programlisting"><a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="returnvalue">CamelObjectBag</span></a> *
camel_object_bag_new (<em class="parameter"><code><a href="../glib/glib-Hash-Tables.html#GHashFunc"><span class="type">GHashFunc</span></a> key_hash_func</code></em>,
<em class="parameter"><code><a href="../glib/glib-Hash-Tables.html#GEqualFunc"><span class="type">GEqualFunc</span></a> key_equal_func</code></em>,
<em class="parameter"><code><a class="link" href="camel-camel-object-bag.html#CamelCopyFunc" title="CamelCopyFunc ()"><span class="type">CamelCopyFunc</span></a> key_copy_func</code></em>,
<em class="parameter"><code><a href="../glib/glib-Miscellaneous-Utility-Functions.html#GFreeFunc"><span class="type">GFreeFunc</span></a> key_free_func</code></em>);</pre>
<p>Returns a new object bag. Object bags are keyed hash tables of objects
that can be updated atomically using transaction semantics. Use
<a class="link" href="camel-camel-object-bag.html#camel-object-bag-destroy" title="camel_object_bag_destroy ()"><code class="function">camel_object_bag_destroy()</code></a> to free the object bag.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="camel-object-bag-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>key_hash_func</p></td>
<td class="parameter_description"><p>a hashing function for keys. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>key_equal_func</p></td>
<td class="parameter_description"><p>a comparison function for keys. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>key_copy_func</p></td>
<td class="parameter_description"><p>a function to copy keys. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>key_free_func</p></td>
<td class="parameter_description"><p>a function to free keys. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="camel-object-bag-new.returns"></a><h4>Returns</h4>
<p> a newly-allocated <a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="camel-object-bag-get"></a><h3>camel_object_bag_get ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
camel_object_bag_get (<em class="parameter"><code><a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a> *bag</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> key</code></em>);</pre>
<p>Lookup an object by <em class="parameter"><code>key</code></em>
. If the key is currently reserved, the function
will block until another thread commits or aborts the reservation. The
caller owns the reference to the returned object. Use <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>
to unreference it.</p>
<div class="refsect3">
<a name="camel-object-bag-get.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bag</p></td>
<td class="parameter_description"><p>a <a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>a key</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="camel-object-bag-get.returns"></a><h4>Returns</h4>
<p>the object corresponding to <em class="parameter"><code>key</code></em>
, or
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not found. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="camel-object-bag-peek"></a><h3>camel_object_bag_peek ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
camel_object_bag_peek (<em class="parameter"><code><a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a> *bag</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> key</code></em>);</pre>
<p>Returns the object for <em class="parameter"><code>key</code></em>
in <em class="parameter"><code>bag</code></em>
, ignoring any reservations. If it
isn't committed, then it isn't considered. This should only be used
where reliable transactional-based state is not required.</p>
<p>Unlink other "peek" operations, the caller owns the returned object
reference. Use <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> to unreference it.</p>
<div class="refsect3">
<a name="camel-object-bag-peek.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bag</p></td>
<td class="parameter_description"><p>a <a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>an unreserved key</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="camel-object-bag-peek.returns"></a><h4>Returns</h4>
<p>the object for <em class="parameter"><code>key</code></em>
, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>key</code></em>
is reserved or not found. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="camel-object-bag-reserve"></a><h3>camel_object_bag_reserve ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
camel_object_bag_reserve (<em class="parameter"><code><a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a> *bag</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> key</code></em>);</pre>
<p>Reserves <em class="parameter"><code>key</code></em>
in <em class="parameter"><code>bag</code></em>
. If <em class="parameter"><code>key</code></em>
is already reserved in another thread,
then wait until the reservation has been committed.</p>
<p>After reserving <em class="parameter"><code>key</code></em>
, you either get a reference to the object
corresponding to <em class="parameter"><code>key</code></em>
(similar to <a class="link" href="camel-camel-object-bag.html#camel-object-bag-get" title="camel_object_bag_get ()"><code class="function">camel_object_bag_get()</code></a>) or you get
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, signifying that you MUST call either <a class="link" href="camel-camel-object-bag.html#camel-object-bag-add" title="camel_object_bag_add ()"><code class="function">camel_object_bag_add()</code></a> or
<a class="link" href="camel-camel-object-bag.html#camel-object-bag-abort" title="camel_object_bag_abort ()"><code class="function">camel_object_bag_abort()</code></a>.</p>
<div class="refsect3">
<a name="camel-object-bag-reserve.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bag</p></td>
<td class="parameter_description"><p>a <a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>the key to reserve</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="camel-object-bag-reserve.returns"></a><h4>Returns</h4>
<p>the object for <em class="parameter"><code>key</code></em>
, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>key</code></em>
is not found. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="camel-object-bag-add"></a><h3>camel_object_bag_add ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
camel_object_bag_add (<em class="parameter"><code><a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a> *bag</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> key</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
<p>Adds <em class="parameter"><code>object</code></em>
to <em class="parameter"><code>bag</code></em>
. The <em class="parameter"><code>key</code></em>
MUST have been previously reserved using
<a class="link" href="camel-camel-object-bag.html#camel-object-bag-reserve" title="camel_object_bag_reserve ()"><code class="function">camel_object_bag_reserve()</code></a>.</p>
<div class="refsect3">
<a name="camel-object-bag-add.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bag</p></td>
<td class="parameter_description"><p>a <a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>a reserved key</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>object</p></td>
<td class="parameter_description"><p>a <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="camel-object-bag-abort"></a><h3>camel_object_bag_abort ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
camel_object_bag_abort (<em class="parameter"><code><a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a> *bag</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> key</code></em>);</pre>
<p>Aborts a key reservation.</p>
<div class="refsect3">
<a name="camel-object-bag-abort.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bag</p></td>
<td class="parameter_description"><p>a <a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>a reserved key</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="camel-object-bag-rekey"></a><h3>camel_object_bag_rekey ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
camel_object_bag_rekey (<em class="parameter"><code><a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a> *bag</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> new_key</code></em>);</pre>
<p>Changes the key for <em class="parameter"><code>object</code></em>
to <em class="parameter"><code>new_key</code></em>
, atomically.</p>
<p>It is considered a programming error if <em class="parameter"><code>object</code></em>
is not found in <em class="parameter"><code>bag</code></em>
.
In such case the function will emit a terminal warning and return.</p>
<div class="refsect3">
<a name="camel-object-bag-rekey.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bag</p></td>
<td class="parameter_description"><p>a <a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>object</p></td>
<td class="parameter_description"><p>a <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>new_key</p></td>
<td class="parameter_description"><p>a new key for <em class="parameter"><code>object</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="camel-object-bag-list"></a><h3>camel_object_bag_list ()</h3>
<pre class="programlisting"><a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="returnvalue">GPtrArray</span></a> *
camel_object_bag_list (<em class="parameter"><code><a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a> *bag</code></em>);</pre>
<p>Returns a <a href="../glib/glib-Pointer-Arrays.html#GPtrArray"><span class="type">GPtrArray</span></a> of all the objects in the bag. The caller owns
both the array and the object references, so to free the array use:</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</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-foreach">g_ptr_array_foreach</a></span> <span class="gtkdoc opt">(</span>array<span class="gtkdoc opt">, (</span>GFunc<span class="gtkdoc opt">)</span> g_object_unref<span class="gtkdoc opt">,</span> NULL<span class="gtkdoc opt">);</span>
<span class="function"><a href="../glib/glib-Pointer-Arrays.html#g-ptr-array-free">g_ptr_array_free</a></span> <span class="gtkdoc opt">(</span>array<span class="gtkdoc opt">,</span> TRUE<span class="gtkdoc opt">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<div class="refsect3">
<a name="camel-object-bag-list.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>bag</p></td>
<td class="parameter_description"><p>a <a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="camel-object-bag-list.returns"></a><h4>Returns</h4>
<p>an array of objects in <em class="parameter"><code>bag</code></em>
. </p>
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GObject][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="camel-object-bag-remove"></a><h3>camel_object_bag_remove ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
camel_object_bag_remove (<em class="parameter"><code><a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a> *bag</code></em>,
<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>);</pre>
<p>Removes <em class="parameter"><code>object</code></em>
from <em class="parameter"><code>bag</code></em>
.</p>
<div class="refsect3">
<a name="camel-object-bag-remove.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>bag</p></td>
<td class="parameter_description"><p>a <a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>object</p></td>
<td class="parameter_description"><p>a <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="camel-object-bag-destroy"></a><h3>camel_object_bag_destroy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
camel_object_bag_destroy (<em class="parameter"><code><a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a> *bag</code></em>);</pre>
<p>Frees <em class="parameter"><code>bag</code></em>
. As a precaution, the function will emit a warning to standard
error and return without freeing <em class="parameter"><code>bag</code></em>
if <em class="parameter"><code>bag</code></em>
still has reserved keys.</p>
<div class="refsect3">
<a name="camel-object-bag-destroy.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>bag</p></td>
<td class="parameter_description"><p>a <a class="link" href="camel-camel-object-bag.html#CamelObjectBag" title="CamelObjectBag"><span class="type">CamelObjectBag</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="camel-camel-object-bag.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="CamelObjectBag"></a><h3>CamelObjectBag</h3>
<pre class="programlisting">typedef struct _CamelObjectBag CamelObjectBag;</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.27</div>
</body>
</html>
|