GDataAccessRule

GDataAccessRule — GData access rule object

Stability Level

Unstable, unless otherwise indicated

Synopsis

#include <gdata/gdata-access-rule.h>

                    GDataAccessRule;
                    GDataAccessRuleClass;
GDataAccessRule *   gdata_access_rule_new               (const gchar *id);
const gchar *       gdata_access_rule_get_role          (GDataAccessRule *self);
void                gdata_access_rule_set_role          (GDataAccessRule *self,
                                                         const gchar *role);
void                gdata_access_rule_get_scope         (GDataAccessRule *self,
                                                         const gchar **type,
                                                         const gchar **value);
void                gdata_access_rule_set_scope         (GDataAccessRule *self,
                                                         const gchar *type,
                                                         const gchar *value);

Object Hierarchy

  GObject
   +----GDataParsable
         +----GDataEntry
               +----GDataAccessRule

Properties

  "role"                     gchar*                : Read / Write
  "scope-type"               gchar*                : Read / Write
  "scope-value"              gchar*                : Read / Write

Description

GDataAccessRule is a subclass of GDataEntry to represent a generic access rule from an access control list (ACL). It is returned by the ACL methods implemented in the GDataAccessHandler interface.

Details

GDataAccessRule

typedef struct _GDataAccessRule GDataAccessRule;

All the fields in the GDataAccessRule structure are private and should never be accessed directly.

Since 0.3.0


GDataAccessRuleClass

typedef struct {
} GDataAccessRuleClass;

All the fields in the GDataAccessRuleClass structure are private and should never be accessed directly.

Since 0.3.0


gdata_access_rule_new ()

GDataAccessRule *   gdata_access_rule_new               (const gchar *id);

Creates a new GDataAccessRule with the given ID and default properties.

id :

the access rule's ID, or NULL

Returns :

a new GDataAccessRule; unref with g_object_unref()

Since 0.3.0


gdata_access_rule_get_role ()

const gchar *       gdata_access_rule_get_role          (GDataAccessRule *self);

Gets the "role" property.

self :

a GDataAccessRule

Returns :

the access rule's role, or NULL

Since 0.3.0


gdata_access_rule_set_role ()

void                gdata_access_rule_set_role          (GDataAccessRule *self,
                                                         const gchar *role);

Sets the "role" property to role.

Set role to NULL to unset the property in the access rule.

self :

a GDataAccessRule

role :

a new role, or NULL

Since 0.3.0


gdata_access_rule_get_scope ()

void                gdata_access_rule_get_scope         (GDataAccessRule *self,
                                                         const gchar **type,
                                                         const gchar **value);

Gets the "scope-type" and "scope-value" properties.

self :

a GDataAccessRule

type :

return location for the scope type, or NULL

value :

return location for the scope value, or NULL

Since 0.3.0


gdata_access_rule_set_scope ()

void                gdata_access_rule_set_scope         (GDataAccessRule *self,
                                                         const gchar *type,
                                                         const gchar *value);

Sets the "scope-type" property to type and the "scope-value" property to value.

Set scope_value to NULL to unset the "scope-value" property in the access rule. type cannot be NULL. scope_value must be NULL if type is default, and non-NULL otherwise.

See the online documentation for more information.

self :

a GDataAccessRule

type :

a new scope type

value :

a new scope value, or NULL

Since 0.3.0

Property Details

The "role" property

  "role"                     gchar*                : Read / Write

The role of the person concerned by this ACL.

Default value: NULL

Since 0.3.0


The "scope-type" property

  "scope-type"               gchar*                : Read / Write

Specifies to whom this access rule applies.

Default value: NULL

Since 0.3.0


The "scope-value" property

  "scope-value"              gchar*                : Read / Write

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.

Default value: NULL

Since 0.3.0