Blame gdata/gdata-access-rule.h

Packit 4b6dd7
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
Packit 4b6dd7
/*
Packit 4b6dd7
 * GData Client
Packit 4b6dd7
 * Copyright (C) Thibault Saunier 2009 <saunierthibault@gmail.com>
Packit 4b6dd7
 * Copyright (C) Philip Withnall 2009 <philip@tecnocode.co.uk>
Packit 4b6dd7
 *
Packit 4b6dd7
 * GData Client is free software; you can redistribute it and/or
Packit 4b6dd7
 * modify it under the terms of the GNU Lesser General Public
Packit 4b6dd7
 * License as published by the Free Software Foundation; either
Packit 4b6dd7
 * version 2.1 of the License, or (at your option) any later version.
Packit 4b6dd7
 *
Packit 4b6dd7
 * GData Client is distributed in the hope that it will be useful,
Packit 4b6dd7
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 4b6dd7
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 4b6dd7
 * Lesser General Public License for more details.
Packit 4b6dd7
 *
Packit 4b6dd7
 * You should have received a copy of the GNU Lesser General Public
Packit 4b6dd7
 * License along with GData Client.  If not, see <http://www.gnu.org/licenses/>.
Packit 4b6dd7
 */
Packit 4b6dd7
Packit 4b6dd7
#ifndef GDATA_ACCESS_RULE_H
Packit 4b6dd7
#define GDATA_ACCESS_RULE_H
Packit 4b6dd7
Packit 4b6dd7
#include <glib.h>
Packit 4b6dd7
#include <glib-object.h>
Packit 4b6dd7
Packit 4b6dd7
#include <gdata/gdata-entry.h>
Packit 4b6dd7
Packit 4b6dd7
G_BEGIN_DECLS
Packit 4b6dd7
Packit 4b6dd7
/**
Packit 4b6dd7
 * GDATA_ACCESS_SCOPE_USER:
Packit 4b6dd7
 *
Packit 4b6dd7
 * The #GDataAccessRule applies to a single individual, whose e-mail address is given in #GDataAccessRule:scope-value.
Packit 4b6dd7
 *
Packit 4b6dd7
 * Since: 0.7.0
Packit 4b6dd7
 */
Packit 4b6dd7
#define GDATA_ACCESS_SCOPE_USER "user"
Packit 4b6dd7
Packit 4b6dd7
/**
Packit 4b6dd7
 * GDATA_ACCESS_SCOPE_DOMAIN:
Packit 4b6dd7
 *
Packit 4b6dd7
 * The #GDataAccessRule applies to all users in a Google Apps For Your Domain domain, given in #GDataAccessRule:scope-value.
Packit 4b6dd7
 *
Packit 4b6dd7
 * Since: 0.7.0
Packit 4b6dd7
 */
Packit 4b6dd7
#define GDATA_ACCESS_SCOPE_DOMAIN "domain"
Packit 4b6dd7
Packit 4b6dd7
/**
Packit 4b6dd7
 * GDATA_ACCESS_SCOPE_DEFAULT:
Packit 4b6dd7
 *
Packit 4b6dd7
 * The #GDataAccessRule applies to all users.
Packit 4b6dd7
 *
Packit 4b6dd7
 * Since: 0.7.0
Packit 4b6dd7
 */
Packit 4b6dd7
#define GDATA_ACCESS_SCOPE_DEFAULT "default"
Packit 4b6dd7
Packit 4b6dd7
/**
Packit 4b6dd7
 * GDATA_ACCESS_ROLE_NONE:
Packit 4b6dd7
 *
Packit 4b6dd7
 * The users specified by the #GDataAccessRule have no rights.
Packit 4b6dd7
 *
Packit 4b6dd7
 * Since: 0.7.0
Packit 4b6dd7
 */
Packit 4b6dd7
#define GDATA_ACCESS_ROLE_NONE "none"
Packit 4b6dd7
Packit 4b6dd7
#define GDATA_TYPE_ACCESS_RULE		(gdata_access_rule_get_type ())
Packit 4b6dd7
#define GDATA_ACCESS_RULE(o)		(G_TYPE_CHECK_INSTANCE_CAST ((o), GDATA_TYPE_ACCESS_RULE, GDataAccessRule))
Packit 4b6dd7
#define GDATA_ACCESS_RULE_CLASS(k)	(G_TYPE_CHECK_CLASS_CAST((k), GDATA_TYPE_ACCESS_RULE, GDataAccessRuleClass))
Packit 4b6dd7
#define GDATA_IS_ACCESS_RULE(o)		(G_TYPE_CHECK_INSTANCE_TYPE ((o), GDATA_TYPE_ACCESS_RULE))
Packit 4b6dd7
#define GDATA_IS_ACCESS_RULE_CLASS(k)	(G_TYPE_CHECK_CLASS_TYPE ((k), GDATA_TYPE_ACCESS_RULE))
Packit 4b6dd7
#define GDATA_ACCESS_RULE_GET_CLASS(o)	(G_TYPE_INSTANCE_GET_CLASS ((o), GDATA_TYPE_ACCESS_RULE, GDataAccessRuleClass))
Packit 4b6dd7
Packit 4b6dd7
typedef struct _GDataAccessRulePrivate	GDataAccessRulePrivate;
Packit 4b6dd7
Packit 4b6dd7
/**
Packit 4b6dd7
 * GDataAccessRule:
Packit 4b6dd7
 *
Packit 4b6dd7
 * All the fields in the #GDataAccessRule structure are private and should never be accessed directly.
Packit 4b6dd7
 *
Packit 4b6dd7
 * Since: 0.3.0
Packit 4b6dd7
 */
Packit 4b6dd7
typedef struct {
Packit 4b6dd7
	GDataEntry parent;
Packit 4b6dd7
	GDataAccessRulePrivate *priv;
Packit 4b6dd7
} GDataAccessRule;
Packit 4b6dd7
Packit 4b6dd7
/**
Packit 4b6dd7
 * GDataAccessRuleClass:
Packit 4b6dd7
 *
Packit 4b6dd7
 * All the fields in the #GDataAccessRuleClass structure are private and should never be accessed directly.
Packit 4b6dd7
 *
Packit 4b6dd7
 * Since: 0.3.0
Packit 4b6dd7
 */
Packit 4b6dd7
typedef struct {
Packit 4b6dd7
	/*< private >*/
Packit 4b6dd7
	GDataEntryClass parent;
Packit 4b6dd7
Packit 4b6dd7
	/*< private >*/
Packit 4b6dd7
	/* Padding for future expansion */
Packit 4b6dd7
	void (*_g_reserved0) (void);
Packit 4b6dd7
	void (*_g_reserved1) (void);
Packit 4b6dd7
} GDataAccessRuleClass;
Packit 4b6dd7
Packit 4b6dd7
GType gdata_access_rule_get_type (void) G_GNUC_CONST;
Packit 4b6dd7
Packit 4b6dd7
GDataAccessRule *gdata_access_rule_new (const gchar *id) G_GNUC_WARN_UNUSED_RESULT G_GNUC_MALLOC;
Packit 4b6dd7
Packit 4b6dd7
const gchar *gdata_access_rule_get_role (GDataAccessRule *self) G_GNUC_PURE;
Packit 4b6dd7
void gdata_access_rule_set_role (GDataAccessRule *self, const gchar *role);
Packit 4b6dd7
void gdata_access_rule_get_scope (GDataAccessRule *self, const gchar **type, const gchar **value);
Packit 4b6dd7
void gdata_access_rule_set_scope (GDataAccessRule *self, const gchar *type, const gchar *value);
Packit 4b6dd7
gint64 gdata_access_rule_get_edited (GDataAccessRule *self);
Packit 4b6dd7
const gchar *gdata_access_rule_get_key (GDataAccessRule *self) G_GNUC_PURE;
Packit 4b6dd7
Packit 4b6dd7
G_END_DECLS
Packit 4b6dd7
Packit 4b6dd7
#endif /* !GDATA_ACCESS_RULE_H */