|
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_MANAGER_H__
|
|
Packit |
79f644 |
#define __GOA_IDENTITY_MANAGER_H__
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
#include <glib.h>
|
|
Packit |
79f644 |
#include <glib-object.h>
|
|
Packit |
79f644 |
#include <gio/gio.h>
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
#include "goaidentity.h"
|
|
Packit |
79f644 |
#include "goaidentityinquiry.h"
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
G_BEGIN_DECLS
|
|
Packit |
79f644 |
#define GOA_TYPE_IDENTITY_MANAGER (goa_identity_manager_get_type ())
|
|
Packit |
79f644 |
#define GOA_IDENTITY_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOA_TYPE_IDENTITY_MANAGER, GoaIdentityManager))
|
|
Packit |
79f644 |
#define GOA_IDENTITY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOA_TYPE_IDENTITY_MANAGER, GoaIdentityManagerInterface))
|
|
Packit |
79f644 |
#define GOA_IS_IDENTITY_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOA_TYPE_IDENTITY_MANAGER))
|
|
Packit |
79f644 |
#define GOA_IDENTITY_MANAGER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), GOA_TYPE_IDENTITY_MANAGER, GoaIdentityManagerInterface))
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
typedef struct _GoaIdentityManager GoaIdentityManager;
|
|
Packit |
79f644 |
typedef struct _GoaIdentityManagerInterface GoaIdentityManagerInterface;
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
struct _GoaIdentityManagerInterface
|
|
Packit |
79f644 |
{
|
|
Packit |
79f644 |
GTypeInterface base_interface;
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
/* Signals */
|
|
Packit |
79f644 |
void (* identity_added) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GoaIdentity *identity);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
void (* identity_removed) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GoaIdentity *identity);
|
|
Packit |
79f644 |
void (* identity_renamed) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GoaIdentity *identity);
|
|
Packit |
79f644 |
void (* identity_refreshed) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GoaIdentity *identity);
|
|
Packit |
79f644 |
void (* identity_needs_renewal) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GoaIdentity *identity);
|
|
Packit |
79f644 |
void (* identity_expiring) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GoaIdentity *identity);
|
|
Packit |
79f644 |
void (* identity_expired) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GoaIdentity *identity);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
/* Virtual Functions */
|
|
Packit |
79f644 |
void (* get_identity) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
const char *identifier,
|
|
Packit |
79f644 |
GCancellable *cancellable,
|
|
Packit |
79f644 |
GAsyncReadyCallback callback,
|
|
Packit |
79f644 |
gpointer user_data);
|
|
Packit |
79f644 |
GoaIdentity * (* get_identity_finish) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GAsyncResult *result,
|
|
Packit |
79f644 |
GError **error);
|
|
Packit |
79f644 |
void (* list_identities) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GCancellable *cancellable,
|
|
Packit |
79f644 |
GAsyncReadyCallback callback,
|
|
Packit |
79f644 |
gpointer user_data);
|
|
Packit |
79f644 |
GList * (* list_identities_finish) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GAsyncResult *result,
|
|
Packit |
79f644 |
GError **error);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
void (* sign_identity_in) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
const char *identifier,
|
|
Packit |
79f644 |
gconstpointer initial_password,
|
|
Packit |
79f644 |
const char *preauth_source,
|
|
Packit |
79f644 |
GoaIdentitySignInFlags flags,
|
|
Packit |
79f644 |
GoaIdentityInquiryFunc inquiry_func,
|
|
Packit |
79f644 |
gpointer inquiry_data,
|
|
Packit |
79f644 |
GCancellable *cancellable,
|
|
Packit |
79f644 |
GAsyncReadyCallback callback,
|
|
Packit |
79f644 |
gpointer user_data);
|
|
Packit |
79f644 |
GoaIdentity * (* sign_identity_in_finish) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GAsyncResult *result,
|
|
Packit |
79f644 |
GError **error);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
void (* sign_identity_out) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GoaIdentity *identity,
|
|
Packit |
79f644 |
GCancellable *cancellable,
|
|
Packit |
79f644 |
GAsyncReadyCallback callback,
|
|
Packit |
79f644 |
gpointer user_data);
|
|
Packit |
79f644 |
void (* sign_identity_out_finish) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GAsyncResult *result,
|
|
Packit |
79f644 |
GError **error);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
void (* renew_identity) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GoaIdentity *identity,
|
|
Packit |
79f644 |
GCancellable *cancellable,
|
|
Packit |
79f644 |
GAsyncReadyCallback callback,
|
|
Packit |
79f644 |
gpointer user_data);
|
|
Packit |
79f644 |
void (* renew_identity_finish) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GAsyncResult *result,
|
|
Packit |
79f644 |
GError **error);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
char * (* name_identity) (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GoaIdentity *identity);
|
|
Packit |
79f644 |
};
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
GType goa_identity_manager_get_type (void);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
void goa_identity_manager_get_identity (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
const char *identifier,
|
|
Packit |
79f644 |
GCancellable *cancellable,
|
|
Packit |
79f644 |
GAsyncReadyCallback callback,
|
|
Packit |
79f644 |
gpointer user_data);
|
|
Packit |
79f644 |
GoaIdentity *goa_identity_manager_get_identity_finish (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GAsyncResult *result,
|
|
Packit |
79f644 |
GError **error);
|
|
Packit |
79f644 |
void goa_identity_manager_list_identities (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GCancellable *cancellable,
|
|
Packit |
79f644 |
GAsyncReadyCallback callback,
|
|
Packit |
79f644 |
gpointer user_data);
|
|
Packit |
79f644 |
GList *goa_identity_manager_list_identities_finish (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GAsyncResult *result,
|
|
Packit |
79f644 |
GError **error);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
void goa_identity_manager_sign_identity_in (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
const char *identifier,
|
|
Packit |
79f644 |
gconstpointer initial_password,
|
|
Packit |
79f644 |
const char *preauth_source,
|
|
Packit |
79f644 |
GoaIdentitySignInFlags flags,
|
|
Packit |
79f644 |
GoaIdentityInquiryFunc inquiry_func,
|
|
Packit |
79f644 |
gpointer inquiry_data,
|
|
Packit |
79f644 |
GCancellable *cancellable,
|
|
Packit |
79f644 |
GAsyncReadyCallback callback,
|
|
Packit |
79f644 |
gpointer user_data);
|
|
Packit |
79f644 |
GoaIdentity *goa_identity_manager_sign_identity_in_finish (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GAsyncResult *result,
|
|
Packit |
79f644 |
GError **error);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
void goa_identity_manager_sign_identity_out (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GoaIdentity *identity,
|
|
Packit |
79f644 |
GCancellable *cancellable,
|
|
Packit |
79f644 |
GAsyncReadyCallback callback,
|
|
Packit |
79f644 |
gpointer user_data);
|
|
Packit |
79f644 |
void goa_identity_manager_sign_identity_out_finish (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GAsyncResult *result,
|
|
Packit |
79f644 |
GError **error);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
void goa_identity_manager_renew_identity (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GoaIdentity *identity,
|
|
Packit |
79f644 |
GCancellable *cancellable,
|
|
Packit |
79f644 |
GAsyncReadyCallback callback,
|
|
Packit |
79f644 |
gpointer user_data);
|
|
Packit |
79f644 |
void goa_identity_manager_renew_identity_finish (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GAsyncResult *result,
|
|
Packit |
79f644 |
GError **error);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
char *goa_identity_manager_name_identity (GoaIdentityManager *identity_manager,
|
|
Packit |
79f644 |
GoaIdentity *identity);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
G_END_DECLS
|
|
Packit |
79f644 |
#endif /* __GOA_IDENTITY_MANAGER_H__ */
|