/usr/share/gtk-doc/html/gdata/GDataParsable.html is in libgdata-doc 0.17.6-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GDataParsable: GData Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GData Reference Manual">
<link rel="up" href="ch02.html" title="Core API">
<link rel="prev" href="gdata-GData-Types.html" title="GData Types">
<link rel="next" href="GDataDownloadStream.html" title="GDataDownloadStream">
<meta name="generator" content="GTK-Doc V1.25.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#GDataParsable.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#GDataParsable.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span>
<a href="#GDataParsable.properties" class="shortcut">Properties</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gdata-GData-Types.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GDataDownloadStream.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GDataParsable"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GDataParsable.top_of_page"></a>GDataParsable</span></h2>
<p>GDataParsable — GData parsable object</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GDataParsable.stability-level"></a><h2>Stability Level</h2>
<acronym title="The intention of a Stable interface is to enable arbitrary third parties to
develop applications to these interfaces, release them, and have confidence that
they will run on all minor releases of the product (after the one in which the
interface was introduced, and within the same major release). Even at a major
release, incompatible changes are expected to be rare, and to have strong
justifications.
"><span class="acronym">Stable</span></acronym>, unless otherwise indicated
</div>
<div class="refsect1">
<a name="GDataParsable.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GDataParsable.html" title="GDataParsable"><span class="returnvalue">GDataParsable</span></a> *
</td>
<td class="function_name">
<a class="link" href="GDataParsable.html#gdata-parsable-new-from-xml" title="gdata_parsable_new_from_xml ()">gdata_parsable_new_from_xml</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="GDataParsable.html#gdata-parsable-get-xml" title="gdata_parsable_get_xml ()">gdata_parsable_get_xml</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GDataParsable.html" title="GDataParsable"><span class="returnvalue">GDataParsable</span></a> *
</td>
<td class="function_name">
<a class="link" href="GDataParsable.html#gdata-parsable-new-from-json" title="gdata_parsable_new_from_json ()">gdata_parsable_new_from_json</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="GDataParsable.html#gdata-parsable-get-json" title="gdata_parsable_get_json ()">gdata_parsable_get_json</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GDataParsable.properties"></a><h2>Properties</h2>
<div class="informaltable"><table border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody><tr>
<td class="property_type"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
<td class="property_name"><a class="link" href="GDataParsable.html#GDataParsable--constructed-from-xml" title="The “constructed-from-xml” property">constructed-from-xml</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GDataParsable.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GDataParsable.html#GDataParsable-struct" title="GDataParsable">GDataParsable</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GDataParsable.html#GDataParsableClass" title="GDataParsableClass">GDataParsableClass</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GDataParsable.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> GDataParsable
<span class="lineart">├──</span> <a class="link" href="GDataEntry.html" title="GDataEntry">GDataEntry</a>
<span class="lineart">├──</span> <a class="link" href="GDataAPPCategories.html" title="GDataAPPCategories">GDataAPPCategories</a>
<span class="lineart">├──</span> <a class="link" href="GDataAuthor.html" title="GDataAuthor">GDataAuthor</a>
<span class="lineart">├──</span> <a class="link" href="GDataFeed.html" title="GDataFeed">GDataFeed</a>
<span class="lineart">├──</span> <a class="link" href="GDataCategory.html" title="GDataCategory">GDataCategory</a>
<span class="lineart">├──</span> <a class="link" href="GDataGContactCalendar.html" title="GDataGContactCalendar">GDataGContactCalendar</a>
<span class="lineart">├──</span> <a class="link" href="GDataGContactEvent.html" title="GDataGContactEvent">GDataGContactEvent</a>
<span class="lineart">├──</span> <a class="link" href="GDataGContactExternalID.html" title="GDataGContactExternalID">GDataGContactExternalID</a>
<span class="lineart">├──</span> <a class="link" href="GDataGContactJot.html" title="GDataGContactJot">GDataGContactJot</a>
<span class="lineart">├──</span> <a class="link" href="GDataGContactLanguage.html" title="GDataGContactLanguage">GDataGContactLanguage</a>
<span class="lineart">├──</span> <a class="link" href="GDataGContactRelation.html" title="GDataGContactRelation">GDataGContactRelation</a>
<span class="lineart">├──</span> <a class="link" href="GDataGContactWebsite.html" title="GDataGContactWebsite">GDataGContactWebsite</a>
<span class="lineart">├──</span> <a class="link" href="GDataGDEmailAddress.html" title="GDataGDEmailAddress">GDataGDEmailAddress</a>
<span class="lineart">├──</span> <a class="link" href="GDataGDIMAddress.html" title="GDataGDIMAddress">GDataGDIMAddress</a>
<span class="lineart">├──</span> <a class="link" href="GDataGDName.html" title="GDataGDName">GDataGDName</a>
<span class="lineart">├──</span> <a class="link" href="GDataGDOrganization.html" title="GDataGDOrganization">GDataGDOrganization</a>
<span class="lineart">├──</span> <a class="link" href="GDataGDPhoneNumber.html" title="GDataGDPhoneNumber">GDataGDPhoneNumber</a>
<span class="lineart">├──</span> <a class="link" href="GDataGDPostalAddress.html" title="GDataGDPostalAddress">GDataGDPostalAddress</a>
<span class="lineart">├──</span> <a class="link" href="GDataGDReminder.html" title="GDataGDReminder">GDataGDReminder</a>
<span class="lineart">├──</span> <a class="link" href="GDataGDWhen.html" title="GDataGDWhen">GDataGDWhen</a>
<span class="lineart">├──</span> <a class="link" href="GDataGDWhere.html" title="GDataGDWhere">GDataGDWhere</a>
<span class="lineart">├──</span> <a class="link" href="GDataGDWho.html" title="GDataGDWho">GDataGDWho</a>
<span class="lineart">├──</span> <a class="link" href="GDataGenerator.html" title="GDataGenerator">GDataGenerator</a>
<span class="lineart">├──</span> <a class="link" href="GDataLink.html" title="GDataLink">GDataLink</a>
<span class="lineart">├──</span> <a class="link" href="GDataMediaCategory.html" title="GDataMediaCategory">GDataMediaCategory</a>
<span class="lineart">├──</span> <a class="link" href="GDataMediaContent.html" title="GDataMediaContent">GDataMediaContent</a>
<span class="lineart">├──</span> <a class="link" href="GDataMediaCredit.html" title="GDataMediaCredit">GDataMediaCredit</a>
<span class="lineart">├──</span> <a class="link" href="GDataMediaThumbnail.html" title="GDataMediaThumbnail">GDataMediaThumbnail</a>
<span class="lineart">╰──</span> <a class="link" href="GDataYouTubeState.html" title="GDataYouTubeState">GDataYouTubeState</a>
</pre>
</div>
<div class="refsect1">
<a name="GDataParsable.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <gdata/gdata-parsable.h>
</pre>
</div>
<div class="refsect1">
<a name="GDataParsable.description"></a><h2>Description</h2>
<p><a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> is an abstract class allowing easy implementation of an extensible parser. It is primarily extended by <a class="link" href="GDataFeed.html" title="GDataFeed"><span class="type">GDataFeed</span></a> and <a class="link" href="GDataEntry.html" title="GDataEntry"><span class="type">GDataEntry</span></a>,
both of which require XML parsing which can be extended by subclassing.</p>
<p>It allows methods to be defined for handling the root XML node, each of its child nodes, and a method to be called after parsing is complete.</p>
</div>
<div class="refsect1">
<a name="GDataParsable.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gdata-parsable-new-from-xml"></a><h3>gdata_parsable_new_from_xml ()</h3>
<pre class="programlisting"><a class="link" href="GDataParsable.html" title="GDataParsable"><span class="returnvalue">GDataParsable</span></a> *
gdata_parsable_new_from_xml (<em class="parameter"><code><a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> parsable_type</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *xml</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Creates a new <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> subclass (of the given <em class="parameter"><code>parsable_type</code></em>
) from the given <em class="parameter"><code>xml</code></em>
.</p>
<p>An object of the given <em class="parameter"><code>parsable_type</code></em>
is created, and its <code class="function">pre_parse_xml</code>, <code class="function">parse_xml</code> and
<code class="function">post_parse_xml</code> class functions called on the XML tree obtained from <em class="parameter"><code>xml</code></em>
. <code class="function">pre_parse_xml</code> and
<code class="function">post_parse_xml</code> are called once each on the root node of the tree, while <code class="function">parse_xml</code> is called for
each of the child nodes of the root node.</p>
<p>If <em class="parameter"><code>length</code></em>
is -1, <em class="parameter"><code>xml</code></em>
will be assumed to be null-terminated.</p>
<p>If an error occurs during parsing, a suitable error from <a class="link" href="GDataService.html#GDataParserError" title="enum GDataParserError"><span class="type">GDataParserError</span></a> will be returned.</p>
<div class="refsect3">
<a name="gdata-parsable-new-from-xml.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>parsable_type</p></td>
<td class="parameter_description"><p>the type of the class represented by the XML</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>xml</p></td>
<td class="parameter_description"><p>the XML for just the parsable object, with full namespace declarations</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the length of <em class="parameter"><code>xml</code></em>
, or -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdata-parsable-new-from-xml.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>; unref with <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a></p>
</div>
<p class="since">Since: <a class="link" href="ix06.html#api-index-0.4.0">0.4.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdata-parsable-get-xml"></a><h3>gdata_parsable_get_xml ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gdata_parsable_get_xml (<em class="parameter"><code><a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> *self</code></em>);</pre>
<p>Builds an XML representation of the <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> in its current state, such that it could be inserted on the server. The XML is guaranteed
to have all its namespaces declared properly in a self-contained fashion, and is valid for stand-alone use.</p>
<div class="refsect3">
<a name="gdata-parsable-get-xml.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdata-parsable-get-xml.returns"></a><h4>Returns</h4>
<p> the object's XML; free with <a href="https://developer.gnome.org/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a></p>
</div>
<p class="since">Since: <a class="link" href="ix06.html#api-index-0.4.0">0.4.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdata-parsable-new-from-json"></a><h3>gdata_parsable_new_from_json ()</h3>
<pre class="programlisting"><a class="link" href="GDataParsable.html" title="GDataParsable"><span class="returnvalue">GDataParsable</span></a> *
gdata_parsable_new_from_json (<em class="parameter"><code><a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> parsable_type</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *json</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> length</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Creates a new <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> subclass (of the given <em class="parameter"><code>parsable_type</code></em>
) from the given <em class="parameter"><code>json</code></em>
.</p>
<p>An object of the given <em class="parameter"><code>parsable_type</code></em>
is created, and its <code class="function">parse_json</code> and
<code class="function">post_parse_json</code> class functions called on the JSON node obtained from <em class="parameter"><code>json</code></em>
.
<code class="function">post_parse_json</code> is called once on the root node, while <code class="function">parse_json</code> is called for
each of the node's members.</p>
<p>If <em class="parameter"><code>length</code></em>
is -1, <em class="parameter"><code>json</code></em>
will be assumed to be nul-terminated.</p>
<p>If an error occurs during parsing, a suitable error from <a class="link" href="GDataService.html#GDataParserError" title="enum GDataParserError"><span class="type">GDataParserError</span></a> will be returned.</p>
<div class="refsect3">
<a name="gdata-parsable-new-from-json.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>parsable_type</p></td>
<td class="parameter_description"><p>the type of the class represented by the JSON</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>json</p></td>
<td class="parameter_description"><p>the JSON for just the parsable object</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the length of <em class="parameter"><code>json</code></em>
, or -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdata-parsable-new-from-json.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>; unref with <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a></p>
</div>
<p class="since">Since: <a class="link" href="ix19.html#api-index-0.15.0">0.15.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdata-parsable-get-json"></a><h3>gdata_parsable_get_json ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gdata_parsable_get_json (<em class="parameter"><code><a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> *self</code></em>);</pre>
<p>Builds a JSON representation of the <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> in its current state, such that it could be inserted on the server. The JSON
is valid for stand-alone use.</p>
<div class="refsect3">
<a name="gdata-parsable-get-json.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>self</p></td>
<td class="parameter_description"><p>a <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdata-parsable-get-json.returns"></a><h4>Returns</h4>
<p> the object's JSON; free with <a href="https://developer.gnome.org/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a></p>
</div>
<p class="since">Since: <a class="link" href="ix19.html#api-index-0.15.0">0.15.0</a></p>
</div>
</div>
<div class="refsect1">
<a name="GDataParsable.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GDataParsable-struct"></a><h3>GDataParsable</h3>
<pre class="programlisting">typedef struct _GDataParsable GDataParsable;</pre>
<p>All the fields in the <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> structure are private and should never be accessed directly.</p>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.3.0">0.3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDataParsableClass"></a><h3>GDataParsableClass</h3>
<pre class="programlisting">typedef struct {
GObjectClass parent;
gboolean (*pre_parse_xml) (GDataParsable *parsable, xmlDoc *doc, xmlNode *root_node, gpointer user_data, GError **error);
gboolean (*parse_xml) (GDataParsable *parsable, xmlDoc *doc, xmlNode *node, gpointer user_data, GError **error);
gboolean (*post_parse_xml) (GDataParsable *parsable, gpointer user_data, GError **error);
void (*pre_get_xml) (GDataParsable *parsable, GString *xml_string);
void (*get_xml) (GDataParsable *parsable, GString *xml_string);
void (*get_namespaces) (GDataParsable *parsable, GHashTable *namespaces);
gboolean (*parse_json) (GDataParsable *parsable, JsonReader *reader, gpointer user_data, GError **error);
gboolean (*post_parse_json) (GDataParsable *parsable, gpointer user_data, GError **error);
void (*get_json) (GDataParsable *parsable, JsonBuilder *builder);
const gchar *(*get_content_type) (void);
const gchar *element_name;
const gchar *element_namespace;
} GDataParsableClass;
</pre>
<p>The class structure for the <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> class. Note that JSON and XML functions are mutually exclusive:
a given implementation of <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> is represented as exactly one of JSON and XML.</p>
<div class="refsect3">
<a name="GDataParsableClass.members"></a><h4>Members</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> <em class="structfield"><code><a name="GDataParsableClass.parent"></a>parent</code></em>;</p></td>
<td class="struct_member_description"><p>the parent class</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GDataParsableClass.pre-parse-xml"></a>pre_parse_xml</code></em> ()</p></td>
<td class="struct_member_description"><p>a function called before parsing of an XML tree is started, which allows properties from the root node to be extracted
and used in <em class="parameter"><code>parsable</code></em>
</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GDataParsableClass.parse-xml"></a>parse_xml</code></em> ()</p></td>
<td class="struct_member_description"><p>a function to parse an XML representation of the <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> to set the properties of the <em class="parameter"><code>parsable</code></em>
</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GDataParsableClass.post-parse-xml"></a>post_parse_xml</code></em> ()</p></td>
<td class="struct_member_description"><p>a function called after parsing an XML tree, to allow the <em class="parameter"><code>parsable</code></em>
to validate the parsed properties</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GDataParsableClass.pre-get-xml"></a>pre_get_xml</code></em> ()</p></td>
<td class="struct_member_description"><p>a function called before building the XML representation of the children of the <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a>, which allows attributes of the root
XML node to be added to <em class="parameter"><code>xml_string</code></em>
</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GDataParsableClass.get-xml"></a>get_xml</code></em> ()</p></td>
<td class="struct_member_description"><p>a function to build an XML representation of the <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> in its current state, appending it to the provided <a href="https://developer.gnome.org/glib/unstable/glib-Strings.html#GString"><span class="type">GString</span></a></p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GDataParsableClass.get-namespaces"></a>get_namespaces</code></em> ()</p></td>
<td class="struct_member_description"><p>a function to return a string containing the namespace declarations used by the <em class="parameter"><code>parsable</code></em>
when represented in XML form</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GDataParsableClass.parse-json"></a>parse_json</code></em> ()</p></td>
<td class="struct_member_description"><p>a function to parse a JSON representation of the <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> to set the properties of the <em class="parameter"><code>parsable</code></em>
</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GDataParsableClass.post-parse-json"></a>post_parse_json</code></em> ()</p></td>
<td class="struct_member_description"><p>a function called after parsing a JSON object, to allow the <em class="parameter"><code>parsable</code></em>
to validate the parsed properties</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GDataParsableClass.get-json"></a>get_json</code></em> ()</p></td>
<td class="struct_member_description"><p>a function to build a JSON representation of the <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> in its current state, appending it to the provided <a href="/opt/gnome3/build/share/gtk-doc/html/json-glib/JsonBuilder.html#JsonBuilder-struct"><span class="type">JsonBuilder</span></a></p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="GDataParsableClass.get-content-type"></a>get_content_type</code></em> ()</p></td>
<td class="struct_member_description"><p>a function which returns content type upon which is <a class="link" href="GDataParsable.html" title="GDataParsable"><span class="type">GDataParsable</span></a> built</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GDataParsableClass.element-name"></a>element_name</code></em>;</p></td>
<td class="struct_member_description"><p>the name of the XML element which represents this parsable</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GDataParsableClass.element-namespace"></a>element_namespace</code></em>;</p></td>
<td class="struct_member_description"><p>the prefix of the XML namespace used for the parsable</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.3.0">0.3.0</a></p>
</div>
</div>
<div class="refsect1">
<a name="GDataParsable.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GDataParsable--constructed-from-xml"></a><h3>The <code class="literal">“constructed-from-xml”</code> property</h3>
<pre class="programlisting"> “constructed-from-xml” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
<p>Specifies whether the object was constructed by parsing XML or manually.</p>
<p>Flags: Read / Write / Construct Only</p>
<p>Default value: FALSE</p>
<p class="since">Since: <a class="link" href="ix09.html#api-index-0.7.0">0.7.0</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25.1</div>
</body>
</html>
|