2 <!-- This file was automatically generated from C sources - DO NOT EDIT!
3 To affect the contents of this file, edit the original C definitions,
4 and/or use gtk-doc annotations. -->
5 <repository version="1.1"
6 xmlns="http://www.gtk.org/introspection/core/1.0"
7 xmlns:c="http://www.gtk.org/introspection/c/1.0"
8 xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
9 <include name="GLib" version="2.0"/>
10 <include name="GObject" version="2.0"/>
11 <include name="Gda" version="4.0"/>
12 <include name="libxml2" version="2.0"/>
13 <package name="gobject-2.0"/>
14 <package name="libgda-4.0"/>
15 <package name="libxml-2.0"/>
16 <namespace name="Midgard"
18 shared-library="libmidgard2.so.2010"
22 parent="GObject.Object"
23 glib:type-name="MidgardBlob"
24 glib:get-type="midgard_blob_get_type"
25 glib:type-struct="BlobClass">
26 <constructor name="new" c:identifier="midgard_blob_new">
27 <doc xml:whitespace="preserve">Default encoding is UTF-8. Set NULL @encoding if such is required.
28 Instatiate new Midgard Blob object for the given midgard_attachment object.
29 This is almost the same constructor as g_object_new, but unlike that one,
30 midgard_blob_new requires MidgardObject (midgard_attachment) object's pointer.
31 This constructor defines new relative path for attachment, if midgard_attachment
32 is associated with midgard_blob and its location is empty.
33 In any other case, location is not changed.</doc>
34 <return-value transfer-ownership="full">
35 <doc xml:whitespace="preserve">newly instatiated #MidgardBlob object or %NULL on failure</doc>
36 <type name="Blob" c:type="MidgardBlob*"/>
39 <parameter name="attachment" transfer-ownership="none">
40 <doc xml:whitespace="preserve">#MidgardObject of MIDGARD_TYPE_ATTACHMENT type.</doc>
41 <type name="Object" c:type="MidgardObject*"/>
43 <parameter name="encoding" transfer-ownership="none">
44 <doc xml:whitespace="preserve">file encoding</doc>
45 <type name="utf8" c:type="gchar*"/>
49 <virtual-method name="read_content" invoker="read_content">
50 <doc xml:whitespace="preserve">Returned content should be freed when no longer needed.
51 This function should be used to get content of small files.
52 For large and huge ones midgard_blob_get_handler should be used
53 to get file handle.</doc>
54 <return-value transfer-ownership="full">
55 <doc xml:whitespace="preserve">content of the file, or %NULL on failure</doc>
56 <type name="utf8" c:type="gchar*"/>
59 <parameter name="bytes_read"
62 transfer-ownership="full">
63 <doc xml:whitespace="preserve">number of bytes read</doc>
64 <type name="gsize" c:type="gsize*"/>
68 <virtual-method name="write_content" invoker="write_content">
69 <doc xml:whitespace="preserve">Write given @content to a file.</doc>
70 <return-value transfer-ownership="none">
71 <doc xml:whitespace="preserve">%TRUE if content has been written to file, %FALSE otherwise.</doc>
72 <type name="boolean" c:type="gboolean"/>
75 <parameter name="content" transfer-ownership="none">
76 <doc xml:whitespace="preserve">content which should be written to file.</doc>
77 <type name="utf8" c:type="gchar*"/>
81 <virtual-method name="remove_file" invoker="remove_file">
82 <doc xml:whitespace="preserve">Deletes a file which is associated with blob and located at
83 attachment's location which is initialized for blob.
84 #midgard_blob_exists should be invoked if file may be already
85 deleted, for example when one file is shared among many attachments.</doc>
86 <return-value transfer-ownership="none">
87 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
88 <type name="boolean" c:type="gboolean"/>
91 <virtual-method name="exists" invoker="exists">
92 <doc xml:whitespace="preserve">Check if file associated with midgard_blob exists.
93 This function will also return FALSE, if file is not yet associated.</doc>
94 <return-value transfer-ownership="none">
95 <doc xml:whitespace="preserve">%TRUE if file exists, %FALSE otherwise</doc>
96 <type name="boolean" c:type="gboolean"/>
99 <virtual-method name="get_path" invoker="get_path">
100 <return-value transfer-ownership="none">
101 <type name="utf8" c:type="gchar*"/>
104 <virtual-method name="get_handler" invoker="get_handler">
105 <doc xml:whitespace="preserve">The main idea is to get file handler. On C level it returns
106 GIOChannel, but language bindings could return typical file handler
107 or anything else which is needed for particular language.
108 Returned channel is owned by midgard_blob and should not be freed
109 or unreferenced.</doc>
110 <return-value transfer-ownership="full">
111 <doc xml:whitespace="preserve">GIOChannel or %NULL</doc>
112 <type name="GLib.IOChannel" c:type="GIOChannel*"/>
115 <parameter name="mode" transfer-ownership="none">
116 <doc xml:whitespace="preserve">fopen mode (r, w, a, b). Default is 'w'.</doc>
117 <type name="utf8" c:type="gchar*"/>
121 <method name="read_content" c:identifier="midgard_blob_read_content">
122 <doc xml:whitespace="preserve">Returned content should be freed when no longer needed.
123 This function should be used to get content of small files.
124 For large and huge ones midgard_blob_get_handler should be used
125 to get file handle.</doc>
126 <return-value transfer-ownership="full">
127 <doc xml:whitespace="preserve">content of the file, or %NULL on failure</doc>
128 <type name="utf8" c:type="gchar*"/>
131 <parameter name="bytes_read"
134 transfer-ownership="full">
135 <doc xml:whitespace="preserve">number of bytes read</doc>
136 <type name="gsize" c:type="gsize*"/>
140 <method name="write_content" c:identifier="midgard_blob_write_content">
141 <doc xml:whitespace="preserve">Write given @content to a file.</doc>
142 <return-value transfer-ownership="none">
143 <doc xml:whitespace="preserve">%TRUE if content has been written to file, %FALSE otherwise.</doc>
144 <type name="boolean" c:type="gboolean"/>
147 <parameter name="content" transfer-ownership="none">
148 <doc xml:whitespace="preserve">content which should be written to file.</doc>
149 <type name="utf8" c:type="gchar*"/>
153 <method name="get_handler" c:identifier="midgard_blob_get_handler">
154 <doc xml:whitespace="preserve">The main idea is to get file handler. On C level it returns
155 GIOChannel, but language bindings could return typical file handler
156 or anything else which is needed for particular language.
157 Returned channel is owned by midgard_blob and should not be freed
158 or unreferenced.</doc>
159 <return-value transfer-ownership="full">
160 <doc xml:whitespace="preserve">GIOChannel or %NULL</doc>
161 <type name="GLib.IOChannel" c:type="GIOChannel*"/>
164 <parameter name="mode" transfer-ownership="none">
165 <doc xml:whitespace="preserve">fopen mode (r, w, a, b). Default is 'w'.</doc>
166 <type name="utf8" c:type="gchar*"/>
170 <method name="get_path" c:identifier="midgard_blob_get_path">
171 <return-value transfer-ownership="none">
172 <type name="utf8" c:type="gchar*"/>
175 <method name="exists" c:identifier="midgard_blob_exists">
176 <doc xml:whitespace="preserve">Check if file associated with midgard_blob exists.
177 This function will also return FALSE, if file is not yet associated.</doc>
178 <return-value transfer-ownership="none">
179 <doc xml:whitespace="preserve">%TRUE if file exists, %FALSE otherwise</doc>
180 <type name="boolean" c:type="gboolean"/>
183 <method name="remove_file" c:identifier="midgard_blob_remove_file">
184 <doc xml:whitespace="preserve">Deletes a file which is associated with blob and located at
185 attachment's location which is initialized for blob.
186 #midgard_blob_exists should be invoked if file may be already
187 deleted, for example when one file is shared among many attachments.</doc>
188 <return-value transfer-ownership="none">
189 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
190 <type name="boolean" c:type="gboolean"/>
193 <property name="content" writable="1" transfer-ownership="none">
194 <type name="utf8" c:type="gchararray"/>
196 <property name="parentguid" writable="1" transfer-ownership="none">
197 <type name="utf8" c:type="gchararray"/>
199 <field name="parent">
200 <type name="GObject.Object" c:type="GObject"/>
203 <type name="BlobPrivate" c:type="MidgardBlobPrivate*"/>
206 <record name="BlobClass"
207 c:type="MidgardBlobClass"
208 glib:is-gtype-struct-for="Blob">
209 <field name="parent">
210 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
212 <field name="read_content">
213 <callback name="read_content" c:type="read_content">
214 <return-value transfer-ownership="full">
215 <doc xml:whitespace="preserve">content of the file, or %NULL on failure</doc>
216 <type name="utf8" c:type="gchar*"/>
219 <parameter name="self" transfer-ownership="none">
220 <type name="Blob" c:type="MidgardBlob*"/>
222 <parameter name="bytes_read"
225 transfer-ownership="full">
226 <doc xml:whitespace="preserve">number of bytes read</doc>
227 <type name="gsize" c:type="gsize*"/>
232 <field name="write_content">
233 <callback name="write_content" c:type="write_content">
234 <return-value transfer-ownership="none">
235 <doc xml:whitespace="preserve">%TRUE if content has been written to file, %FALSE otherwise.</doc>
236 <type name="boolean" c:type="gboolean"/>
239 <parameter name="self" transfer-ownership="none">
240 <type name="Blob" c:type="MidgardBlob*"/>
242 <parameter name="content" transfer-ownership="none">
243 <doc xml:whitespace="preserve">content which should be written to file.</doc>
244 <type name="utf8" c:type="gchar*"/>
249 <field name="remove_file">
250 <callback name="remove_file" c:type="remove_file">
251 <return-value transfer-ownership="none">
252 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
253 <type name="boolean" c:type="gboolean"/>
256 <parameter name="self" transfer-ownership="none">
257 <type name="Blob" c:type="MidgardBlob*"/>
262 <field name="exists">
263 <callback name="exists" c:type="exists">
264 <return-value transfer-ownership="none">
265 <doc xml:whitespace="preserve">%TRUE if file exists, %FALSE otherwise</doc>
266 <type name="boolean" c:type="gboolean"/>
269 <parameter name="self" transfer-ownership="none">
270 <type name="Blob" c:type="MidgardBlob*"/>
275 <field name="get_path">
276 <callback name="get_path" c:type="get_path">
277 <return-value transfer-ownership="none">
278 <type name="utf8" c:type="gchar*"/>
281 <parameter name="self" transfer-ownership="none">
282 <type name="Blob" c:type="MidgardBlob*"/>
287 <field name="get_handler">
288 <callback name="get_handler" c:type="get_handler">
289 <return-value transfer-ownership="full">
290 <doc xml:whitespace="preserve">GIOChannel or %NULL</doc>
291 <type name="GLib.IOChannel" c:type="GIOChannel*"/>
294 <parameter name="self" transfer-ownership="none">
295 <type name="Blob" c:type="MidgardBlob*"/>
297 <parameter name="mode" transfer-ownership="none">
298 <doc xml:whitespace="preserve">fopen mode (r, w, a, b). Default is 'w'.</doc>
299 <type name="utf8" c:type="gchar*"/>
305 <record name="BlobPrivate" c:type="MidgardBlobPrivate">
307 <constant name="CONFIG_EXTENSION" value=".mcfg">
310 <class name="Collector"
311 c:type="MidgardCollector"
312 parent="QueryBuilder"
313 glib:type-name="MidgardCollector"
314 glib:get-type="midgard_collector_get_type"
315 glib:type-struct="CollectorClass">
316 <constructor name="new" c:identifier="midgard_collector_new">
317 <doc xml:whitespace="preserve">unique per object or record. In other words, @domain is a common property (and value)
318 for group of objects expected in collection.
319 If you need reuse given value, make a copy.
320 Cases to return NULL:
322 <listitem><para>
323 </para></listitem>
324 <listitem><para>
325 </para></listitem>
326 <listitem><para>
327 </para></listitem>
328 <listitem><para>
329 </para></listitem>
330 </itemizedlist></doc>
331 <return-value transfer-ownership="full">
332 <doc xml:whitespace="preserve">#MidgardCollector instance, or %NULL on failure</doc>
333 <type name="Collector" c:type="MidgardCollector*"/>
336 <parameter name="mgd" transfer-ownership="none">
337 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
338 <type name="Connection" c:type="MidgardConnection*"/>
340 <parameter name="typename" transfer-ownership="none">
341 <doc xml:whitespace="preserve">name of given class, which collector is initialized for</doc>
342 <type name="utf8" c:type="gchar*"/>
344 <parameter name="domain" transfer-ownership="none">
345 <doc xml:whitespace="preserve">collection' domain</doc>
346 <type name="utf8" c:type="gchar*"/>
348 <parameter name="value" transfer-ownership="none">
349 <doc xml:whitespace="preserve">domain's constraint value</doc>
350 <type name="GObject.Value" c:type="GValue*"/>
354 <virtual-method name="set_key_property" invoker="set_key_property">
355 <return-value transfer-ownership="none">
356 <type name="boolean" c:type="gboolean"/>
359 <parameter name="key" transfer-ownership="none">
360 <type name="utf8" c:type="gchar*"/>
362 <parameter name="value" transfer-ownership="none">
363 <type name="GObject.Value" c:type="GValue*"/>
367 <virtual-method name="add_value_property" invoker="add_value_property">
368 <doc xml:whitespace="preserve">Cases to return FALSE:
370 <listitem><para>
371 </para></listitem>
372 <listitem><para>
373 </para></listitem>
374 </itemizedlist>
375 Number of value properties added to Midgard Collector is limited by
376 the number of properties registered for type which has been initialized
377 for the given #MidgardCollector instance.</doc>
378 <return-value transfer-ownership="none">
379 <doc xml:whitespace="preserve">%TRUE if named value property has been added, %FALSE otherwise</doc>
380 <type name="boolean" c:type="gboolean"/>
383 <parameter name="value" transfer-ownership="none">
384 <doc xml:whitespace="preserve">property name</doc>
385 <type name="utf8" c:type="gchar*"/>
389 <virtual-method name="set" invoker="set">
390 <doc xml:whitespace="preserve">Cases to return FALSE:
392 <listitem><para>
393 </para></listitem>
394 <listitem><para>
395 </para></listitem>
396 <listitem><para>
397 </para></listitem>
398 </itemizedlist>
399 If the key is already added to MidgardCollector then its value
400 (as subkey&value pair) is destroyed and new one is set.
401 In other case new key and its subkey&value pair is added to collector.
402 Key used in this function is a value returned ( or set ) for collector's key.
403 Keys are collection of values returned from property fields.
404 Subkey is an explicit property name.
405 GValue @value argument is owned by MidgardCollector.
406 If value should be reused, its copy should be passed as method argument.</doc>
407 <return-value transfer-ownership="none">
408 <doc xml:whitespace="preserve">%TRUE, if key's value has been set, %FALSE otherwise</doc>
409 <type name="boolean" c:type="gboolean"/>
412 <parameter name="key" transfer-ownership="none">
413 <doc xml:whitespace="preserve">key name for which @subkey&@value pair should be set</doc>
414 <type name="utf8" c:type="gchar*"/>
416 <parameter name="subkey" transfer-ownership="none">
417 <doc xml:whitespace="preserve">property name which is a subkey</doc>
418 <type name="utf8" c:type="gchar*"/>
420 <parameter name="value" transfer-ownership="none">
421 <doc xml:whitespace="preserve">value for given @subkey</doc>
422 <type name="GObject.Value" c:type="GValue*"/>
426 <virtual-method name="get" invoker="get">
427 <doc xml:whitespace="preserve">GData keys ( collector's subkeys ) are inserted to GData as
428 Quarks , so you must call g_quark_to_string if you need to get strings
429 ( e.g. implementing hash table for language bindings ).</doc>
430 <return-value transfer-ownership="full">
431 <doc xml:whitespace="preserve">#GData for the given key or %NULL if key is not found in collection</doc>
432 <type name="GLib.Data" c:type="GData*"/>
435 <parameter name="key" transfer-ownership="none">
436 <doc xml:whitespace="preserve">name of the key to look for</doc>
437 <type name="utf8" c:type="gchar*"/>
441 <virtual-method name="get_subkey" invoker="get_subkey">
442 <return-value transfer-ownership="full">
443 <doc xml:whitespace="preserve">subkey's #GValue value or %NULL if not found</doc>
444 <type name="GObject.Value" c:type="GValue*"/>
447 <parameter name="key" transfer-ownership="none">
448 <doc xml:whitespace="preserve">name of the key</doc>
449 <type name="utf8" c:type="gchar*"/>
451 <parameter name="subkey" transfer-ownership="none">
452 <doc xml:whitespace="preserve">name of key's subkey to look for</doc>
453 <type name="utf8" c:type="gchar*"/>
457 <virtual-method name="merge" invoker="merge">
458 <doc xml:whitespace="preserve">If third overwrite parameter is set as TRUE then all keys which exists
459 in @self and @mc collector's instance will be oberwritten in @self colection
460 instance. If set as FALSE , only those keys will be added, which do not exist
461 in @self collection and exist in @mc collection.
462 Cases to return FALSE:
464 <listitem><para>
465 Second argument is not valid #MidgardCollector
466 </para></listitem>
467 <listitem><para>
468 </para></listitem>
469 </itemizedlist></doc>
470 <return-value transfer-ownership="none">
471 <doc xml:whitespace="preserve">%TRUE if collections has been merged, %FALSE otherwise</doc>
472 <type name="boolean" c:type="gboolean"/>
475 <parameter name="mc" transfer-ownership="none">
476 <doc xml:whitespace="preserve">#MidgardCollector instance</doc>
477 <type name="Collector" c:type="MidgardCollector*"/>
479 <parameter name="overwrite" transfer-ownership="none">
480 <doc xml:whitespace="preserve">whether overwrite collector's keys</doc>
481 <type name="boolean" c:type="gboolean"/>
485 <virtual-method name="list_keys" invoker="list_keys">
486 <return-value transfer-ownership="full">
487 <array c:type="gchar**">
492 <virtual-method name="remove_key" invoker="remove_key">
493 <doc xml:whitespace="preserve">Removes key and associated value from the given #MidgardCollector instance.</doc>
494 <return-value transfer-ownership="none">
495 <doc xml:whitespace="preserve">%TRUE if key (and its value) has been removed from collection, %FALSE otherwise</doc>
496 <type name="boolean" c:type="gboolean"/>
499 <parameter name="key" transfer-ownership="none">
500 <doc xml:whitespace="preserve">name of the key in collector's collection</doc>
501 <type name="utf8" c:type="gchar*"/>
505 <virtual-method name="destroy">
506 <return-value transfer-ownership="none">
507 <type name="none" c:type="void"/>
510 <virtual-method name="add_constraint" invoker="add_constraint">
511 <return-value transfer-ownership="none">
512 <type name="boolean" c:type="gboolean"/>
515 <parameter name="name" transfer-ownership="none">
516 <type name="utf8" c:type="gchar*"/>
518 <parameter name="op" transfer-ownership="none">
519 <type name="utf8" c:type="gchar*"/>
521 <parameter name="value" transfer-ownership="none">
522 <type name="GObject.Value" c:type="GValue*"/>
526 <virtual-method name="add_constraint_with_property"
527 invoker="add_constraint_with_property">
528 <return-value transfer-ownership="none">
529 <type name="boolean" c:type="gboolean"/>
532 <parameter name="property_a" transfer-ownership="none">
533 <type name="utf8" c:type="gchar*"/>
535 <parameter name="op" transfer-ownership="none">
536 <type name="utf8" c:type="gchar*"/>
538 <parameter name="property_b" transfer-ownership="none">
539 <type name="utf8" c:type="gchar*"/>
543 <virtual-method name="begin_group" invoker="begin_group">
544 <return-value transfer-ownership="none">
545 <type name="boolean" c:type="gboolean"/>
548 <parameter name="type" transfer-ownership="none">
549 <type name="utf8" c:type="gchar*"/>
553 <virtual-method name="end_group" invoker="end_group">
554 <return-value transfer-ownership="none">
555 <type name="boolean" c:type="gboolean"/>
558 <virtual-method name="add_order" invoker="add_order">
559 <return-value transfer-ownership="none">
560 <type name="boolean" c:type="gboolean"/>
563 <parameter name="name" transfer-ownership="none">
564 <type name="utf8" c:type="gchar*"/>
566 <parameter name="dir" transfer-ownership="none">
567 <type name="utf8" c:type="gchar*"/>
571 <virtual-method name="set_offset" invoker="set_offset">
572 <return-value transfer-ownership="none">
573 <type name="none" c:type="void"/>
576 <parameter name="offset" transfer-ownership="none">
577 <type name="uint" c:type="guint"/>
581 <virtual-method name="set_limit" invoker="set_limit">
582 <return-value transfer-ownership="none">
583 <type name="none" c:type="void"/>
586 <parameter name="limit" transfer-ownership="none">
587 <type name="uint" c:type="guint"/>
591 <virtual-method name="count" invoker="count">
592 <return-value transfer-ownership="none">
593 <type name="none" c:type="void"/>
596 <virtual-method name="include_deleted" invoker="include_deleted">
597 <return-value transfer-ownership="none">
598 <type name="none" c:type="void"/>
601 <virtual-method name="execute" invoker="execute">
602 <doc xml:whitespace="preserve">Executes SQL query and set internal keys&values collection.
603 Overwritten #MidgardQueryBuilder execute method.
604 Unlike QB's execute method this one returns boolean value.
605 Resultset is stored inernally by #MidgardCollector instance.
606 Cases to return FALSE:
608 <listitem><para>
609 No key is associated, midgard_collector_set_key_property()
610 </para></listitem>
611 <listitem><para>
612 No value property is associated, midgard_collector_add_value_property()
613 </para></listitem>
614 <listitem><para>
615 Database provider returned SQL query syntax error
616 </para></listitem>
617 <listitem><para>
619 </para></listitem>
620 </itemizedlist></doc>
621 <return-value transfer-ownership="none">
622 <doc xml:whitespace="preserve">%TRUE in success, %FALSE otherwise</doc>
623 <type name="boolean" c:type="gboolean"/>
626 <method name="set_key_property"
627 c:identifier="midgard_collector_set_key_property">
628 <return-value transfer-ownership="none">
629 <type name="boolean" c:type="gboolean"/>
632 <parameter name="key" transfer-ownership="none">
633 <type name="utf8" c:type="gchar*"/>
635 <parameter name="value" transfer-ownership="none">
636 <type name="GObject.Value" c:type="GValue*"/>
640 <method name="add_value_property"
641 c:identifier="midgard_collector_add_value_property">
642 <doc xml:whitespace="preserve">Cases to return FALSE:
644 <listitem><para>
645 </para></listitem>
646 <listitem><para>
647 </para></listitem>
648 </itemizedlist>
649 Number of value properties added to Midgard Collector is limited by
650 the number of properties registered for type which has been initialized
651 for the given #MidgardCollector instance.</doc>
652 <return-value transfer-ownership="none">
653 <doc xml:whitespace="preserve">%TRUE if named value property has been added, %FALSE otherwise</doc>
654 <type name="boolean" c:type="gboolean"/>
657 <parameter name="value" transfer-ownership="none">
658 <doc xml:whitespace="preserve">property name</doc>
659 <type name="utf8" c:type="gchar*"/>
663 <method name="set" c:identifier="midgard_collector_set">
664 <doc xml:whitespace="preserve">Cases to return FALSE:
666 <listitem><para>
667 </para></listitem>
668 <listitem><para>
669 </para></listitem>
670 <listitem><para>
671 </para></listitem>
672 </itemizedlist>
673 If the key is already added to MidgardCollector then its value
674 (as subkey&value pair) is destroyed and new one is set.
675 In other case new key and its subkey&value pair is added to collector.
676 Key used in this function is a value returned ( or set ) for collector's key.
677 Keys are collection of values returned from property fields.
678 Subkey is an explicit property name.
679 GValue @value argument is owned by MidgardCollector.
680 If value should be reused, its copy should be passed as method argument.</doc>
681 <return-value transfer-ownership="none">
682 <doc xml:whitespace="preserve">%TRUE, if key's value has been set, %FALSE otherwise</doc>
683 <type name="boolean" c:type="gboolean"/>
686 <parameter name="key" transfer-ownership="none">
687 <doc xml:whitespace="preserve">key name for which @subkey&@value pair should be set</doc>
688 <type name="utf8" c:type="gchar*"/>
690 <parameter name="subkey" transfer-ownership="none">
691 <doc xml:whitespace="preserve">property name which is a subkey</doc>
692 <type name="utf8" c:type="gchar*"/>
694 <parameter name="value" transfer-ownership="none">
695 <doc xml:whitespace="preserve">value for given @subkey</doc>
696 <type name="GObject.Value" c:type="GValue*"/>
700 <method name="get" c:identifier="midgard_collector_get">
701 <doc xml:whitespace="preserve">GData keys ( collector's subkeys ) are inserted to GData as
702 Quarks , so you must call g_quark_to_string if you need to get strings
703 ( e.g. implementing hash table for language bindings ).</doc>
704 <return-value transfer-ownership="full">
705 <doc xml:whitespace="preserve">#GData for the given key or %NULL if key is not found in collection</doc>
706 <type name="GLib.Data" c:type="GData*"/>
709 <parameter name="key" transfer-ownership="none">
710 <doc xml:whitespace="preserve">name of the key to look for</doc>
711 <type name="utf8" c:type="gchar*"/>
715 <method name="get_subkey" c:identifier="midgard_collector_get_subkey">
716 <return-value transfer-ownership="full">
717 <doc xml:whitespace="preserve">subkey's #GValue value or %NULL if not found</doc>
718 <type name="GObject.Value" c:type="GValue*"/>
721 <parameter name="key" transfer-ownership="none">
722 <doc xml:whitespace="preserve">name of the key</doc>
723 <type name="utf8" c:type="gchar*"/>
725 <parameter name="subkey" transfer-ownership="none">
726 <doc xml:whitespace="preserve">name of key's subkey to look for</doc>
727 <type name="utf8" c:type="gchar*"/>
731 <method name="list_keys" c:identifier="midgard_collector_list_keys">
732 <return-value transfer-ownership="full">
733 <array c:type="gchar**">
738 <method name="merge" c:identifier="midgard_collector_merge">
739 <doc xml:whitespace="preserve">If third overwrite parameter is set as TRUE then all keys which exists
740 in @self and @mc collector's instance will be oberwritten in @self colection
741 instance. If set as FALSE , only those keys will be added, which do not exist
742 in @self collection and exist in @mc collection.
743 Cases to return FALSE:
745 <listitem><para>
746 Second argument is not valid #MidgardCollector
747 </para></listitem>
748 <listitem><para>
749 </para></listitem>
750 </itemizedlist></doc>
751 <return-value transfer-ownership="none">
752 <doc xml:whitespace="preserve">%TRUE if collections has been merged, %FALSE otherwise</doc>
753 <type name="boolean" c:type="gboolean"/>
756 <parameter name="mc" transfer-ownership="none">
757 <doc xml:whitespace="preserve">#MidgardCollector instance</doc>
758 <type name="Collector" c:type="MidgardCollector*"/>
760 <parameter name="overwrite" transfer-ownership="none">
761 <doc xml:whitespace="preserve">whether overwrite collector's keys</doc>
762 <type name="boolean" c:type="gboolean"/>
766 <method name="remove_key" c:identifier="midgard_collector_remove_key">
767 <doc xml:whitespace="preserve">Removes key and associated value from the given #MidgardCollector instance.</doc>
768 <return-value transfer-ownership="none">
769 <doc xml:whitespace="preserve">%TRUE if key (and its value) has been removed from collection, %FALSE otherwise</doc>
770 <type name="boolean" c:type="gboolean"/>
773 <parameter name="key" transfer-ownership="none">
774 <doc xml:whitespace="preserve">name of the key in collector's collection</doc>
775 <type name="utf8" c:type="gchar*"/>
779 <method name="add_constraint"
780 c:identifier="midgard_collector_add_constraint">
781 <return-value transfer-ownership="none">
782 <type name="boolean" c:type="gboolean"/>
785 <parameter name="name" transfer-ownership="none">
786 <type name="utf8" c:type="gchar*"/>
788 <parameter name="op" transfer-ownership="none">
789 <type name="utf8" c:type="gchar*"/>
791 <parameter name="value" transfer-ownership="none">
792 <type name="GObject.Value" c:type="GValue*"/>
796 <method name="add_constraint_with_property"
797 c:identifier="midgard_collector_add_constraint_with_property">
798 <return-value transfer-ownership="none">
799 <type name="boolean" c:type="gboolean"/>
802 <parameter name="property_a" transfer-ownership="none">
803 <type name="utf8" c:type="gchar*"/>
805 <parameter name="op" transfer-ownership="none">
806 <type name="utf8" c:type="gchar*"/>
808 <parameter name="property_b" transfer-ownership="none">
809 <type name="utf8" c:type="gchar*"/>
813 <method name="begin_group" c:identifier="midgard_collector_begin_group">
814 <return-value transfer-ownership="none">
815 <type name="boolean" c:type="gboolean"/>
818 <parameter name="type" transfer-ownership="none">
819 <type name="utf8" c:type="gchar*"/>
823 <method name="end_group" c:identifier="midgard_collector_end_group">
824 <return-value transfer-ownership="none">
825 <type name="boolean" c:type="gboolean"/>
828 <method name="add_order" c:identifier="midgard_collector_add_order">
829 <return-value transfer-ownership="none">
830 <type name="boolean" c:type="gboolean"/>
833 <parameter name="name" transfer-ownership="none">
834 <type name="utf8" c:type="gchar*"/>
836 <parameter name="dir" transfer-ownership="none">
837 <type name="utf8" c:type="gchar*"/>
841 <method name="set_offset" c:identifier="midgard_collector_set_offset">
842 <return-value transfer-ownership="none">
843 <type name="none" c:type="void"/>
846 <parameter name="offset" transfer-ownership="none">
847 <type name="uint" c:type="guint"/>
851 <method name="set_limit" c:identifier="midgard_collector_set_limit">
852 <return-value transfer-ownership="none">
853 <type name="none" c:type="void"/>
856 <parameter name="limit" transfer-ownership="none">
857 <type name="uint" c:type="guint"/>
861 <method name="count" c:identifier="midgard_collector_count">
862 <return-value transfer-ownership="none">
863 <type name="none" c:type="void"/>
866 <method name="execute" c:identifier="midgard_collector_execute">
867 <doc xml:whitespace="preserve">Executes SQL query and set internal keys&values collection.
868 Overwritten #MidgardQueryBuilder execute method.
869 Unlike QB's execute method this one returns boolean value.
870 Resultset is stored inernally by #MidgardCollector instance.
871 Cases to return FALSE:
873 <listitem><para>
874 No key is associated, midgard_collector_set_key_property()
875 </para></listitem>
876 <listitem><para>
877 No value property is associated, midgard_collector_add_value_property()
878 </para></listitem>
879 <listitem><para>
880 Database provider returned SQL query syntax error
881 </para></listitem>
882 <listitem><para>
884 </para></listitem>
885 </itemizedlist></doc>
886 <return-value transfer-ownership="none">
887 <doc xml:whitespace="preserve">%TRUE in success, %FALSE otherwise</doc>
888 <type name="boolean" c:type="gboolean"/>
891 <method name="include_deleted"
892 c:identifier="midgard_collector_include_deleted">
893 <return-value transfer-ownership="none">
894 <type name="boolean" c:type="gboolean"/>
897 <field name="parent">
898 <type name="QueryBuilder" c:type="MidgardQueryBuilder"/>
901 <type name="CollectorPrivate" c:type="MidgardCollectorPrivate*"/>
904 <record name="CollectorClass"
905 c:type="MidgardCollectorClass"
906 glib:is-gtype-struct-for="Collector">
907 <field name="parent">
908 <type name="QueryBuilderClass" c:type="MidgardQueryBuilderClass"/>
910 <field name="set_key_property">
911 <callback name="set_key_property" c:type="set_key_property">
912 <return-value transfer-ownership="none">
913 <type name="boolean" c:type="gboolean"/>
916 <parameter name="collector" transfer-ownership="none">
917 <type name="Collector" c:type="MidgardCollector*"/>
919 <parameter name="key" transfer-ownership="none">
920 <type name="utf8" c:type="gchar*"/>
922 <parameter name="value" transfer-ownership="none">
923 <type name="GObject.Value" c:type="GValue*"/>
928 <field name="add_value_property">
929 <callback name="add_value_property" c:type="add_value_property">
930 <return-value transfer-ownership="none">
931 <doc xml:whitespace="preserve">%TRUE if named value property has been added, %FALSE otherwise</doc>
932 <type name="boolean" c:type="gboolean"/>
935 <parameter name="collector" transfer-ownership="none">
936 <type name="Collector" c:type="MidgardCollector*"/>
938 <parameter name="value" transfer-ownership="none">
939 <doc xml:whitespace="preserve">property name</doc>
940 <type name="utf8" c:type="gchar*"/>
946 <callback name="set" c:type="set">
947 <return-value transfer-ownership="none">
948 <doc xml:whitespace="preserve">%TRUE, if key's value has been set, %FALSE otherwise</doc>
949 <type name="boolean" c:type="gboolean"/>
952 <parameter name="collector" transfer-ownership="none">
953 <type name="Collector" c:type="MidgardCollector*"/>
955 <parameter name="key" transfer-ownership="none">
956 <doc xml:whitespace="preserve">key name for which @subkey&@value pair should be set</doc>
957 <type name="utf8" c:type="gchar*"/>
959 <parameter name="subkey" transfer-ownership="none">
960 <doc xml:whitespace="preserve">property name which is a subkey</doc>
961 <type name="utf8" c:type="gchar*"/>
963 <parameter name="value" transfer-ownership="none">
964 <doc xml:whitespace="preserve">value for given @subkey</doc>
965 <type name="GObject.Value" c:type="GValue*"/>
971 <callback name="get" c:type="get">
972 <return-value transfer-ownership="full">
973 <doc xml:whitespace="preserve">#GData for the given key or %NULL if key is not found in collection</doc>
974 <type name="GLib.Data" c:type="GData*"/>
977 <parameter name="collector" transfer-ownership="none">
978 <type name="Collector" c:type="MidgardCollector*"/>
980 <parameter name="key" transfer-ownership="none">
981 <doc xml:whitespace="preserve">name of the key to look for</doc>
982 <type name="utf8" c:type="gchar*"/>
987 <field name="get_subkey">
988 <callback name="get_subkey" c:type="get_subkey">
989 <return-value transfer-ownership="full">
990 <doc xml:whitespace="preserve">subkey's #GValue value or %NULL if not found</doc>
991 <type name="GObject.Value" c:type="GValue*"/>
994 <parameter name="collector" transfer-ownership="none">
995 <type name="Collector" c:type="MidgardCollector*"/>
997 <parameter name="key" transfer-ownership="none">
998 <doc xml:whitespace="preserve">name of the key</doc>
999 <type name="utf8" c:type="gchar*"/>
1001 <parameter name="subkey" transfer-ownership="none">
1002 <doc xml:whitespace="preserve">name of key's subkey to look for</doc>
1003 <type name="utf8" c:type="gchar*"/>
1008 <field name="merge">
1009 <callback name="merge" c:type="merge">
1010 <return-value transfer-ownership="none">
1011 <doc xml:whitespace="preserve">%TRUE if collections has been merged, %FALSE otherwise</doc>
1012 <type name="boolean" c:type="gboolean"/>
1015 <parameter name="collector" transfer-ownership="none">
1016 <type name="Collector" c:type="MidgardCollector*"/>
1018 <parameter name="mc" transfer-ownership="none">
1019 <doc xml:whitespace="preserve">#MidgardCollector instance</doc>
1020 <type name="Collector" c:type="MidgardCollector*"/>
1022 <parameter name="overwrite" transfer-ownership="none">
1023 <doc xml:whitespace="preserve">whether overwrite collector's keys</doc>
1024 <type name="boolean" c:type="gboolean"/>
1029 <field name="list_keys">
1030 <callback name="list_keys" c:type="list_keys">
1031 <return-value transfer-ownership="full">
1032 <array c:type="gchar**">
1037 <parameter name="collector" transfer-ownership="none">
1038 <type name="Collector" c:type="MidgardCollector*"/>
1043 <field name="remove_key">
1044 <callback name="remove_key" c:type="remove_key">
1045 <return-value transfer-ownership="none">
1046 <doc xml:whitespace="preserve">%TRUE if key (and its value) has been removed from collection, %FALSE otherwise</doc>
1047 <type name="boolean" c:type="gboolean"/>
1050 <parameter name="collector" transfer-ownership="none">
1051 <type name="Collector" c:type="MidgardCollector*"/>
1053 <parameter name="key" transfer-ownership="none">
1054 <doc xml:whitespace="preserve">name of the key in collector's collection</doc>
1055 <type name="utf8" c:type="gchar*"/>
1060 <field name="destroy">
1061 <callback name="destroy" c:type="destroy">
1062 <return-value transfer-ownership="none">
1063 <type name="none" c:type="void"/>
1066 <parameter name="collector" transfer-ownership="none">
1067 <type name="Collector" c:type="MidgardCollector*"/>
1072 <field name="add_constraint">
1073 <callback name="add_constraint" c:type="add_constraint">
1074 <return-value transfer-ownership="none">
1075 <type name="boolean" c:type="gboolean"/>
1078 <parameter name="self" transfer-ownership="none">
1079 <type name="Collector" c:type="MidgardCollector*"/>
1081 <parameter name="name" transfer-ownership="none">
1082 <type name="utf8" c:type="gchar*"/>
1084 <parameter name="op" transfer-ownership="none">
1085 <type name="utf8" c:type="gchar*"/>
1087 <parameter name="value" transfer-ownership="none">
1088 <type name="GObject.Value" c:type="GValue*"/>
1093 <field name="add_constraint_with_property">
1094 <callback name="add_constraint_with_property"
1095 c:type="add_constraint_with_property">
1096 <return-value transfer-ownership="none">
1097 <type name="boolean" c:type="gboolean"/>
1100 <parameter name="self" transfer-ownership="none">
1101 <type name="Collector" c:type="MidgardCollector*"/>
1103 <parameter name="property_a" transfer-ownership="none">
1104 <type name="utf8" c:type="gchar*"/>
1106 <parameter name="op" transfer-ownership="none">
1107 <type name="utf8" c:type="gchar*"/>
1109 <parameter name="property_b" transfer-ownership="none">
1110 <type name="utf8" c:type="gchar*"/>
1115 <field name="begin_group">
1116 <callback name="begin_group" c:type="begin_group">
1117 <return-value transfer-ownership="none">
1118 <type name="boolean" c:type="gboolean"/>
1121 <parameter name="self" transfer-ownership="none">
1122 <type name="Collector" c:type="MidgardCollector*"/>
1124 <parameter name="type" transfer-ownership="none">
1125 <type name="utf8" c:type="gchar*"/>
1130 <field name="end_group">
1131 <callback name="end_group" c:type="end_group">
1132 <return-value transfer-ownership="none">
1133 <type name="boolean" c:type="gboolean"/>
1136 <parameter name="self" transfer-ownership="none">
1137 <type name="Collector" c:type="MidgardCollector*"/>
1142 <field name="add_order">
1143 <callback name="add_order" c:type="add_order">
1144 <return-value transfer-ownership="none">
1145 <type name="boolean" c:type="gboolean"/>
1148 <parameter name="self" transfer-ownership="none">
1149 <type name="Collector" c:type="MidgardCollector*"/>
1151 <parameter name="name" transfer-ownership="none">
1152 <type name="utf8" c:type="gchar*"/>
1154 <parameter name="dir" transfer-ownership="none">
1155 <type name="utf8" c:type="gchar*"/>
1160 <field name="set_offset">
1161 <callback name="set_offset" c:type="set_offset">
1162 <return-value transfer-ownership="none">
1163 <type name="none" c:type="void"/>
1166 <parameter name="self" transfer-ownership="none">
1167 <type name="Collector" c:type="MidgardCollector*"/>
1169 <parameter name="offset" transfer-ownership="none">
1170 <type name="uint" c:type="guint"/>
1175 <field name="set_limit">
1176 <callback name="set_limit" c:type="set_limit">
1177 <return-value transfer-ownership="none">
1178 <type name="none" c:type="void"/>
1181 <parameter name="self" transfer-ownership="none">
1182 <type name="Collector" c:type="MidgardCollector*"/>
1184 <parameter name="limit" transfer-ownership="none">
1185 <type name="uint" c:type="guint"/>
1190 <field name="count">
1191 <callback name="count" c:type="count">
1192 <return-value transfer-ownership="none">
1193 <type name="none" c:type="void"/>
1196 <parameter name="self" transfer-ownership="none">
1197 <type name="Collector" c:type="MidgardCollector*"/>
1202 <field name="include_deleted">
1203 <callback name="include_deleted" c:type="include_deleted">
1204 <return-value transfer-ownership="none">
1205 <type name="none" c:type="void"/>
1208 <parameter name="self" transfer-ownership="none">
1209 <type name="Collector" c:type="MidgardCollector*"/>
1214 <field name="execute">
1215 <callback name="execute" c:type="execute">
1216 <return-value transfer-ownership="none">
1217 <doc xml:whitespace="preserve">%TRUE in success, %FALSE otherwise</doc>
1218 <type name="boolean" c:type="gboolean"/>
1221 <parameter name="self" transfer-ownership="none">
1222 <type name="Collector" c:type="MidgardCollector*"/>
1228 <record name="CollectorPrivate" c:type="MidgardCollectorPrivate">
1230 <class name="Config"
1231 c:type="MidgardConfig"
1232 parent="GObject.Object"
1233 glib:type-name="MidgardConfig"
1234 glib:get-type="midgard_config_get_type"
1235 glib:type-struct="ConfigClass">
1236 <constructor name="new" c:identifier="midgard_config_new">
1237 <doc xml:whitespace="preserve">Initializes new instance of MidgardConfig object type.
1238 NULL is returned when object can not be initialized.</doc>
1239 <return-value transfer-ownership="full">
1240 <doc xml:whitespace="preserve">pointer to @MidgardConfig object or %NULL on failure.</doc>
1241 <type name="Config" c:type="MidgardConfig*"/>
1244 <function name="list_files" c:identifier="midgard_config_list_files">
1245 <doc xml:whitespace="preserve">List all available configuration files.
1246 If @user value is set to %TRUE, all available files from ~/.midgard/conf.d will be listed.
1247 Only system files ( usually from /etc/midgard/conf.d ) will be listed if @user value is set to %FALSE.
1248 Returned array should be freed when no longer needed.</doc>
1249 <return-value transfer-ownership="full">
1250 <doc xml:whitespace="preserve">newly allocated and %NULL terminated array of file names.</doc>
1251 <array c:type="gchar**">
1256 <parameter name="user" transfer-ownership="none">
1257 <doc xml:whitespace="preserve">boolean switch for system or user's config files</doc>
1258 <type name="boolean" c:type="gboolean"/>
1262 <method name="read_file"
1263 c:identifier="midgard_config_read_file"
1266 <doc xml:whitespace="preserve">This method reads configuration file from the given name and sets MidgardConfig object's properties.
1267 Such initialized MidgardConfig instance may be reused among midgard-core and midgard-php extension
1268 for example, without any need to re-read configuration file and without any need to re-initalize
1269 #MidgardConfig object instance.
1270 Set %TRUE as @user boolean value to read files from user's home directory.</doc>
1271 <return-value transfer-ownership="none">
1272 <doc xml:whitespace="preserve">%TRUE when file has been read , %FALSE otherwise.</doc>
1273 <type name="boolean" c:type="gboolean"/>
1276 <parameter name="filename" transfer-ownership="none">
1277 <doc xml:whitespace="preserve">name of the file to read</doc>
1278 <type name="utf8" c:type="gchar*"/>
1280 <parameter name="user" transfer-ownership="none">
1281 <doc xml:whitespace="preserve">boolean switch for system or user's config files</doc>
1282 <type name="boolean" c:type="gboolean"/>
1286 <method name="read_file_at_path"
1287 c:identifier="midgard_config_read_file_at_path"
1289 <return-value transfer-ownership="none">
1290 <doc xml:whitespace="preserve">%TRUE if file has been read, %FALSE otherwise</doc>
1291 <type name="boolean" c:type="gboolean"/>
1294 <parameter name="filepath" transfer-ownership="none">
1295 <doc xml:whitespace="preserve">a path to read file from</doc>
1296 <type name="utf8" c:type="gchar*"/>
1300 <method name="read_data"
1301 c:identifier="midgard_config_read_data"
1303 <return-value transfer-ownership="none">
1304 <doc xml:whitespace="preserve">%TRUE if data has been read, %FALSE otherwise</doc>
1305 <type name="boolean" c:type="gboolean"/>
1308 <parameter name="data" transfer-ownership="none">
1309 <doc xml:whitespace="preserve">a NULL-terminated buffer containing the configuration</doc>
1310 <type name="utf8" c:type="gchar*"/>
1314 <method name="save_file"
1315 c:identifier="midgard_config_save_file"
1317 <doc xml:whitespace="preserve">Saves configuration file for the given #MidgardConfig.
1318 This method saves configuration file with the given name.
1319 If third user parameter is set to %TRUE, then configuration file will
1320 be saved in ~/.midgard2/conf.d directory.
1321 User's conf.d directory will be created if doesn't exist.
1322 directory doesn't exist or file can not be saved.</doc>
1323 <return-value transfer-ownership="none">
1324 <doc xml:whitespace="preserve">%TRUE on success or %FALSE ( with propper warning message ) if system wide</doc>
1325 <type name="boolean" c:type="gboolean"/>
1328 <parameter name="name" transfer-ownership="none">
1329 <doc xml:whitespace="preserve">configuration filename</doc>
1330 <type name="utf8" c:type="gchar*"/>
1332 <parameter name="user" transfer-ownership="none">
1333 <doc xml:whitespace="preserve">system or home directory switch</doc>
1334 <type name="boolean" c:type="gboolean"/>
1338 <method name="create_blobdir"
1339 c:identifier="midgard_config_create_blobdir">
1340 <doc xml:whitespace="preserve">Creates directories for blobs</doc>
1341 <return-value transfer-ownership="none">
1342 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise.</doc>
1343 <type name="boolean" c:type="gboolean"/>
1346 <method name="copy" c:identifier="midgard_config_copy" version="10.05">
1347 <return-value transfer-ownership="full">
1348 <doc xml:whitespace="preserve">deep copy of given #MidgardConfig object</doc>
1349 <type name="Config" c:type="MidgardConfig*"/>
1352 <method name="get_database_name"
1353 c:identifier="midgard_config_get_database_name">
1354 <return-value transfer-ownership="none">
1355 <type name="utf8" c:type="gchar*"/>
1358 <method name="get_database_type"
1359 c:identifier="midgard_config_get_database_type">
1360 <return-value transfer-ownership="none">
1361 <type name="utf8" c:type="gchar*"/>
1364 <method name="get_database_username"
1365 c:identifier="midgard_config_get_database_username">
1366 <return-value transfer-ownership="none">
1367 <type name="utf8" c:type="gchar*"/>
1370 <method name="get_database_password"
1371 c:identifier="midgard_config_get_database_password">
1372 <return-value transfer-ownership="none">
1373 <type name="utf8" c:type="gchar*"/>
1376 <method name="get_database_host"
1377 c:identifier="midgard_config_get_database_host">
1378 <return-value transfer-ownership="none">
1379 <type name="utf8" c:type="gchar*"/>
1382 <method name="get_database_port"
1383 c:identifier="midgard_config_get_database_port">
1384 <return-value transfer-ownership="none">
1385 <type name="uint" c:type="guint"/>
1388 <method name="get_blobdir" c:identifier="midgard_config_get_blobdir">
1389 <return-value transfer-ownership="none">
1390 <type name="utf8" c:type="gchar*"/>
1393 <method name="get_logfile" c:identifier="midgard_config_get_logfile">
1394 <return-value transfer-ownership="none">
1395 <type name="utf8" c:type="gchar*"/>
1398 <method name="get_loglevel" c:identifier="midgard_config_get_loglevel">
1399 <return-value transfer-ownership="none">
1400 <type name="utf8" c:type="gchar*"/>
1403 <method name="get_table_create"
1404 c:identifier="midgard_config_get_table_create">
1405 <return-value transfer-ownership="none">
1406 <type name="boolean" c:type="gboolean"/>
1409 <method name="get_table_update"
1410 c:identifier="midgard_config_get_table_update">
1411 <return-value transfer-ownership="none">
1412 <type name="boolean" c:type="gboolean"/>
1415 <method name="get_testunit" c:identifier="midgard_config_get_testunit">
1416 <return-value transfer-ownership="none">
1417 <type name="boolean" c:type="gboolean"/>
1420 <method name="get_midgard_username"
1421 c:identifier="midgard_config_get_midgard_username">
1422 <return-value transfer-ownership="none">
1423 <type name="utf8" c:type="gchar*"/>
1426 <method name="get_midgard_password"
1427 c:identifier="midgard_config_get_midgard_password">
1428 <return-value transfer-ownership="none">
1429 <type name="utf8" c:type="gchar*"/>
1432 <method name="get_authtype" c:identifier="midgard_config_get_authtype">
1433 <return-value transfer-ownership="none">
1434 <type name="utf8" c:type="gchar*"/>
1437 <method name="get_pamfile" c:identifier="midgard_config_get_pamfile">
1438 <return-value transfer-ownership="none">
1439 <type name="utf8" c:type="gchar*"/>
1442 <method name="get_schema_dir"
1443 c:identifier="midgard_config_get_schema_dir">
1444 <return-value transfer-ownership="none">
1445 <type name="utf8" c:type="gchar*"/>
1448 <method name="set_database_name"
1449 c:identifier="midgard_config_set_database_name">
1450 <return-value transfer-ownership="none">
1451 <type name="none" c:type="void"/>
1454 <parameter name="name" transfer-ownership="none">
1455 <type name="utf8" c:type="gchar*"/>
1459 <method name="set_database_type"
1460 c:identifier="midgard_config_set_database_type">
1461 <return-value transfer-ownership="none">
1462 <type name="none" c:type="void"/>
1465 <parameter name="type" transfer-ownership="none">
1466 <type name="utf8" c:type="gchar*"/>
1470 <method name="set_database_username"
1471 c:identifier="midgard_config_set_database_username">
1472 <return-value transfer-ownership="none">
1473 <type name="none" c:type="void"/>
1476 <parameter name="username" transfer-ownership="none">
1477 <type name="utf8" c:type="gchar*"/>
1481 <method name="set_database_password"
1482 c:identifier="midgard_config_set_database_password">
1483 <return-value transfer-ownership="none">
1484 <type name="none" c:type="void"/>
1487 <parameter name="password" transfer-ownership="none">
1488 <type name="utf8" c:type="gchar*"/>
1492 <method name="set_database_host"
1493 c:identifier="midgard_config_set_database_host">
1494 <return-value transfer-ownership="none">
1495 <type name="none" c:type="void"/>
1498 <parameter name="host" transfer-ownership="none">
1499 <type name="utf8" c:type="gchar*"/>
1503 <method name="set_database_port"
1504 c:identifier="midgard_config_set_database_port">
1505 <return-value transfer-ownership="none">
1506 <type name="none" c:type="void"/>
1509 <parameter name="port" transfer-ownership="none">
1510 <type name="uint" c:type="guint"/>
1514 <method name="set_blobdir" c:identifier="midgard_config_set_blobdir">
1515 <return-value transfer-ownership="none">
1516 <type name="none" c:type="void"/>
1519 <parameter name="blobdir" transfer-ownership="none">
1520 <type name="utf8" c:type="gchar*"/>
1524 <method name="set_logfile" c:identifier="midgard_config_set_logfile">
1525 <return-value transfer-ownership="none">
1526 <type name="none" c:type="void"/>
1529 <parameter name="logfile" transfer-ownership="none">
1530 <type name="utf8" c:type="gchar*"/>
1534 <method name="set_loglevel" c:identifier="midgard_config_set_loglevel">
1535 <return-value transfer-ownership="none">
1536 <type name="none" c:type="void"/>
1539 <parameter name="loglevel" transfer-ownership="none">
1540 <type name="utf8" c:type="gchar*"/>
1544 <method name="set_table_create"
1545 c:identifier="midgard_config_set_table_create">
1546 <return-value transfer-ownership="none">
1547 <type name="none" c:type="void"/>
1550 <parameter name="toggle" transfer-ownership="none">
1551 <type name="boolean" c:type="gboolean"/>
1555 <method name="set_table_update"
1556 c:identifier="midgard_config_set_table_update">
1557 <return-value transfer-ownership="none">
1558 <type name="none" c:type="void"/>
1561 <parameter name="toggle" transfer-ownership="none">
1562 <type name="boolean" c:type="gboolean"/>
1566 <method name="set_testunit" c:identifier="midgard_config_set_testunit">
1567 <return-value transfer-ownership="none">
1568 <type name="none" c:type="void"/>
1571 <parameter name="toggle" transfer-ownership="none">
1572 <type name="boolean" c:type="gboolean"/>
1576 <method name="set_midgard_username"
1577 c:identifier="midgard_config_set_midgard_username">
1578 <return-value transfer-ownership="none">
1579 <type name="none" c:type="void"/>
1582 <parameter name="username" transfer-ownership="none">
1583 <type name="utf8" c:type="gchar*"/>
1587 <method name="set_midgard_password"
1588 c:identifier="midgard_config_set_midgard_password">
1589 <return-value transfer-ownership="none">
1590 <type name="none" c:type="void"/>
1593 <parameter name="password" transfer-ownership="none">
1594 <type name="utf8" c:type="gchar*"/>
1598 <method name="set_authtype" c:identifier="midgard_config_set_authtype">
1599 <return-value transfer-ownership="none">
1600 <type name="none" c:type="void"/>
1603 <parameter name="authtype" transfer-ownership="none">
1604 <type name="utf8" c:type="gchar*"/>
1608 <method name="set_pamfile" c:identifier="midgard_config_set_pamfile">
1609 <return-value transfer-ownership="none">
1610 <type name="none" c:type="void"/>
1613 <parameter name="pamfile" transfer-ownership="none">
1614 <type name="utf8" c:type="gchar*"/>
1618 <method name="set_schema_dir"
1619 c:identifier="midgard_config_set_schema_dir">
1620 <return-value transfer-ownership="none">
1621 <type name="none" c:type="void"/>
1624 <parameter name="dir" transfer-ownership="none">
1625 <type name="utf8" c:type="gchar*"/>
1629 <property name="authtype" writable="1" transfer-ownership="none">
1630 <type name="utf8" c:type="gchararray"/>
1632 <property name="blobdir" writable="1" transfer-ownership="none">
1633 <type name="utf8" c:type="gchararray"/>
1635 <property name="cachedir" writable="1" transfer-ownership="none">
1636 <type name="utf8" c:type="gchararray"/>
1638 <property name="database" writable="1" transfer-ownership="none">
1639 <type name="utf8" c:type="gchararray"/>
1641 <property name="dbdir" writable="1" transfer-ownership="none">
1642 <type name="utf8" c:type="gchararray"/>
1644 <property name="dbpass" writable="1" transfer-ownership="none">
1645 <type name="utf8" c:type="gchararray"/>
1647 <property name="dbtype" writable="1" transfer-ownership="none">
1648 <type name="utf8" c:type="gchararray"/>
1650 <property name="dbuser" writable="1" transfer-ownership="none">
1651 <type name="utf8" c:type="gchararray"/>
1653 <property name="host" writable="1" transfer-ownership="none">
1654 <type name="utf8" c:type="gchararray"/>
1656 <property name="logfilename" writable="1" transfer-ownership="none">
1657 <type name="utf8" c:type="gchararray"/>
1659 <property name="loglevel" writable="1" transfer-ownership="none">
1660 <type name="utf8" c:type="gchararray"/>
1662 <property name="midgardpassword" writable="1" transfer-ownership="none">
1663 <type name="utf8" c:type="gchararray"/>
1665 <property name="midgardusername" writable="1" transfer-ownership="none">
1666 <type name="utf8" c:type="gchararray"/>
1668 <property name="pamfile" writable="1" transfer-ownership="none">
1669 <type name="utf8" c:type="gchararray"/>
1671 <property name="port" writable="1" transfer-ownership="none">
1672 <type name="uint" c:type="guint"/>
1674 <property name="sharedir" writable="1" transfer-ownership="none">
1675 <type name="utf8" c:type="gchararray"/>
1677 <property name="tablecreate" writable="1" transfer-ownership="none">
1678 <type name="boolean" c:type="gboolean"/>
1680 <property name="tableupdate" writable="1" transfer-ownership="none">
1681 <type name="boolean" c:type="gboolean"/>
1683 <property name="testunit" writable="1" transfer-ownership="none">
1684 <type name="boolean" c:type="gboolean"/>
1686 <property name="vardir" writable="1" transfer-ownership="none">
1687 <type name="utf8" c:type="gchararray"/>
1689 <field name="parent">
1690 <type name="GObject.Object" c:type="GObject"/>
1692 <field name="dbtype">
1693 <type name="utf8" c:type="gchar*"/>
1696 <type name="utf8" c:type="gchar*"/>
1698 <field name="dbport">
1699 <type name="uint" c:type="guint"/>
1701 <field name="database">
1702 <type name="utf8" c:type="gchar*"/>
1704 <field name="dbdir">
1705 <type name="utf8" c:type="gchar*"/>
1707 <field name="dbuser">
1708 <type name="utf8" c:type="gchar*"/>
1710 <field name="dbpass">
1711 <type name="utf8" c:type="gchar*"/>
1713 <field name="logfilename">
1714 <type name="utf8" c:type="gchar*"/>
1716 <field name="loglevel">
1717 <type name="utf8" c:type="gchar*"/>
1719 <field name="tablecreate">
1720 <type name="boolean" c:type="gboolean"/>
1722 <field name="tableupdate">
1723 <type name="boolean" c:type="gboolean"/>
1726 <record name="ConfigClass"
1727 c:type="MidgardConfigClass"
1728 glib:is-gtype-struct-for="Config">
1729 <field name="parent">
1730 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
1733 <record name="ConfigPrivate" c:type="MidgardConfigPrivate">
1735 <class name="Connection"
1736 c:type="MidgardConnection"
1737 parent="GObject.Object"
1738 glib:type-name="MidgardConnection"
1739 glib:get-type="midgard_connection_get_type"
1740 glib:type-struct="ConnectionClass">
1741 <constructor name="new" c:identifier="midgard_connection_new">
1742 <doc xml:whitespace="preserve">Initializes new instance of MidgardConnection object type.
1743 MidgardConnectionClass has no properties registered as class members.
1744 Every internal data of MidgardConnection object is accessible with API
1745 functions, and is not settable or gettable as property's value.
1746 Particular methods should be implemented for language bindings.
1747 #MidgardConnection objects holds runtime ( or request ) non persistent
1748 data like authentication type, debug level, etc.
1749 Persistent data like database name, blobs directory are associated with #MidgardConfig object.</doc>
1750 <return-value transfer-ownership="full">
1751 <doc xml:whitespace="preserve">pointer to #MidgardConnection object or %NULL on failure.</doc>
1752 <type name="Connection" c:type="MidgardConnection*"/>
1755 <function name="open_all" c:identifier="midgard_connection_open_all">
1756 <doc xml:whitespace="preserve">Every key is configuration name, and value is #MidgardConnection object.
1757 Use g_hash_table_destroy to free hashtable and all opened connections.</doc>
1758 <return-value transfer-ownership="full">
1759 <doc xml:whitespace="preserve">Newly allocated full #GHashTable.</doc>
1760 <type name="GLib.HashTable" c:type="GHashTable*"/>
1763 <parameter name="userdir" transfer-ownership="none">
1764 <doc xml:whitespace="preserve">switch to read configuration from system or user's directory</doc>
1765 <type name="boolean" c:type="gboolean"/>
1769 <method name="open" c:identifier="midgard_connection_open" throws="1">
1770 <doc xml:whitespace="preserve">Opens a connection to the database, which is defined in named configuration.
1771 The configuration file is read from the system configuration directory
1772 directory is taken into account if library is compiled with `/usr' prefix,
1773 `/usr/local/etc` if compiled with `/usr/local` prefix, etc.
1774 Consider using midgard_connection_open_config(), if you need to open connection to
1775 database which is configured in user's home directory.
1776 If the named database configuration can not be read or the connection fails,
1777 then %FALSE is returned and an error message is written to the global midgard
1779 It also initializes #MidgardSchema object (which is encapsulated by implementation )
1780 and register all MgdSchema, #MidgardObjectClass derived classes defined by user.
1781 This happens only when basic Midgard classes are not registered in GType system.
1782 This is recommended way to initialize MgdSchema types.</doc>
1783 <return-value transfer-ownership="none">
1784 <doc xml:whitespace="preserve">%TRUE if the operation succeeded, %FALSE otherwise.</doc>
1785 <type name="boolean" c:type="gboolean"/>
1788 <parameter name="name" transfer-ownership="none">
1789 <doc xml:whitespace="preserve">configuration file name</doc>
1790 <type name="utf8" c:type="gchar*"/>
1794 <method name="open_config" c:identifier="midgard_connection_open_config">
1795 <doc xml:whitespace="preserve">Opens a #MidgardConnection with the given configuration.
1796 Take a look at midgard_connection_open() wrt #MidgardSchema.
1797 If #MidgardConnection is already associated with given config, method returns %TRUE.
1798 If associated with another one, %FALSE is returned and MGD_ERR_INTERNAL error is set.</doc>
1799 <return-value transfer-ownership="none">
1800 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
1801 <type name="boolean" c:type="gboolean"/>
1804 <parameter name="config" transfer-ownership="none">
1805 <doc xml:whitespace="preserve">#MidgardConfig object</doc>
1806 <type name="Config" c:type="MidgardConfig*"/>
1810 <method name="open_from_file"
1811 c:identifier="midgard_connection_open_from_file"
1813 <doc xml:whitespace="preserve">Opens a connection to the database.
1814 The configuration file is read from given filepath.
1815 Take a look at midgard_connection_open() wrt #MidgardSchema.</doc>
1816 <return-value transfer-ownership="none">
1817 <doc xml:whitespace="preserve">%TRUE if the operation succeeded, %FALSE otherwise.</doc>
1818 <type name="boolean" c:type="gboolean"/>
1821 <parameter name="filepath" transfer-ownership="none">
1822 <doc xml:whitespace="preserve">configuration file path</doc>
1823 <type name="utf8" c:type="gchar*"/>
1827 <method name="is_connected"
1828 c:identifier="midgard_connection_is_connected">
1829 <return-value transfer-ownership="none">
1830 <doc xml:whitespace="preserve">%TRUE if database connection is established, %FALSE otherwise</doc>
1831 <type name="boolean" c:type="gboolean"/>
1834 <method name="set_loglevel"
1835 c:identifier="midgard_connection_set_loglevel">
1836 <doc xml:whitespace="preserve">Sets log level of the given MidgardConnection.
1837 Overwrites internal #MidgardConnection's log level defined in configuration file.
1838 By default MidgardConnection holds loglevel which is associated with ( and duplicated
1839 from ) #MidgardConfig.
1840 #MidgardConfig object's log level isn't changed by this function
1841 This method is a shortcut which sets correctly loghandler,loglevel
1842 is defined. Core's default function is #midgard_error_default_log.
1843 warn is default loglevel, SQL queries are logged with debug level.
1844 With info level, function names ( and classes' names ) are ( at least should be) logged in language bindings</doc>
1845 <return-value transfer-ownership="none">
1846 <doc xml:whitespace="preserve">%TRUE if debug level is set, %FALSE otherwise</doc>
1847 <type name="boolean" c:type="gboolean"/>
1850 <parameter name="level" transfer-ownership="none">
1851 <doc xml:whitespace="preserve">Loglevel string</doc>
1852 <type name="utf8" c:type="gchar*"/>
1854 <parameter name="log_func" transfer-ownership="none" scope="call">
1855 <doc xml:whitespace="preserve">log handler function</doc>
1856 <type name="GLib.LogFunc" c:type="GLogFunc"/>
1860 <method name="get_loglevel"
1861 c:identifier="midgard_connection_get_loglevel">
1862 <return-value transfer-ownership="none">
1863 <doc xml:whitespace="preserve">unsigned integer flag specified by GLogLevelFlags.</doc>
1864 <type name="uint" c:type="guint"/>
1867 <method name="set_loghandler"
1868 c:identifier="midgard_connection_set_loghandler">
1869 <doc xml:whitespace="preserve">Sets internal loghandler id associated with G_LOG_DOMAIN and loglevel.
1870 Caller is responsible to remove loghandler using g_log_remove_handler
1871 when new loglevel for G_LOG_DOMAIN is set.</doc>
1872 <return-value transfer-ownership="none">
1873 <type name="none" c:type="void"/>
1876 <parameter name="loghandler" transfer-ownership="none">
1877 <doc xml:whitespace="preserve">loghandler id</doc>
1878 <type name="uint" c:type="guint"/>
1882 <method name="get_loghandler"
1883 c:identifier="midgard_connection_get_loghandler">
1884 <doc xml:whitespace="preserve">MidgardConnection's loglevel currently set.</doc>
1885 <return-value transfer-ownership="none">
1886 <doc xml:whitespace="preserve">unsigned integer value which is associated with G_LOG_DOMAIN and</doc>
1887 <type name="uint" c:type="guint"/>
1890 <method name="get_error" c:identifier="midgard_connection_get_error">
1891 <doc xml:whitespace="preserve">Error id may be one of set by #midgard_error.</doc>
1892 <return-value transfer-ownership="none">
1893 <doc xml:whitespace="preserve">Last error id set</doc>
1894 <type name="int" c:type="gint"/>
1897 <method name="set_error" c:identifier="midgard_connection_set_error">
1898 <doc xml:whitespace="preserve">Valid #errcode is one defined in #MgdErrorGeneric.</doc>
1899 <return-value transfer-ownership="none">
1900 <type name="none" c:type="void"/>
1903 <parameter name="errcode" transfer-ownership="none">
1904 <doc xml:whitespace="preserve">error code</doc>
1905 <type name="int" c:type="gint"/>
1909 <method name="get_error_string"
1910 c:identifier="midgard_connection_get_error_string">
1911 <doc xml:whitespace="preserve">Error string may be one set by #midgard_error.</doc>
1912 <return-value transfer-ownership="none">
1913 <doc xml:whitespace="preserve">last error string</doc>
1914 <type name="utf8" c:type="gchar*"/>
1917 <method name="get_user" c:identifier="midgard_connection_get_user">
1918 <doc xml:whitespace="preserve">NULL is explicitly returned if there's no midgard_user logged in
1919 for the given MidgardConnection.
1920 See also #MidgardUser methods if you need midgard_person associated with user.</doc>
1921 <return-value transfer-ownership="full">
1922 <doc xml:whitespace="preserve">A pointer to MidgardUser instance or %NULL</doc>
1923 <type name="User" c:type="MidgardUser*"/>
1926 <method name="copy" c:identifier="midgard_connection_copy">
1927 <doc xml:whitespace="preserve">This function duplicates given #MidgardConnection. It doesn't make deep copy.
1928 All persistant data are kept unchanged, but runtime related members are reset
1929 to default state. This function is helpful if application is forking and new
1930 processes might have different environment variables.
1931 Call g_object_unref if returned object is no longer needed.</doc>
1932 <return-value transfer-ownership="full">
1933 <doc xml:whitespace="preserve">Newly allocated and duplicated #MidgardConnection</doc>
1934 <type name="Connection" c:type="MidgardConnection*"/>
1937 <method name="reopen" c:identifier="midgard_connection_reopen">
1938 <doc xml:whitespace="preserve">This is MySQL optimized workaround for lost connection event.</doc>
1939 <return-value transfer-ownership="none">
1940 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
1941 <type name="boolean" c:type="gboolean"/>
1944 <method name="list_auth_types"
1945 c:identifier="midgard_connection_list_auth_types">
1946 <doc xml:whitespace="preserve">List available and registered authentication types.
1947 Use g_free() to free returned array.</doc>
1948 <return-value transfer-ownership="full">
1949 <doc xml:whitespace="preserve">NULL terminated array with authentication types.</doc>
1950 <array c:type="gchar**">
1955 <parameter name="n_types"
1957 caller-allocates="0"
1958 transfer-ownership="full">
1959 <doc xml:whitespace="preserve">a pointer to store number of returned types</doc>
1960 <type name="uint" c:type="guint*"/>
1964 <method name="enable_quota"
1965 c:identifier="midgard_connection_enable_quota"
1967 <doc xml:whitespace="preserve">Enable or disable quota table usage.
1968 If enabled, every base operation (create, update, delete) will be recorded in quota table,
1969 limiting particular types usage.</doc>
1970 <return-value transfer-ownership="none">
1971 <type name="none" c:type="void"/>
1974 <parameter name="toggle" transfer-ownership="none">
1975 <doc xml:whitespace="preserve">quota enable, disable toggle</doc>
1976 <type name="boolean" c:type="gboolean"/>
1980 <method name="enable_replication"
1981 c:identifier="midgard_connection_enable_replication"
1983 <doc xml:whitespace="preserve">Enable or disable repligard table usage.
1984 If enabled, every base operation (create, update, delete) will be recorded in repligard table.</doc>
1985 <return-value transfer-ownership="none">
1986 <type name="none" c:type="void"/>
1989 <parameter name="toggle" transfer-ownership="none">
1990 <doc xml:whitespace="preserve">replication enable, disable toggle</doc>
1991 <type name="boolean" c:type="gboolean"/>
1995 <method name="enable_dbus"
1996 c:identifier="midgard_connection_enable_dbus"
1998 <doc xml:whitespace="preserve">Enable or disable dbus messages send for basic operation</doc>
1999 <return-value transfer-ownership="none">
2000 <type name="none" c:type="void"/>
2003 <parameter name="toggle" transfer-ownership="none">
2004 <doc xml:whitespace="preserve">dbus enable, disable toggle</doc>
2005 <type name="boolean" c:type="gboolean"/>
2009 <method name="is_enabled_quota"
2010 c:identifier="midgard_connection_is_enabled_quota"
2012 <return-value transfer-ownership="none">
2013 <doc xml:whitespace="preserve">%TRUE, if quota is enabled, %FALSE otherwise</doc>
2014 <type name="boolean" c:type="gboolean"/>
2017 <method name="is_enabled_replication"
2018 c:identifier="midgard_connection_is_enabled_replication"
2020 <return-value transfer-ownership="none">
2021 <doc xml:whitespace="preserve">%TRUE, if replication is enabled, %FALSE otherwise</doc>
2022 <type name="boolean" c:type="gboolean"/>
2025 <method name="is_enabled_dbus"
2026 c:identifier="midgard_connection_is_enabled_dbus"
2028 <return-value transfer-ownership="none">
2029 <doc xml:whitespace="preserve">%TRUE, if dbus is enabled, %FALSE otherwise</doc>
2030 <type name="boolean" c:type="gboolean"/>
2033 <field name="parent">
2034 <type name="GObject.Object" c:type="GObject"/>
2036 <field name="errnum">
2037 <type name="int" c:type="gint"/>
2039 <field name="errstr">
2040 <type name="utf8" c:type="gchar*"/>
2043 <type name="GLib.Error" c:type="GError*"/>
2046 <type name="ConnectionPrivate" c:type="MidgardConnectionPrivate*"/>
2048 <glib:signal name="auth-changed">
2049 <return-value transfer-ownership="full">
2050 <type name="none" c:type="void"/>
2053 <glib:signal name="connected">
2054 <return-value transfer-ownership="full">
2055 <type name="none" c:type="void"/>
2058 <glib:signal name="disconnected">
2059 <return-value transfer-ownership="full">
2060 <type name="none" c:type="void"/>
2063 <glib:signal name="error">
2064 <return-value transfer-ownership="full">
2065 <type name="none" c:type="void"/>
2068 <glib:signal name="lost-provider">
2069 <return-value transfer-ownership="full">
2070 <type name="none" c:type="void"/>
2074 <record name="ConnectionClass"
2075 c:type="MidgardConnectionClass"
2076 glib:is-gtype-struct-for="Connection">
2077 <field name="parent">
2078 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
2080 <field name="error">
2081 <callback name="error" c:type="error">
2082 <return-value transfer-ownership="none">
2083 <type name="none" c:type="void"/>
2086 <parameter name="object" transfer-ownership="none">
2087 <type name="GObject.Object" c:type="GObject*"/>
2092 <field name="auth_changed">
2093 <callback name="auth_changed" c:type="auth_changed">
2094 <return-value transfer-ownership="none">
2095 <type name="none" c:type="void"/>
2098 <parameter name="object" transfer-ownership="none">
2099 <type name="GObject.Object" c:type="GObject*"/>
2104 <field name="lost_provider">
2105 <callback name="lost_provider" c:type="lost_provider">
2106 <return-value transfer-ownership="none">
2107 <type name="none" c:type="void"/>
2110 <parameter name="object" transfer-ownership="none">
2111 <type name="GObject.Object" c:type="GObject*"/>
2116 <field name="connected">
2117 <callback name="connected" c:type="connected">
2118 <return-value transfer-ownership="none">
2119 <type name="none" c:type="void"/>
2122 <parameter name="object" transfer-ownership="none">
2123 <type name="GObject.Object" c:type="GObject*"/>
2128 <field name="disconnected">
2129 <callback name="disconnected" c:type="disconnected">
2130 <return-value transfer-ownership="none">
2131 <type name="none" c:type="void"/>
2134 <parameter name="object" transfer-ownership="none">
2135 <type name="GObject.Object" c:type="GObject*"/>
2140 <field name="signal_id_error">
2141 <type name="uint" c:type="guint"/>
2143 <field name="signal_id_auth_changed">
2144 <type name="uint" c:type="guint"/>
2146 <field name="signal_id_lost_provider">
2147 <type name="uint" c:type="guint"/>
2149 <field name="signal_id_connected">
2150 <type name="uint" c:type="guint"/>
2152 <field name="signal_id_disconnected">
2153 <type name="uint" c:type="guint"/>
2156 <record name="ConnectionPrivate" c:type="MidgardConnectionPrivate">
2158 <class name="DBObject"
2159 c:type="MidgardDBObject"
2160 parent="GObject.Object"
2162 glib:type-name="MidgardDBObject"
2163 glib:get-type="midgard_dbobject_get_type"
2164 glib:type-struct="DBObjectClass">
2165 <virtual-method name="get_connection">
2166 <return-value transfer-ownership="none">
2167 <type name="Connection" c:type="MidgardConnection*"/>
2170 <field name="parent">
2171 <type name="GObject.Object" c:type="GObject"/>
2173 <field name="dbpriv">
2174 <type name="DBObjectPrivate" c:type="MidgardDBObjectPrivate*"/>
2177 <record name="DBObjectClass"
2178 c:type="MidgardDBObjectClass"
2179 glib:is-gtype-struct-for="DBObject">
2180 <field name="parent">
2181 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
2183 <field name="dbpriv">
2184 <type name="DBObjectPrivate" c:type="MidgardDBObjectPrivate*"/>
2186 <field name="get_connection">
2187 <callback name="get_connection" c:type="get_connection">
2188 <return-value transfer-ownership="none">
2189 <type name="Connection" c:type="MidgardConnection*"/>
2192 <parameter name="object" transfer-ownership="none">
2193 <type name="DBObject" c:type="MidgardDBObject*"/>
2199 <record name="DBObjectPrivate" c:type="MidgardDBObjectPrivate">
2201 <constant name="DBUS_PATH" value="/org/midgardproject">
2204 <constant name="DBUS_SUPPORT" value="1">
2207 <constant name="DEFAULT_AUTH_TYPE" value="Plaintext">
2210 <constant name="DEFAULT_DATETIME" value="0001-01-01 00:00:00+0000">
2213 <record name="Dbus" c:type="MidgardDbus">
2214 <field name="parent" writable="1">
2215 <type name="GObject.Object" c:type="GObject"/>
2217 <field name="priv" writable="1">
2218 <type name="DbusPrivate" c:type="MidgardDbusPrivate*"/>
2221 <record name="DbusClass" c:type="MidgardDbusClass">
2222 <field name="parent" writable="1">
2223 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
2225 <field name="notified">
2226 <type name="any" c:type="pointer"/>
2228 <field name="signal_notified" writable="1">
2229 <type name="uint" c:type="guint"/>
2232 <record name="DbusPrivate" c:type="MidgardDbusPrivate">
2234 <constant name="GETTEXT_PACKAGE" value="midgard">
2237 <constant name="GLOBAL_SCHEMA"
2238 value="/usr/share/midgard2/MidgardObjects.xml">
2241 <callback name="GMarshalFunc_BOOLEAN__STRING_POINTER"
2242 c:type="GMarshalFunc_BOOLEAN__STRING_POINTER">
2243 <return-value transfer-ownership="none">
2244 <type name="boolean" c:type="gboolean"/>
2247 <parameter name="data1" transfer-ownership="none">
2248 <type name="any" c:type="gpointer"/>
2250 <parameter name="arg_1" transfer-ownership="none">
2251 <type name="any" c:type="gpointer"/>
2253 <parameter name="arg_2" transfer-ownership="none">
2254 <type name="any" c:type="gpointer"/>
2256 <parameter name="data2" transfer-ownership="none">
2257 <type name="any" c:type="gpointer"/>
2261 <class name="KeyConfig"
2262 c:type="MidgardKeyConfig"
2263 parent="GObject.Object"
2265 glib:type-name="MidgardKeyConfig"
2266 glib:get-type="midgard_key_config_get_type"
2267 glib:type-struct="KeyConfigClass">
2268 <function name="construct" c:identifier="midgard_key_config_construct">
2269 <return-value transfer-ownership="full">
2270 <type name="KeyConfig" c:type="MidgardKeyConfig*"/>
2273 <parameter name="object_type" transfer-ownership="none">
2274 <type name="GType" c:type="GType"/>
2276 <parameter name="keyctx" transfer-ownership="none">
2277 <type name="KeyConfigContext" c:type="MidgardKeyConfigContext*"/>
2279 <parameter name="path" transfer-ownership="none">
2280 <type name="utf8" c:type="char*"/>
2284 <virtual-method name="set_value" invoker="set_value">
2285 <return-value transfer-ownership="none">
2286 <type name="none" c:type="void"/>
2289 <parameter name="group" transfer-ownership="none">
2290 <type name="utf8" c:type="char*"/>
2292 <parameter name="key" transfer-ownership="none">
2293 <type name="utf8" c:type="char*"/>
2295 <parameter name="value" transfer-ownership="none">
2296 <type name="utf8" c:type="char*"/>
2300 <virtual-method name="get_value" invoker="get_value">
2301 <return-value transfer-ownership="full">
2302 <type name="utf8" c:type="char*"/>
2305 <parameter name="group" transfer-ownership="none">
2306 <type name="utf8" c:type="char*"/>
2308 <parameter name="key" transfer-ownership="none">
2309 <type name="utf8" c:type="char*"/>
2313 <virtual-method name="set_comment" invoker="set_comment">
2314 <return-value transfer-ownership="none">
2315 <type name="none" c:type="void"/>
2318 <parameter name="group" transfer-ownership="none">
2319 <type name="utf8" c:type="char*"/>
2321 <parameter name="key" transfer-ownership="none">
2322 <type name="utf8" c:type="char*"/>
2324 <parameter name="comment" transfer-ownership="none">
2325 <type name="utf8" c:type="char*"/>
2329 <virtual-method name="get_comment" invoker="get_comment">
2330 <return-value transfer-ownership="full">
2331 <type name="utf8" c:type="char*"/>
2334 <parameter name="group" transfer-ownership="none">
2335 <type name="utf8" c:type="char*"/>
2337 <parameter name="key" transfer-ownership="none">
2338 <type name="utf8" c:type="char*"/>
2342 <virtual-method name="list_groups" invoker="list_groups">
2343 <return-value transfer-ownership="full">
2344 <array c:type="char**">
2349 <parameter name="result_length1"
2351 caller-allocates="0"
2352 transfer-ownership="full">
2353 <type name="int" c:type="int*"/>
2357 <virtual-method name="group_exists" invoker="group_exists">
2358 <return-value transfer-ownership="none">
2359 <type name="boolean" c:type="gboolean"/>
2362 <parameter name="name" transfer-ownership="none">
2363 <type name="utf8" c:type="char*"/>
2367 <virtual-method name="delete_group" invoker="delete_group">
2368 <return-value transfer-ownership="none">
2369 <type name="boolean" c:type="gboolean"/>
2372 <parameter name="name" transfer-ownership="none">
2373 <type name="utf8" c:type="char*"/>
2377 <virtual-method name="store" invoker="store">
2378 <return-value transfer-ownership="none">
2379 <type name="boolean" c:type="gboolean"/>
2382 <virtual-method name="load_from_data" invoker="load_from_data">
2383 <return-value transfer-ownership="none">
2384 <type name="boolean" c:type="gboolean"/>
2387 <parameter name="data" transfer-ownership="none">
2388 <type name="utf8" c:type="char*"/>
2392 <virtual-method name="to_data" invoker="to_data">
2393 <return-value transfer-ownership="full">
2394 <type name="utf8" c:type="char*"/>
2397 <method name="set_value" c:identifier="midgard_key_config_set_value">
2398 <return-value transfer-ownership="none">
2399 <type name="none" c:type="void"/>
2402 <parameter name="group" transfer-ownership="none">
2403 <type name="utf8" c:type="char*"/>
2405 <parameter name="key" transfer-ownership="none">
2406 <type name="utf8" c:type="char*"/>
2408 <parameter name="value" transfer-ownership="none">
2409 <type name="utf8" c:type="char*"/>
2413 <method name="get_value" c:identifier="midgard_key_config_get_value">
2414 <return-value transfer-ownership="full">
2415 <type name="utf8" c:type="char*"/>
2418 <parameter name="group" transfer-ownership="none">
2419 <type name="utf8" c:type="char*"/>
2421 <parameter name="key" transfer-ownership="none">
2422 <type name="utf8" c:type="char*"/>
2426 <method name="set_comment" c:identifier="midgard_key_config_set_comment">
2427 <return-value transfer-ownership="none">
2428 <type name="none" c:type="void"/>
2431 <parameter name="group" transfer-ownership="none">
2432 <type name="utf8" c:type="char*"/>
2434 <parameter name="key" transfer-ownership="none">
2435 <type name="utf8" c:type="char*"/>
2437 <parameter name="comment" transfer-ownership="none">
2438 <type name="utf8" c:type="char*"/>
2442 <method name="get_comment" c:identifier="midgard_key_config_get_comment">
2443 <return-value transfer-ownership="full">
2444 <type name="utf8" c:type="char*"/>
2447 <parameter name="group" transfer-ownership="none">
2448 <type name="utf8" c:type="char*"/>
2450 <parameter name="key" transfer-ownership="none">
2451 <type name="utf8" c:type="char*"/>
2455 <method name="list_groups" c:identifier="midgard_key_config_list_groups">
2456 <return-value transfer-ownership="full">
2457 <array c:type="char**">
2462 <parameter name="result_length1"
2464 caller-allocates="0"
2465 transfer-ownership="full">
2466 <type name="int" c:type="int*"/>
2470 <method name="group_exists"
2471 c:identifier="midgard_key_config_group_exists">
2472 <return-value transfer-ownership="none">
2473 <type name="boolean" c:type="gboolean"/>
2476 <parameter name="name" transfer-ownership="none">
2477 <type name="utf8" c:type="char*"/>
2481 <method name="delete_group"
2482 c:identifier="midgard_key_config_delete_group">
2483 <return-value transfer-ownership="none">
2484 <type name="boolean" c:type="gboolean"/>
2487 <parameter name="name" transfer-ownership="none">
2488 <type name="utf8" c:type="char*"/>
2492 <method name="store" c:identifier="midgard_key_config_store">
2493 <return-value transfer-ownership="none">
2494 <type name="boolean" c:type="gboolean"/>
2497 <method name="load_from_data"
2498 c:identifier="midgard_key_config_load_from_data">
2499 <return-value transfer-ownership="none">
2500 <type name="boolean" c:type="gboolean"/>
2503 <parameter name="data" transfer-ownership="none">
2504 <type name="utf8" c:type="char*"/>
2508 <method name="to_data" c:identifier="midgard_key_config_to_data">
2509 <return-value transfer-ownership="full">
2510 <type name="utf8" c:type="char*"/>
2513 <field name="parent_instance">
2514 <type name="GObject.Object" c:type="GObject"/>
2517 <type name="KeyConfigPrivate" c:type="MidgardKeyConfigPrivate*"/>
2520 <type name="utf8" c:type="char*"/>
2522 <field name="context">
2523 <type name="KeyConfigContext" c:type="MidgardKeyConfigContext*"/>
2526 <record name="KeyConfigClass"
2527 c:type="MidgardKeyConfigClass"
2528 glib:is-gtype-struct-for="KeyConfig">
2529 <field name="parent_class">
2530 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
2532 <field name="set_value">
2533 <callback name="set_value" c:type="set_value">
2534 <return-value transfer-ownership="none">
2535 <type name="none" c:type="void"/>
2538 <parameter name="self" transfer-ownership="none">
2539 <type name="KeyConfig" c:type="MidgardKeyConfig*"/>
2541 <parameter name="group" transfer-ownership="none">
2542 <type name="utf8" c:type="char*"/>
2544 <parameter name="key" transfer-ownership="none">
2545 <type name="utf8" c:type="char*"/>
2547 <parameter name="value" transfer-ownership="none">
2548 <type name="utf8" c:type="char*"/>
2553 <field name="get_value">
2554 <callback name="get_value" c:type="get_value">
2555 <return-value transfer-ownership="full">
2556 <type name="utf8" c:type="char*"/>
2559 <parameter name="self" transfer-ownership="none">
2560 <type name="KeyConfig" c:type="MidgardKeyConfig*"/>
2562 <parameter name="group" transfer-ownership="none">
2563 <type name="utf8" c:type="char*"/>
2565 <parameter name="key" transfer-ownership="none">
2566 <type name="utf8" c:type="char*"/>
2571 <field name="set_comment">
2572 <callback name="set_comment" c:type="set_comment">
2573 <return-value transfer-ownership="none">
2574 <type name="none" c:type="void"/>
2577 <parameter name="self" transfer-ownership="none">
2578 <type name="KeyConfig" c:type="MidgardKeyConfig*"/>
2580 <parameter name="group" transfer-ownership="none">
2581 <type name="utf8" c:type="char*"/>
2583 <parameter name="key" transfer-ownership="none">
2584 <type name="utf8" c:type="char*"/>
2586 <parameter name="comment" transfer-ownership="none">
2587 <type name="utf8" c:type="char*"/>
2592 <field name="get_comment">
2593 <callback name="get_comment" c:type="get_comment">
2594 <return-value transfer-ownership="full">
2595 <type name="utf8" c:type="char*"/>
2598 <parameter name="self" transfer-ownership="none">
2599 <type name="KeyConfig" c:type="MidgardKeyConfig*"/>
2601 <parameter name="group" transfer-ownership="none">
2602 <type name="utf8" c:type="char*"/>
2604 <parameter name="key" transfer-ownership="none">
2605 <type name="utf8" c:type="char*"/>
2610 <field name="list_groups">
2611 <callback name="list_groups" c:type="list_groups">
2612 <return-value transfer-ownership="full">
2613 <array c:type="char**">
2618 <parameter name="self" transfer-ownership="none">
2619 <type name="KeyConfig" c:type="MidgardKeyConfig*"/>
2621 <parameter name="result_length1"
2623 caller-allocates="0"
2624 transfer-ownership="full">
2625 <type name="int" c:type="int*"/>
2630 <field name="group_exists">
2631 <callback name="group_exists" c:type="group_exists">
2632 <return-value transfer-ownership="none">
2633 <type name="boolean" c:type="gboolean"/>
2636 <parameter name="self" transfer-ownership="none">
2637 <type name="KeyConfig" c:type="MidgardKeyConfig*"/>
2639 <parameter name="name" transfer-ownership="none">
2640 <type name="utf8" c:type="char*"/>
2645 <field name="delete_group">
2646 <callback name="delete_group" c:type="delete_group">
2647 <return-value transfer-ownership="none">
2648 <type name="boolean" c:type="gboolean"/>
2651 <parameter name="self" transfer-ownership="none">
2652 <type name="KeyConfig" c:type="MidgardKeyConfig*"/>
2654 <parameter name="name" transfer-ownership="none">
2655 <type name="utf8" c:type="char*"/>
2660 <field name="store">
2661 <callback name="store" c:type="store">
2662 <return-value transfer-ownership="none">
2663 <type name="boolean" c:type="gboolean"/>
2666 <parameter name="self" transfer-ownership="none">
2667 <type name="KeyConfig" c:type="MidgardKeyConfig*"/>
2672 <field name="load_from_data">
2673 <callback name="load_from_data" c:type="load_from_data">
2674 <return-value transfer-ownership="none">
2675 <type name="boolean" c:type="gboolean"/>
2678 <parameter name="self" transfer-ownership="none">
2679 <type name="KeyConfig" c:type="MidgardKeyConfig*"/>
2681 <parameter name="data" transfer-ownership="none">
2682 <type name="utf8" c:type="char*"/>
2687 <field name="to_data">
2688 <callback name="to_data" c:type="to_data">
2689 <return-value transfer-ownership="full">
2690 <type name="utf8" c:type="char*"/>
2693 <parameter name="self" transfer-ownership="none">
2694 <type name="KeyConfig" c:type="MidgardKeyConfig*"/>
2700 <class name="KeyConfigContext"
2701 c:type="MidgardKeyConfigContext"
2702 parent="GObject.Object"
2704 glib:type-name="MidgardKeyConfigContext"
2705 glib:get-type="midgard_key_config_context_get_type"
2706 glib:type-struct="KeyConfigContextClass">
2707 <function name="construct"
2708 c:identifier="midgard_key_config_context_construct">
2709 <return-value transfer-ownership="full">
2710 <type name="KeyConfigContext" c:type="MidgardKeyConfigContext*"/>
2713 <parameter name="object_type" transfer-ownership="none">
2714 <type name="GType" c:type="GType"/>
2716 <parameter name="context_path" transfer-ownership="none">
2717 <type name="utf8" c:type="char*"/>
2721 <virtual-method name="list_key_config" invoker="list_key_config">
2722 <return-value transfer-ownership="full">
2723 <array c:type="char**">
2728 <parameter name="result_length1"
2730 caller-allocates="0"
2731 transfer-ownership="full">
2732 <type name="int" c:type="int*"/>
2736 <method name="list_key_config"
2737 c:identifier="midgard_key_config_context_list_key_config">
2738 <return-value transfer-ownership="full">
2739 <array c:type="char**">
2744 <parameter name="result_length1"
2746 caller-allocates="0"
2747 transfer-ownership="full">
2748 <type name="int" c:type="int*"/>
2752 <method name="get_context_path"
2753 c:identifier="midgard_key_config_context_get_context_path">
2754 <return-value transfer-ownership="none">
2755 <type name="utf8" c:type="char*"/>
2758 <property name="context-path" transfer-ownership="none">
2759 <type name="utf8" c:type="gchararray"/>
2761 <field name="parent_instance">
2762 <type name="GObject.Object" c:type="GObject"/>
2765 <type name="KeyConfigContextPrivate"
2766 c:type="MidgardKeyConfigContextPrivate*"/>
2769 <record name="KeyConfigContextClass"
2770 c:type="MidgardKeyConfigContextClass"
2771 glib:is-gtype-struct-for="KeyConfigContext">
2772 <field name="parent_class">
2773 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
2775 <field name="list_key_config">
2776 <callback name="list_key_config" c:type="list_key_config">
2777 <return-value transfer-ownership="full">
2778 <array c:type="char**">
2783 <parameter name="self" transfer-ownership="none">
2784 <type name="KeyConfigContext" c:type="MidgardKeyConfigContext*"/>
2786 <parameter name="result_length1"
2788 caller-allocates="0"
2789 transfer-ownership="full">
2790 <type name="int" c:type="int*"/>
2796 <enumeration name="KeyConfigContextError"
2797 c:type="KeyConfigContextError"
2798 glib:error-quark="key_config_context_error_quark">
2799 <member name="key_config_context_error_path_is_not_absolute"
2801 c:identifier="KEY_CONFIG_CONTEXT_ERROR_PATH_IS_NOT_ABSOLUTE"/>
2803 <record name="KeyConfigContextPrivate"
2804 c:type="MidgardKeyConfigContextPrivate">
2806 <class name="KeyConfigFile"
2807 c:type="MidgardKeyConfigFile"
2809 glib:type-name="MidgardKeyConfigFile"
2810 glib:get-type="midgard_key_config_file_get_type"
2811 glib:type-struct="KeyConfigFileClass">
2812 <constructor name="new"
2813 c:identifier="midgard_key_config_file_new"
2815 <return-value transfer-ownership="full">
2816 <type name="KeyConfigFile" c:type="MidgardKeyConfigFile*"/>
2819 <parameter name="keyctx" transfer-ownership="none">
2820 <type name="KeyConfigFileContext"
2821 c:type="MidgardKeyConfigFileContext*"/>
2823 <parameter name="path" transfer-ownership="none">
2824 <type name="utf8" c:type="char*"/>
2828 <function name="construct"
2829 c:identifier="midgard_key_config_file_construct"
2831 <return-value transfer-ownership="full">
2832 <type name="KeyConfigFile" c:type="MidgardKeyConfigFile*"/>
2835 <parameter name="object_type" transfer-ownership="none">
2836 <type name="GType" c:type="GType"/>
2838 <parameter name="keyctx" transfer-ownership="none">
2839 <type name="KeyConfigFileContext"
2840 c:type="MidgardKeyConfigFileContext*"/>
2842 <parameter name="path" transfer-ownership="none">
2843 <type name="utf8" c:type="char*"/>
2847 <field name="parent_instance">
2848 <type name="KeyConfig" c:type="MidgardKeyConfig"/>
2851 <type name="KeyConfigFilePrivate"
2852 c:type="MidgardKeyConfigFilePrivate*"/>
2855 <record name="KeyConfigFileClass"
2856 c:type="MidgardKeyConfigFileClass"
2857 glib:is-gtype-struct-for="KeyConfigFile">
2858 <field name="parent_class">
2859 <type name="KeyConfigClass" c:type="MidgardKeyConfigClass"/>
2862 <class name="KeyConfigFileContext"
2863 c:type="MidgardKeyConfigFileContext"
2864 parent="KeyConfigContext"
2865 glib:type-name="MidgardKeyConfigFileContext"
2866 glib:get-type="midgard_key_config_file_context_get_type"
2867 glib:type-struct="KeyConfigFileContextClass">
2868 <constructor name="new"
2869 c:identifier="midgard_key_config_file_context_new"
2871 <return-value transfer-ownership="full">
2872 <type name="KeyConfigFileContext"
2873 c:type="MidgardKeyConfigFileContext*"/>
2876 <parameter name="context_path" transfer-ownership="none">
2877 <type name="utf8" c:type="char*"/>
2881 <function name="construct"
2882 c:identifier="midgard_key_config_file_context_construct"
2884 <return-value transfer-ownership="full">
2885 <type name="KeyConfigFileContext"
2886 c:type="MidgardKeyConfigFileContext*"/>
2889 <parameter name="object_type" transfer-ownership="none">
2890 <type name="GType" c:type="GType"/>
2892 <parameter name="context_path" transfer-ownership="none">
2893 <type name="utf8" c:type="char*"/>
2897 <field name="parent_instance">
2898 <type name="KeyConfigContext" c:type="MidgardKeyConfigContext"/>
2901 <type name="KeyConfigFileContextPrivate"
2902 c:type="MidgardKeyConfigFileContextPrivate*"/>
2905 <record name="KeyConfigFileContextClass"
2906 c:type="MidgardKeyConfigFileContextClass"
2907 glib:is-gtype-struct-for="KeyConfigFileContext">
2908 <field name="parent_class">
2909 <type name="KeyConfigContextClass"
2910 c:type="MidgardKeyConfigContextClass"/>
2913 <record name="KeyConfigFileContextPrivate"
2914 c:type="MidgardKeyConfigFileContextPrivate">
2916 <record name="KeyConfigFilePrivate" c:type="MidgardKeyConfigFilePrivate">
2918 <record name="KeyConfigPrivate" c:type="MidgardKeyConfigPrivate">
2920 <constant name="LIB_PREFIX" value="/usr">
2923 <constant name="LIB_VERSION" value="10.05.0">
2926 <constant name="LIB_VERSION_STRING" value="">
2929 <constant name="LSCHEMA_DIR" value="/usr/share/midgard2/schema">
2932 <record name="MD5_CTX" c:type="MIDGARD_MD5_CTX">
2933 <field name="state" writable="1">
2934 <array zero-terminated="0" c:type="unsigned" fixed-size="4">
2938 <field name="count" writable="1">
2939 <array zero-terminated="0" c:type="unsigned" fixed-size="2">
2943 <field name="buffer" writable="1">
2944 <array zero-terminated="0" c:type="unsigned" fixed-size="64">
2949 <function name="MD5_Final" c:identifier="MIDGARD_MD5_Final">
2950 <return-value transfer-ownership="none">
2951 <type name="none" c:type="void"/>
2954 <parameter transfer-ownership="none">
2955 <type name="uint8" c:type="unsigned char"/>
2957 <parameter transfer-ownership="none">
2958 <type name="MD5_CTX" c:type="MIDGARD_MD5_CTX*"/>
2962 <function name="MD5_Init" c:identifier="MIDGARD_MD5_Init">
2963 <return-value transfer-ownership="none">
2964 <type name="none" c:type="void"/>
2967 <parameter transfer-ownership="none">
2968 <type name="MD5_CTX" c:type="MIDGARD_MD5_CTX*"/>
2972 <function name="MD5_Update" c:identifier="MIDGARD_MD5_Update">
2973 <return-value transfer-ownership="none">
2974 <type name="none" c:type="void"/>
2977 <parameter transfer-ownership="none">
2978 <type name="MD5_CTX" c:type="MIDGARD_MD5_CTX*"/>
2980 <parameter transfer-ownership="none">
2981 <array c:type="unsigned char*">
2982 <type name="uint8"/>
2985 <parameter transfer-ownership="none">
2986 <type name="uint" c:type="unsigned int"/>
2990 <constant name="MGD_MYSQL_PASSWORD" value="midgard">
2993 <class name="Metadata"
2994 c:type="MidgardMetadata"
2996 glib:type-name="MidgardMetadata"
2997 glib:get-type="midgard_metadata_get_type"
2998 glib:type-struct="MetadataClass">
2999 <constructor name="new" c:identifier="midgard_metadata_new">
3000 <doc xml:whitespace="preserve">Creates new midgard_metadata instance for the given #MidgardObject instance.
3001 Do not use g_object_new() as metadata constructor. #MidgardObject pointer is internally
3002 assigned as a pointer to midgard object for which particular metadata object
3003 instance was created.
3004 #MidgardMetadata object has two "kinds" of properties.
3005 The first one is settable ( and overwritten ) only by metadata implementation.
3006 The second one is freely settable by application. In this case midgard core
3007 keep value of such property "as is".
3008 Do not free #MidgardMetadata object's memory as it is automatically
3009 freed when particular #MidgardObject object's instance memory is freed.</doc>
3010 <return-value transfer-ownership="full">
3011 <doc xml:whitespace="preserve">newly allocated midgard_metadata instance</doc>
3012 <type name="Metadata" c:type="MidgardMetadata*"/>
3015 <parameter name="object" transfer-ownership="none">
3016 <doc xml:whitespace="preserve">#MidgardObject for which metadata is created</doc>
3017 <type name="DBObject" c:type="MidgardDBObject*"/>
3021 <property name="approved" transfer-ownership="none">
3022 <type name="Timestamp" c:type="MidgardTimestamp"/>
3024 <property name="approver" transfer-ownership="none">
3025 <type name="utf8" c:type="gchararray"/>
3027 <property name="authors" writable="1" transfer-ownership="none">
3028 <type name="utf8" c:type="gchararray"/>
3030 <property name="created" transfer-ownership="none">
3031 <type name="Timestamp" c:type="MidgardTimestamp"/>
3033 <property name="creator" transfer-ownership="none">
3034 <type name="utf8" c:type="gchararray"/>
3036 <property name="deleted" transfer-ownership="none">
3037 <type name="boolean" c:type="gboolean"/>
3039 <property name="exported" transfer-ownership="none">
3040 <type name="Timestamp" c:type="MidgardTimestamp"/>
3042 <property name="hidden" writable="1" transfer-ownership="none">
3043 <type name="boolean" c:type="gboolean"/>
3045 <property name="imported" transfer-ownership="none">
3046 <type name="Timestamp" c:type="MidgardTimestamp"/>
3048 <property name="isapproved" transfer-ownership="none">
3049 <type name="boolean" c:type="gboolean"/>
3051 <property name="islocked" transfer-ownership="none">
3052 <type name="boolean" c:type="gboolean"/>
3054 <property name="locked" transfer-ownership="none">
3055 <type name="Timestamp" c:type="MidgardTimestamp"/>
3057 <property name="locker" transfer-ownership="none">
3058 <type name="utf8" c:type="gchararray"/>
3060 <property name="navnoentry" writable="1" transfer-ownership="none">
3061 <type name="boolean" c:type="gboolean"/>
3063 <property name="owner" writable="1" transfer-ownership="none">
3064 <type name="utf8" c:type="gchararray"/>
3066 <property name="published" writable="1" transfer-ownership="none">
3067 <type name="Timestamp" c:type="MidgardTimestamp"/>
3069 <property name="revised" transfer-ownership="none">
3070 <type name="Timestamp" c:type="MidgardTimestamp"/>
3072 <property name="revision" transfer-ownership="none">
3073 <type name="uint" c:type="guint"/>
3075 <property name="revisor" transfer-ownership="none">
3076 <type name="utf8" c:type="gchararray"/>
3078 <property name="scheduleend" writable="1" transfer-ownership="none">
3079 <type name="Timestamp" c:type="MidgardTimestamp"/>
3081 <property name="schedulestart" writable="1" transfer-ownership="none">
3082 <type name="Timestamp" c:type="MidgardTimestamp"/>
3084 <property name="score" writable="1" transfer-ownership="none">
3085 <type name="int" c:type="gint"/>
3087 <property name="size" transfer-ownership="none">
3088 <type name="uint" c:type="guint"/>
3090 <field name="parent">
3091 <type name="DBObject" c:type="MidgardDBObject"/>
3094 <type name="MetadataPrivate" c:type="MidgardMetadataPrivate*"/>
3097 <record name="MetadataClass"
3098 c:type="MidgardMetadataClass"
3099 glib:is-gtype-struct-for="Metadata">
3100 <field name="parent">
3101 <type name="DBObjectClass" c:type="MidgardDBObjectClass"/>
3104 <record name="MetadataPrivate" c:type="MidgardMetadataPrivate">
3106 <enumeration name="MgdErrorGeneric" c:type="MgdErrorGeneric">
3107 <member name="ok" value="0" c:identifier="MGD_ERR_OK"/>
3108 <member name="error" value="-1" c:identifier="MGD_ERR_ERROR"/>
3109 <member name="access_denied"
3111 c:identifier="MGD_ERR_ACCESS_DENIED"/>
3112 <member name="no_metadata"
3114 c:identifier="MGD_ERR_NO_METADATA"/>
3115 <member name="not_object" value="-4" c:identifier="MGD_ERR_NOT_OBJECT"/>
3116 <member name="not_exists" value="-5" c:identifier="MGD_ERR_NOT_EXISTS"/>
3117 <member name="invalid_name"
3119 c:identifier="MGD_ERR_INVALID_NAME"/>
3120 <member name="duplicate" value="-7" c:identifier="MGD_ERR_DUPLICATE"/>
3121 <member name="has_dependants"
3123 c:identifier="MGD_ERR_HAS_DEPENDANTS"/>
3124 <member name="range" value="-9" c:identifier="MGD_ERR_RANGE"/>
3125 <member name="not_connected"
3127 c:identifier="MGD_ERR_NOT_CONNECTED"/>
3128 <member name="sg_notfound"
3130 c:identifier="MGD_ERR_SG_NOTFOUND"/>
3131 <member name="invalid_object"
3133 c:identifier="MGD_ERR_INVALID_OBJECT"/>
3134 <member name="quota" value="-13" c:identifier="MGD_ERR_QUOTA"/>
3135 <member name="internal" value="-14" c:identifier="MGD_ERR_INTERNAL"/>
3136 <member name="object_name_exists"
3138 c:identifier="MGD_ERR_OBJECT_NAME_EXISTS"/>
3139 <member name="object_no_storage"
3141 c:identifier="MGD_ERR_OBJECT_NO_STORAGE"/>
3142 <member name="object_no_parent"
3144 c:identifier="MGD_ERR_OBJECT_NO_PARENT"/>
3145 <member name="invalid_property_value"
3147 c:identifier="MGD_ERR_INVALID_PROPERTY_VALUE"/>
3148 <member name="invalid_property"
3150 c:identifier="MGD_ERR_INVALID_PROPERTY"/>
3151 <member name="user_data" value="-20" c:identifier="MGD_ERR_USER_DATA"/>
3152 <member name="object_deleted"
3154 c:identifier="MGD_ERR_OBJECT_DELETED"/>
3155 <member name="object_purged"
3157 c:identifier="MGD_ERR_OBJECT_PURGED"/>
3158 <member name="object_exported"
3160 c:identifier="MGD_ERR_OBJECT_EXPORTED"/>
3161 <member name="object_imported"
3163 c:identifier="MGD_ERR_OBJECT_IMPORTED"/>
3164 <member name="missed_dependence"
3166 c:identifier="MGD_ERR_MISSED_DEPENDENCE"/>
3167 <member name="tree_is_circular"
3169 c:identifier="MGD_ERR_TREE_IS_CIRCULAR"/>
3170 <member name="object_is_locked"
3172 c:identifier="MGD_ERR_OBJECT_IS_LOCKED"/>
3174 <class name="Object"
3175 c:type="MidgardObject"
3178 glib:type-name="MidgardObject"
3179 glib:get-type="midgard_object_get_type"
3180 glib:type-struct="ObjectClass">
3181 <constructor name="new" c:identifier="midgard_object_new">
3182 <doc xml:whitespace="preserve">Creates new MidgardObject object instance.
3183 This function is mandatory one for new midgard object initialization.
3184 Unlike g_object_new ( which is typical function to create new GObject
3185 instance ), midgard_object_new initializes data which are accessible
3186 internally by object instance itself or by object's class:
3187 - midgard connection handler is associated with object
3188 Sitegroup value is returned from midgard connection handler and may
3189 be overwritten only by SG0 Midgard Administrator only when object
3190 is created. Setting this property is forbidden when object is already
3191 fetched from database.
3192 Object's contructor tries to determine third optional parameter value.
3193 If it's of #G_TYPE_STRING type , then midgard_is_guid() is called to check
3194 weather passed string is a guid , in any other case id property is used
3195 with #G_TYPE_UINT type. New "empty" instance is created (without fetching
3196 data from database) if @value parameter is explicitly set to NULL.
3197 Any object instance created with this function should be freed using typical
3198 #g_object_unref function.
3199 Cases to return %NULL:
3200 <itemizedlist>
3201 <listitem><para>
3202 </para></listitem>
3203 <listitem><para>
3204 </para></listitem>
3205 <listitem><para>
3206 unspecified internal error ( MGD_ERR_INTERNAL )
3207 </para></listitem>
3208 </itemizedlist></doc>
3209 <return-value transfer-ownership="full">
3210 <doc xml:whitespace="preserve">New #MidgardObject object or %NULL on failure</doc>
3211 <type name="Object" c:type="MidgardObject*"/>
3214 <parameter name="mgd" transfer-ownership="none">
3215 <doc xml:whitespace="preserve">#MidgardConnection handler</doc>
3216 <type name="Connection" c:type="MidgardConnection*"/>
3218 <parameter name="name" transfer-ownership="none">
3219 <doc xml:whitespace="preserve">name of the class</doc>
3220 <type name="utf8" c:type="gchar*"/>
3222 <parameter name="value" transfer-ownership="none">
3223 <doc xml:whitespace="preserve">optional value which holds id or guid of an object</doc>
3224 <type name="GObject.Value" c:type="GValue*"/>
3228 <method name="get_by_id" c:identifier="midgard_object_get_by_id">
3229 <doc xml:whitespace="preserve">Fetch object's record(s) from database using 'id' property.
3230 This is common practice to use 'id' property with integer type when table's
3231 id column stores unique, primary key value which identifies object and its record(s).
3232 However primary property with integer type is freely defined by user.
3233 MidgardObject object instance must be created with midgard_object_new function.
3234 When midgard connection handler is not associated with object instance,
3235 application is terminated with 'assertion fails' error message being logged.
3236 Object instance created with this function should be freed using #g_object_unref.
3237 Cases to return %FALSE:
3238 <itemizedlist>
3239 <listitem><para>
3240 There's no 'id' primary property registered for object's class ( MGD_ERR_INTERNAL )
3241 </para></listitem>
3242 <listitem><para>
3243 Object's record can not be fetched from database ( MGD_ERR_NOT_EXISTS )
3244 </para></listitem>
3245 <listitem><para>
3246 unspecified internal error ( MGD_ERR_INTERNAL )
3247 </para></listitem>
3248 </itemizedlist></doc>
3249 <return-value transfer-ownership="none">
3250 <doc xml:whitespace="preserve">%TRUE if object is successfully fetched from database, %FALSE otherwise.</doc>
3251 <type name="boolean" c:type="gboolean"/>
3254 <parameter name="id" transfer-ownership="none">
3255 <doc xml:whitespace="preserve">object's integer identifier</doc>
3256 <type name="uint" c:type="guint"/>
3260 <method name="get_by_guid" c:identifier="midgard_object_get_by_guid">
3261 <doc xml:whitespace="preserve">Fetch object's record(s) from database using 'guid' property constraint.
3262 MidgardObject object instance must be created with midgard_object_new function.
3263 When midgard connection handler is not associated with object instance,
3264 application is terminated with 'assertion fails' error message being logged.
3265 Object instance created with this function should be freed using g_object_unref.
3266 Cases to return %FALSE:
3267 <itemizedlist>
3268 <listitem><para>
3269 Object's record can not be fetched from database ( MGD_ERR_NOT_EXISTS )
3270 </para></listitem>
3271 <listitem><para>
3272 unspecified internal error ( MGD_ERR_INTERNAL )
3273 </para></listitem>
3274 </itemizedlist></doc>
3275 <return-value transfer-ownership="none">
3276 <doc xml:whitespace="preserve">%TRUE if object is successfully fetched from database, %FALSE otherwise.</doc>
3277 <type name="boolean" c:type="gboolean"/>
3280 <parameter name="guid" transfer-ownership="none">
3281 <doc xml:whitespace="preserve">string value which should identify object</doc>
3282 <type name="utf8" c:type="gchar*"/>
3286 <method name="get_by_path" c:identifier="midgard_object_get_by_path">
3287 <return-value transfer-ownership="none">
3288 <type name="boolean" c:type="gboolean"/>
3291 <parameter name="path" transfer-ownership="none">
3292 <type name="utf8" c:type="gchar*"/>
3296 <method name="update" c:identifier="midgard_object_update">
3297 <doc xml:whitespace="preserve">Update object's record(s).
3298 Internally such metadata properties are set (overwritten):
3299 <itemizedlist>
3300 <listitem><para>
3302 </para></listitem>
3303 <listitem><para>
3304 revision ( increased by one )
3305 </para></listitem>
3306 <listitem><para>
3308 </para></listitem>
3309 </itemizedlist>
3310 Cases to return %FALSE:
3311 <itemizedlist>
3312 <listitem><para>
3313 Property registered with #MGD_TYPE_GUID doesn't hold valid guid ( MGD_ERR_INVALID_PROPERTY_VALUE )
3314 </para></listitem>
3315 <listitem><para>
3316 Object's class is registered with tree facilities and there is already such object in midgard tree ( MGD_ERR_DUPLICATE )
3317 </para></listitem>
3318 <listitem><para>
3319 Quota is activated and its limit is reached ( MGD_ERR_QUOTA )
3320 </para></listitem>
3321 <listitem><para>
3322 Unspecified internal error ( MGD_ERR_INTERNAL )
3323 </para></listitem>
3324 </itemizedlist></doc>
3325 <return-value transfer-ownership="none">
3326 <doc xml:whitespace="preserve">%TRUE if object's record(s) is successfully updated, %FALSE otherwise.</doc>
3327 <type name="boolean" c:type="gboolean"/>
3330 <method name="create" c:identifier="midgard_object_create">
3331 <doc xml:whitespace="preserve">Creates new database record(s) for object.
3332 Internally such properties are set (overwritten):
3333 <itemizedlist>
3334 <listitem><para>
3335 guid (if not set by root)
3336 </para></listitem>
3337 <listitem><para>
3338 id (if set as primary property)
3339 </para></listitem>
3340 </itemizedlist>
3341 Metadata overwritten properties:
3342 <itemizedlist>
3343 <listitem><para>
3345 </para></listitem>
3346 <listitem><para>
3348 </para></listitem>
3349 <listitem><para>
3351 </para></listitem>
3352 <listitem><para>
3354 </para></listitem>
3355 <listitem><para>
3357 </para></listitem>
3358 <listitem><para>
3359 published ( set only, if not defined by user )
3360 </para></listitem>
3361 </itemizedlist>
3362 Cases to return %FALSE:
3363 <itemizedlist>
3364 <listitem><para>
3365 Property registered with #MGD_TYPE_GUID doesn't hold valid guid ( MGD_ERR_INVALID_PROPERTY_VALUE )
3366 </para></listitem>
3367 <listitem><para>
3368 Object's class is registered with tree facilities and there is already object with the same name in midgard tree. ( MGD_ERR_DUPLICATE )
3369 </para></listitem>
3370 <listitem><para>
3371 Object has guid property set already. ( MGD_ERR_DUPLICATE )
3372 </para></listitem>
3373 <listitem><para>
3374 Quota is activated and its limit is reached ( MGD_ERR_QUOTA )
3375 </para></listitem>
3376 <listitem><para>
3377 Unspecified internal error ( MGD_ERR_INTERNAL )
3378 </para></listitem>
3379 </itemizedlist></doc>
3380 <return-value transfer-ownership="none">
3381 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
3382 <type name="boolean" c:type="gboolean"/>
3385 <method name="delete" c:identifier="midgard_object_delete">
3386 <doc xml:whitespace="preserve">Delete object's record(s) from database, but object's record is not fully deleted
3387 from database. Instead, it is marked as deleted , thus it is possible to undelete
3388 object later with midgard_schema_object_factory_object_undelete().
3389 If @check_dependents toggle is %TRUE, parameters and attachments storage will be queried,
3390 if any of such exist and depend on deleted object.
3391 If given object's class has no metadata defined, object will be purged.
3392 Use midgard_object_purge() if you need to purge object's data from database.
3393 Cases to return %FALSE:
3394 <itemizedlist>
3395 <listitem><para>
3396 Object's has no storage defined ( MGD_ERR_OBJECT_NO_STORAGE )
3397 </para></listitem>
3398 <listitem><para>
3399 Object's property guid is empty ( MGD_ERR_INVALID_PROPERTY_VALUE )
3400 </para></listitem>
3401 <listitem><para>
3402 There are still dependent objects in database ( MGD_ERR_HAS_DEPENDENTS )
3403 </para></listitem>
3404 <listitem><para>
3405 Unspecified internal error ( MGD_ERR_INTERNAL )
3406 </para></listitem>
3407 </itemizedlist></doc>
3408 <return-value transfer-ownership="none">
3409 <doc xml:whitespace="preserve">%TRUE if object is successfully marked as deleted, %FALSE otherwise.</doc>
3410 <type name="boolean" c:type="gboolean"/>
3413 <parameter name="check_dependents" transfer-ownership="none">
3414 <doc xml:whitespace="preserve">dependents' check toggle</doc>
3415 <type name="boolean" c:type="gboolean"/>
3419 <method name="purge" c:identifier="midgard_object_purge">
3420 <doc xml:whitespace="preserve">Purge object's record(s) from database.
3421 If @check_dependents toggle is %TRUE, parameters and attachments storage will be queried,
3422 if any of such exist and depend on deleted object.
3423 Object's record(s) are purged from database without any possibility to recover.
3424 After successfull call, only repligard table holds information about object's state.
3425 Use midgard_object_delete(), if undelete facility is needed.
3426 Cases to return %FALSE:
3427 <itemizedlist>
3428 <listitem><para>
3429 Object has no storage defined ( MGD_ERR_OBJECT_NO_STORAGE )
3430 </para></listitem>
3431 <listitem><para>
3432 Object's property guid value is empty ( MGD_ERR_INVALID_PROPERTY_VALUE )
3433 </para></listitem>
3434 <listitem><para>
3435 There are still dependent objects in database ( MGD_ERR_HAS_DEPENDANTS )
3436 </para></listitem>
3437 <listitem><para>
3438 No record has been deleted from database ( MGD_ERR_NOT_EXISTS )
3439 </para></listitem>
3440 <listitem><para>
3441 Unspecified internal error ( MGD_ERR_INTERNAL )
3442 </para></listitem>
3443 </itemizedlist></doc>
3444 <return-value transfer-ownership="none">
3445 <doc xml:whitespace="preserve">%TRUE if object has been succesfully purged from database, %FALSE otherwise.</doc>
3446 <type name="boolean" c:type="gboolean"/>
3449 <parameter name="check_dependents" transfer-ownership="none">
3450 <doc xml:whitespace="preserve">dependents' check toggle</doc>
3451 <type name="boolean" c:type="gboolean"/>
3455 <method name="build_path" c:identifier="midgard_object_build_path">
3456 <return-value transfer-ownership="full">
3457 <type name="utf8" c:type="gchar*"/>
3460 <method name="has_dependents"
3461 c:identifier="midgard_object_has_dependents">
3462 <doc xml:whitespace="preserve">Checks whether object has dependent objects.
3463 Check is done with such particular order:
3464 <itemizedlist>
3465 <listitem><para>
3466 Objects of the same type
3467 </para></listitem>
3468 <listitem><para>
3470 </para></listitem>
3471 <listitem><para>
3473 </para></listitem>
3474 <listitem><para>
3476 </para></listitem>
3477 </itemizedlist></doc>
3478 <return-value transfer-ownership="none">
3479 <type name="boolean" c:type="gboolean"/>
3482 <method name="set_guid" c:identifier="midgard_object_set_guid">
3483 <doc xml:whitespace="preserve">Sets object's guid
3484 Cases to return %FALSE:
3485 <itemizedlist>
3486 <listitem><para>
3487 given guid already exists in database ( MGD_ERR_DUPLICATE )
3488 </para></listitem>
3489 <listitem><para>
3490 given guid is invalid ( MGD_ERR_INVALID_PROPERTY_VALUE )
3491 </para></listitem>
3492 <listitem><para>
3493 object has already set guid property ( MGD_ERR_INVALID_PROPERTY_VALUE )
3494 </para></listitem>
3495 </itemizedlist></doc>
3496 <return-value transfer-ownership="none">
3497 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
3498 <type name="boolean" c:type="gboolean"/>
3501 <parameter name="guid" transfer-ownership="none">
3502 <doc xml:whitespace="preserve">guid to set</doc>
3503 <type name="utf8" c:type="gchar*"/>
3507 <method name="set_connection"
3508 c:identifier="midgard_object_set_connection">
3509 <return-value transfer-ownership="none">
3510 <type name="none" c:type="void"/>
3513 <parameter name="mgd" transfer-ownership="none">
3514 <type name="Connection" c:type="MidgardConnection*"/>
3518 <method name="get_connection"
3519 c:identifier="midgard_object_get_connection">
3520 <doc xml:whitespace="preserve">Returned #MidgardConnection is owned by core, and should not be freed.</doc>
3521 <return-value transfer-ownership="none">
3522 <doc xml:whitespace="preserve">pointer to #MidgardConnection associated with given object.</doc>
3523 <type name="Connection" c:type="MidgardConnection*"/>
3526 <method name="approve" c:identifier="midgard_object_approve">
3527 <doc xml:whitespace="preserve">Approve object.
3528 Approval functionality is not used by midgard core itself.
3529 Instead, it supports higher level's applications. It means,
3530 that there are no core methods ( like update or delete ) which
3531 do real check if object is approved. You should create own approval
3532 midgard_object_unapprove() and this one.
3533 revisor, revised, revision, approver and approved.
3534 Cases to return %FALSE:
3535 <itemizedlist>
3536 <listitem><para>
3537 No user logged in ( MGD_ERR_ACCESS_DENIED )
3538 </para></listitem>
3539 <listitem><para>
3540 No active person ( MGD_ERR_INTERNAL )
3541 </para></listitem>
3542 <listitem><para>
3543 Object is already approved
3544 </para></listitem>
3545 </itemizedlist></doc>
3546 <return-value transfer-ownership="none">
3547 <doc xml:whitespace="preserve">%TRUE if object has been approved, FALSE otherwise</doc>
3548 <type name="boolean" c:type="gboolean"/>
3551 <method name="is_approved" c:identifier="midgard_object_is_approved">
3552 <doc xml:whitespace="preserve">Check whether object is approved.</doc>
3553 <return-value transfer-ownership="none">
3554 <doc xml:whitespace="preserve">%TRUE if object is approved, %FALSE otherwise</doc>
3555 <type name="boolean" c:type="gboolean"/>
3558 <method name="unapprove" c:identifier="midgard_object_unapprove">
3559 <doc xml:whitespace="preserve">Simply unapprove object. It doesn't affect any core functionality,
3560 like midgard_object_approve().
3561 This method updates metadata properties:
3562 revisor, revised, revision, approver and approved
3563 Cases to return %FALSE:
3564 <itemizedlist>
3565 <listitem><para>
3566 No user logged in ( MGD_ERR_ACCESS_DENIED )
3567 </para></listitem>
3568 <listitem><para>
3569 Object is not approved
3570 </para></listitem>
3571 </itemizedlist></doc>
3572 <return-value transfer-ownership="none">
3573 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
3574 <type name="boolean" c:type="gboolean"/>
3577 <method name="lock" c:identifier="midgard_object_lock">
3578 <doc xml:whitespace="preserve">Lock object.
3579 This method doesn't affect any core's functionality like midgard_object_approve.
3580 You should create own locking workflow and logic with methods:
3581 midgard_object_is_locked(), midgard_object_unlock() and this one.
3582 Updates metadata properties:
3583 locker, locked, revisor, revised and revision
3584 Cases to return %FALSE:
3585 <itemizedlist>
3586 <listitem><para>
3587 No user logged in ( MGD_ERR_ACCESS_DENIED )
3588 </para></listitem>
3589 <listitem><para>
3590 Metadata class not defined for given object's class ( MGD_ERR_NO_METADATA )
3591 </para></listitem>
3592 <listitem><para>
3593 Object is already locked ( MGD_ERR_OBJECT_IS_LOCKED )
3594 </para></listitem>
3595 </itemizedlist></doc>
3596 <return-value transfer-ownership="none">
3597 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
3598 <type name="boolean" c:type="gboolean"/>
3601 <method name="is_locked" c:identifier="midgard_object_is_locked">
3602 <doc xml:whitespace="preserve">Check whether object is locked
3603 Cases to return %FALSE:
3604 <itemizedlist>
3605 <listitem><para>
3606 Metadata class not defined for given object's class ( MGD_ERR_NO_METADATA )
3607 </para></listitem>
3608 </itemizedlist></doc>
3609 <return-value transfer-ownership="none">
3610 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
3611 <type name="boolean" c:type="gboolean"/>
3614 <method name="unlock" c:identifier="midgard_object_unlock">
3615 <doc xml:whitespace="preserve">Unlock object.
3616 Cases to return %FALSE:
3617 <itemizedlist>
3618 <listitem><para>
3619 No user logged in ( MGD_ERR_ACCESS_DENIED )
3620 </para></listitem>
3621 <listitem><para>
3622 Object is not locked ( FIXME )
3623 </para></listitem>
3624 <listitem><para>
3625 Metadata class not defined for given object's class ( MGD_ERR_NO_METADATA )
3626 </para></listitem>
3627 </itemizedlist></doc>
3628 <return-value transfer-ownership="none">
3629 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
3630 <type name="boolean" c:type="gboolean"/>
3633 <method name="get_schema_property"
3634 c:identifier="midgard_object_get_schema_property">
3635 <return-value transfer-ownership="full">
3636 <type name="GObject.Value" c:type="GValue*"/>
3639 <parameter name="property" transfer-ownership="none">
3640 <type name="utf8" c:type="gchar*"/>
3644 <method name="set_schema_property"
3645 c:identifier="midgard_object_set_schema_property">
3646 <return-value transfer-ownership="none">
3647 <type name="none" c:type="void"/>
3650 <parameter name="property" transfer-ownership="none">
3651 <type name="utf8" c:type="gchar*"/>
3653 <parameter name="value" transfer-ownership="none">
3654 <type name="GObject.Value" c:type="GValue*"/>
3658 <method name="get_parameter" c:identifier="midgard_object_get_parameter">
3659 <return-value transfer-ownership="none">
3660 <type name="GObject.Value" c:type="GValue*"/>
3663 <parameter name="domain" transfer-ownership="none">
3664 <type name="utf8" c:type="gchar*"/>
3666 <parameter name="name" transfer-ownership="none">
3667 <type name="utf8" c:type="gchar*"/>
3671 <method name="set_parameter" c:identifier="midgard_object_set_parameter">
3672 <doc xml:whitespace="preserve">Creates object's parameter object if it doesn't exists, updates otherwise.</doc>
3673 <return-value transfer-ownership="none">
3674 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
3675 <type name="boolean" c:type="gboolean"/>
3678 <parameter name="domain" transfer-ownership="none">
3679 <doc xml:whitespace="preserve">parameter's domain string</doc>
3680 <type name="utf8" c:type="gchar*"/>
3682 <parameter name="name" transfer-ownership="none">
3683 <doc xml:whitespace="preserve">parameter's name string</doc>
3684 <type name="utf8" c:type="gchar*"/>
3686 <parameter name="value" transfer-ownership="none">
3687 <doc xml:whitespace="preserve">a GValue value which should be set for domain&name pair</doc>
3688 <type name="GObject.Value" c:type="GValue*"/>
3692 <method name="list_parameters"
3693 c:identifier="midgard_object_list_parameters">
3694 <doc xml:whitespace="preserve">Returned objects are midgard_parameter class. Parameter objects are
3695 fetched from database unconditionally if domain i sexplicitly set to NULL.
3696 That is, only those which parent guid property matches object's guid.
3697 Returned array should be freed when no longer needed.</doc>
3698 <return-value transfer-ownership="full">
3699 <doc xml:whitespace="preserve">Newly allocated and NULL terminated array of midgard_parameter objects.</doc>
3700 <type name="Object" c:type="MidgardObject**"/>
3703 <parameter name="domain" transfer-ownership="none">
3704 <doc xml:whitespace="preserve">optional paramaters' domain</doc>
3705 <type name="utf8" c:type="gchar*"/>
3709 <method name="delete_parameters"
3710 c:identifier="midgard_object_delete_parameters">
3711 <doc xml:whitespace="preserve">Delete object's parameter(s) which match given properties' values.
3712 Properties list in @parameters is optional. All object's parameters are
3713 deleted ( if exist ) if @parameters is explicitly set to %NULL.</doc>
3714 <return-value transfer-ownership="none">
3715 <doc xml:whitespace="preserve">%TRUE on success, %FALSE if at least one of the parameters could not be deleted</doc>
3716 <type name="boolean" c:type="gboolean"/>
3719 <parameter name="n_params" transfer-ownership="none">
3720 <doc xml:whitespace="preserve">number of properties</doc>
3721 <type name="uint" c:type="guint"/>
3723 <parameter name="parameters" transfer-ownership="none">
3724 <doc xml:whitespace="preserve">properties list</doc>
3725 <type name="GObject.Parameter" c:type="GParameter*"/>
3729 <method name="purge_parameters"
3730 c:identifier="midgard_object_purge_parameters">
3731 <doc xml:whitespace="preserve">Purge object's parameter(s) which match given properties' values.
3732 Properties list in @parameters is optional. All object's parameters are
3733 purged ( if exist ) if @parameters is explicitly set to %NULL.</doc>
3734 <return-value transfer-ownership="none">
3735 <doc xml:whitespace="preserve">%TRUE on success, %FALSE if at least one of the parameters could not be purged</doc>
3736 <type name="boolean" c:type="gboolean"/>
3739 <parameter name="n_params" transfer-ownership="none">
3740 <doc xml:whitespace="preserve">number of properties</doc>
3741 <type name="uint" c:type="guint"/>
3743 <parameter name="parameters" transfer-ownership="none">
3744 <doc xml:whitespace="preserve">properties list</doc>
3745 <type name="GObject.Parameter" c:type="GParameter*"/>
3749 <method name="find_parameters"
3750 c:identifier="midgard_object_find_parameters">
3751 <doc xml:whitespace="preserve">Find object's parameter(s) with matching given properties.
3752 returned ( if exist ) if @parameters is explicitly set to %NULL.</doc>
3753 <return-value transfer-ownership="full">
3754 <doc xml:whitespace="preserve">newly created, NULL terminated array of #MidgardObject ( midgard_parameter class ) or %NULL on failure</doc>
3755 <type name="Object" c:type="MidgardObject**"/>
3758 <parameter name="n_params" transfer-ownership="none">
3759 <doc xml:whitespace="preserve">number of properties</doc>
3760 <type name="uint" c:type="guint"/>
3762 <parameter name="parameters" transfer-ownership="none">
3763 <doc xml:whitespace="preserve">properties list</doc>
3764 <type name="GObject.Parameter" c:type="GParameter*"/>
3768 <method name="has_parameters"
3769 c:identifier="midgard_object_has_parameters">
3770 <return-value transfer-ownership="none">
3771 <doc xml:whitespace="preserve">%TRUE if object has paramateres, %FALSE otherwise.</doc>
3772 <type name="boolean" c:type="gboolean"/>
3775 <method name="list_attachments"
3776 c:identifier="midgard_object_list_attachments">
3777 <doc xml:whitespace="preserve">Returned objects are midgard_attachment class. Attachments objects are
3778 fetched from database unconditionally.
3779 That is, only those which parent guid property matches object's guid.
3780 Returned array should be freed when no longer needed.</doc>
3781 <return-value transfer-ownership="full">
3782 <doc xml:whitespace="preserve">Newly allocated and NULL terminated array of midgard_attachment objects.</doc>
3783 <type name="Object" c:type="MidgardObject**"/>
3786 <method name="create_attachment"
3787 c:identifier="midgard_object_create_attachment">
3788 <doc xml:whitespace="preserve">Creates object's attachment using given properties.
3789 Any property may be explicitly set to NULL.</doc>
3790 <return-value transfer-ownership="full">
3791 <doc xml:whitespace="preserve">newly created #MidgardObject of midgard_attachment class or %NULL on failure</doc>
3792 <type name="Object" c:type="MidgardObject*"/>
3795 <parameter name="name" transfer-ownership="none">
3796 <doc xml:whitespace="preserve">name for attachment</doc>
3797 <type name="utf8" c:type="gchar*"/>
3799 <parameter name="title" transfer-ownership="none">
3800 <doc xml:whitespace="preserve">its title</doc>
3801 <type name="utf8" c:type="gchar*"/>
3803 <parameter name="mimetype" transfer-ownership="none">
3804 <doc xml:whitespace="preserve">and mimetype</doc>
3805 <type name="utf8" c:type="gchar*"/>
3809 <method name="delete_attachments"
3810 c:identifier="midgard_object_delete_attachments">
3811 <doc xml:whitespace="preserve">Delete object's attachments(s) which match given properties' values.
3812 Properties list in @parameters is optional. All object's attachments are
3813 deleted ( if exist ) if @parameters is explicitly set to %NULL.</doc>
3814 <return-value transfer-ownership="none">
3815 <doc xml:whitespace="preserve">%TRUE on success, %FALSE if at least one of the attachment could not be deleted</doc>
3816 <type name="boolean" c:type="gboolean"/>
3819 <parameter name="n_params" transfer-ownership="none">
3820 <doc xml:whitespace="preserve">number of properties</doc>
3821 <type name="uint" c:type="guint"/>
3823 <parameter name="parameters" transfer-ownership="none">
3824 <doc xml:whitespace="preserve">properties list</doc>
3825 <type name="GObject.Parameter" c:type="GParameter*"/>
3829 <method name="purge_attachments"
3830 c:identifier="midgard_object_purge_attachments">
3831 <doc xml:whitespace="preserve">Purge object's attachments(s) which match given properties' values.
3832 Properties list in @parameters is optional. All object's attachments are
3833 purged ( if exist ) if @parameters is explicitly set to %NULL.
3834 to blob located on filesystem ( it should be set to %TRUE by default ).
3835 However, if midgard_attachment is created for blobs sharing and file should not
3836 be deleted, @delete_blob should be set to %FALSE.
3837 There's no way to determine if midgard_attachment is sharing blob, so aplication
3838 itelf is responsible to create such own logic.</doc>
3839 <return-value transfer-ownership="none">
3840 <doc xml:whitespace="preserve">%TRUE on success, %FALSE if at least one of the attachment could not be purged</doc>
3841 <type name="boolean" c:type="gboolean"/>
3844 <parameter name="delete_blob" transfer-ownership="none">
3845 <doc xml:whitespace="preserve">whether blob should be deleted as well</doc>
3846 <type name="boolean" c:type="gboolean"/>
3848 <parameter name="n_params" transfer-ownership="none">
3849 <doc xml:whitespace="preserve">number of properties</doc>
3850 <type name="uint" c:type="guint"/>
3852 <parameter name="parameters" transfer-ownership="none">
3853 <doc xml:whitespace="preserve">properties list</doc>
3854 <type name="GObject.Parameter" c:type="GParameter*"/>
3858 <method name="find_attachments"
3859 c:identifier="midgard_object_find_attachments">
3860 <doc xml:whitespace="preserve">Find object's attachment(s) with matching given properties.
3861 returned ( if exist ) if @parameters is explicitly set to %NULL.</doc>
3862 <return-value transfer-ownership="full">
3863 <doc xml:whitespace="preserve">newly created, NULL terminated array of #MidgardObject ( midgard_attachment class ) or %NULL on failure</doc>
3864 <type name="Object" c:type="MidgardObject**"/>
3867 <parameter name="n_params" transfer-ownership="none">
3868 <doc xml:whitespace="preserve">number of properties</doc>
3869 <type name="uint" c:type="guint"/>
3871 <parameter name="parameters" transfer-ownership="none">
3872 <doc xml:whitespace="preserve">properties list</doc>
3873 <type name="GObject.Parameter" c:type="GParameter*"/>
3877 <method name="has_attachments"
3878 c:identifier="midgard_object_has_attachments">
3879 <return-value transfer-ownership="none">
3880 <doc xml:whitespace="preserve">%TRUE if object has attachments, %FALSE otherwise.</doc>
3881 <type name="boolean" c:type="gboolean"/>
3884 <property name="action" writable="1" transfer-ownership="none">
3885 <type name="utf8" c:type="gchararray"/>
3887 <property name="guid" transfer-ownership="none">
3888 <type name="utf8" c:type="gchararray"/>
3890 <property name="metadata" writable="1" transfer-ownership="none">
3891 <type name="Metadata" c:type="MidgardMetadata"/>
3893 <field name="parent">
3894 <type name="DBObject" c:type="MidgardDBObject"/>
3897 <type name="ObjectPrivate" c:type="MidgardObjectPrivate*"/>
3899 <glib:signal name="action-approve">
3900 <return-value transfer-ownership="full">
3901 <type name="none" c:type="void"/>
3904 <glib:signal name="action-approve-hook">
3905 <return-value transfer-ownership="full">
3906 <type name="none" c:type="void"/>
3909 <glib:signal name="action-approved">
3910 <return-value transfer-ownership="full">
3911 <type name="none" c:type="void"/>
3914 <glib:signal name="action-create">
3915 <return-value transfer-ownership="full">
3916 <type name="none" c:type="void"/>
3919 <glib:signal name="action-create-hook">
3920 <return-value transfer-ownership="full">
3921 <type name="none" c:type="void"/>
3924 <glib:signal name="action-created">
3925 <return-value transfer-ownership="full">
3926 <type name="none" c:type="void"/>
3929 <glib:signal name="action-delete">
3930 <return-value transfer-ownership="full">
3931 <type name="none" c:type="void"/>
3934 <glib:signal name="action-delete-hook">
3935 <return-value transfer-ownership="full">
3936 <type name="none" c:type="void"/>
3939 <glib:signal name="action-deleted">
3940 <return-value transfer-ownership="full">
3941 <type name="none" c:type="void"/>
3944 <glib:signal name="action-export">
3945 <return-value transfer-ownership="full">
3946 <type name="none" c:type="void"/>
3949 <glib:signal name="action-export-hook">
3950 <return-value transfer-ownership="full">
3951 <type name="none" c:type="void"/>
3954 <glib:signal name="action-exported">
3955 <return-value transfer-ownership="full">
3956 <type name="none" c:type="void"/>
3959 <glib:signal name="action-import">
3960 <return-value transfer-ownership="full">
3961 <type name="none" c:type="void"/>
3964 <glib:signal name="action-import-hook">
3965 <return-value transfer-ownership="full">
3966 <type name="none" c:type="void"/>
3969 <glib:signal name="action-imported">
3970 <return-value transfer-ownership="full">
3971 <type name="none" c:type="void"/>
3974 <glib:signal name="action-loaded">
3975 <return-value transfer-ownership="full">
3976 <type name="none" c:type="void"/>
3979 <glib:signal name="action-loaded-hook">
3980 <return-value transfer-ownership="full">
3981 <type name="none" c:type="void"/>
3984 <glib:signal name="action-lock">
3985 <return-value transfer-ownership="full">
3986 <type name="none" c:type="void"/>
3989 <glib:signal name="action-lock-hook">
3990 <return-value transfer-ownership="full">
3991 <type name="none" c:type="void"/>
3994 <glib:signal name="action-locked">
3995 <return-value transfer-ownership="full">
3996 <type name="none" c:type="void"/>
3999 <glib:signal name="action-purge">
4000 <return-value transfer-ownership="full">
4001 <type name="none" c:type="void"/>
4004 <glib:signal name="action-purge-hook">
4005 <return-value transfer-ownership="full">
4006 <type name="none" c:type="void"/>
4009 <glib:signal name="action-purged">
4010 <return-value transfer-ownership="full">
4011 <type name="none" c:type="void"/>
4014 <glib:signal name="action-unapprove">
4015 <return-value transfer-ownership="full">
4016 <type name="none" c:type="void"/>
4019 <glib:signal name="action-unapprove-hook">
4020 <return-value transfer-ownership="full">
4021 <type name="none" c:type="void"/>
4024 <glib:signal name="action-unapproved">
4025 <return-value transfer-ownership="full">
4026 <type name="none" c:type="void"/>
4029 <glib:signal name="action-unlock">
4030 <return-value transfer-ownership="full">
4031 <type name="none" c:type="void"/>
4034 <glib:signal name="action-unlock-hook">
4035 <return-value transfer-ownership="full">
4036 <type name="none" c:type="void"/>
4039 <glib:signal name="action-unlocked">
4040 <return-value transfer-ownership="full">
4041 <type name="none" c:type="void"/>
4044 <glib:signal name="action-update">
4045 <return-value transfer-ownership="full">
4046 <type name="none" c:type="void"/>
4049 <glib:signal name="action-update-hook">
4050 <return-value transfer-ownership="full">
4051 <type name="none" c:type="void"/>
4054 <glib:signal name="action-updated">
4055 <return-value transfer-ownership="full">
4056 <type name="none" c:type="void"/>
4060 <record name="ObjectClass"
4061 c:type="MidgardObjectClass"
4062 glib:is-gtype-struct-for="Object">
4063 <field name="parent">
4064 <type name="DBObjectClass" c:type="MidgardDBObjectClass"/>
4067 <type name="ObjectClassPrivate" c:type="MidgardObjectClassPrivate*"/>
4069 <field name="get_connection">
4070 <callback name="get_connection" c:type="get_connection">
4071 <return-value transfer-ownership="none">
4072 <type name="Connection" c:type="MidgardConnection*"/>
4075 <parameter transfer-ownership="none">
4076 <type name="DBObject" c:type="MidgardDBObject*"/>
4081 <field name="action_create">
4082 <callback name="action_create" c:type="action_create">
4083 <return-value transfer-ownership="none">
4084 <type name="none" c:type="void"/>
4087 <parameter name="object" transfer-ownership="none">
4088 <type name="Object" c:type="MidgardObject*"/>
4093 <field name="action_create_hook">
4094 <callback name="action_create_hook" c:type="action_create_hook">
4095 <return-value transfer-ownership="none">
4096 <type name="none" c:type="void"/>
4099 <parameter name="object" transfer-ownership="none">
4100 <type name="Object" c:type="MidgardObject*"/>
4105 <field name="action_created">
4106 <callback name="action_created" c:type="action_created">
4107 <return-value transfer-ownership="none">
4108 <type name="none" c:type="void"/>
4111 <parameter name="object" transfer-ownership="none">
4112 <type name="Object" c:type="MidgardObject*"/>
4117 <field name="action_update">
4118 <callback name="action_update" c:type="action_update">
4119 <return-value transfer-ownership="none">
4120 <type name="none" c:type="void"/>
4123 <parameter name="object" transfer-ownership="none">
4124 <type name="Object" c:type="MidgardObject*"/>
4129 <field name="action_update_hook">
4130 <callback name="action_update_hook" c:type="action_update_hook">
4131 <return-value transfer-ownership="none">
4132 <type name="none" c:type="void"/>
4135 <parameter name="object" transfer-ownership="none">
4136 <type name="Object" c:type="MidgardObject*"/>
4141 <field name="action_updated">
4142 <callback name="action_updated" c:type="action_updated">
4143 <return-value transfer-ownership="none">
4144 <type name="none" c:type="void"/>
4147 <parameter name="object" transfer-ownership="none">
4148 <type name="Object" c:type="MidgardObject*"/>
4153 <field name="action_delete">
4154 <callback name="action_delete" c:type="action_delete">
4155 <return-value transfer-ownership="none">
4156 <type name="none" c:type="void"/>
4159 <parameter name="object" transfer-ownership="none">
4160 <type name="Object" c:type="MidgardObject*"/>
4165 <field name="action_delete_hook">
4166 <callback name="action_delete_hook" c:type="action_delete_hook">
4167 <return-value transfer-ownership="none">
4168 <type name="none" c:type="void"/>
4171 <parameter name="object" transfer-ownership="none">
4172 <type name="Object" c:type="MidgardObject*"/>
4177 <field name="action_deleted">
4178 <callback name="action_deleted" c:type="action_deleted">
4179 <return-value transfer-ownership="none">
4180 <type name="none" c:type="void"/>
4183 <parameter name="object" transfer-ownership="none">
4184 <type name="Object" c:type="MidgardObject*"/>
4189 <field name="action_purge">
4190 <callback name="action_purge" c:type="action_purge">
4191 <return-value transfer-ownership="none">
4192 <type name="none" c:type="void"/>
4195 <parameter name="object" transfer-ownership="none">
4196 <type name="Object" c:type="MidgardObject*"/>
4201 <field name="action_purge_hook">
4202 <callback name="action_purge_hook" c:type="action_purge_hook">
4203 <return-value transfer-ownership="none">
4204 <type name="none" c:type="void"/>
4207 <parameter name="object" transfer-ownership="none">
4208 <type name="Object" c:type="MidgardObject*"/>
4213 <field name="action_purged">
4214 <callback name="action_purged" c:type="action_purged">
4215 <return-value transfer-ownership="none">
4216 <type name="none" c:type="void"/>
4219 <parameter name="object" transfer-ownership="none">
4220 <type name="Object" c:type="MidgardObject*"/>
4225 <field name="action_import">
4226 <callback name="action_import" c:type="action_import">
4227 <return-value transfer-ownership="none">
4228 <type name="none" c:type="void"/>
4231 <parameter name="object" transfer-ownership="none">
4232 <type name="Object" c:type="MidgardObject*"/>
4237 <field name="action_import_hook">
4238 <callback name="action_import_hook" c:type="action_import_hook">
4239 <return-value transfer-ownership="none">
4240 <type name="none" c:type="void"/>
4243 <parameter name="object" transfer-ownership="none">
4244 <type name="Object" c:type="MidgardObject*"/>
4249 <field name="action_imported">
4250 <callback name="action_imported" c:type="action_imported">
4251 <return-value transfer-ownership="none">
4252 <type name="none" c:type="void"/>
4255 <parameter name="object" transfer-ownership="none">
4256 <type name="Object" c:type="MidgardObject*"/>
4261 <field name="action_export">
4262 <callback name="action_export" c:type="action_export">
4263 <return-value transfer-ownership="none">
4264 <type name="none" c:type="void"/>
4267 <parameter name="object" transfer-ownership="none">
4268 <type name="Object" c:type="MidgardObject*"/>
4273 <field name="action_export_hook">
4274 <callback name="action_export_hook" c:type="action_export_hook">
4275 <return-value transfer-ownership="none">
4276 <type name="none" c:type="void"/>
4279 <parameter name="object" transfer-ownership="none">
4280 <type name="Object" c:type="MidgardObject*"/>
4285 <field name="action_exported">
4286 <callback name="action_exported" c:type="action_exported">
4287 <return-value transfer-ownership="none">
4288 <type name="none" c:type="void"/>
4291 <parameter name="object" transfer-ownership="none">
4292 <type name="Object" c:type="MidgardObject*"/>
4297 <field name="action_loaded">
4298 <callback name="action_loaded" c:type="action_loaded">
4299 <return-value transfer-ownership="none">
4300 <type name="none" c:type="void"/>
4303 <parameter name="object" transfer-ownership="none">
4304 <type name="Object" c:type="MidgardObject*"/>
4309 <field name="action_loaded_hook">
4310 <callback name="action_loaded_hook" c:type="action_loaded_hook">
4311 <return-value transfer-ownership="none">
4312 <type name="none" c:type="void"/>
4315 <parameter name="object" transfer-ownership="none">
4316 <type name="Object" c:type="MidgardObject*"/>
4321 <field name="action_approve">
4322 <callback name="action_approve" c:type="action_approve">
4323 <return-value transfer-ownership="none">
4324 <type name="none" c:type="void"/>
4327 <parameter name="object" transfer-ownership="none">
4328 <type name="Object" c:type="MidgardObject*"/>
4333 <field name="action_approve_hook">
4334 <callback name="action_approve_hook" c:type="action_approve_hook">
4335 <return-value transfer-ownership="none">
4336 <type name="none" c:type="void"/>
4339 <parameter name="object" transfer-ownership="none">
4340 <type name="Object" c:type="MidgardObject*"/>
4345 <field name="action_approved">
4346 <callback name="action_approved" c:type="action_approved">
4347 <return-value transfer-ownership="none">
4348 <type name="none" c:type="void"/>
4351 <parameter name="object" transfer-ownership="none">
4352 <type name="Object" c:type="MidgardObject*"/>
4357 <field name="action_unapprove">
4358 <callback name="action_unapprove" c:type="action_unapprove">
4359 <return-value transfer-ownership="none">
4360 <type name="none" c:type="void"/>
4363 <parameter name="object" transfer-ownership="none">
4364 <type name="Object" c:type="MidgardObject*"/>
4369 <field name="action_unapprove_hook">
4370 <callback name="action_unapprove_hook" c:type="action_unapprove_hook">
4371 <return-value transfer-ownership="none">
4372 <type name="none" c:type="void"/>
4375 <parameter name="object" transfer-ownership="none">
4376 <type name="Object" c:type="MidgardObject*"/>
4381 <field name="action_unapproved">
4382 <callback name="action_unapproved" c:type="action_unapproved">
4383 <return-value transfer-ownership="none">
4384 <type name="none" c:type="void"/>
4387 <parameter name="object" transfer-ownership="none">
4388 <type name="Object" c:type="MidgardObject*"/>
4393 <field name="action_lock">
4394 <callback name="action_lock" c:type="action_lock">
4395 <return-value transfer-ownership="none">
4396 <type name="none" c:type="void"/>
4399 <parameter name="object" transfer-ownership="none">
4400 <type name="Object" c:type="MidgardObject*"/>
4405 <field name="action_lock_hook">
4406 <callback name="action_lock_hook" c:type="action_lock_hook">
4407 <return-value transfer-ownership="none">
4408 <type name="none" c:type="void"/>
4411 <parameter name="object" transfer-ownership="none">
4412 <type name="Object" c:type="MidgardObject*"/>
4417 <field name="action_locked">
4418 <callback name="action_locked" c:type="action_locked">
4419 <return-value transfer-ownership="none">
4420 <type name="none" c:type="void"/>
4423 <parameter name="object" transfer-ownership="none">
4424 <type name="Object" c:type="MidgardObject*"/>
4429 <field name="action_unlock">
4430 <callback name="action_unlock" c:type="action_unlock">
4431 <return-value transfer-ownership="none">
4432 <type name="none" c:type="void"/>
4435 <parameter name="object" transfer-ownership="none">
4436 <type name="Object" c:type="MidgardObject*"/>
4441 <field name="action_unlock_hook">
4442 <callback name="action_unlock_hook" c:type="action_unlock_hook">
4443 <return-value transfer-ownership="none">
4444 <type name="none" c:type="void"/>
4447 <parameter name="object" transfer-ownership="none">
4448 <type name="Object" c:type="MidgardObject*"/>
4453 <field name="action_unlocked">
4454 <callback name="action_unlocked" c:type="action_unlocked">
4455 <return-value transfer-ownership="none">
4456 <type name="none" c:type="void"/>
4459 <parameter name="object" transfer-ownership="none">
4460 <type name="Object" c:type="MidgardObject*"/>
4465 <field name="signal_action_loaded">
4466 <type name="uint" c:type="guint"/>
4468 <field name="signal_action_loaded_hook">
4469 <type name="uint" c:type="guint"/>
4471 <field name="signal_action_update">
4472 <type name="uint" c:type="guint"/>
4474 <field name="signal_action_update_hook">
4475 <type name="uint" c:type="guint"/>
4477 <field name="signal_action_updated">
4478 <type name="uint" c:type="guint"/>
4480 <field name="signal_action_create">
4481 <type name="uint" c:type="guint"/>
4483 <field name="signal_action_create_hook">
4484 <type name="uint" c:type="guint"/>
4486 <field name="signal_action_created">
4487 <type name="uint" c:type="guint"/>
4489 <field name="signal_action_delete">
4490 <type name="uint" c:type="guint"/>
4492 <field name="signal_action_delete_hook">
4493 <type name="uint" c:type="guint"/>
4495 <field name="signal_action_deleted">
4496 <type name="uint" c:type="guint"/>
4498 <field name="signal_action_purge">
4499 <type name="uint" c:type="guint"/>
4501 <field name="signal_action_purge_hook">
4502 <type name="uint" c:type="guint"/>
4504 <field name="signal_action_purged">
4505 <type name="uint" c:type="guint"/>
4507 <field name="signal_action_import">
4508 <type name="uint" c:type="guint"/>
4510 <field name="signal_action_import_hook">
4511 <type name="uint" c:type="guint"/>
4513 <field name="signal_action_imported">
4514 <type name="uint" c:type="guint"/>
4516 <field name="signal_action_export">
4517 <type name="uint" c:type="guint"/>
4519 <field name="signal_action_export_hook">
4520 <type name="uint" c:type="guint"/>
4522 <field name="signal_action_exported">
4523 <type name="uint" c:type="guint"/>
4525 <field name="signal_action_approve">
4526 <type name="uint" c:type="guint"/>
4528 <field name="signal_action_approve_hook">
4529 <type name="uint" c:type="guint"/>
4531 <field name="signal_action_approved">
4532 <type name="uint" c:type="guint"/>
4534 <field name="signal_action_unapprove">
4535 <type name="uint" c:type="guint"/>
4537 <field name="signal_action_unapprove_hook">
4538 <type name="uint" c:type="guint"/>
4540 <field name="signal_action_unapproved">
4541 <type name="uint" c:type="guint"/>
4543 <field name="signal_action_lock">
4544 <type name="uint" c:type="guint"/>
4546 <field name="signal_action_lock_hook">
4547 <type name="uint" c:type="guint"/>
4549 <field name="signal_action_locked">
4550 <type name="uint" c:type="guint"/>
4552 <field name="signal_action_unlock">
4553 <type name="uint" c:type="guint"/>
4555 <field name="signal_action_unlock_hook">
4556 <type name="uint" c:type="guint"/>
4558 <field name="signal_action_unlocked">
4559 <type name="uint" c:type="guint"/>
4562 <record name="ObjectClassPrivate" c:type="MidgardObjectClassPrivate">
4564 <record name="ObjectPrivate" c:type="MidgardObjectPrivate">
4566 <constant name="PACKAGE_NAME" value="midgard2">
4569 <class name="ParamLongtext"
4570 c:type="MidgardParamLongtext"
4571 parent="GObject.Object"
4572 glib:type-name="MidgardParamLongtext"
4573 glib:get-type="midgard_param_longtext_get_type"
4574 glib:fundamental="1">
4576 <record name="ParamSpecLongtext" c:type="MidgardParamSpecLongtext">
4578 <class name="QueryBuilder"
4579 c:type="MidgardQueryBuilder"
4580 parent="GObject.Object"
4581 glib:type-name="MidgardQueryBuilder"
4582 glib:get-type="midgard_query_builder_get_type"
4583 glib:type-struct="QueryBuilderClass">
4584 <constructor name="new" c:identifier="midgard_query_builder_new">
4585 <return-value transfer-ownership="full">
4586 <type name="QueryBuilder" c:type="MidgardQueryBuilder*"/>
4589 <parameter name="mgd" transfer-ownership="none">
4590 <type name="Connection" c:type="MidgardConnection*"/>
4592 <parameter name="classname" transfer-ownership="none">
4593 <type name="utf8" c:type="gchar*"/>
4597 <virtual-method name="add_constraint" invoker="add_constraint">
4598 <return-value transfer-ownership="none">
4599 <type name="boolean" c:type="gboolean"/>
4602 <parameter name="name" transfer-ownership="none">
4603 <type name="utf8" c:type="gchar*"/>
4605 <parameter name="op" transfer-ownership="none">
4606 <type name="utf8" c:type="gchar*"/>
4608 <parameter name="value" transfer-ownership="none">
4609 <type name="GObject.Value" c:type="GValue*"/>
4613 <virtual-method name="add_constraint_with_property"
4614 invoker="add_constraint_with_property">
4615 <doc xml:whitespace="preserve">Adds named property constraint to the given query builder.
4616 Unlike add_constraint method, this one accepts property name
4617 instead of scalar value. The difference is that with add_constraint
4618 method you can compare property with particular value, while using
4619 add_constraint_with_property method you can compare two different
4620 properties without any need to know their values.
4621 For example, you should use this method if you want to select only
4622 those objects which has been revised after publication time, and particular
4623 date doesn't matter.
4625 <programlisting>
4626 midgard_query_builder_add_constraint_with_property(builder, "metadata.revised", ">", "metadata.published");
4627 </programlisting>
4628 </example></doc>
4629 <return-value transfer-ownership="none">
4630 <doc xml:whitespace="preserve">%TRUE if properties' names are valid, %FALSE otherwise</doc>
4631 <type name="boolean" c:type="gboolean"/>
4634 <parameter name="property_a" transfer-ownership="none">
4635 <doc xml:whitespace="preserve">property name</doc>
4636 <type name="utf8" c:type="gchar*"/>
4638 <parameter name="op" transfer-ownership="none">
4639 <doc xml:whitespace="preserve">comparison operator</doc>
4640 <type name="utf8" c:type="gchar*"/>
4642 <parameter name="property_b" transfer-ownership="none">
4643 <doc xml:whitespace="preserve">property name</doc>
4644 <type name="utf8" c:type="gchar*"/>
4648 <virtual-method name="begin_group" invoker="begin_group">
4649 <doc xml:whitespace="preserve">Starts a constraint group of the given type. A conjunctive constraint
4650 group @type (AND) requires that all component constraints match the
4651 queried objects, while a disjunctive group @type (OR) requires just
4652 one of the component constraints to match.</doc>
4653 <return-value transfer-ownership="none">
4654 <doc xml:whitespace="preserve">%TRUE if the @type is valid, %FALSE otherwise</doc>
4655 <type name="boolean" c:type="gboolean"/>
4658 <parameter name="type" transfer-ownership="none">
4659 <doc xml:whitespace="preserve">group type</doc>
4660 <type name="utf8" c:type="gchar*"/>
4664 <virtual-method name="end_group" invoker="end_group">
4665 <doc xml:whitespace="preserve">Closes the most recently opened constraint group. The client should
4666 ensure proper nesting by closing all constraint groups before the
4667 containing query is executed.
4668 open constraint groups were found</doc>
4669 <return-value transfer-ownership="none">
4670 <doc xml:whitespace="preserve">%TRUE if a constraint group was closed, or %FALSE if no</doc>
4671 <type name="boolean" c:type="gboolean"/>
4674 <virtual-method name="add_order" invoker="add_order">
4675 <doc xml:whitespace="preserve">Adds an ordering constraint to the query. An ordering constraint consists
4676 of a property name and a sort direction. The objects returned by this
4677 query will be sorted by the given property in the given direction
4678 (ascending or descending). Multiple ordering constraints are applied in
4679 the order they were added.
4680 Property name pattern is described in midgard_query_builder_add_constraint()</doc>
4681 <return-value transfer-ownership="none">
4682 <doc xml:whitespace="preserve">%TRUE if the ordering constraint is valid, %FALSE otherwise</doc>
4683 <type name="boolean" c:type="gboolean"/>
4686 <parameter name="name" transfer-ownership="none">
4687 <doc xml:whitespace="preserve">property name</doc>
4688 <type name="utf8" c:type="gchar*"/>
4690 <parameter name="dir" transfer-ownership="none">
4691 <doc xml:whitespace="preserve">sort direction</doc>
4692 <type name="utf8" c:type="gchar*"/>
4696 <virtual-method name="set_offset" invoker="set_offset">
4697 <doc xml:whitespace="preserve">Sets the start @offset of the objects to return when the query is executed.
4698 The start @offset is applied after all the matching objects have been
4699 identified and sorted according to the given ordering constraints. The
4700 first @offset objects are skipped and only the remaining (if any) objects
4701 are returned to the client.
4702 Setting a start offset is normally only reasonable when one or more
4703 ordering constraints are applied to the query. A start offset is usually
4704 accompanied by a limit setting.</doc>
4705 <return-value transfer-ownership="none">
4706 <type name="none" c:type="void"/>
4709 <parameter name="offset" transfer-ownership="none">
4710 <doc xml:whitespace="preserve">query offset</doc>
4711 <type name="uint" c:type="guint"/>
4715 <virtual-method name="set_limit" invoker="set_limit">
4716 <doc xml:whitespace="preserve">Sets the maximum number of objects to return when the query is executed.
4717 A query will by default return all matching objects, but the @limit setting
4718 can be used to restrict the potentially large number of returned objects.
4719 The @limit is applied only after the matching objects have been identified
4720 and sorted and after the optional start offset has been applied.
4721 Setting a @limit on the number of returned objects is normally only
4722 reasonable when one or more ordering constraints and optionally an offset
4723 setting are applied to the query.</doc>
4724 <return-value transfer-ownership="none">
4725 <type name="none" c:type="void"/>
4728 <parameter name="limit" transfer-ownership="none">
4729 <doc xml:whitespace="preserve">query limit</doc>
4730 <type name="uint" c:type="guint"/>
4734 <virtual-method name="include_deleted" invoker="include_deleted">
4735 <doc xml:whitespace="preserve">Query all objects, deleted and undeleted.</doc>
4736 <return-value transfer-ownership="none">
4737 <type name="none" c:type="void"/>
4740 <virtual-method name="execute" invoker="execute">
4741 <doc xml:whitespace="preserve">Executes the built query.
4742 Objects in returned array are #MidgardDBObject derived ones,
4743 and typecasted to base GObject. You can safely typecast them to
4744 the type, which #MidgardQueryBuilder has been initialized for.
4745 In case of any error, #MidgardConnection error is set.</doc>
4746 <return-value transfer-ownership="full">
4747 <doc xml:whitespace="preserve">NULL terminated array of objects, or NULL if none found</doc>
4748 <type name="GObject.Object" c:type="GObject**"/>
4751 <parameter name="n_objects"
4753 caller-allocates="0"
4754 transfer-ownership="full">
4755 <doc xml:whitespace="preserve">a pointer to store number of returned objects</doc>
4756 <type name="uint" c:type="guint*"/>
4760 <virtual-method name="count" invoker="count">
4761 <return-value transfer-ownership="none">
4762 <type name="uint" c:type="guint"/>
4765 <method name="add_constraint"
4766 c:identifier="midgard_query_builder_add_constraint">
4767 <return-value transfer-ownership="none">
4768 <type name="boolean" c:type="gboolean"/>
4771 <parameter name="name" transfer-ownership="none">
4772 <type name="utf8" c:type="gchar*"/>
4774 <parameter name="op" transfer-ownership="none">
4775 <type name="utf8" c:type="gchar*"/>
4777 <parameter name="value" transfer-ownership="none">
4778 <type name="GObject.Value" c:type="GValue*"/>
4782 <method name="add_constraint_with_property"
4783 c:identifier="midgard_query_builder_add_constraint_with_property">
4784 <doc xml:whitespace="preserve">Adds named property constraint to the given query builder.
4785 Unlike add_constraint method, this one accepts property name
4786 instead of scalar value. The difference is that with add_constraint
4787 method you can compare property with particular value, while using
4788 add_constraint_with_property method you can compare two different
4789 properties without any need to know their values.
4790 For example, you should use this method if you want to select only
4791 those objects which has been revised after publication time, and particular
4792 date doesn't matter.
4794 <programlisting>
4795 midgard_query_builder_add_constraint_with_property(builder, "metadata.revised", ">", "metadata.published");
4796 </programlisting>
4797 </example></doc>
4798 <return-value transfer-ownership="none">
4799 <doc xml:whitespace="preserve">%TRUE if properties' names are valid, %FALSE otherwise</doc>
4800 <type name="boolean" c:type="gboolean"/>
4803 <parameter name="property_a" transfer-ownership="none">
4804 <doc xml:whitespace="preserve">property name</doc>
4805 <type name="utf8" c:type="gchar*"/>
4807 <parameter name="op" transfer-ownership="none">
4808 <doc xml:whitespace="preserve">comparison operator</doc>
4809 <type name="utf8" c:type="gchar*"/>
4811 <parameter name="property_b" transfer-ownership="none">
4812 <doc xml:whitespace="preserve">property name</doc>
4813 <type name="utf8" c:type="gchar*"/>
4817 <method name="begin_group"
4818 c:identifier="midgard_query_builder_begin_group">
4819 <doc xml:whitespace="preserve">Starts a constraint group of the given type. A conjunctive constraint
4820 group @type (AND) requires that all component constraints match the
4821 queried objects, while a disjunctive group @type (OR) requires just
4822 one of the component constraints to match.</doc>
4823 <return-value transfer-ownership="none">
4824 <doc xml:whitespace="preserve">%TRUE if the @type is valid, %FALSE otherwise</doc>
4825 <type name="boolean" c:type="gboolean"/>
4828 <parameter name="type" transfer-ownership="none">
4829 <doc xml:whitespace="preserve">group type</doc>
4830 <type name="utf8" c:type="gchar*"/>
4834 <method name="end_group" c:identifier="midgard_query_builder_end_group">
4835 <doc xml:whitespace="preserve">Closes the most recently opened constraint group. The client should
4836 ensure proper nesting by closing all constraint groups before the
4837 containing query is executed.
4838 open constraint groups were found</doc>
4839 <return-value transfer-ownership="none">
4840 <doc xml:whitespace="preserve">%TRUE if a constraint group was closed, or %FALSE if no</doc>
4841 <type name="boolean" c:type="gboolean"/>
4844 <method name="add_order" c:identifier="midgard_query_builder_add_order">
4845 <doc xml:whitespace="preserve">Adds an ordering constraint to the query. An ordering constraint consists
4846 of a property name and a sort direction. The objects returned by this
4847 query will be sorted by the given property in the given direction
4848 (ascending or descending). Multiple ordering constraints are applied in
4849 the order they were added.
4850 Property name pattern is described in midgard_query_builder_add_constraint()</doc>
4851 <return-value transfer-ownership="none">
4852 <doc xml:whitespace="preserve">%TRUE if the ordering constraint is valid, %FALSE otherwise</doc>
4853 <type name="boolean" c:type="gboolean"/>
4856 <parameter name="name" transfer-ownership="none">
4857 <doc xml:whitespace="preserve">property name</doc>
4858 <type name="utf8" c:type="gchar*"/>
4860 <parameter name="dir" transfer-ownership="none">
4861 <doc xml:whitespace="preserve">sort direction</doc>
4862 <type name="utf8" c:type="gchar*"/>
4866 <method name="set_offset"
4867 c:identifier="midgard_query_builder_set_offset">
4868 <doc xml:whitespace="preserve">Sets the start @offset of the objects to return when the query is executed.
4869 The start @offset is applied after all the matching objects have been
4870 identified and sorted according to the given ordering constraints. The
4871 first @offset objects are skipped and only the remaining (if any) objects
4872 are returned to the client.
4873 Setting a start offset is normally only reasonable when one or more
4874 ordering constraints are applied to the query. A start offset is usually
4875 accompanied by a limit setting.</doc>
4876 <return-value transfer-ownership="none">
4877 <type name="none" c:type="void"/>
4880 <parameter name="offset" transfer-ownership="none">
4881 <doc xml:whitespace="preserve">query offset</doc>
4882 <type name="uint" c:type="guint"/>
4886 <method name="set_limit" c:identifier="midgard_query_builder_set_limit">
4887 <doc xml:whitespace="preserve">Sets the maximum number of objects to return when the query is executed.
4888 A query will by default return all matching objects, but the @limit setting
4889 can be used to restrict the potentially large number of returned objects.
4890 The @limit is applied only after the matching objects have been identified
4891 and sorted and after the optional start offset has been applied.
4892 Setting a @limit on the number of returned objects is normally only
4893 reasonable when one or more ordering constraints and optionally an offset
4894 setting are applied to the query.</doc>
4895 <return-value transfer-ownership="none">
4896 <type name="none" c:type="void"/>
4899 <parameter name="limit" transfer-ownership="none">
4900 <doc xml:whitespace="preserve">query limit</doc>
4901 <type name="uint" c:type="guint"/>
4905 <method name="execute" c:identifier="midgard_query_builder_execute">
4906 <doc xml:whitespace="preserve">Executes the built query.
4907 Objects in returned array are #MidgardDBObject derived ones,
4908 and typecasted to base GObject. You can safely typecast them to
4909 the type, which #MidgardQueryBuilder has been initialized for.
4910 In case of any error, #MidgardConnection error is set.</doc>
4911 <return-value transfer-ownership="full">
4912 <doc xml:whitespace="preserve">NULL terminated array of objects, or NULL if none found</doc>
4913 <type name="GObject.Object" c:type="GObject**"/>
4916 <parameter name="n_objects"
4918 caller-allocates="0"
4919 transfer-ownership="full">
4920 <doc xml:whitespace="preserve">a pointer to store number of returned objects</doc>
4921 <type name="uint" c:type="guint*"/>
4925 <method name="count" c:identifier="midgard_query_builder_count">
4926 <return-value transfer-ownership="none">
4927 <type name="uint" c:type="guint"/>
4930 <method name="get_type_name"
4931 c:identifier="midgard_query_builder_get_type_name">
4932 <doc xml:whitespace="preserve">Returns type name of the type which is currently used by Query Builder.
4933 This function should be used on language binding level , when internal
4934 Query Builder's instance is already created and language binding object
4935 should be instanciated.
4936 Returned type name is a pointer and is owned by GLib system.
4937 Caller shouldn't free it.</doc>
4938 <return-value transfer-ownership="none">
4939 <doc xml:whitespace="preserve">name of the class, which query builder is initialized for.</doc>
4940 <type name="utf8" c:type="gchar*"/>
4943 <method name="include_deleted"
4944 c:identifier="midgard_query_builder_include_deleted">
4945 <doc xml:whitespace="preserve">Query all objects, deleted and undeleted.</doc>
4946 <return-value transfer-ownership="none">
4947 <type name="none" c:type="void"/>
4950 <field name="parent">
4951 <type name="GObject.Object" c:type="GObject"/>
4954 <type name="QueryBuilderPrivate" c:type="MidgardQueryBuilderPrivate*"/>
4956 <glib:signal name="execution-end">
4957 <return-value transfer-ownership="full">
4958 <type name="none" c:type="void"/>
4961 <glib:signal name="execution-start">
4962 <return-value transfer-ownership="full">
4963 <type name="none" c:type="void"/>
4967 <record name="QueryBuilderClass"
4968 c:type="MidgardQueryBuilderClass"
4969 glib:is-gtype-struct-for="QueryBuilder">
4970 <field name="parent">
4971 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
4973 <field name="add_constraint">
4974 <callback name="add_constraint" c:type="add_constraint">
4975 <return-value transfer-ownership="none">
4976 <type name="boolean" c:type="gboolean"/>
4979 <parameter name="builder" transfer-ownership="none">
4980 <type name="QueryBuilder" c:type="MidgardQueryBuilder*"/>
4982 <parameter name="name" transfer-ownership="none">
4983 <type name="utf8" c:type="gchar*"/>
4985 <parameter name="op" transfer-ownership="none">
4986 <type name="utf8" c:type="gchar*"/>
4988 <parameter name="value" transfer-ownership="none">
4989 <type name="GObject.Value" c:type="GValue*"/>
4994 <field name="add_constraint_with_property">
4995 <callback name="add_constraint_with_property"
4996 c:type="add_constraint_with_property">
4997 <return-value transfer-ownership="none">
4998 <doc xml:whitespace="preserve">%TRUE if properties' names are valid, %FALSE otherwise</doc>
4999 <type name="boolean" c:type="gboolean"/>
5002 <parameter name="builder" transfer-ownership="none">
5003 <type name="QueryBuilder" c:type="MidgardQueryBuilder*"/>
5005 <parameter name="property_a" transfer-ownership="none">
5006 <doc xml:whitespace="preserve">property name</doc>
5007 <type name="utf8" c:type="gchar*"/>
5009 <parameter name="op" transfer-ownership="none">
5010 <doc xml:whitespace="preserve">comparison operator</doc>
5011 <type name="utf8" c:type="gchar*"/>
5013 <parameter name="property_b" transfer-ownership="none">
5014 <doc xml:whitespace="preserve">property name</doc>
5015 <type name="utf8" c:type="gchar*"/>
5020 <field name="begin_group">
5021 <callback name="begin_group" c:type="begin_group">
5022 <return-value transfer-ownership="none">
5023 <doc xml:whitespace="preserve">%TRUE if the @type is valid, %FALSE otherwise</doc>
5024 <type name="boolean" c:type="gboolean"/>
5027 <parameter name="builder" transfer-ownership="none">
5028 <type name="QueryBuilder" c:type="MidgardQueryBuilder*"/>
5030 <parameter name="type" transfer-ownership="none">
5031 <doc xml:whitespace="preserve">group type</doc>
5032 <type name="utf8" c:type="gchar*"/>
5037 <field name="end_group">
5038 <callback name="end_group" c:type="end_group">
5039 <return-value transfer-ownership="none">
5040 <doc xml:whitespace="preserve">%TRUE if a constraint group was closed, or %FALSE if no</doc>
5041 <type name="boolean" c:type="gboolean"/>
5044 <parameter name="builder" transfer-ownership="none">
5045 <type name="QueryBuilder" c:type="MidgardQueryBuilder*"/>
5050 <field name="add_order">
5051 <callback name="add_order" c:type="add_order">
5052 <return-value transfer-ownership="none">
5053 <doc xml:whitespace="preserve">%TRUE if the ordering constraint is valid, %FALSE otherwise</doc>
5054 <type name="boolean" c:type="gboolean"/>
5057 <parameter name="builder" transfer-ownership="none">
5058 <type name="QueryBuilder" c:type="MidgardQueryBuilder*"/>
5060 <parameter name="name" transfer-ownership="none">
5061 <doc xml:whitespace="preserve">property name</doc>
5062 <type name="utf8" c:type="gchar*"/>
5064 <parameter name="dir" transfer-ownership="none">
5065 <doc xml:whitespace="preserve">sort direction</doc>
5066 <type name="utf8" c:type="gchar*"/>
5071 <field name="set_offset">
5072 <callback name="set_offset" c:type="set_offset">
5073 <return-value transfer-ownership="none">
5074 <type name="none" c:type="void"/>
5077 <parameter name="builder" transfer-ownership="none">
5078 <type name="QueryBuilder" c:type="MidgardQueryBuilder*"/>
5080 <parameter name="offset" transfer-ownership="none">
5081 <doc xml:whitespace="preserve">query offset</doc>
5082 <type name="uint" c:type="guint"/>
5087 <field name="set_limit">
5088 <callback name="set_limit" c:type="set_limit">
5089 <return-value transfer-ownership="none">
5090 <type name="none" c:type="void"/>
5093 <parameter name="builder" transfer-ownership="none">
5094 <type name="QueryBuilder" c:type="MidgardQueryBuilder*"/>
5096 <parameter name="limit" transfer-ownership="none">
5097 <doc xml:whitespace="preserve">query limit</doc>
5098 <type name="uint" c:type="guint"/>
5103 <field name="include_deleted">
5104 <callback name="include_deleted" c:type="include_deleted">
5105 <return-value transfer-ownership="none">
5106 <type name="none" c:type="void"/>
5109 <parameter name="builder" transfer-ownership="none">
5110 <type name="QueryBuilder" c:type="MidgardQueryBuilder*"/>
5115 <field name="execute">
5116 <callback name="execute" c:type="execute">
5117 <return-value transfer-ownership="full">
5118 <doc xml:whitespace="preserve">NULL terminated array of objects, or NULL if none found</doc>
5119 <type name="GObject.Object" c:type="GObject**"/>
5122 <parameter name="builder" transfer-ownership="none">
5123 <type name="QueryBuilder" c:type="MidgardQueryBuilder*"/>
5125 <parameter name="n_objects"
5127 caller-allocates="0"
5128 transfer-ownership="full">
5129 <doc xml:whitespace="preserve">a pointer to store number of returned objects</doc>
5130 <type name="uint" c:type="guint*"/>
5135 <field name="count">
5136 <callback name="count" c:type="count">
5137 <return-value transfer-ownership="none">
5138 <type name="uint" c:type="guint"/>
5141 <parameter name="builder" transfer-ownership="none">
5142 <type name="QueryBuilder" c:type="MidgardQueryBuilder*"/>
5147 <field name="execution_start">
5148 <callback name="execution_start" c:type="execution_start">
5149 <return-value transfer-ownership="none">
5150 <type name="none" c:type="void"/>
5153 <parameter name="object" transfer-ownership="none">
5154 <type name="GObject.Object" c:type="GObject*"/>
5159 <field name="execution_end">
5160 <callback name="execution_end" c:type="execution_end">
5161 <return-value transfer-ownership="none">
5162 <type name="none" c:type="void"/>
5165 <parameter name="object" transfer-ownership="none">
5166 <type name="GObject.Object" c:type="GObject*"/>
5171 <field name="signal_id_execution_start">
5172 <type name="uint" c:type="guint"/>
5174 <field name="signal_id_execution_end">
5175 <type name="uint" c:type="guint"/>
5178 <record name="QueryBuilderPrivate" c:type="MidgardQueryBuilderPrivate">
5180 <class name="QueryConstraint"
5181 c:type="MidgardQueryConstraint"
5182 parent="GObject.Object"
5183 glib:type-name="MidgardQueryConstraint"
5184 glib:get-type="midgard_query_constraint_get_type"
5185 glib:type-struct="QueryConstraintClass">
5186 <implements name="QueryConstraintSimple"/>
5187 <constructor name="new"
5188 c:identifier="midgard_query_constraint_new"
5190 <return-value transfer-ownership="full">
5191 <doc xml:whitespace="preserve">new #MidgardQueryConstraint instance, or %NULL on failure</doc>
5192 <type name="QueryConstraint" c:type="MidgardQueryConstraint*"/>
5195 <parameter name="property" transfer-ownership="none">
5196 <doc xml:whitespace="preserve">#MidgardQueryProperty instance</doc>
5197 <type name="QueryProperty" c:type="MidgardQueryProperty*"/>
5199 <parameter name="op" transfer-ownership="none">
5200 <doc xml:whitespace="preserve">constraint operator</doc>
5201 <type name="utf8" c:type="gchar*"/>
5203 <parameter name="holder" transfer-ownership="none">
5204 <doc xml:whitespace="preserve">#MidgardQueryHolder instance</doc>
5205 <type name="QueryHolder" c:type="MidgardQueryHolder*"/>
5207 <parameter name="storage" transfer-ownership="none">
5208 <doc xml:whitespace="preserve">optional #MidgardQueryStorage to use with constraint</doc>
5209 <type name="QueryStorage" c:type="MidgardQueryStorage*"/>
5213 <virtual-method name="list_constraints">
5214 <return-value transfer-ownership="full">
5215 <type name="QueryConstraintSimple"
5216 c:type="MidgardQueryConstraintSimple**"/>
5219 <parameter name="n_objects"
5221 caller-allocates="0"
5222 transfer-ownership="full">
5223 <type name="uint" c:type="guint*"/>
5227 <method name="get_value"
5228 c:identifier="midgard_query_constraint_get_value">
5229 <return-value transfer-ownership="none">
5230 <type name="none" c:type="void"/>
5233 <parameter name="value" transfer-ownership="none">
5234 <type name="GObject.Value" c:type="GValue*"/>
5238 <method name="set_value"
5239 c:identifier="midgard_query_constraint_set_value">
5240 <return-value transfer-ownership="none">
5241 <type name="boolean" c:type="gboolean"/>
5244 <parameter name="value" transfer-ownership="none">
5245 <type name="GObject.Value" c:type="GValue*"/>
5249 <method name="get_storage"
5250 c:identifier="midgard_query_constraint_get_storage"
5252 <return-value transfer-ownership="full">
5253 <doc xml:whitespace="preserve">#MidgardQueryStorage associated with constraint or %NULL</doc>
5254 <type name="QueryStorage" c:type="MidgardQueryStorage*"/>
5257 <method name="set_storage"
5258 c:identifier="midgard_query_constraint_set_storage"
5260 <return-value transfer-ownership="none">
5261 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5262 <type name="boolean" c:type="gboolean"/>
5265 <parameter name="storage" transfer-ownership="none">
5266 <doc xml:whitespace="preserve">#MidgardQueryStorage to associate with @self constraint</doc>
5267 <type name="QueryStorage" c:type="MidgardQueryStorage*"/>
5271 <method name="get_property"
5272 c:identifier="midgard_query_constraint_get_property"
5274 <return-value transfer-ownership="full">
5275 <doc xml:whitespace="preserve">#MidgardQueryProperty associated with @self constraint, or %NULL</doc>
5276 <type name="QueryProperty" c:type="MidgardQueryProperty*"/>
5279 <method name="set_property"
5280 c:identifier="midgard_query_constraint_set_property"
5282 <return-value transfer-ownership="none">
5283 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5284 <type name="boolean" c:type="gboolean"/>
5287 <parameter name="property" transfer-ownership="none">
5288 <doc xml:whitespace="preserve">#MidgardQueryProperty to associate with @self constraint</doc>
5289 <type name="QueryProperty" c:type="MidgardQueryProperty*"/>
5293 <method name="get_operator"
5294 c:identifier="midgard_query_constraint_get_operator"
5296 <return-value transfer-ownership="none">
5297 <doc xml:whitespace="preserve">operator type associated with @self constraint, or %NULL</doc>
5298 <type name="utf8" c:type="gchar*"/>
5301 <method name="set_operator"
5302 c:identifier="midgard_query_constraint_set_operator"
5304 <doc xml:whitespace="preserve">Check midgard_query_constraint_new() for valid operator types.</doc>
5305 <return-value transfer-ownership="none">
5306 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5307 <type name="boolean" c:type="gboolean"/>
5310 <parameter name="op" transfer-ownership="none">
5311 <doc xml:whitespace="preserve">operator to associate with constraint</doc>
5312 <type name="utf8" c:type="gchar*"/>
5316 <field name="parent">
5317 <type name="GObject.Object" c:type="GObject"/>
5320 <type name="QueryConstraintPrivate"
5321 c:type="MidgardQueryConstraintPrivate*"/>
5324 <record name="QueryConstraintClass"
5325 c:type="MidgardQueryConstraintClass"
5326 glib:is-gtype-struct-for="QueryConstraint">
5327 <field name="parent">
5328 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
5330 <field name="list_constraints">
5331 <callback name="list_constraints" c:type="list_constraints">
5332 <return-value transfer-ownership="full">
5333 <type name="QueryConstraintSimple"
5334 c:type="MidgardQueryConstraintSimple**"/>
5337 <parameter name="self" transfer-ownership="none">
5338 <type name="QueryConstraint" c:type="MidgardQueryConstraint*"/>
5340 <parameter name="n_objects"
5342 caller-allocates="0"
5343 transfer-ownership="full">
5344 <type name="uint" c:type="guint*"/>
5350 <class name="QueryConstraintGroup"
5351 c:type="MidgardQueryConstraintGroup"
5352 parent="GObject.Object"
5353 glib:type-name="MidgardQueryConstraintGroup"
5354 glib:get-type="midgard_query_constraint_group_get_type"
5355 glib:type-struct="QueryConstraintGroupClass">
5356 <implements name="QueryConstraintSimple"/>
5357 <constructor name="new"
5358 c:identifier="midgard_query_constraint_group_new"
5360 <doc xml:whitespace="preserve">Create new #MidgardQueryConstraintGroup instance with default "AND" group type.</doc>
5361 <return-value transfer-ownership="full">
5362 <doc xml:whitespace="preserve">#MidgardQueryConstraintGroup instance or %NULL</doc>
5363 <type name="QueryConstraintGroup"
5364 c:type="MidgardQueryConstraintGroup*"/>
5367 <constructor name="new_valist"
5368 c:identifier="midgard_query_constraint_group_new_valist"
5371 <doc xml:whitespace="preserve">This is C convinient function. It's not designed for language bindings.</doc>
5372 <return-value transfer-ownership="full">
5373 <doc xml:whitespace="preserve">#MidgardQueryConstraintGroup instance or %NULL</doc>
5374 <type name="QueryConstraintGroup"
5375 c:type="MidgardQueryConstraintGroup*"/>
5378 <parameter name="type" transfer-ownership="none">
5379 <doc xml:whitespace="preserve">constraints group type ('OR' or 'AND')</doc>
5380 <type name="utf8" c:type="gchar*"/>
5382 <parameter name="constraint" transfer-ownership="none">
5383 <doc xml:whitespace="preserve">list of constraints to add to group or NULL</doc>
5384 <type name="QueryConstraintSimple"
5385 c:type="MidgardQueryConstraintSimple*"/>
5387 <parameter transfer-ownership="none">
5393 <constructor name="new_with_constraints"
5394 c:identifier="midgard_query_constraint_group_new_with_constraints"
5396 <return-value transfer-ownership="full">
5397 <doc xml:whitespace="preserve">#MidgardQueryConstraintGroup instance or %NULL</doc>
5398 <type name="QueryConstraintGroup"
5399 c:type="MidgardQueryConstraintGroup*"/>
5402 <parameter name="type" transfer-ownership="none">
5403 <doc xml:whitespace="preserve">constraints group type</doc>
5404 <type name="utf8" c:type="gchar*"/>
5406 <parameter name="constraints" transfer-ownership="none">
5407 <doc xml:whitespace="preserve">an array of #MidgardQueryConstraintSimple constraints</doc>
5408 <type name="QueryConstraintSimple"
5409 c:type="MidgardQueryConstraintSimple**"/>
5411 <parameter name="n_constraints" transfer-ownership="none">
5412 <doc xml:whitespace="preserve">the length of given constraints array</doc>
5413 <type name="uint" c:type="guint"/>
5417 <method name="get_group_type"
5418 c:identifier="midgard_query_constraint_group_get_group_type"
5420 <return-value transfer-ownership="none">
5421 <doc xml:whitespace="preserve">group type ('OR' or 'AND')</doc>
5422 <type name="utf8" c:type="gchar*"/>
5425 <method name="set_group_type"
5426 c:identifier="midgard_query_constraint_group_set_group_type"
5428 <return-value transfer-ownership="none">
5429 <doc xml:whitespace="preserve">%TRUE if type is set, %FALSE otherwise</doc>
5430 <type name="boolean" c:type="gboolean"/>
5433 <parameter name="type" transfer-ownership="none">
5434 <doc xml:whitespace="preserve">group type to set ('OR' or 'AND')</doc>
5435 <type name="utf8" c:type="gchar*"/>
5439 <method name="add_constraint"
5440 c:identifier="midgard_query_constraint_group_add_constraint"
5443 <return-value transfer-ownership="none">
5444 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5445 <type name="boolean" c:type="gboolean"/>
5448 <parameter name="constraint" transfer-ownership="none">
5449 <doc xml:whitespace="preserve">list of #MidgardQueryConstraintSimple constraint(s) to add to constraint group</doc>
5450 <type name="QueryConstraintSimple"
5451 c:type="MidgardQueryConstraintSimple*"/>
5453 <parameter transfer-ownership="none">
5459 <field name="parent">
5460 <type name="GObject.Object" c:type="GObject"/>
5463 <type name="QueryConstraintGroupPrivate"
5464 c:type="MidgardQueryConstraintGroupPrivate*"/>
5467 <record name="QueryConstraintGroupClass"
5468 c:type="MidgardQueryConstraintGroupClass"
5469 glib:is-gtype-struct-for="QueryConstraintGroup">
5470 <field name="parent">
5471 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
5474 <record name="QueryConstraintGroupPrivate"
5475 c:type="MidgardQueryConstraintGroupPrivate">
5477 <record name="QueryConstraintPrivate"
5478 c:type="MidgardQueryConstraintPrivate">
5480 <interface name="QueryConstraintSimple"
5481 c:type="MidgardQueryConstraintSimple"
5482 glib:type-name="MidgardQueryConstraintSimple"
5483 glib:get-type="midgard_query_constraint_simple_get_type">
5484 <method name="list_constraints"
5485 c:identifier="midgard_query_constraint_simple_list_constraints"
5487 <return-value transfer-ownership="full">
5488 <doc xml:whitespace="preserve">array of #MidgardQueryConstraintSimple instances</doc>
5489 <type name="QueryConstraintSimple"
5490 c:type="MidgardQueryConstraintSimple**"/>
5493 <parameter name="n_objects"
5495 caller-allocates="0"
5496 transfer-ownership="full">
5497 <doc xml:whitespace="preserve">pointer to store numer of returned objects</doc>
5498 <type name="uint" c:type="guint*"/>
5503 <record name="QueryConstraintSimpleIFace"
5504 c:type="MidgardQueryConstraintSimpleIFace">
5505 <field name="parent" writable="1">
5506 <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
5508 <field name="list_constraints">
5509 <type name="any" c:type="pointer"/>
5511 <field name="priv" writable="1">
5512 <type name="QueryConstraintSimplePrivate"
5513 c:type="MidgardQueryConstraintSimplePrivate*"/>
5516 <record name="QueryConstraintSimplePrivate"
5517 c:type="MidgardQueryConstraintSimplePrivate">
5519 <class name="QueryExecutor"
5520 c:type="MidgardQueryExecutor"
5521 parent="GObject.Object"
5523 glib:type-name="MidgardQueryExecutor"
5524 glib:get-type="midgard_query_executor_get_type"
5525 glib:type-struct="QueryExecutorClass">
5526 <constructor name="new" c:identifier="midgard_query_executor_new">
5527 <return-value transfer-ownership="full">
5528 <type name="QueryExecutor" c:type="MidgardQueryExecutor*"/>
5531 <parameter name="mgd" transfer-ownership="none">
5532 <type name="Connection" c:type="MidgardConnection*"/>
5534 <parameter name="storage" transfer-ownership="none">
5535 <type name="QueryStorage" c:type="MidgardQueryStorage*"/>
5539 <virtual-method name="set_constraint"
5540 invoker="set_constraint"
5542 <doc xml:whitespace="preserve">Set constraint object which will be used for query execution</doc>
5543 <return-value transfer-ownership="none">
5544 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5545 <type name="boolean" c:type="gboolean"/>
5548 <parameter name="constraint" transfer-ownership="none">
5549 <doc xml:whitespace="preserve">#MidgardConstraintSimple instance</doc>
5550 <type name="QueryConstraintSimple"
5551 c:type="MidgardQueryConstraintSimple*"/>
5555 <virtual-method name="set_limit" invoker="set_limit" version="10.05">
5556 <return-value transfer-ownership="none">
5557 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5558 <type name="boolean" c:type="gboolean"/>
5561 <parameter name="limit" transfer-ownership="none">
5562 <doc xml:whitespace="preserve">execution limit</doc>
5563 <type name="uint" c:type="guint"/>
5567 <virtual-method name="set_offset" invoker="set_offset" version="10.05">
5568 <return-value transfer-ownership="none">
5569 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5570 <type name="boolean" c:type="gboolean"/>
5573 <parameter name="offset" transfer-ownership="none">
5574 <doc xml:whitespace="preserve">execution offset</doc>
5575 <type name="uint" c:type="guint"/>
5579 <virtual-method name="add_order" invoker="add_order" version="10.05">
5580 <return-value transfer-ownership="none">
5581 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5582 <type name="boolean" c:type="gboolean"/>
5585 <parameter name="property" transfer-ownership="none">
5586 <type name="QueryProperty" c:type="MidgardQueryProperty*"/>
5588 <parameter name="type" transfer-ownership="none">
5589 <doc xml:whitespace="preserve">execution order</doc>
5590 <type name="utf8" c:type="gchar*"/>
5594 <virtual-method name="add_join" invoker="add_join">
5595 <return-value transfer-ownership="none">
5596 <type name="boolean" c:type="gboolean"/>
5599 <parameter name="join_type" transfer-ownership="none">
5600 <type name="utf8" c:type="gchar*"/>
5602 <parameter name="left_property" transfer-ownership="none">
5603 <type name="QueryProperty" c:type="MidgardQueryProperty*"/>
5605 <parameter name="right_property" transfer-ownership="none">
5606 <type name="QueryProperty" c:type="MidgardQueryProperty*"/>
5610 <virtual-method name="execute" invoker="execute" version="10.05">
5611 <return-value transfer-ownership="none">
5612 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5613 <type name="boolean" c:type="gboolean"/>
5616 <virtual-method name="get_results_count"
5617 invoker="get_results_count"
5619 <return-value transfer-ownership="none">
5620 <doc xml:whitespace="preserve">number of objects or records returned from execution</doc>
5621 <type name="uint" c:type="guint"/>
5624 <method name="set_constraint"
5625 c:identifier="midgard_query_executor_set_constraint"
5627 <doc xml:whitespace="preserve">Set constraint object which will be used for query execution</doc>
5628 <return-value transfer-ownership="none">
5629 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5630 <type name="boolean" c:type="gboolean"/>
5633 <parameter name="constraint" transfer-ownership="none">
5634 <doc xml:whitespace="preserve">#MidgardConstraintSimple instance</doc>
5635 <type name="QueryConstraintSimple"
5636 c:type="MidgardQueryConstraintSimple*"/>
5640 <method name="set_limit"
5641 c:identifier="midgard_query_executor_set_limit"
5643 <return-value transfer-ownership="none">
5644 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5645 <type name="boolean" c:type="gboolean"/>
5648 <parameter name="limit" transfer-ownership="none">
5649 <doc xml:whitespace="preserve">execution limit</doc>
5650 <type name="uint" c:type="guint"/>
5654 <method name="set_offset"
5655 c:identifier="midgard_query_executor_set_offset"
5657 <return-value transfer-ownership="none">
5658 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5659 <type name="boolean" c:type="gboolean"/>
5662 <parameter name="offset" transfer-ownership="none">
5663 <doc xml:whitespace="preserve">execution offset</doc>
5664 <type name="uint" c:type="guint"/>
5668 <method name="add_order"
5669 c:identifier="midgard_query_executor_add_order"
5671 <return-value transfer-ownership="none">
5672 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5673 <type name="boolean" c:type="gboolean"/>
5676 <parameter name="property" transfer-ownership="none">
5677 <type name="QueryProperty" c:type="MidgardQueryProperty*"/>
5679 <parameter name="type" transfer-ownership="none">
5680 <doc xml:whitespace="preserve">execution order</doc>
5681 <type name="utf8" c:type="gchar*"/>
5685 <method name="add_join" c:identifier="midgard_query_executor_add_join">
5686 <return-value transfer-ownership="none">
5687 <type name="boolean" c:type="gboolean"/>
5690 <parameter name="join_type" transfer-ownership="none">
5691 <type name="utf8" c:type="gchar*"/>
5693 <parameter name="left_property" transfer-ownership="none">
5694 <type name="QueryProperty" c:type="MidgardQueryProperty*"/>
5696 <parameter name="right_property" transfer-ownership="none">
5697 <type name="QueryProperty" c:type="MidgardQueryProperty*"/>
5701 <method name="execute"
5702 c:identifier="midgard_query_executor_execute"
5704 <return-value transfer-ownership="none">
5705 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5706 <type name="boolean" c:type="gboolean"/>
5709 <method name="get_results_count"
5710 c:identifier="midgard_query_executor_get_results_count"
5712 <return-value transfer-ownership="none">
5713 <doc xml:whitespace="preserve">number of objects or records returned from execution</doc>
5714 <type name="uint" c:type="guint"/>
5717 <property name="resultscount" transfer-ownership="none">
5718 <type name="uint" c:type="guint"/>
5720 <field name="parent">
5721 <type name="GObject.Object" c:type="GObject"/>
5724 <type name="QueryExecutorPrivate"
5725 c:type="MidgardQueryExecutorPrivate*"/>
5728 <record name="QueryExecutorClass"
5729 c:type="MidgardQueryExecutorClass"
5730 glib:is-gtype-struct-for="QueryExecutor">
5731 <field name="parent">
5732 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
5734 <field name="set_constraint">
5735 <callback name="set_constraint" c:type="set_constraint">
5736 <return-value transfer-ownership="none">
5737 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5738 <type name="boolean" c:type="gboolean"/>
5741 <parameter name="self" transfer-ownership="none">
5742 <type name="QueryExecutor" c:type="MidgardQueryExecutor*"/>
5744 <parameter name="constraint" transfer-ownership="none">
5745 <doc xml:whitespace="preserve">#MidgardConstraintSimple instance</doc>
5746 <type name="QueryConstraintSimple"
5747 c:type="MidgardQueryConstraintSimple*"/>
5752 <field name="set_limit">
5753 <callback name="set_limit" c:type="set_limit">
5754 <return-value transfer-ownership="none">
5755 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5756 <type name="boolean" c:type="gboolean"/>
5759 <parameter name="self" transfer-ownership="none">
5760 <type name="QueryExecutor" c:type="MidgardQueryExecutor*"/>
5762 <parameter name="limit" transfer-ownership="none">
5763 <doc xml:whitespace="preserve">execution limit</doc>
5764 <type name="uint" c:type="guint"/>
5769 <field name="set_offset">
5770 <callback name="set_offset" c:type="set_offset">
5771 <return-value transfer-ownership="none">
5772 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5773 <type name="boolean" c:type="gboolean"/>
5776 <parameter name="self" transfer-ownership="none">
5777 <type name="QueryExecutor" c:type="MidgardQueryExecutor*"/>
5779 <parameter name="offset" transfer-ownership="none">
5780 <doc xml:whitespace="preserve">execution offset</doc>
5781 <type name="uint" c:type="guint"/>
5786 <field name="add_order">
5787 <callback name="add_order" c:type="add_order">
5788 <return-value transfer-ownership="none">
5789 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5790 <type name="boolean" c:type="gboolean"/>
5793 <parameter name="self" transfer-ownership="none">
5794 <type name="QueryExecutor" c:type="MidgardQueryExecutor*"/>
5796 <parameter name="property" transfer-ownership="none">
5797 <type name="QueryProperty" c:type="MidgardQueryProperty*"/>
5799 <parameter name="type" transfer-ownership="none">
5800 <doc xml:whitespace="preserve">execution order</doc>
5801 <type name="utf8" c:type="gchar*"/>
5806 <field name="add_join">
5807 <callback name="add_join" c:type="add_join">
5808 <return-value transfer-ownership="none">
5809 <type name="boolean" c:type="gboolean"/>
5812 <parameter name="self" transfer-ownership="none">
5813 <type name="QueryExecutor" c:type="MidgardQueryExecutor*"/>
5815 <parameter name="join_type" transfer-ownership="none">
5816 <type name="utf8" c:type="gchar*"/>
5818 <parameter name="left_property" transfer-ownership="none">
5819 <type name="QueryProperty" c:type="MidgardQueryProperty*"/>
5821 <parameter name="right_property" transfer-ownership="none">
5822 <type name="QueryProperty" c:type="MidgardQueryProperty*"/>
5827 <field name="execute">
5828 <callback name="execute" c:type="execute">
5829 <return-value transfer-ownership="none">
5830 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5831 <type name="boolean" c:type="gboolean"/>
5834 <parameter name="self" transfer-ownership="none">
5835 <type name="QueryExecutor" c:type="MidgardQueryExecutor*"/>
5840 <field name="get_results_count">
5841 <callback name="get_results_count" c:type="get_results_count">
5842 <return-value transfer-ownership="none">
5843 <doc xml:whitespace="preserve">number of objects or records returned from execution</doc>
5844 <type name="uint" c:type="guint"/>
5847 <parameter name="self" transfer-ownership="none">
5848 <type name="QueryExecutor" c:type="MidgardQueryExecutor*"/>
5854 <record name="QueryExecutorPrivate" c:type="MidgardQueryExecutorPrivate">
5856 <interface name="QueryHolder"
5857 c:type="MidgardQueryHolder"
5858 glib:type-name="MidgardQueryHolder"
5859 glib:get-type="midgard_query_holder_get_type">
5860 <method name="get_value"
5861 c:identifier="midgard_query_holder_get_value"
5863 <return-value transfer-ownership="none">
5864 <type name="none" c:type="void"/>
5867 <parameter name="value" transfer-ownership="none">
5868 <doc xml:whitespace="preserve">pointer to store returned value</doc>
5869 <type name="GObject.Value" c:type="GValue*"/>
5873 <method name="set_value"
5874 c:identifier="midgard_query_holder_set_value"
5876 <return-value transfer-ownership="none">
5877 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
5878 <type name="boolean" c:type="gboolean"/>
5881 <parameter name="value" transfer-ownership="none">
5882 <doc xml:whitespace="preserve">value to set</doc>
5883 <type name="GObject.Value" c:type="GValue*"/>
5888 <record name="QueryHolderIFace" c:type="MidgardQueryHolderIFace">
5889 <field name="parent" writable="1">
5890 <type name="GObject.TypeInterface" c:type="GTypeInterface"/>
5892 <field name="get_value">
5893 <type name="any" c:type="pointer"/>
5895 <field name="set_value">
5896 <type name="any" c:type="pointer"/>
5899 <class name="QueryProperty"
5900 c:type="MidgardQueryProperty"
5901 parent="GObject.Object"
5902 glib:type-name="MidgardQueryProperty"
5903 glib:get-type="midgard_query_property_get_type"
5904 glib:type-struct="QueryPropertyClass">
5905 <implements name="QueryHolder"/>
5906 <constructor name="new"
5907 c:identifier="midgard_query_property_new"
5909 <return-value transfer-ownership="full">
5910 <doc xml:whitespace="preserve">new #MidgardQueryProperty instance or NULL on failure</doc>
5911 <type name="QueryProperty" c:type="MidgardQueryProperty*"/>
5914 <parameter name="property" transfer-ownership="none">
5915 <doc xml:whitespace="preserve">name of the property</doc>
5916 <type name="utf8" c:type="gchar*"/>
5918 <parameter name="storage" transfer-ownership="none">
5919 <doc xml:whitespace="preserve">optional storage for given property</doc>
5920 <type name="QueryStorage" c:type="MidgardQueryStorage*"/>
5924 <field name="parent">
5925 <type name="GObject.Object" c:type="GObject"/>
5928 <type name="QueryPropertyPrivate"
5929 c:type="MidgardQueryPropertyPrivate*"/>
5932 <record name="QueryPropertyClass"
5933 c:type="MidgardQueryPropertyClass"
5934 glib:is-gtype-struct-for="QueryProperty">
5935 <field name="parent">
5936 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
5939 <record name="QueryPropertyPrivate" c:type="MidgardQueryPropertyPrivate">
5941 <class name="QuerySelect"
5942 c:type="MidgardQuerySelect"
5943 parent="QueryExecutor"
5944 glib:type-name="MidgardQuerySelect"
5945 glib:get-type="midgard_query_select_get_type"
5946 glib:type-struct="QuerySelectClass">
5947 <constructor name="new"
5948 c:identifier="midgard_query_select_new"
5950 <doc xml:whitespace="preserve">#MidgardStorage @storage represents storage which is queried during execution</doc>
5951 <return-value transfer-ownership="full">
5952 <doc xml:whitespace="preserve">new #MidgardQuerySelect instance or %NULL on failure</doc>
5953 <type name="QuerySelect" c:type="MidgardQuerySelect*"/>
5956 <parameter name="mgd" transfer-ownership="none">
5957 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
5958 <type name="Connection" c:type="MidgardConnection*"/>
5960 <parameter name="storage" transfer-ownership="none">
5961 <doc xml:whitespace="preserve">#MidgardStorage instance</doc>
5962 <type name="QueryStorage" c:type="MidgardQueryStorage*"/>
5966 <virtual-method name="list_objects"
5967 invoker="list_objects"
5969 <doc xml:whitespace="preserve">List all objects for which data has been returned during execution.</doc>
5970 <return-value transfer-ownership="full">
5971 <doc xml:whitespace="preserve">newly allocated array of #MidgardDBObject</doc>
5972 <type name="DBObject" c:type="MidgardDBObject**"/>
5975 <parameter name="n_objects"
5977 caller-allocates="0"
5978 transfer-ownership="full">
5979 <doc xml:whitespace="preserve">pointer to store number of returned objects</doc>
5980 <type name="uint" c:type="guint*"/>
5984 <virtual-method name="toggle_read_only"
5985 invoker="toggle_read_only"
5987 <doc xml:whitespace="preserve">This method switch #MidgardQuerySelect to read only mode.
5988 It should be enabled when returned objects will be used only to read properties.
5989 It improves performance, but it's impossible to write returned object's properties.</doc>
5990 <return-value transfer-ownership="none">
5991 <type name="none" c:type="void"/>
5994 <parameter name="toggle" transfer-ownership="none">
5995 <doc xml:whitespace="preserve">enables or disables read only mode</doc>
5996 <type name="boolean" c:type="gboolean"/>
6000 <method name="list_objects"
6001 c:identifier="midgard_query_select_list_objects"
6003 <doc xml:whitespace="preserve">List all objects for which data has been returned during execution.</doc>
6004 <return-value transfer-ownership="full">
6005 <doc xml:whitespace="preserve">newly allocated array of #MidgardDBObject</doc>
6006 <type name="DBObject" c:type="MidgardDBObject**"/>
6009 <parameter name="n_objects"
6011 caller-allocates="0"
6012 transfer-ownership="full">
6013 <doc xml:whitespace="preserve">pointer to store number of returned objects</doc>
6014 <type name="uint" c:type="guint*"/>
6018 <method name="toggle_read_only"
6019 c:identifier="midgard_query_select_toggle_read_only"
6021 <doc xml:whitespace="preserve">This method switch #MidgardQuerySelect to read only mode.
6022 It should be enabled when returned objects will be used only to read properties.
6023 It improves performance, but it's impossible to write returned object's properties.</doc>
6024 <return-value transfer-ownership="none">
6025 <type name="none" c:type="void"/>
6028 <parameter name="toggle" transfer-ownership="none">
6029 <doc xml:whitespace="preserve">enables or disables read only mode</doc>
6030 <type name="boolean" c:type="gboolean"/>
6034 <field name="parent">
6035 <type name="QueryExecutor" c:type="MidgardQueryExecutor"/>
6038 <record name="QuerySelectClass"
6039 c:type="MidgardQuerySelectClass"
6040 glib:is-gtype-struct-for="QuerySelect">
6041 <field name="parent">
6042 <type name="QueryExecutorClass" c:type="MidgardQueryExecutorClass"/>
6044 <field name="list_objects">
6045 <callback name="list_objects" c:type="list_objects">
6046 <return-value transfer-ownership="full">
6047 <doc xml:whitespace="preserve">newly allocated array of #MidgardDBObject</doc>
6048 <type name="DBObject" c:type="MidgardDBObject**"/>
6051 <parameter name="self" transfer-ownership="none">
6052 <type name="QuerySelect" c:type="MidgardQuerySelect*"/>
6054 <parameter name="n_objects"
6056 caller-allocates="0"
6057 transfer-ownership="full">
6058 <doc xml:whitespace="preserve">pointer to store number of returned objects</doc>
6059 <type name="uint" c:type="guint*"/>
6064 <field name="toggle_read_only">
6065 <callback name="toggle_read_only" c:type="toggle_read_only">
6066 <return-value transfer-ownership="none">
6067 <type name="none" c:type="void"/>
6070 <parameter name="self" transfer-ownership="none">
6071 <type name="QuerySelect" c:type="MidgardQuerySelect*"/>
6073 <parameter name="toggle" transfer-ownership="none">
6074 <doc xml:whitespace="preserve">enables or disables read only mode</doc>
6075 <type name="boolean" c:type="gboolean"/>
6081 <class name="QueryStorage"
6082 c:type="MidgardQueryStorage"
6083 parent="GObject.Object"
6084 glib:type-name="MidgardQueryStorage"
6085 glib:get-type="midgard_query_storage_get_type"
6086 glib:type-struct="QueryStorageClass">
6087 <constructor name="new"
6088 c:identifier="midgard_query_storage_new"
6090 <doc xml:whitespace="preserve">Initializes new object which represents #MidgardDBObject derived one's storage</doc>
6091 <return-value transfer-ownership="full">
6092 <doc xml:whitespace="preserve">new #MidgardQueryStorage or %NULL on failure</doc>
6093 <type name="QueryStorage" c:type="MidgardQueryStorage*"/>
6096 <parameter name="classname" transfer-ownership="none">
6097 <doc xml:whitespace="preserve">name of the #MidgardDBObject derived class</doc>
6098 <type name="utf8" c:type="gchar*"/>
6102 <field name="parent">
6103 <type name="GObject.Object" c:type="GObject"/>
6106 <type name="QueryStoragePrivate" c:type="MidgardQueryStoragePrivate*"/>
6109 <record name="QueryStorageClass"
6110 c:type="MidgardQueryStorageClass"
6111 glib:is-gtype-struct-for="QueryStorage">
6112 <field name="parent">
6113 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
6116 <record name="QueryStoragePrivate" c:type="MidgardQueryStoragePrivate">
6118 <class name="QueryValue"
6119 c:type="MidgardQueryValue"
6120 parent="GObject.Object"
6121 glib:type-name="MidgardQueryValue"
6122 glib:get-type="midgard_query_value_get_type"
6123 glib:type-struct="QueryValueClass">
6124 <implements name="QueryHolder"/>
6125 <constructor name="new"
6126 c:identifier="midgard_query_value_new"
6128 <return-value transfer-ownership="full">
6129 <doc xml:whitespace="preserve">new #MidgardQueryValue or %NULL on failure</doc>
6130 <type name="QueryValue" c:type="MidgardQueryValue*"/>
6133 <parameter name="value" transfer-ownership="none">
6134 <doc xml:whitespace="preserve">a #GValue value</doc>
6135 <type name="GObject.Value" c:type="GValue*"/>
6139 <virtual-method name="get_value">
6140 <return-value transfer-ownership="none">
6141 <type name="none" c:type="void"/>
6144 <parameter name="value" transfer-ownership="none">
6145 <type name="GObject.Value" c:type="GValue*"/>
6149 <virtual-method name="set_value">
6150 <return-value transfer-ownership="full">
6151 <type name="QueryValue" c:type="MidgardQueryValue*"/>
6154 <parameter name="value" transfer-ownership="none">
6155 <type name="GObject.Value" c:type="GValue*"/>
6159 <field name="parent">
6160 <type name="GObject.Object" c:type="GObject"/>
6163 <type name="QueryValuePrivate" c:type="MidgardQueryValuePrivate*"/>
6166 <record name="QueryValueClass"
6167 c:type="MidgardQueryValueClass"
6168 glib:is-gtype-struct-for="QueryValue">
6169 <field name="parent">
6170 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
6172 <field name="get_value">
6173 <callback name="get_value" c:type="get_value">
6174 <return-value transfer-ownership="none">
6175 <type name="none" c:type="void"/>
6178 <parameter name="self" transfer-ownership="none">
6179 <type name="QueryValue" c:type="MidgardQueryValue*"/>
6181 <parameter name="value" transfer-ownership="none">
6182 <type name="GObject.Value" c:type="GValue*"/>
6187 <field name="set_value">
6188 <callback name="set_value" c:type="set_value">
6189 <return-value transfer-ownership="full">
6190 <type name="QueryValue" c:type="MidgardQueryValue*"/>
6193 <parameter name="self" transfer-ownership="none">
6194 <type name="QueryValue" c:type="MidgardQueryValue*"/>
6196 <parameter name="value" transfer-ownership="none">
6197 <type name="GObject.Value" c:type="GValue*"/>
6203 <record name="QueryValuePrivate" c:type="MidgardQueryValuePrivate">
6205 <record name="ReflectionProperty" c:type="MidgardReflectionProperty">
6207 <record name="ReflectionPropertyClass"
6208 c:type="MidgardReflectionPropertyClass">
6209 <field name="parent" writable="1">
6210 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
6212 <field name="is_link">
6213 <type name="any" c:type="pointer"/>
6216 <class name="ReflectorObject"
6217 c:type="MidgardReflectorObject"
6218 parent="GObject.Object"
6220 glib:type-name="MidgardReflectorObject"
6221 glib:get-type="midgard_reflector_object_get_type"
6222 glib:type-struct="ReflectorObjectClass">
6223 <function name="get_property_primary"
6224 c:identifier="midgard_reflector_object_get_property_primary"
6226 <return-value transfer-ownership="none">
6227 <doc xml:whitespace="preserve">Name of property which is defined as primary for given class or %NULL.</doc>
6228 <type name="utf8" c:type="gchar*"/>
6231 <parameter name="classname" transfer-ownership="none">
6232 <doc xml:whitespace="preserve">Name of the class</doc>
6233 <type name="utf8" c:type="gchar*"/>
6237 <function name="get_property_up"
6238 c:identifier="midgard_reflector_object_get_property_up"
6240 <return-value transfer-ownership="none">
6241 <doc xml:whitespace="preserve">Name of property which is defined as 'up' for given class or %NULL.</doc>
6242 <type name="utf8" c:type="gchar*"/>
6245 <parameter name="classname" transfer-ownership="none">
6246 <doc xml:whitespace="preserve">Name of the class</doc>
6247 <type name="utf8" c:type="gchar*"/>
6251 <function name="get_property_parent"
6252 c:identifier="midgard_reflector_object_get_property_parent"
6254 <return-value transfer-ownership="none">
6255 <doc xml:whitespace="preserve">Name of property which is defined as 'parent' for given class or %NULL.</doc>
6256 <type name="utf8" c:type="gchar*"/>
6259 <parameter name="classname" transfer-ownership="none">
6260 <doc xml:whitespace="preserve">Name of the class</doc>
6261 <type name="utf8" c:type="gchar*"/>
6265 <function name="get_property_unique"
6266 c:identifier="midgard_reflector_object_get_property_unique"
6268 <return-value transfer-ownership="none">
6269 <doc xml:whitespace="preserve">Name of property which is defined unique for given class, or %NULL.</doc>
6270 <type name="utf8" c:type="gchar*"/>
6273 <parameter name="classname" transfer-ownership="none">
6274 <doc xml:whitespace="preserve">Name of the class</doc>
6275 <type name="utf8" c:type="gchar*"/>
6279 <function name="list_children"
6280 c:identifier="midgard_reflector_object_list_children"
6282 <doc xml:whitespace="preserve">Returns newly allocated, children ( in midgard tree ) classes' names.
6283 Returned array should be freed if no longer needed without freeing array's elements.</doc>
6284 <return-value transfer-ownership="container">
6285 <doc xml:whitespace="preserve">array of strings or %NULL.</doc>
6286 <array c:type="gchar**">
6291 <parameter name="classname" transfer-ownership="none">
6292 <doc xml:whitespace="preserve">Name of the class</doc>
6293 <type name="utf8" c:type="gchar*"/>
6295 <parameter name="n_children"
6297 caller-allocates="0"
6298 transfer-ownership="full">
6299 <doc xml:whitespace="preserve">pointer to store number of children classes</doc>
6300 <type name="uint" c:type="guint*"/>
6304 <function name="has_metadata_class"
6305 c:identifier="midgard_reflector_object_has_metadata_class">
6306 <return-value transfer-ownership="none">
6307 <type name="boolean" c:type="gboolean"/>
6310 <parameter name="classname" transfer-ownership="none">
6311 <type name="utf8" c:type="gchar*"/>
6315 <function name="get_metadata_class"
6316 c:identifier="midgard_reflector_object_get_metadata_class"
6318 <return-value transfer-ownership="none">
6319 <doc xml:whitespace="preserve">Name of the metadata class of the given one or %NULL.</doc>
6320 <type name="utf8" c:type="gchar*"/>
6323 <parameter name="classname" transfer-ownership="none">
6324 <doc xml:whitespace="preserve">Name of the class</doc>
6325 <type name="utf8" c:type="gchar*"/>
6329 <function name="get_schema_value"
6330 c:identifier="midgard_reflector_object_get_schema_value"
6332 <return-value transfer-ownership="none">
6333 <doc xml:whitespace="preserve">value of given node's name or %NULL.</doc>
6334 <type name="utf8" c:type="gchar*"/>
6337 <parameter name="classname" transfer-ownership="none">
6338 <doc xml:whitespace="preserve">Name of the class</doc>
6339 <type name="utf8" c:type="gchar*"/>
6341 <parameter name="name" transfer-ownership="none">
6342 <doc xml:whitespace="preserve">node's name declared for given @klass</doc>
6343 <type name="utf8" c:type="gchar*"/>
6347 <field name="parent">
6348 <type name="GObject.Object" c:type="GObject"/>
6351 <record name="ReflectorObjectClass"
6352 c:type="MidgardReflectorObjectClass"
6353 glib:is-gtype-struct-for="ReflectorObject">
6354 <field name="parent">
6355 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
6358 <class name="ReflectorProperty"
6359 c:type="MidgardReflectorProperty"
6360 parent="GObject.Object"
6361 glib:type-name="MidgardReflectorProperty"
6362 glib:get-type="midgard_reflector_property_get_type"
6363 glib:type-struct="ReflectorPropertyClass">
6364 <constructor name="new"
6365 c:identifier="midgard_reflector_property_new"
6367 <return-value transfer-ownership="full">
6368 <doc xml:whitespace="preserve">newly initialized #MidgardReflectorProperty instance or %NULL on failure.</doc>
6369 <type name="ReflectorProperty" c:type="MidgardReflectorProperty*"/>
6372 <parameter name="classname" transfer-ownership="none">
6373 <doc xml:whitespace="preserve">Name of #MidgardDBObject (or derived) class</doc>
6374 <type name="utf8" c:type="gchar*"/>
6378 <method name="get_midgard_type"
6379 c:identifier="midgard_reflector_property_get_midgard_type"
6381 <return-value transfer-ownership="none">
6382 <doc xml:whitespace="preserve">type (#GType) of the property or %NULL if property is not registered for given class.</doc>
6383 <type name="GType" c:type="GType"/>
6386 <parameter name="propname" transfer-ownership="none">
6387 <doc xml:whitespace="preserve">property name which is registered for #MidgardDBObjectClass</doc>
6388 <type name="utf8" c:type="gchar*"/>
6392 <method name="is_link"
6393 c:identifier="midgard_reflector_property_is_link"
6395 <doc xml:whitespace="preserve">Checks whether property is a link.</doc>
6396 <return-value transfer-ownership="none">
6397 <doc xml:whitespace="preserve">%TRUE if property is registered as link, %FALSE otherwise (or in case if property is not registered for given class.</doc>
6398 <type name="boolean" c:type="gboolean"/>
6401 <parameter name="propname" transfer-ownership="none">
6402 <doc xml:whitespace="preserve">property name</doc>
6403 <type name="utf8" c:type="gchar*"/>
6407 <method name="is_linked"
6408 c:identifier="midgard_reflector_property_is_linked"
6410 <doc xml:whitespace="preserve">Checks if property is linked with another type.
6411 %FALSE is returned if property is not linked or is not registered for given class.</doc>
6412 <return-value transfer-ownership="none">
6413 <doc xml:whitespace="preserve">%TRUE if property is linked with another type (property of another class is defined as a link to given one).</doc>
6414 <type name="boolean" c:type="gboolean"/>
6417 <parameter name="propname" transfer-ownership="none">
6418 <doc xml:whitespace="preserve">property name</doc>
6419 <type name="utf8" c:type="gchar*"/>
6423 <method name="get_link_class"
6424 c:identifier="midgard_reflector_property_get_link_class"
6427 <return-value transfer-ownership="none">
6428 <doc xml:whitespace="preserve">the pointer to the #MidgardDBObjectClass, a given property is a link to.</doc>
6429 <type name="DBObjectClass" c:type="MidgardDBObjectClass*"/>
6432 <parameter name="propname" transfer-ownership="none">
6433 <doc xml:whitespace="preserve">property name</doc>
6434 <type name="utf8" c:type="gchar*"/>
6438 <method name="get_link_name"
6439 c:identifier="midgard_reflector_property_get_link_name"
6441 <doc xml:whitespace="preserve">Or %NULL if property is not a link or given property is not registered for given class.</doc>
6442 <return-value transfer-ownership="none">
6443 <doc xml:whitespace="preserve">The name of the class, the given property is a link to.</doc>
6444 <type name="utf8" c:type="gchar*"/>
6447 <parameter name="propname" transfer-ownership="none">
6448 <doc xml:whitespace="preserve">property name</doc>
6449 <type name="utf8" c:type="gchar*"/>
6453 <method name="get_link_target"
6454 c:identifier="midgard_reflector_property_get_link_target"
6456 <doc xml:whitespace="preserve">Or %NULL if property is not a link or it's not registered for given class.</doc>
6457 <return-value transfer-ownership="none">
6458 <doc xml:whitespace="preserve">The name of the property, the given one is a link to.</doc>
6459 <type name="utf8" c:type="gchar*"/>
6462 <parameter name="propname" transfer-ownership="none">
6463 <doc xml:whitespace="preserve">property name</doc>
6464 <type name="utf8" c:type="gchar*"/>
6468 <method name="description"
6469 c:identifier="midgard_reflector_property_description"
6471 <return-value transfer-ownership="none">
6472 <doc xml:whitespace="preserve">description of the given property or %NULL.</doc>
6473 <type name="utf8" c:type="gchar*"/>
6476 <parameter name="propname" transfer-ownership="none">
6477 <doc xml:whitespace="preserve">property name</doc>
6478 <type name="utf8" c:type="gchar*"/>
6482 <method name="get_user_value"
6483 c:identifier="midgard_reflector_property_get_user_value"
6485 <return-value transfer-ownership="none">
6486 <doc xml:whitespace="preserve">value for user defined field, or NULL if none found</doc>
6487 <type name="utf8" c:type="gchar*"/>
6490 <parameter name="property" transfer-ownership="none">
6491 <doc xml:whitespace="preserve">property to look value for</doc>
6492 <type name="utf8" c:type="gchar*"/>
6494 <parameter name="name" transfer-ownership="none">
6495 <doc xml:whitespace="preserve">name of user defined field</doc>
6496 <type name="utf8" c:type="gchar*"/>
6500 <method name="is_private"
6501 c:identifier="midgard_reflector_property_is_private"
6503 <return-value transfer-ownership="none">
6504 <doc xml:whitespace="preserve">%TRUE, if propery is defined private, %FALSE otherwise</doc>
6505 <type name="boolean" c:type="gboolean"/>
6508 <parameter name="property" transfer-ownership="none">
6509 <doc xml:whitespace="preserve">property name to check</doc>
6510 <type name="utf8" c:type="gchar*"/>
6514 <method name="is_unique"
6515 c:identifier="midgard_reflector_property_is_unique"
6517 <return-value transfer-ownership="none">
6518 <doc xml:whitespace="preserve">%TRUE, if property is defined as unique, %FALSE otherwise</doc>
6519 <type name="boolean" c:type="gboolean"/>
6522 <parameter name="property" transfer-ownership="none">
6523 <doc xml:whitespace="preserve">property name to check</doc>
6524 <type name="utf8" c:type="gchar*"/>
6528 <method name="is_primary"
6529 c:identifier="midgard_reflector_property_is_primary"
6531 <return-value transfer-ownership="none">
6532 <doc xml:whitespace="preserve">%TRUE, if property is primary, %FALSE otherwise</doc>
6533 <type name="boolean" c:type="gboolean"/>
6536 <parameter name="property" transfer-ownership="none">
6537 <doc xml:whitespace="preserve">property name to check</doc>
6538 <type name="utf8" c:type="gchar*"/>
6542 <method name="has_default_value"
6543 c:identifier="midgard_reflector_property_has_default_value"
6545 <return-value transfer-ownership="none">
6546 <doc xml:whitespace="preserve">%TRUE, if property has default value, %FALSE otherwise</doc>
6547 <type name="boolean" c:type="gboolean"/>
6550 <parameter name="property" transfer-ownership="none">
6551 <doc xml:whitespace="preserve">property name to check</doc>
6552 <type name="utf8" c:type="gchar*"/>
6556 <method name="get_default_value"
6557 c:identifier="midgard_reflector_property_get_default_value"
6559 <doc xml:whitespace="preserve">so it should be unset when no longer needed.</doc>
6560 <return-value transfer-ownership="none">
6561 <doc xml:whitespace="preserve">%TRUE, if property has default value and its copy has been made, %FALSE otherwise</doc>
6562 <type name="boolean" c:type="gboolean"/>
6565 <parameter name="property" transfer-ownership="none">
6566 <doc xml:whitespace="preserve">property name to check</doc>
6567 <type name="utf8" c:type="gchar*"/>
6569 <parameter name="value"
6571 caller-allocates="0"
6572 transfer-ownership="full">
6573 <doc xml:whitespace="preserve">value which stores default value defined for given property</doc>
6574 <type name="GObject.Value" c:type="GValue*"/>
6578 <property name="dbclass"
6582 transfer-ownership="none">
6583 <type name="utf8" c:type="gchararray"/>
6585 <field name="parent">
6586 <type name="GObject.Object" c:type="GObject"/>
6589 <type name="ReflectorPropertyPrivate"
6590 c:type="MidgardReflectorPropertyPrivate*"/>
6593 <record name="ReflectorPropertyClass"
6594 c:type="MidgardReflectorPropertyClass"
6595 glib:is-gtype-struct-for="ReflectorProperty">
6596 <field name="parent">
6597 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
6600 <record name="ReflectorPropertyPrivate"
6601 c:type="MidgardReflectorPropertyPrivate">
6603 <class name="Replicator"
6604 c:type="MidgardReplicator"
6605 parent="GObject.Object"
6606 glib:type-name="MidgardReplicator"
6607 glib:get-type="midgard_replicator_get_type"
6608 glib:type-struct="ReplicatorClass">
6609 <function name="serialize" c:identifier="midgard_replicator_serialize">
6610 <return-value transfer-ownership="full">
6611 <doc xml:whitespace="preserve">serialized objects as xml content or %NULL on failure.</doc>
6612 <type name="utf8" c:type="gchar*"/>
6615 <parameter name="object" transfer-ownership="none">
6616 <doc xml:whitespace="preserve">GObject (or derived class) instance</doc>
6617 <type name="GObject.Object" c:type="GObject*"/>
6621 <function name="export" c:identifier="midgard_replicator_export">
6622 <doc xml:whitespace="preserve">Given object is not serialized. Its storage record is marked as exported.</doc>
6623 <return-value transfer-ownership="none">
6624 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise.</doc>
6625 <type name="boolean" c:type="gboolean"/>
6628 <parameter name="object" transfer-ownership="none">
6629 <doc xml:whitespace="preserve">#MidgardDBObject instance</doc>
6630 <type name="DBObject" c:type="MidgardDBObject*"/>
6634 <function name="export_purged"
6635 c:identifier="midgard_replicator_export_purged">
6636 <doc xml:whitespace="preserve">Exports all purged objects of given class. If @startdate or @enddate are not NULL,
6637 all objects which were purged between dates will be exported.</doc>
6638 <return-value transfer-ownership="full">
6639 <doc xml:whitespace="preserve">xml buffer with serialized objects or %NULL if there are no objects matching given criteria.</doc>
6640 <type name="utf8" c:type="gchar*"/>
6643 <parameter name="mgd" transfer-ownership="none">
6644 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
6645 <type name="Connection" c:type="MidgardConnection*"/>
6647 <parameter name="classname" transfer-ownership="none">
6648 <doc xml:whitespace="preserve">name of #MidgardObjectClass derived one</doc>
6649 <type name="utf8" c:type="gchar*"/>
6651 <parameter name="startdate" transfer-ownership="none">
6652 <doc xml:whitespace="preserve">optional start date</doc>
6653 <type name="utf8" c:type="gchar*"/>
6655 <parameter name="enddate" transfer-ownership="none">
6656 <doc xml:whitespace="preserve">optional end date</doc>
6657 <type name="utf8" c:type="gchar*"/>
6661 <function name="serialize_blob"
6662 c:identifier="midgard_replicator_serialize_blob">
6663 <doc xml:whitespace="preserve">Serialize midgard_blob binary data.</doc>
6664 <return-value transfer-ownership="full">
6665 <doc xml:whitespace="preserve">Newly allocated xml buffer, which holds blob data base64 encoded, or %NULL.</doc>
6666 <type name="utf8" c:type="gchar*"/>
6669 <parameter name="object" transfer-ownership="none">
6670 <doc xml:whitespace="preserve">#MidgardObject of MIDGARD_TYPE_ATTACHMENT type</doc>
6671 <type name="Object" c:type="MidgardObject*"/>
6675 <function name="export_blob"
6676 c:identifier="midgard_replicator_export_blob">
6677 <doc xml:whitespace="preserve">Alias for midgard_replicator_serialize_blob().</doc>
6678 <return-value transfer-ownership="full">
6679 <doc xml:whitespace="preserve">serialized object as xml data</doc>
6680 <type name="utf8" c:type="gchar*"/>
6683 <parameter name="object" transfer-ownership="none">
6684 <doc xml:whitespace="preserve">#MidgardObject of MIDGARD_TYPE_ATTACHMENT type</doc>
6685 <type name="Object" c:type="MidgardObject*"/>
6689 <function name="export_by_guid"
6690 c:identifier="midgard_replicator_export_by_guid">
6691 <doc xml:whitespace="preserve">Marks object's storage record as exported.
6692 Cases to return %FALSE:
6693 <itemizedlist>
6694 <listitem><para>
6695 Given guid is NULL or empty string (MGD_ERR_INVALID_PROPERTY_VALUE)
6696 </para></listitem>
6697 <listitem><para>
6698 Object identified by given guid doesn't exist (MGD_ERR_NOT_EXISTS)
6699 </para></listitem>
6700 <listitem><para>
6701 Object identified by given guid is purged (MGD_ERR_OBJECT_PURGED)
6702 </para></listitem>
6703 <listitem><para>
6704 Internal storage error (MGD_ERR_INTERNAL)
6705 </para></listitem>
6706 </itemizedlist></doc>
6707 <return-value transfer-ownership="none">
6708 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
6709 <type name="boolean" c:type="gboolean"/>
6712 <parameter name="mgd" transfer-ownership="none">
6713 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
6714 <type name="Connection" c:type="MidgardConnection*"/>
6716 <parameter name="guid" transfer-ownership="none">
6717 <doc xml:whitespace="preserve">guid which identifies object to be exported</doc>
6718 <type name="utf8" c:type="gchar*"/>
6722 <function name="export_media"
6723 c:identifier="midgard_replicator_export_media">
6724 <return-value transfer-ownership="full">
6725 <type name="utf8" c:type="gchar*"/>
6728 <parameter name="object" transfer-ownership="none">
6729 <type name="Object" c:type="MidgardObject*"/>
6733 <function name="unserialize"
6734 c:identifier="midgard_replicator_unserialize">
6735 <return-value transfer-ownership="full">
6736 <doc xml:whitespace="preserve">Newly allocated array of GObjects</doc>
6737 <type name="GObject.Object" c:type="GObject**"/>
6740 <parameter name="mgd" transfer-ownership="none">
6741 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
6742 <type name="Connection" c:type="MidgardConnection*"/>
6744 <parameter name="xml" transfer-ownership="none">
6745 <doc xml:whitespace="preserve">xml buffer which holds serialized object</doc>
6746 <type name="utf8" c:type="gchar*"/>
6748 <parameter name="force" transfer-ownership="none">
6749 <doc xml:whitespace="preserve">toggle to force unserialization</doc>
6750 <type name="boolean" c:type="gboolean"/>
6754 <function name="import_object"
6755 c:identifier="midgard_replicator_import_object">
6756 <doc xml:whitespace="preserve">Imports given object to underlying storage
6757 Cases to return %FALSE:
6758 <itemizedlist>
6759 <listitem><para>
6760 Given guid is NULL or empty string (MGD_ERR_INVALID_PROPERTY_VALUE)
6761 </para></listitem>
6762 <listitem><para>
6763 Object is already imported (MGD_ERR_OBJECT_IMPORTED)
6764 </para></listitem>
6765 <listitem><para>
6766 Object identified is deleted (MGD_ERR_OBJECT_DELETED)
6767 </para></listitem>
6768 </itemizedlist>
6769 Set @force toggle if you want to import object even if it's already imported or deleted.</doc>
6770 <return-value transfer-ownership="none">
6771 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
6772 <type name="boolean" c:type="gboolean"/>
6775 <parameter name="object" transfer-ownership="none">
6776 <doc xml:whitespace="preserve">#MidgardDBObject instance</doc>
6777 <type name="DBObject" c:type="MidgardDBObject*"/>
6779 <parameter name="force" transfer-ownership="none">
6780 <doc xml:whitespace="preserve">toggle to force import</doc>
6781 <type name="boolean" c:type="gboolean"/>
6785 <function name="import_from_xml"
6786 c:identifier="midgard_replicator_import_from_xml">
6787 <doc xml:whitespace="preserve">This method tries to import all objects which could be unserialized from gievn xml.
6788 It's not atomic. Check error code returned from midgard_connection_get_error().</doc>
6789 <return-value transfer-ownership="none">
6790 <type name="none" c:type="void"/>
6793 <parameter name="mgd" transfer-ownership="none">
6794 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
6795 <type name="Connection" c:type="MidgardConnection*"/>
6797 <parameter name="xml" transfer-ownership="none">
6798 <doc xml:whitespace="preserve">data buffer which holds serialized object</doc>
6799 <type name="utf8" c:type="gchar*"/>
6801 <parameter name="force" transfer-ownership="none">
6802 <doc xml:whitespace="preserve">toggle to force import</doc>
6803 <type name="boolean" c:type="gboolean"/>
6807 <field name="parent">
6808 <type name="GObject.Object" c:type="GObject"/>
6811 <record name="ReplicatorClass"
6812 c:type="MidgardReplicatorClass"
6813 glib:is-gtype-struct-for="Replicator">
6814 <field name="parent">
6815 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
6817 <field name="serialize">
6818 <callback name="serialize" c:type="serialize">
6819 <return-value transfer-ownership="full">
6820 <type name="utf8" c:type="gchar*"/>
6823 <parameter name="object" transfer-ownership="none">
6824 <type name="GObject.Object" c:type="GObject*"/>
6829 <field name="export">
6830 <callback name="export" c:type="export">
6831 <return-value transfer-ownership="none">
6832 <type name="boolean" c:type="gboolean"/>
6835 <parameter name="object" transfer-ownership="none">
6836 <type name="DBObject" c:type="MidgardDBObject*"/>
6841 <field name="export_purged">
6842 <callback name="export_purged" c:type="export_purged">
6843 <return-value transfer-ownership="full">
6844 <type name="utf8" c:type="gchar*"/>
6847 <parameter name="mgd" transfer-ownership="none">
6848 <type name="Connection" c:type="MidgardConnection*"/>
6850 <parameter name="classname" transfer-ownership="none">
6851 <type name="utf8" c:type="gchar*"/>
6853 <parameter name="startdate" transfer-ownership="none">
6854 <type name="utf8" c:type="gchar*"/>
6856 <parameter name="enddate" transfer-ownership="none">
6857 <type name="utf8" c:type="gchar*"/>
6862 <field name="serialize_blob">
6863 <callback name="serialize_blob" c:type="serialize_blob">
6864 <return-value transfer-ownership="full">
6865 <type name="utf8" c:type="gchar*"/>
6868 <parameter name="object" transfer-ownership="none">
6869 <type name="Object" c:type="MidgardObject*"/>
6874 <field name="export_blob">
6875 <callback name="export_blob" c:type="export_blob">
6876 <return-value transfer-ownership="full">
6877 <type name="utf8" c:type="gchar*"/>
6880 <parameter name="object" transfer-ownership="none">
6881 <type name="Object" c:type="MidgardObject*"/>
6886 <field name="export_by_guid">
6887 <callback name="export_by_guid" c:type="export_by_guid">
6888 <return-value transfer-ownership="none">
6889 <type name="boolean" c:type="gboolean"/>
6892 <parameter name="guid" transfer-ownership="none">
6893 <type name="utf8" c:type="gchar*"/>
6898 <field name="export_media">
6899 <callback name="export_media" c:type="export_media">
6900 <return-value transfer-ownership="full">
6901 <type name="utf8" c:type="gchar*"/>
6904 <parameter name="object" transfer-ownership="none">
6905 <type name="Object" c:type="MidgardObject*"/>
6910 <field name="unserialize">
6911 <callback name="unserialize" c:type="unserialize">
6912 <return-value transfer-ownership="full">
6913 <type name="GObject.Object" c:type="GObject*"/>
6916 <parameter name="mgd" transfer-ownership="none">
6917 <type name="Connection" c:type="MidgardConnection*"/>
6919 <parameter name="xml" transfer-ownership="none">
6920 <type name="utf8" c:type="gchar*"/>
6922 <parameter name="force" transfer-ownership="none">
6923 <type name="boolean" c:type="gboolean"/>
6928 <field name="import_object">
6929 <callback name="import_object" c:type="import_object">
6930 <return-value transfer-ownership="none">
6931 <type name="boolean" c:type="gboolean"/>
6934 <parameter name="object" transfer-ownership="none">
6935 <type name="DBObject" c:type="MidgardDBObject*"/>
6937 <parameter name="force" transfer-ownership="none">
6938 <type name="boolean" c:type="gboolean"/>
6943 <field name="import_from_xml">
6944 <callback name="import_from_xml" c:type="import_from_xml">
6945 <return-value transfer-ownership="none">
6946 <type name="none" c:type="void"/>
6949 <parameter name="mgd" transfer-ownership="none">
6950 <type name="Connection" c:type="MidgardConnection*"/>
6952 <parameter name="xml" transfer-ownership="none">
6953 <type name="utf8" c:type="gchar*"/>
6955 <parameter name="force" transfer-ownership="none">
6956 <type name="boolean" c:type="gboolean"/>
6962 <record name="ReplicatorPrivate" c:type="MidgardReplicatorPrivate">
6964 <constant name="SHARE_DIR" value="/usr/share/midgard2">
6967 <class name="Schema"
6968 c:type="MidgardSchema"
6969 parent="GObject.Object"
6970 glib:type-name="MidgardSchema"
6971 glib:get-type="midgard_schema_get_type"
6972 glib:type-struct="SchemaClass">
6973 <method name="init" c:identifier="midgard_schema_init">
6974 <return-value transfer-ownership="none">
6975 <type name="none" c:type="void"/>
6978 <parameter name="path" transfer-ownership="none">
6979 <type name="utf8" c:type="gchar*"/>
6983 <method name="read_dir" c:identifier="midgard_schema_read_dir">
6984 <return-value transfer-ownership="none">
6985 <type name="boolean" c:type="gboolean"/>
6988 <parameter name="dirname" transfer-ownership="none">
6989 <type name="utf8" c:type="gchar*"/>
6993 <method name="type_exists" c:identifier="midgard_schema_type_exists">
6994 <return-value transfer-ownership="none">
6995 <type name="boolean" c:type="gboolean"/>
6998 <parameter name="classname" transfer-ownership="none">
6999 <type name="utf8" c:type="gchar*"/>
7003 <method name="read_file" c:identifier="midgard_schema_read_file">
7004 <return-value transfer-ownership="none">
7005 <type name="none" c:type="void"/>
7008 <parameter name="filename" transfer-ownership="none">
7009 <type name="utf8" c:type="gchar*"/>
7013 <field name="parent">
7014 <type name="GObject.Object" c:type="GObject"/>
7016 <field name="types">
7017 <type name="GLib.HashTable" c:type="GHashTable*"/>
7020 <record name="SchemaClass"
7021 c:type="MidgardSchemaClass"
7022 glib:is-gtype-struct-for="Schema">
7023 <field name="parent">
7024 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
7027 <class name="SchemaObjectFactory"
7028 c:type="MidgardSchemaObjectFactory"
7029 parent="GObject.Object"
7031 glib:type-name="MidgardSchemaObjectFactory"
7032 glib:get-type="midgard_schema_object_factory_get_type"
7033 glib:type-struct="SchemaObjectFactoryClass">
7034 <function name="get_object_by_guid"
7035 c:identifier="midgard_schema_object_factory_get_object_by_guid"
7037 <doc xml:whitespace="preserve">Creates new instance of the class defined in Midgard Schema.
7038 Cases to return %NULL:
7039 <itemizedlist>
7040 <listitem><para>
7041 Given guid is not a valid guid (MGD_ERR_NOT_EXISTS)
7042 </para></listitem>
7043 <listitem><para>
7044 There's no object identified by given guid (MGD_ERR_NOT_EXISTS)
7045 </para></listitem>
7046 <listitem><para>
7047 Object identified by given guid is deleted (MGD_ERR_OBJECT_DELETED)
7048 </para></listitem>
7049 <listitem><para>
7050 Object identified by given guid is purged (MGD_ERR_OBJECT_PURGED)
7051 </para></listitem>
7052 </itemizedlist></doc>
7053 <return-value transfer-ownership="full">
7054 <doc xml:whitespace="preserve">#MidgardObject derived new instance or %NULL on failure</doc>
7055 <type name="Object" c:type="MidgardObject*"/>
7058 <parameter name="mgd" transfer-ownership="none">
7059 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
7060 <type name="Connection" c:type="MidgardConnection*"/>
7062 <parameter name="guid" transfer-ownership="none">
7063 <doc xml:whitespace="preserve">guid which identifies object to look for</doc>
7064 <type name="utf8" c:type="gchar*"/>
7068 <function name="get_object_by_path"
7069 c:identifier="midgard_schema_object_factory_get_object_by_path"
7071 <doc xml:whitespace="preserve">Get object by path. Path elements are objects' names.
7072 To get top object with empty name use "/" path.
7073 Cases to return %NULL:
7074 <itemizedlist>
7075 <listitem><para>
7076 Object identified by given path doesn't exist (MGD_ERR_NOT_EXISTS)
7077 </para></listitem>
7078 <listitem><para>
7079 Given @classname doesn't support tree functionality (MGD_ERR_NOT_INTERNAL)
7080 </para></listitem>
7081 <listitem><para>
7082 Given @classname doesn't provide 'id' or unique named property (MGD_ERR_NOT_INTERNAL)
7083 </para></listitem>
7084 </itemizedlist></doc>
7085 <return-value transfer-ownership="full">
7086 <doc xml:whitespace="preserve">#MidgardObject derived, new @classname instance or %NULL</doc>
7087 <type name="Object" c:type="MidgardObject*"/>
7090 <parameter name="mgd" transfer-ownership="none">
7091 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
7092 <type name="Connection" c:type="MidgardConnection*"/>
7094 <parameter name="classname" transfer-ownership="none">
7095 <doc xml:whitespace="preserve">name of the class, new instance should be created for</doc>
7096 <type name="utf8" c:type="gchar*"/>
7098 <parameter name="path" transfer-ownership="none">
7099 <doc xml:whitespace="preserve">path which identifies object</doc>
7100 <type name="utf8" c:type="gchar*"/>
7104 <function name="object_undelete"
7105 c:identifier="midgard_schema_object_factory_object_undelete"
7107 <doc xml:whitespace="preserve">Cases to return %FALSE:
7108 <itemizedlist>
7109 <listitem><para>
7110 Object identified by given guid doesn't exist (MGD_ERR_NOT_EXISTS)
7111 </para></listitem>
7112 <listitem><para>
7113 Object identified by given guid is purged (MGD_ERR_OBJECT_PURGED)
7114 </para></listitem>
7115 <listitem><para>
7116 Object identified by given guid is not deleted (MGD_ERR_USER_DATA)
7117 </para></listitem>
7118 <listitem><para>
7119 Either object's or repligard's record couldn't be updated (MGD_ERR_INTERNAL)
7120 </para></listitem>
7121 </itemizedlist></doc>
7122 <return-value transfer-ownership="none">
7123 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
7124 <type name="boolean" c:type="gboolean"/>
7127 <parameter name="mgd" transfer-ownership="none">
7128 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
7129 <type name="Connection" c:type="MidgardConnection*"/>
7131 <parameter name="guid" transfer-ownership="none">
7132 <doc xml:whitespace="preserve">guid which identifies object to undelete</doc>
7133 <type name="utf8" c:type="gchar*"/>
7137 <field name="parent">
7138 <type name="GObject.Object" c:type="GObject"/>
7141 <record name="SchemaObjectFactoryClass"
7142 c:type="MidgardSchemaObjectFactoryClass"
7143 glib:is-gtype-struct-for="SchemaObjectFactory">
7144 <field name="parent">
7145 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
7148 <record name="SchemaObjectFactoryPrivate"
7149 c:type="MidgardSchemaObjectFactoryPrivate">
7151 <class name="SchemaObjectTree"
7152 c:type="MidgardSchemaObjectTree"
7153 parent="GObject.Object"
7155 glib:type-name="MidgardSchemaObjectTree"
7156 glib:get-type="midgard_schema_object_tree_get_type"
7157 glib:type-struct="SchemaObjectTreeClass">
7158 <function name="is_in_tree"
7159 c:identifier="midgard_schema_object_tree_is_in_tree"
7161 <return-value transfer-ownership="none">
7162 <doc xml:whitespace="preserve">%TRUE, if given @object exists under @parent_object in tree. %FALSE otherwise.</doc>
7163 <type name="boolean" c:type="gboolean"/>
7166 <parameter name="object" transfer-ownership="none">
7167 <doc xml:whitespace="preserve">#MidgardObject instance to check existance in tree</doc>
7168 <type name="Object" c:type="MidgardObject*"/>
7170 <parameter name="parent_object" transfer-ownership="none">
7171 <doc xml:whitespace="preserve">parent #MidgardObject instance</doc>
7172 <type name="Object" c:type="MidgardObject*"/>
7176 <function name="get_parent_name"
7177 c:identifier="midgard_schema_object_tree_get_parent_name"
7179 <return-value transfer-ownership="none">
7180 <doc xml:whitespace="preserve">classname which, in tree is a parent one for given @object</doc>
7181 <type name="utf8" c:type="gchar*"/>
7184 <parameter name="object" transfer-ownership="none">
7185 <doc xml:whitespace="preserve">#MidgardObject instance</doc>
7186 <type name="Object" c:type="MidgardObject*"/>
7190 <function name="get_parent_object"
7191 c:identifier="midgard_schema_object_tree_get_parent_object"
7193 <doc xml:whitespace="preserve">Get tree parent object, of the given @object.</doc>
7194 <return-value transfer-ownership="full">
7195 <doc xml:whitespace="preserve">parent object or %NULL</doc>
7196 <type name="Object" c:type="MidgardObject*"/>
7199 <parameter name="object" transfer-ownership="none">
7200 <doc xml:whitespace="preserve">#MidgardObject instance</doc>
7201 <type name="Object" c:type="MidgardObject*"/>
7205 <function name="list_objects"
7206 c:identifier="midgard_schema_object_tree_list_objects"
7208 <doc xml:whitespace="preserve">List tree children objects, of given @object type.</doc>
7209 <return-value transfer-ownership="full">
7210 <doc xml:whitespace="preserve">newly allocated array of #MidgardObject objects</doc>
7211 <type name="Object" c:type="MidgardObject**"/>
7214 <parameter name="object" transfer-ownership="none">
7215 <doc xml:whitespace="preserve">#MidgardObject instance</doc>
7216 <type name="Object" c:type="MidgardObject*"/>
7218 <parameter name="n_objects"
7220 caller-allocates="0"
7221 transfer-ownership="full">
7222 <doc xml:whitespace="preserve">pointer to store number of returned objects</doc>
7223 <type name="uint" c:type="guint*"/>
7227 <function name="list_children_objects"
7228 c:identifier="midgard_schema_object_tree_list_children_objects"
7230 <doc xml:whitespace="preserve">List all @classname objects, if exist and are tree children of given @object.</doc>
7231 <return-value transfer-ownership="full">
7232 <doc xml:whitespace="preserve">array of #MidgardObject objects, or %NULL.</doc>
7233 <type name="Object" c:type="MidgardObject**"/>
7236 <parameter name="object" transfer-ownership="none">
7237 <doc xml:whitespace="preserve">#MidgardObject instance</doc>
7238 <type name="Object" c:type="MidgardObject*"/>
7240 <parameter name="classname" transfer-ownership="none">
7241 <doc xml:whitespace="preserve">name of the tree child class</doc>
7242 <type name="utf8" c:type="gchar*"/>
7244 <parameter name="n_objects"
7246 caller-allocates="0"
7247 transfer-ownership="full">
7248 <doc xml:whitespace="preserve">pointer to store number of returned objects</doc>
7249 <type name="uint" c:type="guint*"/>
7253 <field name="parent">
7254 <type name="GObject.Object" c:type="GObject"/>
7257 <record name="SchemaObjectTreeClass"
7258 c:type="MidgardSchemaObjectTreeClass"
7259 glib:is-gtype-struct-for="SchemaObjectTree">
7260 <field name="parent">
7261 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
7264 <record name="SchemaObjectTreePrivate"
7265 c:type="MidgardSchemaObjectTreePrivate">
7267 <class name="Storage"
7268 c:type="MidgardStorage"
7269 parent="GObject.Object"
7270 glib:type-name="MidgardStorage"
7271 glib:get-type="midgard_storage_get_type"
7272 glib:type-struct="StorageClass">
7273 <function name="create_base_storage"
7274 c:identifier="midgard_storage_create_base_storage"
7276 <doc xml:whitespace="preserve">Creates storage for base Midgard classes.</doc>
7277 <return-value transfer-ownership="none">
7278 <doc xml:whitespace="preserve">%TRUE if tables has been created, %FALSE otherwise.</doc>
7279 <type name="boolean" c:type="gboolean"/>
7282 <parameter name="mgd" transfer-ownership="none">
7283 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
7284 <type name="Connection" c:type="MidgardConnection*"/>
7288 <function name="create"
7289 c:identifier="midgard_storage_create"
7291 <doc xml:whitespace="preserve">Creates underlying storage (e.g. table in database) for class which is identified by given @name.
7292 It may be class which represents any underlying storage type (database table or view, for example).
7293 If underlying storage already exists, this method silently ignore creation
7294 and returns %TRUE. Such case is not considered an error.
7295 This method also creates metadata storage if given class uses such.
7296 Indexes are created if:
7297 <itemizedlist>
7298 <listitem><para>
7299 property is a link type
7300 </para></listitem>
7301 <listitem><para>
7302 property is linked to another property
7303 </para></listitem>
7304 <listitem><para>
7305 property is either parent or up
7306 </para></listitem>
7307 <listitem><para>
7308 property holds guid value
7309 </para></listitem>
7310 </itemizedlist>
7311 Auto increment (and primary key ) field is created if property is defined
7312 as primaryproperty, and it's integer ( or unsigned one ) type</doc>
7313 <return-value transfer-ownership="none">
7314 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
7315 <type name="boolean" c:type="gboolean"/>
7318 <parameter name="mgd" transfer-ownership="none">
7319 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
7320 <type name="Connection" c:type="MidgardConnection*"/>
7322 <parameter name="name" transfer-ownership="none">
7323 <doc xml:whitespace="preserve">name of #MidgardDBObjectClass derived class</doc>
7324 <type name="utf8" c:type="gchar*"/>
7328 <function name="update"
7329 c:identifier="midgard_storage_update"
7331 <doc xml:whitespace="preserve">Update underlying storage.
7332 This method doesn't create storage. It creates new columns if are defined
7333 for class properties and do not exist in storage yet.
7334 See midgard_storage_create() if you need more info about indexes.</doc>
7335 <return-value transfer-ownership="none">
7336 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
7337 <type name="boolean" c:type="gboolean"/>
7340 <parameter name="mgd" transfer-ownership="none">
7341 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
7342 <type name="Connection" c:type="MidgardConnection*"/>
7344 <parameter name="name" transfer-ownership="none">
7345 <doc xml:whitespace="preserve">Name of #MidgardDBObjectClass derived class.</doc>
7346 <type name="utf8" c:type="gchar*"/>
7350 <function name="exists"
7351 c:identifier="midgard_storage_exists"
7353 <doc xml:whitespace="preserve">Checks whether storage for given class exists.</doc>
7354 <return-value transfer-ownership="none">
7355 <doc xml:whitespace="preserve">%TRUE if storage exists, %FALSE otherwise</doc>
7356 <type name="boolean" c:type="gboolean"/>
7359 <parameter name="mgd" transfer-ownership="none">
7360 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
7361 <type name="Connection" c:type="MidgardConnection*"/>
7363 <parameter name="name" transfer-ownership="none">
7364 <doc xml:whitespace="preserve">Name of #MidgardDBObjectClass derived class</doc>
7365 <type name="utf8" c:type="gchar*"/>
7369 <function name="delete"
7370 c:identifier="midgard_storage_delete"
7372 <doc xml:whitespace="preserve">Delete storage for given class.</doc>
7373 <return-value transfer-ownership="none">
7374 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
7375 <type name="boolean" c:type="gboolean"/>
7378 <parameter name="mgd" transfer-ownership="none">
7379 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
7380 <type name="Connection" c:type="MidgardConnection*"/>
7382 <parameter name="name" transfer-ownership="none">
7383 <doc xml:whitespace="preserve">name of #MidgardDBObjectClass derived class.</doc>
7384 <type name="utf8" c:type="gchar*"/>
7389 <record name="StorageClass"
7390 c:type="MidgardStorageClass"
7391 glib:is-gtype-struct-for="Storage">
7393 <record name="Timestamp"
7394 c:type="MidgardTimestamp"
7395 glib:type-name="MidgardTimestamp"
7396 glib:get-type="midgard_timestamp_get_type">
7397 <field name="year" writable="1">
7398 <type name="long" c:type="glong"/>
7400 <field name="month" writable="1">
7401 <type name="int" c:type="gint"/>
7403 <field name="day" writable="1">
7404 <type name="int" c:type="gint"/>
7406 <field name="hour" writable="1">
7407 <type name="int" c:type="gint"/>
7409 <field name="minute" writable="1">
7410 <type name="int" c:type="gint"/>
7412 <field name="second" writable="1">
7413 <type name="int" c:type="gint"/>
7415 <field name="nano" writable="1">
7416 <type name="ulong" c:type="gulong"/>
7418 <field name="offset" writable="1">
7419 <type name="long" c:type="glong"/>
7421 <field name="date_value" writable="1">
7422 <type name="uint64" c:type="guint64"/>
7424 <field name="date_string" writable="1">
7425 <type name="utf8" c:type="gchar*"/>
7427 <constructor name="new" c:identifier="midgard_timestamp_new">
7428 <return-value transfer-ownership="full">
7429 <type name="Timestamp" c:type="MidgardTimestamp*"/>
7432 <constructor name="new_value_from_iso8601"
7433 c:identifier="midgard_timestamp_new_value_from_iso8601">
7434 <return-value transfer-ownership="full">
7435 <type name="Timestamp" c:type="GValue*"/>
7438 <parameter name="iso_date" transfer-ownership="none">
7439 <type name="utf8" c:type="gchar*"/>
7443 <constructor name="new_from_iso8601"
7444 c:identifier="midgard_timestamp_new_from_iso8601">
7445 <return-value transfer-ownership="full">
7446 <type name="Timestamp" c:type="MidgardTimestamp*"/>
7449 <parameter name="iso_date" transfer-ownership="none">
7450 <type name="utf8" c:type="gchar*"/>
7454 <method name="get_string" c:identifier="midgard_timestamp_get_string">
7455 <return-value transfer-ownership="full">
7456 <type name="utf8" c:type="gchar*"/>
7459 <method name="free" c:identifier="midgard_timestamp_free">
7460 <return-value transfer-ownership="none">
7461 <type name="none" c:type="void"/>
7465 <class name="Transaction"
7466 c:type="MidgardTransaction"
7467 parent="GObject.Object"
7468 glib:type-name="MidgardTransaction"
7469 glib:get-type="midgard_transaction_get_type"
7470 glib:type-struct="TransactionClass">
7471 <constructor name="new"
7472 c:identifier="midgard_transaction_new"
7474 <return-value transfer-ownership="full">
7475 <doc xml:whitespace="preserve">New #MidgardTransaction instance or NULL on failure</doc>
7476 <type name="Transaction" c:type="MidgardTransaction*"/>
7479 <parameter name="mgd" transfer-ownership="none">
7480 <type name="Connection" c:type="MidgardConnection*"/>
7484 <virtual-method name="begin" invoker="begin" version="9.09">
7485 <doc xml:whitespace="preserve">Begins new, underlying database provider's transaction.
7486 In case of error, #MidgardConnection error is set to MGD_ERR_INTERNAL.</doc>
7487 <return-value transfer-ownership="none">
7488 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise.</doc>
7489 <type name="boolean" c:type="gboolean"/>
7492 <virtual-method name="commit" invoker="commit" version="9.09">
7493 <doc xml:whitespace="preserve">In case of error, #MidgardConnection error is set to MGD_ERR_INTERNAL.</doc>
7494 <return-value transfer-ownership="none">
7495 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
7496 <type name="boolean" c:type="gboolean"/>
7499 <virtual-method name="rollback" invoker="rollback" version="9.09">
7500 <doc xml:whitespace="preserve">In case of error, #MidgardConnection error is set to MGD_ERR_INTERNAL</doc>
7501 <return-value transfer-ownership="none">
7502 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise.</doc>
7503 <type name="boolean" c:type="gboolean"/>
7506 <virtual-method name="get_status" invoker="get_status" version="9.09">
7507 <doc xml:whitespace="preserve">Returns transaction status. %FALSE means, any transaction operation failed.
7508 No #MidgardConnection error is set in case of error.</doc>
7509 <return-value transfer-ownership="none">
7510 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
7511 <type name="boolean" c:type="gboolean"/>
7514 <virtual-method name="get_name" invoker="get_name" version="9.09">
7515 <return-value transfer-ownership="none">
7516 <doc xml:whitespace="preserve">unique name which identifies given transaction.</doc>
7517 <type name="utf8" c:type="gchar*"/>
7520 <method name="begin"
7521 c:identifier="midgard_transaction_begin"
7523 <doc xml:whitespace="preserve">Begins new, underlying database provider's transaction.
7524 In case of error, #MidgardConnection error is set to MGD_ERR_INTERNAL.</doc>
7525 <return-value transfer-ownership="none">
7526 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise.</doc>
7527 <type name="boolean" c:type="gboolean"/>
7530 <method name="commit"
7531 c:identifier="midgard_transaction_commit"
7533 <doc xml:whitespace="preserve">In case of error, #MidgardConnection error is set to MGD_ERR_INTERNAL.</doc>
7534 <return-value transfer-ownership="none">
7535 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
7536 <type name="boolean" c:type="gboolean"/>
7539 <method name="rollback"
7540 c:identifier="midgard_transaction_rollback"
7542 <doc xml:whitespace="preserve">In case of error, #MidgardConnection error is set to MGD_ERR_INTERNAL</doc>
7543 <return-value transfer-ownership="none">
7544 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise.</doc>
7545 <type name="boolean" c:type="gboolean"/>
7548 <method name="get_status"
7549 c:identifier="midgard_transaction_get_status"
7551 <doc xml:whitespace="preserve">Returns transaction status. %FALSE means, any transaction operation failed.
7552 No #MidgardConnection error is set in case of error.</doc>
7553 <return-value transfer-ownership="none">
7554 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
7555 <type name="boolean" c:type="gboolean"/>
7558 <method name="get_name"
7559 c:identifier="midgard_transaction_get_name"
7561 <return-value transfer-ownership="none">
7562 <doc xml:whitespace="preserve">unique name which identifies given transaction.</doc>
7563 <type name="utf8" c:type="gchar*"/>
7566 <field name="parent">
7567 <type name="GObject.Object" c:type="GObject"/>
7570 <type name="TransactionPrivate" c:type="MidgardTransactionPrivate*"/>
7573 <record name="TransactionClass"
7574 c:type="MidgardTransactionClass"
7575 glib:is-gtype-struct-for="Transaction">
7576 <field name="parent">
7577 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
7579 <field name="begin">
7580 <callback name="begin" c:type="begin">
7581 <return-value transfer-ownership="none">
7582 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise.</doc>
7583 <type name="boolean" c:type="gboolean"/>
7586 <parameter name="self" transfer-ownership="none">
7587 <type name="Transaction" c:type="MidgardTransaction*"/>
7592 <field name="commit">
7593 <callback name="commit" c:type="commit">
7594 <return-value transfer-ownership="none">
7595 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
7596 <type name="boolean" c:type="gboolean"/>
7599 <parameter name="self" transfer-ownership="none">
7600 <type name="Transaction" c:type="MidgardTransaction*"/>
7605 <field name="rollback">
7606 <callback name="rollback" c:type="rollback">
7607 <return-value transfer-ownership="none">
7608 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise.</doc>
7609 <type name="boolean" c:type="gboolean"/>
7612 <parameter name="self" transfer-ownership="none">
7613 <type name="Transaction" c:type="MidgardTransaction*"/>
7618 <field name="get_status">
7619 <callback name="get_status" c:type="get_status">
7620 <return-value transfer-ownership="none">
7621 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
7622 <type name="boolean" c:type="gboolean"/>
7625 <parameter name="self" transfer-ownership="none">
7626 <type name="Transaction" c:type="MidgardTransaction*"/>
7631 <field name="get_name">
7632 <callback name="get_name" c:type="get_name">
7633 <return-value transfer-ownership="none">
7634 <doc xml:whitespace="preserve">unique name which identifies given transaction.</doc>
7635 <type name="utf8" c:type="gchar*"/>
7638 <parameter name="self" transfer-ownership="none">
7639 <type name="Transaction" c:type="MidgardTransaction*"/>
7645 <record name="TransactionPrivate" c:type="MidgardTransactionPrivate">
7647 <enumeration name="TypeAuth" c:type="MidgardTypeAuth">
7648 <member name="normal" value="0" c:identifier="MIDGARD_AUTHTYPE_NORMAL"/>
7649 <member name="pam" value="1" c:identifier="MIDGARD_AUTHTYPE_PAM"/>
7650 <member name="trust" value="2" c:identifier="MIDGARD_AUTHTYPE_TRUST"/>
7652 <record name="TypeHolder" c:type="MidgardTypeHolder">
7653 <field name="elements" writable="1">
7654 <type name="uint" c:type="guint"/>
7656 <field name="level" writable="1">
7657 <type name="uint" c:type="guint"/>
7660 <constant name="USER_PROP_GUID" value="guid">
7663 <constant name="USER_TYPE_ADMIN" value="2">
7666 <constant name="USER_TYPE_NONE" value="0">
7669 <constant name="USER_TYPE_USER" value="1">
7673 c:type="MidgardUser"
7675 glib:type-name="MidgardUser"
7676 glib:get-type="midgard_user_get_type"
7677 glib:type-struct="UserClass">
7678 <constructor name="new" c:identifier="midgard_user_new">
7679 <doc xml:whitespace="preserve">in constructor if @parameters argument will be set to not %NULL value.</doc>
7680 <return-value transfer-ownership="full">
7681 <doc xml:whitespace="preserve">#MidgardUser object or %NULL on failure</doc>
7682 <type name="User" c:type="MidgardUser*"/>
7685 <parameter name="mgd" transfer-ownership="none">
7686 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
7687 <type name="Connection" c:type="MidgardConnection*"/>
7689 <parameter name="n_params" transfer-ownership="none">
7690 <doc xml:whitespace="preserve">number of parameters</doc>
7691 <type name="uint" c:type="guint"/>
7693 <parameter name="parameters" transfer-ownership="none">
7694 <doc xml:whitespace="preserve">#GParameter with #MidgardUser properties</doc>
7695 <type name="GObject.Parameter" c:type="GParameter*"/>
7699 <function name="get" c:identifier="midgard_user_get">
7700 <doc xml:whitespace="preserve">Fetch #MidgardUser object from storage.
7701 At least 'login' and 'authtype' property are required to be set in parameters.
7702 Cases to return %NULL:
7703 <itemizedlist>
7704 <listitem><para>
7705 'login' or 'authtype' properties do not exist in given parameters (MGD_ERR_INVALID_PROPERTY_VALUE)
7706 </para></listitem>
7707 <listitem><para>
7708 There's no user object which match given parameters (MGD_ERR_NOT_EXISTS)
7709 </para></listitem>
7710 <listitem><para>
7711 More than one record found in database (MGD_ERR_INTERNAL)
7712 </para></listitem>
7713 </itemizedlist>
7715 <return-value transfer-ownership="full">
7716 <doc xml:whitespace="preserve">new #MidgardUser instance or %NULL in case of failure</doc>
7717 <type name="User" c:type="MidgardUser*"/>
7720 <parameter name="mgd" transfer-ownership="none">
7721 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
7722 <type name="Connection" c:type="MidgardConnection*"/>
7724 <parameter name="n_params" transfer-ownership="none">
7725 <doc xml:whitespace="preserve">number of parameters</doc>
7726 <type name="uint" c:type="guint"/>
7728 <parameter name="parameters" transfer-ownership="none">
7729 <doc xml:whitespace="preserve">#GParameter with #MidgardUser properties</doc>
7730 <type name="GObject.Parameter" c:type="GParameter*"/>
7734 <function name="quick_login" c:identifier="midgard_user_quick_login">
7735 <return-value transfer-ownership="full">
7736 <type name="User" c:type="MidgardUser*"/>
7739 <parameter name="mgd" transfer-ownership="none">
7740 <type name="Connection" c:type="MidgardConnection*"/>
7742 <parameter name="login" transfer-ownership="none">
7743 <type name="utf8" c:type="gchar*"/>
7745 <parameter name="password" transfer-ownership="none">
7746 <type name="utf8" c:type="gchar*"/>
7750 <function name="query" c:identifier="midgard_user_query">
7751 <return-value transfer-ownership="full">
7752 <type name="User" c:type="MidgardUser**"/>
7755 <parameter name="mgd" transfer-ownership="none">
7756 <type name="Connection" c:type="MidgardConnection*"/>
7758 <parameter name="n_params" transfer-ownership="none">
7759 <type name="uint" c:type="guint"/>
7761 <parameter name="parameters" transfer-ownership="none">
7762 <type name="GObject.Parameter" c:type="GParameter*"/>
7766 <virtual-method name="get_person" invoker="get_person">
7767 <doc xml:whitespace="preserve">Returned object should not be unref.</doc>
7768 <return-value transfer-ownership="full">
7769 <doc xml:whitespace="preserve">#MidgardObject of "midgard_person" type, of %NULL if none associated.</doc>
7770 <type name="Object" c:type="MidgardObject*"/>
7773 <virtual-method name="log_in" invoker="log_in">
7774 <return-value transfer-ownership="none">
7775 <type name="boolean" c:type="gboolean"/>
7778 <virtual-method name="log_out" invoker="log_out" version="9.09">
7779 <doc xml:whitespace="preserve">Cases to return %FALSE:
7780 <itemizedlist>
7781 <listitem><para>
7782 There's no user logged in (MGD_ERR_INTERNAL)
7783 </para></listitem>
7784 <listitem><para>
7785 User is not recently logged in (MGD_ERR_INTERNAL)
7786 </para></listitem>
7787 </itemizedlist></doc>
7788 <return-value transfer-ownership="none">
7789 <doc xml:whitespace="preserve">%TRUE if user successfully logs out, %FALSE otherwise</doc>
7790 <type name="boolean" c:type="gboolean"/>
7793 <virtual-method name="create" invoker="create">
7794 <return-value transfer-ownership="none">
7795 <type name="boolean" c:type="gboolean"/>
7798 <virtual-method name="update" invoker="update" version="9.09">
7799 <doc xml:whitespace="preserve">Updates user storage record
7800 Cases to return %FALSE:
7801 <itemizedlist>
7802 <listitem><para>
7803 User with such login and authentication type already exists ( MGD_ERR_DUPLICATE )
7804 </para></listitem>
7805 <listitem><para>
7806 User's guid is not set ( MGD_ERR_INVALID_PROPERTY_VALUE )
7807 </para></listitem>
7808 <listitem><para>
7809 'authtype' property is empty or NULL ( MGD_ERR_INVALID_PROPERTY_VALUE )
7810 </para></listitem>
7811 <listitem><para>
7812 User record hasn't been found ( MGD_ERR_INTERNAL )
7813 </para></listitem>
7814 <listitem><para>
7815 Failed to update storage record ( MGD_ERR_INTERNAL )
7816 </para></listitem>
7817 <listitem><para>
7818 'authtype' property value is invalid ( MGD_ERR_INTERNAL )
7819 </para></listitem>
7820 </itemizedlist></doc>
7821 <return-value transfer-ownership="none">
7822 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
7823 <type name="boolean" c:type="gboolean"/>
7826 <virtual-method name="delete_record">
7827 <return-value transfer-ownership="none">
7828 <type name="boolean" c:type="gboolean"/>
7831 <virtual-method name="is_user" invoker="is_user">
7832 <doc xml:whitespace="preserve">Checks if given user is a user.
7833 For example, function will return FALSE for user who is logged in as admin or root.</doc>
7834 <return-value transfer-ownership="none">
7835 <doc xml:whitespace="preserve">%TRUE if user is a user, %FALSE otherwise</doc>
7836 <type name="boolean" c:type="gboolean"/>
7839 <virtual-method name="is_admin" invoker="is_admin">
7840 <doc xml:whitespace="preserve">Checks if given user is an admin.</doc>
7841 <return-value transfer-ownership="none">
7842 <doc xml:whitespace="preserve">%TRUE if user is an admin, %FALSE otherwise</doc>
7843 <type name="boolean" c:type="gboolean"/>
7846 <method name="create" c:identifier="midgard_user_create">
7847 <return-value transfer-ownership="none">
7848 <type name="boolean" c:type="gboolean"/>
7851 <method name="update" c:identifier="midgard_user_update" version="9.09">
7852 <doc xml:whitespace="preserve">Updates user storage record
7853 Cases to return %FALSE:
7854 <itemizedlist>
7855 <listitem><para>
7856 User with such login and authentication type already exists ( MGD_ERR_DUPLICATE )
7857 </para></listitem>
7858 <listitem><para>
7859 User's guid is not set ( MGD_ERR_INVALID_PROPERTY_VALUE )
7860 </para></listitem>
7861 <listitem><para>
7862 'authtype' property is empty or NULL ( MGD_ERR_INVALID_PROPERTY_VALUE )
7863 </para></listitem>
7864 <listitem><para>
7865 User record hasn't been found ( MGD_ERR_INTERNAL )
7866 </para></listitem>
7867 <listitem><para>
7868 Failed to update storage record ( MGD_ERR_INTERNAL )
7869 </para></listitem>
7870 <listitem><para>
7871 'authtype' property value is invalid ( MGD_ERR_INTERNAL )
7872 </para></listitem>
7873 </itemizedlist></doc>
7874 <return-value transfer-ownership="none">
7875 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
7876 <type name="boolean" c:type="gboolean"/>
7879 <method name="delete"
7880 c:identifier="midgard_user_delete"
7882 <doc xml:whitespace="preserve">Delete user's storage record.
7883 Cases to return %FALSE:
7884 <itemizedlist>
7885 <listitem><para>
7886 User's guid is not set ( MGD_ERR_INVALID_PROPERTY_VALUE )
7887 </para></listitem>
7888 <listitem><para>
7889 Failed to delete storage record ( MGD_ERR_INTERNAL )
7890 </para></listitem>
7891 </itemizedlist></doc>
7892 <return-value transfer-ownership="none">
7893 <doc xml:whitespace="preserve">@TRUE on success, @FALSE otherwise</doc>
7894 <type name="boolean" c:type="gboolean"/>
7897 <method name="is_user" c:identifier="midgard_user_is_user">
7898 <doc xml:whitespace="preserve">Checks if given user is a user.
7899 For example, function will return FALSE for user who is logged in as admin or root.</doc>
7900 <return-value transfer-ownership="none">
7901 <doc xml:whitespace="preserve">%TRUE if user is a user, %FALSE otherwise</doc>
7902 <type name="boolean" c:type="gboolean"/>
7905 <method name="is_admin" c:identifier="midgard_user_is_admin">
7906 <doc xml:whitespace="preserve">Checks if given user is an admin.</doc>
7907 <return-value transfer-ownership="none">
7908 <doc xml:whitespace="preserve">%TRUE if user is an admin, %FALSE otherwise</doc>
7909 <type name="boolean" c:type="gboolean"/>
7912 <method name="get_person" c:identifier="midgard_user_get_person">
7913 <doc xml:whitespace="preserve">Returned object should not be unref.</doc>
7914 <return-value transfer-ownership="full">
7915 <doc xml:whitespace="preserve">#MidgardObject of "midgard_person" type, of %NULL if none associated.</doc>
7916 <type name="Object" c:type="MidgardObject*"/>
7919 <method name="set_person" c:identifier="midgard_user_set_person">
7920 <doc xml:whitespace="preserve">Associates given #MidgardObject person with @self #MidgardUser.
7921 Sets person property and updates user storage record.
7922 #MidgardUser @self takes ownership of the given #MidgardPerson reference,
7923 which should be not unref any more.
7924 See midgard_user_update() for returned error details.</doc>
7925 <return-value transfer-ownership="none">
7926 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
7927 <type name="boolean" c:type="gboolean"/>
7930 <parameter name="person" transfer-ownership="none">
7931 <doc xml:whitespace="preserve">#MidgardObject instance</doc>
7932 <type name="Object" c:type="MidgardObject*"/>
7936 <method name="log_in" c:identifier="midgard_user_log_in">
7937 <return-value transfer-ownership="none">
7938 <type name="boolean" c:type="gboolean"/>
7941 <method name="log_out"
7942 c:identifier="midgard_user_log_out"
7944 <doc xml:whitespace="preserve">Cases to return %FALSE:
7945 <itemizedlist>
7946 <listitem><para>
7947 There's no user logged in (MGD_ERR_INTERNAL)
7948 </para></listitem>
7949 <listitem><para>
7950 User is not recently logged in (MGD_ERR_INTERNAL)
7951 </para></listitem>
7952 </itemizedlist></doc>
7953 <return-value transfer-ownership="none">
7954 <doc xml:whitespace="preserve">%TRUE if user successfully logs out, %FALSE otherwise</doc>
7955 <type name="boolean" c:type="gboolean"/>
7958 <method name="set_active" c:identifier="midgard_user_set_active">
7959 <return-value transfer-ownership="none">
7960 <type name="boolean" c:type="gboolean"/>
7963 <parameter name="flag" transfer-ownership="none">
7964 <type name="boolean" c:type="gboolean"/>
7968 <property name="active" writable="1" transfer-ownership="none">
7969 <type name="boolean" c:type="gboolean"/>
7971 <property name="authtype" writable="1" transfer-ownership="none">
7972 <type name="utf8" c:type="gchararray"/>
7974 <property name="authtypeid" transfer-ownership="none">
7975 <type name="uint" c:type="guint"/>
7977 <property name="guid" transfer-ownership="none">
7978 <type name="utf8" c:type="gchararray"/>
7980 <property name="login" writable="1" transfer-ownership="none">
7981 <type name="utf8" c:type="gchararray"/>
7983 <property name="password" writable="1" transfer-ownership="none">
7984 <type name="utf8" c:type="gchararray"/>
7986 <property name="person" transfer-ownership="none">
7987 <type name="utf8" c:type="gchararray"/>
7989 <property name="usertype" writable="1" transfer-ownership="none">
7990 <type name="uint" c:type="guint"/>
7992 <field name="parent">
7993 <type name="DBObject" c:type="MidgardDBObject"/>
7996 <type name="UserPrivate" c:type="MidgardUserPrivate*"/>
7999 <record name="UserClass"
8000 c:type="MidgardUserClass"
8001 glib:is-gtype-struct-for="User">
8002 <field name="parent">
8003 <type name="DBObjectClass" c:type="MidgardDBObjectClass"/>
8005 <field name="get_connection">
8006 <callback name="get_connection" c:type="get_connection">
8007 <return-value transfer-ownership="none">
8008 <type name="Connection" c:type="MidgardConnection*"/>
8011 <parameter transfer-ownership="none">
8012 <type name="DBObject" c:type="MidgardDBObject*"/>
8017 <field name="get_person">
8018 <callback name="get_person" c:type="get_person">
8019 <return-value transfer-ownership="full">
8020 <doc xml:whitespace="preserve">#MidgardObject of "midgard_person" type, of %NULL if none associated.</doc>
8021 <type name="Object" c:type="MidgardObject*"/>
8024 <parameter name="self" transfer-ownership="none">
8025 <type name="User" c:type="MidgardUser*"/>
8030 <field name="log_in">
8031 <callback name="log_in" c:type="log_in">
8032 <return-value transfer-ownership="none">
8033 <type name="boolean" c:type="gboolean"/>
8036 <parameter name="self" transfer-ownership="none">
8037 <type name="User" c:type="MidgardUser*"/>
8042 <field name="log_out">
8043 <callback name="log_out" c:type="log_out">
8044 <return-value transfer-ownership="none">
8045 <doc xml:whitespace="preserve">%TRUE if user successfully logs out, %FALSE otherwise</doc>
8046 <type name="boolean" c:type="gboolean"/>
8049 <parameter name="self" transfer-ownership="none">
8050 <type name="User" c:type="MidgardUser*"/>
8056 <callback name="get" c:type="get">
8057 <return-value transfer-ownership="full">
8058 <type name="User" c:type="MidgardUser*"/>
8061 <parameter name="mgd" transfer-ownership="none">
8062 <type name="Connection" c:type="MidgardConnection*"/>
8064 <parameter name="n_params" transfer-ownership="none">
8065 <type name="uint" c:type="guint"/>
8067 <parameter name="parameters" transfer-ownership="none">
8068 <type name="GObject.Parameter" c:type="GParameter*"/>
8073 <field name="query">
8074 <callback name="query" c:type="query">
8075 <return-value transfer-ownership="full">
8076 <type name="User" c:type="MidgardUser**"/>
8079 <parameter name="mgd" transfer-ownership="none">
8080 <type name="Connection" c:type="MidgardConnection*"/>
8082 <parameter name="n_params" transfer-ownership="none">
8083 <type name="uint" c:type="guint"/>
8085 <parameter name="parameters" transfer-ownership="none">
8086 <type name="GObject.Parameter" c:type="GParameter*"/>
8091 <field name="create">
8092 <callback name="create" c:type="create">
8093 <return-value transfer-ownership="none">
8094 <type name="boolean" c:type="gboolean"/>
8097 <parameter name="self" transfer-ownership="none">
8098 <type name="User" c:type="MidgardUser*"/>
8103 <field name="update">
8104 <callback name="update" c:type="update">
8105 <return-value transfer-ownership="none">
8106 <doc xml:whitespace="preserve">%TRUE on success, %FALSE otherwise</doc>
8107 <type name="boolean" c:type="gboolean"/>
8110 <parameter name="self" transfer-ownership="none">
8111 <type name="User" c:type="MidgardUser*"/>
8116 <field name="delete_record">
8117 <callback name="delete_record" c:type="delete_record">
8118 <return-value transfer-ownership="none">
8119 <type name="boolean" c:type="gboolean"/>
8122 <parameter name="self" transfer-ownership="none">
8123 <type name="User" c:type="MidgardUser*"/>
8128 <field name="is_user">
8129 <callback name="is_user" c:type="is_user">
8130 <return-value transfer-ownership="none">
8131 <doc xml:whitespace="preserve">%TRUE if user is a user, %FALSE otherwise</doc>
8132 <type name="boolean" c:type="gboolean"/>
8135 <parameter name="self" transfer-ownership="none">
8136 <type name="User" c:type="MidgardUser*"/>
8141 <field name="is_admin">
8142 <callback name="is_admin" c:type="is_admin">
8143 <return-value transfer-ownership="none">
8144 <doc xml:whitespace="preserve">%TRUE if user is an admin, %FALSE otherwise</doc>
8145 <type name="boolean" c:type="gboolean"/>
8148 <parameter name="self" transfer-ownership="none">
8149 <type name="User" c:type="MidgardUser*"/>
8155 <record name="UserPrivate" c:type="MidgardUserPrivate">
8158 c:type="MidgardView"
8161 glib:type-name="MidgardView"
8162 glib:get-type="midgard_view_get_type"
8163 glib:type-struct="ViewClass">
8164 <field name="parent">
8165 <type name="GObject.Object" c:type="GObject"/>
8167 <field name="dbpriv">
8168 <type name="DBObjectPrivate" c:type="MidgardDBObjectPrivate*"/>
8171 <record name="ViewClass"
8172 c:type="MidgardViewClass"
8173 glib:is-gtype-struct-for="View">
8174 <field name="parent">
8175 <type name="GObject.ObjectClass" c:type="GObjectClass"/>
8177 <field name="dbpriv">
8178 <type name="DBObjectPrivate" c:type="MidgardDBObjectPrivate*"/>
8180 <field name="get_connection">
8181 <callback name="get_connection" c:type="get_connection">
8182 <return-value transfer-ownership="none">
8183 <type name="Connection" c:type="MidgardConnection*"/>
8186 <parameter name="object" transfer-ownership="none">
8187 <type name="DBObject" c:type="MidgardDBObject*"/>
8193 <function name="close" c:identifier="midgard_close">
8194 <return-value transfer-ownership="none">
8195 <type name="none" c:type="void"/>
8198 <function name="core_timestamp_set_current_time"
8199 c:identifier="midgard_core_timestamp_set_current_time">
8200 <return-value transfer-ownership="none">
8201 <type name="none" c:type="void"/>
8204 <parameter name="tm" transfer-ownership="none">
8205 <type name="Timestamp" c:type="MidgardTimestamp*"/>
8210 c:type="midgard_dbus"
8211 parent="GObject.Object"
8212 glib:type-name="midgard_dbus"
8213 glib:get-type="midgard_dbus_get_type">
8214 <constructor name="new" c:identifier="midgard_dbus_new">
8215 <return-value transfer-ownership="full">
8216 <doc xml:whitespace="preserve">new #MidgardDBus instance, %NULL otherwise</doc>
8217 <type name="dbus" c:type="MidgardDbus*"/>
8220 <parameter name="mgd" transfer-ownership="none">
8221 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
8222 <type name="Connection" c:type="MidgardConnection*"/>
8224 <parameter name="path" transfer-ownership="none">
8225 <doc xml:whitespace="preserve">a path at which D-Bus object exists</doc>
8226 <type name="utf8" c:type="gchar*"/>
8228 <parameter name="use_session" transfer-ownership="none">
8229 <doc xml:whitespace="preserve">whether to use session bus</doc>
8230 <type name="boolean" c:type="gboolean"/>
8234 <function name="send" c:identifier="midgard_dbus_send">
8235 <doc xml:whitespace="preserve">Emits 'Notified' signal on objects at given @path and sends given message.</doc>
8236 <return-value transfer-ownership="none">
8237 <type name="none" c:type="void"/>
8240 <parameter name="mgd" transfer-ownership="none">
8241 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
8242 <type name="Connection" c:type="MidgardConnection*"/>
8244 <parameter name="path" transfer-ownership="none">
8245 <doc xml:whitespace="preserve">dbus path at which we expect recipients</doc>
8246 <type name="utf8" c:type="gchar*"/>
8248 <parameter name="message" transfer-ownership="none">
8249 <doc xml:whitespace="preserve">a message to be sent</doc>
8250 <type name="utf8" c:type="gchar*"/>
8252 <parameter name="use_session" transfer-ownership="none">
8253 <doc xml:whitespace="preserve">whether to use system or session bus</doc>
8254 <type name="boolean" c:type="gboolean"/>
8258 <function name="get_name" c:identifier="midgard_dbus_get_name">
8259 <return-value transfer-ownership="none">
8260 <type name="utf8" c:type="gchar*"/>
8263 <method name="get_message" c:identifier="midgard_dbus_get_message">
8264 <doc xml:whitespace="preserve">Get message associated with givven instance.</doc>
8265 <return-value transfer-ownership="none">
8266 <doc xml:whitespace="preserve">pointer to object's message or %NULL</doc>
8267 <type name="utf8" c:type="gchar*"/>
8270 <glib:signal name="notified">
8271 <return-value transfer-ownership="full">
8272 <type name="none" c:type="void"/>
8275 <parameter name="object" transfer-ownership="none">
8276 <type name="utf8" c:type="gchararray"/>
8281 <function name="dbus_glib_marshal_midgard_dbus_BOOLEAN__STRING_POINTER"
8282 c:identifier="dbus_glib_marshal_midgard_dbus_BOOLEAN__STRING_POINTER">
8283 <return-value transfer-ownership="none">
8284 <type name="none" c:type="void"/>
8287 <parameter name="closure" transfer-ownership="none">
8288 <type name="GObject.Closure" c:type="GClosure*"/>
8290 <parameter name="return_value" transfer-ownership="none">
8291 <type name="GObject.Value" c:type="GValue*"/>
8293 <parameter name="n_param_values" transfer-ownership="none">
8294 <type name="uint" c:type="guint"/>
8296 <parameter name="param_values" transfer-ownership="none">
8297 <type name="GObject.Value" c:type="GValue*"/>
8299 <parameter name="invocation_hint" transfer-ownership="none">
8300 <type name="any" c:type="gpointer"/>
8302 <parameter name="marshal_data" transfer-ownership="none">
8303 <type name="any" c:type="gpointer"/>
8307 <function name="error_default_log"
8308 c:identifier="midgard_error_default_log">
8309 <doc xml:whitespace="preserve">structure. This function checks pointer type using MIDGARD_IS_CONNECTION
8310 convention macro. Next midgard_connection_get_loglevel is called to get loglevel.
8311 If MidgardConnection check fails , a typecast to MidgardTypeHolder is made.
8312 In this case, level member is used to get loglevel.
8313 You are responsible to correctly set MidgardConnection or MidgardTypeHolder
8314 before passing ptr argument. The main approach is to follow configuration's
8315 loglevel even if MidgardConnection pointer is not yet available.</doc>
8316 <return-value transfer-ownership="none">
8317 <type name="none" c:type="void"/>
8320 <parameter name="domain" transfer-ownership="none">
8321 <doc xml:whitespace="preserve">domain for the given log message</doc>
8322 <type name="utf8" c:type="gchar*"/>
8324 <parameter name="level" transfer-ownership="none">
8325 <doc xml:whitespace="preserve">GLogLevelFlags</doc>
8326 <type name="GLib.LogLevelFlags" c:type="GLogLevelFlags"/>
8328 <parameter name="msg" transfer-ownership="none">
8329 <doc xml:whitespace="preserve">log message</doc>
8330 <type name="utf8" c:type="gchar*"/>
8332 <parameter name="ptr" transfer-ownership="none">
8333 <doc xml:whitespace="preserve">pointer to structure which holds loglevel</doc>
8334 <type name="any" c:type="gpointer"/>
8338 <function name="error_generic" c:identifier="midgard_error_generic">
8339 <doc xml:whitespace="preserve">GQuark for Midgard Error. It's used by Midgard Error implementation, and
8340 probably not needed to use by any application.</doc>
8341 <return-value transfer-ownership="full">
8342 <doc xml:whitespace="preserve">MGD_GENERIC_ERROR GQuark</doc>
8343 <type name="GLib.Quark" c:type="GQuark"/>
8346 <function name="error_parse_loglevel"
8347 c:identifier="midgard_error_parse_loglevel">
8348 <doc xml:whitespace="preserve">This function returns level registered in GLib.</doc>
8349 <return-value transfer-ownership="none">
8350 <doc xml:whitespace="preserve">#GLogLevelFlags or -1 on failure</doc>
8351 <type name="int" c:type="gint"/>
8354 <parameter name="levelstring" transfer-ownership="none">
8355 <doc xml:whitespace="preserve">string which should be parsed</doc>
8356 <type name="utf8" c:type="gchar*"/>
8360 <function name="error_string" c:identifier="midgard_error_string">
8361 <doc xml:whitespace="preserve">Get error message for the given error code.</doc>
8362 <return-value transfer-ownership="none">
8363 <doc xml:whitespace="preserve">error messages which is owned by midgard-core and should not be freed.</doc>
8364 <type name="utf8" c:type="gchar*"/>
8367 <parameter name="domain" transfer-ownership="none">
8368 <doc xml:whitespace="preserve">GQuark which represents MidgardError domain.</doc>
8369 <type name="GLib.Quark" c:type="GQuark"/>
8371 <parameter name="errcode" transfer-ownership="none">
8372 <doc xml:whitespace="preserve">MidgardErrorGeneric enum value.</doc>
8373 <type name="int" c:type="gint"/>
8377 <function name="guid_external" c:identifier="midgard_guid_external">
8378 <return-value transfer-ownership="full">
8379 <type name="utf8" c:type="gchar*"/>
8382 <parameter name="mgd" transfer-ownership="none">
8383 <type name="Connection" c:type="MidgardConnection*"/>
8385 <parameter name="external" transfer-ownership="none">
8386 <type name="utf8" c:type="gchar*"/>
8390 <function name="guid_new" c:identifier="midgard_guid_new">
8391 <return-value transfer-ownership="full">
8392 <type name="utf8" c:type="gchar*"/>
8395 <parameter name="mgd" transfer-ownership="none">
8396 <type name="Connection" c:type="MidgardConnection*"/>
8400 <function name="hash_strings_new" c:identifier="midgard_hash_strings_new">
8401 <return-value transfer-ownership="full">
8402 <type name="GLib.HashTable" c:type="GHashTable*"/>
8405 <function name="init" c:identifier="midgard_init">
8406 <return-value transfer-ownership="none">
8407 <type name="none" c:type="void"/>
8410 <function name="is_guid" c:identifier="midgard_is_guid">
8411 <return-value transfer-ownership="none">
8412 <type name="boolean" c:type="gboolean"/>
8415 <parameter name="guid" transfer-ownership="none">
8416 <type name="utf8" c:type="gchar*"/>
8420 <function name="is_uuid" c:identifier="midgard_is_uuid">
8421 <return-value transfer-ownership="none">
8422 <type name="boolean" c:type="gboolean"/>
8425 <parameter name="uuid" transfer-ownership="none">
8426 <type name="utf8" c:type="gchar*"/>
8430 <function name="mgd_create_guid" c:identifier="mgd_create_guid">
8431 <return-value transfer-ownership="full">
8432 <type name="utf8" c:type="gchar*"/>
8435 <parameter name="mgd" transfer-ownership="none">
8436 <type name="Connection" c:type="MidgardConnection*"/>
8438 <parameter name="table" transfer-ownership="none">
8439 <type name="utf8" c:type="gchar*"/>
8441 <parameter name="id" transfer-ownership="none">
8442 <type name="uint" c:type="guint"/>
8446 <function name="mgd_info" c:identifier="mgd_info" introspectable="0">
8447 <return-value transfer-ownership="none">
8448 <type name="none" c:type="void"/>
8451 <parameter name="format" transfer-ownership="none">
8452 <type name="utf8" c:type="gchar*"/>
8454 <parameter transfer-ownership="none">
8460 <function name="quota_create" c:identifier="midgard_quota_create">
8461 <return-value transfer-ownership="none">
8462 <type name="boolean" c:type="gboolean"/>
8465 <parameter name="object" transfer-ownership="none">
8466 <type name="Object" c:type="MidgardObject*"/>
8470 <function name="quota_get_object_size"
8471 c:identifier="midgard_quota_get_object_size">
8472 <return-value transfer-ownership="none">
8473 <type name="uint" c:type="guint"/>
8476 <parameter name="object" transfer-ownership="none">
8477 <type name="Object" c:type="MidgardObject*"/>
8481 <function name="quota_get_type_size"
8482 c:identifier="midgard_quota_get_type_size">
8483 <return-value transfer-ownership="none">
8484 <type name="uint" c:type="guint"/>
8487 <parameter name="mgd" transfer-ownership="none">
8488 <type name="Connection" c:type="MidgardConnection*"/>
8490 <parameter name="typename" transfer-ownership="none">
8491 <type name="utf8" c:type="gchar*"/>
8495 <function name="quota_remove" c:identifier="midgard_quota_remove">
8496 <return-value transfer-ownership="none">
8497 <type name="none" c:type="void"/>
8500 <parameter name="object" transfer-ownership="none">
8501 <type name="Object" c:type="MidgardObject*"/>
8503 <parameter name="size" transfer-ownership="none">
8504 <type name="uint" c:type="guint"/>
8508 <function name="quota_set_type_size"
8509 c:identifier="midgard_quota_set_type_size">
8510 <return-value transfer-ownership="none">
8511 <type name="none" c:type="void"/>
8514 <parameter name="mgd" transfer-ownership="none">
8515 <type name="Connection" c:type="MidgardConnection*"/>
8517 <parameter name="typename" transfer-ownership="none">
8518 <type name="utf8" c:type="gchar*"/>
8520 <parameter name="size" transfer-ownership="none">
8521 <type name="uint" c:type="guint"/>
8523 <parameter name="records" transfer-ownership="none">
8524 <type name="uint" c:type="guint"/>
8528 <function name="quota_size_is_reached"
8529 c:identifier="midgard_quota_size_is_reached">
8530 <return-value transfer-ownership="none">
8531 <type name="boolean" c:type="gboolean"/>
8534 <parameter name="object" transfer-ownership="none">
8535 <type name="Object" c:type="MidgardObject*"/>
8537 <parameter name="size" transfer-ownership="none">
8538 <type name="int" c:type="gint"/>
8542 <function name="quota_update" c:identifier="midgard_quota_update">
8543 <return-value transfer-ownership="none">
8544 <type name="boolean" c:type="gboolean"/>
8547 <parameter name="object" transfer-ownership="none">
8548 <type name="Object" c:type="MidgardObject*"/>
8550 <parameter name="init_size" transfer-ownership="none">
8551 <type name="uint" c:type="guint"/>
8555 <class name="reflection_property"
8556 c:type="midgard_reflection_property"
8557 parent="GObject.Object"
8558 glib:type-name="midgard_reflection_property"
8559 glib:get-type="midgard_reflection_property_get_type">
8560 <constructor name="new" c:identifier="midgard_reflection_property_new">
8561 <doc xml:whitespace="preserve">Deprecated:10.05</doc>
8562 <return-value transfer-ownership="full">
8563 <doc xml:whitespace="preserve">newly initialized #MidgardReflectionProperty instance or %NULL on failure.</doc>
8564 <type name="reflection_property"
8565 c:type="MidgardReflectionProperty*"/>
8568 <parameter name="klass" transfer-ownership="none">
8569 <doc xml:whitespace="preserve">#MidgardDBObjectClass pointer</doc>
8570 <type name="DBObjectClass" c:type="MidgardDBObjectClass*"/>
8574 <method name="get_midgard_type"
8575 c:identifier="midgard_reflection_property_get_midgard_type">
8576 <doc xml:whitespace="preserve">Deprecated:10.05</doc>
8577 <return-value transfer-ownership="none">
8578 <doc xml:whitespace="preserve">type (#GType) of the property or %NULL if property is not registered for given class.</doc>
8579 <type name="GType" c:type="GType"/>
8582 <parameter name="propname" transfer-ownership="none">
8583 <doc xml:whitespace="preserve">property name which is registered for #MidgardDBObjectClass</doc>
8584 <type name="utf8" c:type="gchar*"/>
8588 <method name="is_link"
8589 c:identifier="midgard_reflection_property_is_link">
8590 <doc xml:whitespace="preserve">Checks whether property is a link.
8591 Deprecated:10.05</doc>
8592 <return-value transfer-ownership="none">
8593 <doc xml:whitespace="preserve">%TRUE if property is registered as link, %FALSE otherwise (or in case if property is not registered for given class.</doc>
8594 <type name="boolean" c:type="gboolean"/>
8597 <parameter name="propname" transfer-ownership="none">
8598 <doc xml:whitespace="preserve">property name</doc>
8599 <type name="utf8" c:type="gchar*"/>
8603 <method name="is_linked"
8604 c:identifier="midgard_reflection_property_is_linked">
8605 <doc xml:whitespace="preserve">Checks if property is linked with another type.
8606 %FALSE is returned if property is not linked or is not registered for given class.
8607 Deprecated:10.05</doc>
8608 <return-value transfer-ownership="none">
8609 <doc xml:whitespace="preserve">%TRUE if property is linked with another type (property of another class is defined as a link to given one).</doc>
8610 <type name="boolean" c:type="gboolean"/>
8613 <parameter name="propname" transfer-ownership="none">
8614 <doc xml:whitespace="preserve">property name</doc>
8615 <type name="utf8" c:type="gchar*"/>
8619 <method name="get_link_class"
8620 c:identifier="midgard_reflection_property_get_link_class">
8621 <doc xml:whitespace="preserve">Returns the pointer to the #MidgardDBObjectClass, a given property is a link to.
8622 Deprecated:10.05</doc>
8623 <return-value transfer-ownership="none">
8624 <type name="DBObjectClass" c:type="MidgardDBObjectClass*"/>
8627 <parameter name="propname" transfer-ownership="none">
8628 <doc xml:whitespace="preserve">property name</doc>
8629 <type name="utf8" c:type="gchar*"/>
8633 <method name="get_link_name"
8634 c:identifier="midgard_reflection_property_get_link_name">
8635 <doc xml:whitespace="preserve">Or %NULL if property is not a link or given property is not registered for given class.
8636 Deprecated:10.05</doc>
8637 <return-value transfer-ownership="none">
8638 <doc xml:whitespace="preserve">The name of the class, the given property is a link to.</doc>
8639 <type name="utf8" c:type="gchar*"/>
8642 <parameter name="propname" transfer-ownership="none">
8643 <doc xml:whitespace="preserve">property name</doc>
8644 <type name="utf8" c:type="gchar*"/>
8648 <method name="get_link_target"
8649 c:identifier="midgard_reflection_property_get_link_target">
8650 <doc xml:whitespace="preserve">Or %NULL if property is not a link or it's not registered for given class.
8651 Deprecated:10.05</doc>
8652 <return-value transfer-ownership="none">
8653 <doc xml:whitespace="preserve">The name of the property, the given one is a link to.</doc>
8654 <type name="utf8" c:type="gchar*"/>
8657 <parameter name="propname" transfer-ownership="none">
8658 <doc xml:whitespace="preserve">property name</doc>
8659 <type name="utf8" c:type="gchar*"/>
8663 <method name="description"
8664 c:identifier="midgard_reflection_property_description">
8665 <doc xml:whitespace="preserve">Deprecated:10.05</doc>
8666 <return-value transfer-ownership="none">
8667 <doc xml:whitespace="preserve">description of the given property or %NULL.</doc>
8668 <type name="utf8" c:type="gchar*"/>
8671 <parameter name="propname" transfer-ownership="none">
8672 <doc xml:whitespace="preserve">property name</doc>
8673 <type name="utf8" c:type="gchar*"/>
8677 <method name="get_user_value"
8678 c:identifier="midgard_reflection_property_get_user_value"
8680 <doc xml:whitespace="preserve">Deprecated:10.05</doc>
8681 <return-value transfer-ownership="none">
8682 <doc xml:whitespace="preserve">value for user defined field, or NULL if none found</doc>
8683 <type name="utf8" c:type="gchar*"/>
8686 <parameter name="property" transfer-ownership="none">
8687 <doc xml:whitespace="preserve">property to look value for</doc>
8688 <type name="utf8" c:type="gchar*"/>
8690 <parameter name="name" transfer-ownership="none">
8691 <doc xml:whitespace="preserve">name of user defined field</doc>
8692 <type name="utf8" c:type="gchar*"/>
8696 <method name="is_private"
8697 c:identifier="midgard_reflection_property_is_private">
8698 <doc xml:whitespace="preserve">Deprecated:10.05</doc>
8699 <return-value transfer-ownership="none">
8700 <doc xml:whitespace="preserve">%TRUE, if propery is defined private, %FALSE otherwise</doc>
8701 <type name="boolean" c:type="gboolean"/>
8704 <parameter name="property" transfer-ownership="none">
8705 <doc xml:whitespace="preserve">property name to check</doc>
8706 <type name="utf8" c:type="gchar*"/>
8711 <function name="set_error"
8712 c:identifier="midgard_set_error"
8714 <doc xml:whitespace="preserve">This function sets internal error constant, and creates new error message.
8715 User defined message is appended to internal one.
8716 Any message created by application ( and its corresponding constant ) are destroyed
8717 and reset to MGD_ERR_OK when any API function is invoked.
8718 Second @domain parameter is optional , and can be safely defined as NULL for
8719 MGD_GENERIC_ERROR domain.
8721 <programlisting>
8722 void set_wrong_property(MidgardConnection *mgd, gchar *prop)
8724 midgard_set_error(mgd, NULL,
8725 MGD_ERR_INVALID_PROPERTY_VALUE,
8726 "My application doesn't accept %s property",
8729 </programlisting>
8730 </example></doc>
8731 <return-value transfer-ownership="none">
8732 <type name="none" c:type="void"/>
8735 <parameter name="mgd" transfer-ownership="none">
8736 <doc xml:whitespace="preserve">#MidgardConnection instance</doc>
8737 <type name="Connection" c:type="MidgardConnection*"/>
8739 <parameter name="domain" transfer-ownership="none">
8740 <doc xml:whitespace="preserve">GQuark which represents MidgardError domain</doc>
8741 <type name="GLib.Quark" c:type="GQuark"/>
8743 <parameter name="errcode" transfer-ownership="none">
8744 <doc xml:whitespace="preserve">#MidgardErrorGeneric enum value</doc>
8745 <type name="int" c:type="gint"/>
8747 <parameter name="msg" transfer-ownership="none">
8748 <doc xml:whitespace="preserve">a message which should be appended to string represented by errcode</doc>
8749 <type name="utf8" c:type="gchar*"/>
8751 <parameter transfer-ownership="none">
8757 <function name="timestamp_get_string_from_value"
8758 c:identifier="midgard_timestamp_get_string_from_value">
8759 <return-value transfer-ownership="full">
8760 <type name="utf8" c:type="gchar*"/>
8763 <parameter name="value" transfer-ownership="none">
8764 <type name="GObject.Value" c:type="GValue*"/>
8768 <function name="timestamp_new_current"
8769 c:identifier="midgard_timestamp_new_current">
8770 <return-value transfer-ownership="none">
8771 <type name="none" c:type="void"/>
8774 <parameter name="value" transfer-ownership="none">
8775 <type name="GObject.Value" c:type="GValue*"/>
8779 <function name="timestamp_set_current_time"
8780 c:identifier="midgard_timestamp_set_current_time">
8781 <return-value transfer-ownership="none">
8782 <type name="none" c:type="void"/>
8785 <parameter name="value" transfer-ownership="none">
8786 <type name="GObject.Value" c:type="GValue*"/>
8790 <function name="uuid_external" c:identifier="midgard_uuid_external">
8791 <return-value transfer-ownership="full">
8792 <type name="utf8" c:type="gchar*"/>
8795 <parameter name="external" transfer-ownership="none">
8796 <type name="utf8" c:type="gchar*"/>
8800 <function name="uuid_new" c:identifier="midgard_uuid_new">
8801 <return-value transfer-ownership="full">
8802 <type name="utf8" c:type="gchar*"/>
8805 <function name="version" c:identifier="midgard_version">
8806 <return-value transfer-ownership="none">
8807 <type name="utf8" c:type="char*"/>