|
Packit |
79f644 |
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
|
|
Packit |
79f644 |
*
|
|
Packit |
79f644 |
* Copyright © 2012 – 2017 Red Hat, Inc.
|
|
Packit |
79f644 |
*
|
|
Packit |
79f644 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
79f644 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
79f644 |
* License as published by the Free Software Foundation; either
|
|
Packit |
79f644 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit |
79f644 |
*
|
|
Packit |
79f644 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
79f644 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
79f644 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
79f644 |
* Lesser General Public License for more details.
|
|
Packit |
79f644 |
*
|
|
Packit |
79f644 |
* You should have received a copy of the GNU Lesser General
|
|
Packit |
79f644 |
* Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
Packit |
79f644 |
*/
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
#ifndef __GOA_IDENTITY_H__
|
|
Packit |
79f644 |
#define __GOA_IDENTITY_H__
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
#include <glib.h>
|
|
Packit |
79f644 |
#include <glib-object.h>
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
G_BEGIN_DECLS
|
|
Packit |
79f644 |
#define GOA_TYPE_IDENTITY (goa_identity_get_type ())
|
|
Packit |
79f644 |
#define GOA_IDENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOA_TYPE_IDENTITY, GoaIdentity))
|
|
Packit |
79f644 |
#define GOA_IDENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOA_TYPE_IDENTITY, GoaIdentityInterface))
|
|
Packit |
79f644 |
#define GOA_IS_IDENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOA_TYPE_IDENTITY))
|
|
Packit |
79f644 |
#define GOA_IDENTITY_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), GOA_TYPE_IDENTITY, GoaIdentityInterface))
|
|
Packit |
79f644 |
#define GOA_IDENTITY_ERROR (goa_identity_error_quark ())
|
|
Packit |
79f644 |
typedef struct _GoaIdentity GoaIdentity;
|
|
Packit |
79f644 |
typedef struct _GoaIdentityInterface GoaIdentityInterface;
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
struct _GoaIdentityInterface
|
|
Packit |
79f644 |
{
|
|
Packit |
79f644 |
GTypeInterface base_interface;
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
const char * (* get_identifier) (GoaIdentity *identity);
|
|
Packit |
79f644 |
gboolean (* is_signed_in) (GoaIdentity *identity);
|
|
Packit |
79f644 |
};
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
typedef enum
|
|
Packit |
79f644 |
{
|
|
Packit |
79f644 |
GOA_IDENTITY_ERROR_NOT_FOUND,
|
|
Packit |
79f644 |
GOA_IDENTITY_ERROR_VERIFYING,
|
|
Packit |
79f644 |
GOA_IDENTITY_ERROR_RENEWING,
|
|
Packit |
79f644 |
GOA_IDENTITY_ERROR_CREDENTIALS_UNAVAILABLE,
|
|
Packit |
79f644 |
GOA_IDENTITY_ERROR_ENUMERATING_CREDENTIALS,
|
|
Packit |
79f644 |
GOA_IDENTITY_ERROR_ALLOCATING_CREDENTIALS,
|
|
Packit |
79f644 |
GOA_IDENTITY_ERROR_AUTHENTICATION_FAILED,
|
|
Packit |
79f644 |
GOA_IDENTITY_ERROR_SAVING_CREDENTIALS,
|
|
Packit |
79f644 |
GOA_IDENTITY_ERROR_REMOVING_CREDENTIALS,
|
|
Packit |
79f644 |
GOA_IDENTITY_ERROR_PARSING_IDENTIFIER,
|
|
Packit |
79f644 |
} GoaIdentityError;
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
typedef enum
|
|
Packit |
79f644 |
{
|
|
Packit |
79f644 |
GOA_IDENTITY_SIGN_IN_FLAGS_NONE = 0,
|
|
Packit |
79f644 |
GOA_IDENTITY_SIGN_IN_FLAGS_DISALLOW_RENEWAL = 1,
|
|
Packit |
79f644 |
GOA_IDENTITY_SIGN_IN_FLAGS_DISALLOW_FORWARDING = 1 << 1,
|
|
Packit |
79f644 |
GOA_IDENTITY_SIGN_IN_FLAGS_DISALLOW_PROXYING = 1 << 2
|
|
Packit |
79f644 |
} GoaIdentitySignInFlags;
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
GType goa_identity_get_type (void);
|
|
Packit |
79f644 |
GQuark goa_identity_error_quark (void);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
const char *goa_identity_get_identifier (GoaIdentity *identity);
|
|
Packit |
79f644 |
gboolean goa_identity_is_signed_in (GoaIdentity *identity);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
G_END_DECLS
|
|
Packit |
79f644 |
#endif /* __GOA_IDENTITY_H__ */
|