![]() |
![]() |
![]() |
GData Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#include <gdata/gdata-access-rule.h> #define GDATA_ACCESS_SCOPE_USER #define GDATA_ACCESS_SCOPE_DOMAIN #define GDATA_ACCESS_SCOPE_DEFAULT #define GDATA_ACCESS_ROLE_NONE 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
); gint64 gdata_access_rule_get_edited (GDataAccessRule *self
);
"edited" gint64 : Read "role" gchar* : Read / Write "scope-type" gchar* : Read / Write "scope-value" gchar* : Read / Write
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.
Access rules should be inserted to the GDATA_LINK_ACCESS_CONTROL_LIST
URI of the feed or entry they should be applied to. This will return a
GDATA_SERVICE_ERROR_CONFLICT
error if a rule already exists on that feed or entry for that scope type and value.
#define GDATA_ACCESS_SCOPE_USER "user"
The GDataAccessRule applies to a single individual, whose e-mail address is given in "scope-value".
Since 0.7.0
#define GDATA_ACCESS_SCOPE_DOMAIN "domain"
The GDataAccessRule applies to all users in a Google Apps For Your Domain domain, given in "scope-value".
Since 0.7.0
#define GDATA_ACCESS_SCOPE_DEFAULT "default"
The GDataAccessRule applies to all users.
Since 0.7.0
#define GDATA_ACCESS_ROLE_NONE "none"
The users specified by the GDataAccessRule have no rights.
Since 0.7.0
typedef struct _GDataAccessRule GDataAccessRule;
All the fields in the GDataAccessRule structure are private and should never be accessed directly.
Since 0.3.0
typedef struct { } GDataAccessRuleClass;
All the fields in the GDataAccessRuleClass structure are private and should never be accessed directly.
Since 0.3.0
GDataAccessRule * gdata_access_rule_new (const gchar *id
);
Creates a new GDataAccessRule with the given ID and default properties.
|
the access rule's ID, or NULL
|
Returns : |
a new GDataAccessRule; unref with g_object_unref()
|
Since 0.3.0
const gchar * gdata_access_rule_get_role (GDataAccessRule *self
);
Gets the "role" property.
|
a GDataAccessRule |
Returns : |
the access rule's role, or NULL
|
Since 0.3.0
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.
|
a GDataAccessRule |
|
a new role, or NULL
|
Since 0.3.0
void gdata_access_rule_get_scope (GDataAccessRule *self
,const gchar **type
,const gchar **value
);
Gets the "scope-type" and "scope-value" properties.
|
a GDataAccessRule |
|
return location for the scope type, or NULL . [out callee-allocates][transfer none]
|
|
return location for the scope value, or NULL . [out callee-allocates][transfer none]
|
Since 0.3.0
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.
|
a GDataAccessRule |
|
a new scope type |
|
a new scope value, or NULL
|
Since 0.3.0
gint64 gdata_access_rule_get_edited (GDataAccessRule *self
);
Gets the "edited" property. If the property is unset, -1
will be returned.
|
a GDataAccessRule |
Returns : |
the UNIX timestamp for the time the access rule was last edited, or -1
|
Since 0.7.0
"edited"
property"edited" gint64 : Read
The last time the access rule was edited. If the rule has not been edited yet, the content indicates the time it was created.
For more information, see the Atom Publishing Protocol specification.
Allowed values: >= -1
Default value: -1
Since 0.7.0
"role"
property"role" gchar* : Read / Write
The role of the person concerned by this ACL. By default, this can only be GDATA_ACCESS_ROLE_NONE
. Services may extend it with
their own namespaced roles.
Default value: "none"
Since 0.3.0
"scope-type"
property"scope-type" gchar* : Read / Write
Specifies to whom this access rule applies. For example, GDATA_ACCESS_SCOPE_USER
or GDATA_ACCESS_SCOPE_DEFAULT
.
Default value: "default"
Since 0.3.0
"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