/usr/share/gtk-doc/html/gdata/GDataAccessRule.html is in libgdata-doc 0.17.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GDataAccessRule: 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="ch03.html" title="Access Control List API">
<link rel="prev" href="GDataAccessHandler.html" title="GDataAccessHandler">
<link rel="next" href="ch04.html" title="Batch Operation API">
<meta name="generator" content="GTK-Doc V1.24.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="#GDataAccessRule.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#GDataAccessRule.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span>
<a href="#GDataAccessRule.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="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GDataAccessHandler.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="ch04.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GDataAccessRule"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GDataAccessRule.top_of_page"></a>GDataAccessRule</span></h2>
<p>GDataAccessRule — GData access rule object</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GDataAccessRule.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="GDataAccessRule.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="GDataAccessRule.html" title="GDataAccessRule"><span class="returnvalue">GDataAccessRule</span></a> *
</td>
<td class="function_name">
<a class="link" href="GDataAccessRule.html#gdata-access-rule-new" title="gdata_access_rule_new ()">gdata_access_rule_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <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="GDataAccessRule.html#gdata-access-rule-get-role" title="gdata_access_rule_get_role ()">gdata_access_rule_get_role</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GDataAccessRule.html#gdata-access-rule-set-role" title="gdata_access_rule_set_role ()">gdata_access_rule_set_role</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GDataAccessRule.html#gdata-access-rule-get-scope" title="gdata_access_rule_get_scope ()">gdata_access_rule_get_scope</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GDataAccessRule.html#gdata-access-rule-set-scope" title="gdata_access_rule_set_scope ()">gdata_access_rule_set_scope</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#gint64"><span class="returnvalue">gint64</span></a>
</td>
<td class="function_name">
<a class="link" href="GDataAccessRule.html#gdata-access-rule-get-edited" title="gdata_access_rule_get_edited ()">gdata_access_rule_get_edited</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <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="GDataAccessRule.html#gdata-access-rule-get-key" title="gdata_access_rule_get_key ()">gdata_access_rule_get_key</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GDataAccessRule.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#gint64"><span class="type">gint64</span></a></td>
<td class="property_name"><a class="link" href="GDataAccessRule.html#GDataAccessRule--edited" title="The “edited” property">edited</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="GDataAccessRule.html#GDataAccessRule--key" title="The “key” property">key</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="GDataAccessRule.html#GDataAccessRule--role" title="The “role” property">role</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="GDataAccessRule.html#GDataAccessRule--scope-type" title="The “scope-type” property">scope-type</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
<td class="property_name"><a class="link" href="GDataAccessRule.html#GDataAccessRule--scope-value" title="The “scope-value” property">scope-value</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GDataAccessRule.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="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GDataAccessRule.html#GDATA-ACCESS-SCOPE-USER:CAPS" title="GDATA_ACCESS_SCOPE_USER">GDATA_ACCESS_SCOPE_USER</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GDataAccessRule.html#GDATA-ACCESS-SCOPE-DOMAIN:CAPS" title="GDATA_ACCESS_SCOPE_DOMAIN">GDATA_ACCESS_SCOPE_DOMAIN</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GDataAccessRule.html#GDATA-ACCESS-SCOPE-DEFAULT:CAPS" title="GDATA_ACCESS_SCOPE_DEFAULT">GDATA_ACCESS_SCOPE_DEFAULT</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="GDataAccessRule.html#GDATA-ACCESS-ROLE-NONE:CAPS" title="GDATA_ACCESS_ROLE_NONE">GDATA_ACCESS_ROLE_NONE</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GDataAccessRule.html#GDataAccessRule-struct" title="GDataAccessRule">GDataAccessRule</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="GDataAccessRule.html#GDataAccessRuleClass" title="GDataAccessRuleClass">GDataAccessRuleClass</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GDataAccessRule.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> <a class="link" href="GDataParsable.html" title="GDataParsable">GDataParsable</a>
<span class="lineart">╰──</span> <a class="link" href="GDataEntry.html" title="GDataEntry">GDataEntry</a>
<span class="lineart">╰──</span> GDataAccessRule
<span class="lineart">├──</span> <a class="link" href="GDataCalendarAccessRule.html" title="GDataCalendarAccessRule">GDataCalendarAccessRule</a>
<span class="lineart">╰──</span> <a class="link" href="GDataDocumentsAccessRule.html" title="GDataDocumentsAccessRule">GDataDocumentsAccessRule</a>
</pre>
</div>
<div class="refsect1">
<a name="GDataAccessRule.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <gdata/gdata-access-rule.h>
</pre>
</div>
<div class="refsect1">
<a name="GDataAccessRule.description"></a><h2>Description</h2>
<p><a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a> is a subclass of <a class="link" href="GDataEntry.html" title="GDataEntry"><span class="type">GDataEntry</span></a> to represent a generic access rule from an access control list (ACL).
It is returned by the ACL methods implemented in the <a class="link" href="GDataAccessHandler.html" title="GDataAccessHandler"><span class="type">GDataAccessHandler</span></a> interface.</p>
<p>Access rules should be inserted to the <a class="link" href="GDataAccessHandler.html#GDATA-LINK-ACCESS-CONTROL-LIST:CAPS" title="GDATA_LINK_ACCESS_CONTROL_LIST"><code class="literal">GDATA_LINK_ACCESS_CONTROL_LIST</code></a> URI of the feed or entry they should be applied to. This will return a
<a class="link" href="GDataService.html#GDATA-SERVICE-ERROR-CONFLICT:CAPS"><code class="literal">GDATA_SERVICE_ERROR_CONFLICT</code></a> error if a rule already exists on that feed or entry for that scope type and value.</p>
<div class="example">
<a name="id-1.3.3.3.9.4"></a><p class="title"><b>Example 4. Adding a Rule to the Access Control List for an Entry</b></p>
<div class="example-contents">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>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</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="usertype">GDataAuthorizationDomain</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">domain</span><span class="symbol">;</span>
<span class="usertype">GDataService</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">service</span><span class="symbol">;</span>
<span class="usertype">GDataEntry</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">entry</span><span class="symbol">;</span>
<span class="usertype">GDataFeed</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">acl_feed</span><span class="symbol">;</span>
<span class="usertype">GDataAccessRule</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">rule</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">new_rule</span><span class="symbol">;</span>
<span class="usertype">GError</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">error </span><span class="symbol">=</span><span class="normal"> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
<span class="normal">domain </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GDataDocumentsService.html#gdata-documents-service-get-primary-authorization-domain">gdata_documents_service_get_primary_authorization_domain</a></span><span class="normal"> </span><span class="symbol">();</span>
<span class="comment">/* Retrieve a GDataEntry which will have a new rule inserted into its ACL. */</span>
<span class="normal">service </span><span class="symbol">=</span><span class="normal"> </span><span class="function">build_my_service</span><span class="normal"> </span><span class="symbol">();</span>
<span class="normal">entry </span><span class="symbol">=</span><span class="normal"> </span><span class="function">get_the_entry</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">service</span><span class="symbol">);</span>
<span class="comment">/* Create and insert a new access rule for </span><span class="url"><a href="example@gmail.com">example@gmail.com</a></span><span class="comment"> which grants them _no_ permissions on the entry.</span>
<span class="comment"> * In a real application, the GDataEntry subclass would define its own access roles which are more useful. For example,</span>
<span class="comment"> * GDataDocumentsEntry defines access roles for users who can read (but not write) a Google Document, and users who</span>
<span class="comment"> * can also write to the document. */</span>
<span class="normal">rule </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GDataAccessRule.html#gdata-access-rule-new">gdata_access_rule_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
<span class="function"><a href="GDataAccessRule.html#gdata-access-rule-set-role">gdata_access_rule_set_role</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">rule</span><span class="symbol">,</span><span class="normal"> <a href="GDataAccessRule.html#GDATA-ACCESS-ROLE-NONE:CAPS">GDATA_ACCESS_ROLE_NONE</a></span><span class="symbol">);</span><span class="normal"> </span><span class="comment">/* or, for example, GDATA_DOCUMENTS_ACCESS_ROLE_READER */</span>
<span class="function"><a href="GDataAccessRule.html#gdata-access-rule-set-scope">gdata_access_rule_set_scope</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">rule</span><span class="symbol">,</span><span class="normal"> <a href="GDataAccessRule.html#GDATA-ACCESS-SCOPE-USER:CAPS">GDATA_ACCESS_SCOPE_USER</a></span><span class="symbol">,</span><span class="normal"> </span><span class="string">"example@gmail.com"</span><span class="symbol">);</span><span class="normal"> </span><span class="comment">/* e-mail address of the user the ACL applies to */</span>
<span class="normal">acl_link </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GDataEntry.html#gdata-entry-look-up-link">gdata_entry_look_up_link</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">entry</span><span class="symbol">,</span><span class="normal"> <a href="GDataAccessHandler.html#GDATA-LINK-ACCESS-CONTROL-LIST:CAPS">GDATA_LINK_ACCESS_CONTROL_LIST</a></span><span class="symbol">);</span>
<span class="normal">new_rule </span><span class="symbol">=</span><span class="normal"> </span><span class="function">GDATA_ACCESS_RULE</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="GDataService.html#gdata-service-insert-entry">gdata_service_insert_entry</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GDATA_SERVICE</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">service</span><span class="symbol">),</span><span class="normal"> domain</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="GDataLink.html#gdata-link-get-uri">gdata_link_get_uri</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">acl_link</span><span class="symbol">),</span>
<span class="normal"> </span><span class="function">GDATA_ENTRY</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">rule</span><span class="symbol">),</span><span class="normal"> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">error</span><span class="symbol">));</span>
<span class="function"><a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">rule</span><span class="symbol">);</span>
<span class="function"><a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">entry</span><span class="symbol">);</span>
<span class="function"><a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">service</span><span class="symbol">);</span>
<span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error </span><span class="symbol">!=</span><span class="normal"> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="function"><a href="https://developer.gnome.org/glib/unstable/glib-Message-Logging.html#g-error">g_error</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"Error inserting access rule: %s"</span><span class="symbol">,</span><span class="normal"> error</span><span class="symbol">-></span><span class="normal">message</span><span class="symbol">);</span>
<span class="function"><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#g-error-free">g_error_free</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">error</span><span class="symbol">);</span>
<span class="keyword">return</span><span class="symbol">;</span>
<span class="cbracket">}</span>
<span class="comment">/* Potentially do something with the new_rule here, such as store its ID for later use. */</span>
<span class="function"><a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">new_rule</span><span class="symbol">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="example-break">
</div>
<div class="refsect1">
<a name="GDataAccessRule.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gdata-access-rule-new"></a><h3>gdata_access_rule_new ()</h3>
<pre class="programlisting"><a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="returnvalue">GDataAccessRule</span></a> *
gdata_access_rule_new (<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *id</code></em>);</pre>
<p>Creates a new <a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a> with the given ID and default properties.</p>
<div class="refsect3">
<a name="gdata-access-rule-new.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>id</p></td>
<td class="parameter_description"><p>the access rule's ID, 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-access-rule-new.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></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="ix05.html#api-index-0.3.0">0.3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdata-access-rule-get-role"></a><h3>gdata_access_rule_get_role ()</h3>
<pre class="programlisting">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gdata_access_rule_get_role (<em class="parameter"><code><a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a> *self</code></em>);</pre>
<p>Gets the <a class="link" href="GDataAccessRule.html#GDataAccessRule--role" title="The “role” property"><span class="type">“role”</span></a> property.</p>
<div class="refsect3">
<a name="gdata-access-rule-get-role.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="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdata-access-rule-get-role.returns"></a><h4>Returns</h4>
<p> the access rule's role, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p>
</div>
<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="gdata-access-rule-set-role"></a><h3>gdata_access_rule_set_role ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdata_access_rule_set_role (<em class="parameter"><code><a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a> *self</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> *role</code></em>);</pre>
<p>Sets the <a class="link" href="GDataAccessRule.html#GDataAccessRule--role" title="The “role” property"><span class="type">“role”</span></a> property to <em class="parameter"><code>role</code></em>
.</p>
<p>Set <em class="parameter"><code>role</code></em>
to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to unset the property in the access rule.</p>
<div class="refsect3">
<a name="gdata-access-rule-set-role.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="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>role</p></td>
<td class="parameter_description"><p>a new role, 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>
<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="gdata-access-rule-get-scope"></a><h3>gdata_access_rule_get_scope ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdata_access_rule_get_scope (<em class="parameter"><code><a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a> *self</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> **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> **value</code></em>);</pre>
<p>Gets the <a class="link" href="GDataAccessRule.html#GDataAccessRule--scope-type" title="The “scope-type” property"><span class="type">“scope-type”</span></a> and <a class="link" href="GDataAccessRule.html#GDataAccessRule--scope-value" title="The “scope-value” property"><span class="type">“scope-value”</span></a> properties.</p>
<div class="refsect3">
<a name="gdata-access-rule-get-scope.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="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p> return location for the scope type, 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"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out callee-allocates</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p> return location for the scope value, 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"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out callee-allocates</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></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>
<hr>
<div class="refsect2">
<a name="gdata-access-rule-set-scope"></a><h3>gdata_access_rule_set_scope ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdata_access_rule_set_scope (<em class="parameter"><code><a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a> *self</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> *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> *value</code></em>);</pre>
<p>Sets the <a class="link" href="GDataAccessRule.html#GDataAccessRule--scope-type" title="The “scope-type” property"><span class="type">“scope-type”</span></a> property to <em class="parameter"><code>type</code></em>
and the <a class="link" href="GDataAccessRule.html#GDataAccessRule--scope-value" title="The “scope-value” property"><span class="type">“scope-value”</span></a> property to <em class="parameter"><code>value</code></em>
.</p>
<p>Set <em class="parameter"><code>scope_value</code></em>
to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to unset the <a class="link" href="GDataAccessRule.html#GDataAccessRule--scope-value" title="The “scope-value” property"><span class="type">“scope-value”</span></a> property in the access rule. <em class="parameter"><code>type</code></em>
cannot
be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <em class="parameter"><code>scope_value</code></em>
must be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>type</code></em>
is <code class="literal">default</code>, and non-<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> otherwise.</p>
<p>See the</p>
<a class="ulink" href="https://developers.google.com/google-apps/calendar/v3/reference/acl" target="_top">online
documentation</a> for more information.
<div class="refsect3">
<a name="gdata-access-rule-set-scope.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="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>a new scope type</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p> a new scope value, 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"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></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>
<hr>
<div class="refsect2">
<a name="gdata-access-rule-get-edited"></a><h3>gdata_access_rule_get_edited ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint64"><span class="returnvalue">gint64</span></a>
gdata_access_rule_get_edited (<em class="parameter"><code><a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a> *self</code></em>);</pre>
<p>Gets the <a class="link" href="GDataAccessRule.html#GDataAccessRule--edited" title="The “edited” property"><span class="type">“edited”</span></a> property. If the property is unset, <code class="code">-1</code> will be returned.</p>
<div class="refsect3">
<a name="gdata-access-rule-get-edited.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="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdata-access-rule-get-edited.returns"></a><h4>Returns</h4>
<p> the UNIX timestamp for the time the access rule was last edited, or <code class="code">-1</code></p>
</div>
<p class="since">Since: <a class="link" href="ix09.html#api-index-0.7.0">0.7.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gdata-access-rule-get-key"></a><h3>gdata_access_rule_get_key ()</h3>
<pre class="programlisting">const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gdata_access_rule_get_key (<em class="parameter"><code><a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a> *self</code></em>);</pre>
<p>Gets the <a class="link" href="GDataAccessRule.html#GDataAccessRule--key" title="The “key” property"><span class="type">“key”</span></a> property.</p>
<div class="refsect3">
<a name="gdata-access-rule-get-key.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="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdata-access-rule-get-key.returns"></a><h4>Returns</h4>
<p> the access rule's authorisation key, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p>
</div>
<p class="since">Since: <a class="link" href="ix21.html#api-index-0.16.0">0.16.0</a></p>
</div>
</div>
<div class="refsect1">
<a name="GDataAccessRule.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GDATA-ACCESS-SCOPE-USER:CAPS"></a><h3>GDATA_ACCESS_SCOPE_USER</h3>
<pre class="programlisting">#define GDATA_ACCESS_SCOPE_USER "user"
</pre>
<p>The <a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a> applies to a single individual, whose e-mail address is given in <a class="link" href="GDataAccessRule.html#GDataAccessRule--scope-value" title="The “scope-value” property"><span class="type">“scope-value”</span></a>.</p>
<p class="since">Since: <a class="link" href="ix09.html#api-index-0.7.0">0.7.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDATA-ACCESS-SCOPE-DOMAIN:CAPS"></a><h3>GDATA_ACCESS_SCOPE_DOMAIN</h3>
<pre class="programlisting">#define GDATA_ACCESS_SCOPE_DOMAIN "domain"
</pre>
<p>The <a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a> applies to all users in a Google Apps For Your Domain domain, given in <a class="link" href="GDataAccessRule.html#GDataAccessRule--scope-value" title="The “scope-value” property"><span class="type">“scope-value”</span></a>.</p>
<p class="since">Since: <a class="link" href="ix09.html#api-index-0.7.0">0.7.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDATA-ACCESS-SCOPE-DEFAULT:CAPS"></a><h3>GDATA_ACCESS_SCOPE_DEFAULT</h3>
<pre class="programlisting">#define GDATA_ACCESS_SCOPE_DEFAULT "default"
</pre>
<p>The <a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a> applies to all users.</p>
<p class="since">Since: <a class="link" href="ix09.html#api-index-0.7.0">0.7.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDATA-ACCESS-ROLE-NONE:CAPS"></a><h3>GDATA_ACCESS_ROLE_NONE</h3>
<pre class="programlisting">#define GDATA_ACCESS_ROLE_NONE "none"
</pre>
<p>The users specified by the <a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</span></a> have no rights.</p>
<p class="since">Since: <a class="link" href="ix09.html#api-index-0.7.0">0.7.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDataAccessRule-struct"></a><h3>GDataAccessRule</h3>
<pre class="programlisting">typedef struct _GDataAccessRule GDataAccessRule;</pre>
<p>All the fields in the <a class="link" href="GDataAccessRule.html" title="GDataAccessRule"><span class="type">GDataAccessRule</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="GDataAccessRuleClass"></a><h3>GDataAccessRuleClass</h3>
<pre class="programlisting">typedef struct {
} GDataAccessRuleClass;
</pre>
<p>All the fields in the <a class="link" href="GDataAccessRule.html#GDataAccessRuleClass" title="GDataAccessRuleClass"><span class="type">GDataAccessRuleClass</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>
</div>
<div class="refsect1">
<a name="GDataAccessRule.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GDataAccessRule--edited"></a><h3>The <code class="literal">“edited”</code> property</h3>
<pre class="programlisting"> “edited” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gint64"><span class="type">gint64</span></a></pre>
<p>The last time the access rule was edited. If the rule has not been edited yet, the content indicates the time it was created.</p>
<p>For more information, see the <a class="ulink" href="http://www.atomenabled.org/developers/protocol/#appEdited" target="_top">
Atom Publishing Protocol specification</a>.</p>
<p>Flags: Read</p>
<p>Allowed values: >= -1</p>
<p>Default value: -1</p>
<p class="since">Since: <a class="link" href="ix09.html#api-index-0.7.0">0.7.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDataAccessRule--key"></a><h3>The <code class="literal">“key”</code> property</h3>
<pre class="programlisting"> “key” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>An optional authorisation key required to access this item with the given scope. If set, this restricts
access to those principals who have a copy of the key. The key is generated server-side and cannot be
modified by the client. If no authorisation key is set (and hence none is needed for access to the item),
this will be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p>Flags: Read</p>
<p>Default value: NULL</p>
<p class="since">Since: <a class="link" href="ix21.html#api-index-0.16.0">0.16.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GDataAccessRule--role"></a><h3>The <code class="literal">“role”</code> property</h3>
<pre class="programlisting"> “role” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>The role of the person concerned by this ACL. By default, this can only be <a class="link" href="GDataAccessRule.html#GDATA-ACCESS-ROLE-NONE:CAPS" title="GDATA_ACCESS_ROLE_NONE"><code class="literal">GDATA_ACCESS_ROLE_NONE</code></a>. Services may extend it with
their own namespaced roles.</p>
<p>Flags: Read / Write</p>
<p>Default value: "none"</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="GDataAccessRule--scope-type"></a><h3>The <code class="literal">“scope-type”</code> property</h3>
<pre class="programlisting"> “scope-type” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>Specifies to whom this access rule applies. For example, <a class="link" href="GDataAccessRule.html#GDATA-ACCESS-SCOPE-USER:CAPS" title="GDATA_ACCESS_SCOPE_USER"><code class="literal">GDATA_ACCESS_SCOPE_USER</code></a> or <a class="link" href="GDataAccessRule.html#GDATA-ACCESS-SCOPE-DEFAULT:CAPS" title="GDATA_ACCESS_SCOPE_DEFAULT"><code class="literal">GDATA_ACCESS_SCOPE_DEFAULT</code></a>.</p>
<p>Flags: Read / Write</p>
<p>Default value: "default"</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="GDataAccessRule--scope-value"></a><h3>The <code class="literal">“scope-value”</code> property</h3>
<pre class="programlisting"> “scope-value” <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
<p>A value representing the user who is represented by the access rule, such as an
e-mail address for users, or a domain name for domains.</p>
<p>This must be <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if and only if <a class="link" href="GDataAccessRule.html#GDataAccessRule--scope-type" title="The “scope-type” property"><span class="type">“scope-type”</span></a> is <a class="link" href="GDataAccessRule.html#GDATA-ACCESS-SCOPE-DEFAULT:CAPS" title="GDATA_ACCESS_SCOPE_DEFAULT"><code class="literal">GDATA_ACCESS_SCOPE_DEFAULT</code></a>.</p>
<p>Flags: Read / Write</p>
<p>Default value: NULL</p>
<p class="since">Since: <a class="link" href="ix05.html#api-index-0.3.0">0.3.0</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24.1</div>
</body>
</html>
|