|
Packit |
79f644 |
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
|
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_INQUIRY_H__
|
|
Packit |
79f644 |
#define __GOA_IDENTITY_INQUIRY_H__
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
#include <stdint.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 |
|
|
Packit |
79f644 |
G_BEGIN_DECLS
|
|
Packit |
79f644 |
#define GOA_TYPE_IDENTITY_INQUIRY (goa_identity_inquiry_get_type ())
|
|
Packit |
79f644 |
#define GOA_IDENTITY_INQUIRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GOA_TYPE_IDENTITY_INQUIRY, GoaIdentityInquiry))
|
|
Packit |
79f644 |
#define GOA_IDENTITY_INQUIRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GOA_TYPE_IDENTITY_INQUIRY, GoaIdentityInquiryClass))
|
|
Packit |
79f644 |
#define GOA_IS_IDENTITY_INQUIRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GOA_TYPE_IDENTITY_INQUIRY))
|
|
Packit |
79f644 |
#define GOA_IDENTITY_INQUIRY_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), GOA_TYPE_IDENTITY_INQUIRY, GoaIdentityInquiryInterface))
|
|
Packit |
79f644 |
typedef struct _GoaIdentityInquiry GoaIdentityInquiry;
|
|
Packit |
79f644 |
typedef struct _GoaIdentityInquiryInterface GoaIdentityInquiryInterface;
|
|
Packit |
79f644 |
typedef struct _GoaIdentityInquiryIter GoaIdentityInquiryIter;
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
typedef struct _GoaIdentityQuery GoaIdentityQuery;
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
typedef void (* GoaIdentityInquiryFunc) (GoaIdentityInquiry *inquiry,
|
|
Packit |
79f644 |
GCancellable *cancellable,
|
|
Packit |
79f644 |
gpointer user_data);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
typedef enum
|
|
Packit |
79f644 |
{
|
|
Packit |
79f644 |
GOA_IDENTITY_QUERY_MODE_INVISIBLE,
|
|
Packit |
79f644 |
GOA_IDENTITY_QUERY_MODE_VISIBLE
|
|
Packit |
79f644 |
} GoaIdentityQueryMode;
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
struct _GoaIdentityInquiryIter
|
|
Packit |
79f644 |
{
|
|
Packit |
79f644 |
gpointer data;
|
|
Packit |
79f644 |
};
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
struct _GoaIdentityInquiryInterface
|
|
Packit |
79f644 |
{
|
|
Packit |
79f644 |
GTypeInterface base_interface;
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
GoaIdentity * (* get_identity) (GoaIdentityInquiry *inquiry);
|
|
Packit |
79f644 |
char * (* get_name) (GoaIdentityInquiry *inquiry);
|
|
Packit |
79f644 |
char * (* get_banner) (GoaIdentityInquiry *inquiry);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
gboolean (* is_complete) (GoaIdentityInquiry *inquiry);
|
|
Packit |
79f644 |
void (* answer_query) (GoaIdentityInquiry *inquiry,
|
|
Packit |
79f644 |
GoaIdentityQuery *query,
|
|
Packit |
79f644 |
const char *answer);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
void (* iter_init) (GoaIdentityInquiryIter *iter,
|
|
Packit |
79f644 |
GoaIdentityInquiry *inquiry);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
GoaIdentityQuery * (* iter_next) (GoaIdentityInquiryIter *iter,
|
|
Packit |
79f644 |
GoaIdentityInquiry *inquiry);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
GoaIdentityQueryMode (* get_mode) (GoaIdentityInquiry *inquiry,
|
|
Packit |
79f644 |
GoaIdentityQuery *query);
|
|
Packit |
79f644 |
char * (* get_prompt) (GoaIdentityInquiry *inquiry,
|
|
Packit |
79f644 |
GoaIdentityQuery *query);
|
|
Packit |
79f644 |
gboolean (* is_answered) (GoaIdentityInquiry *inquiry,
|
|
Packit |
79f644 |
GoaIdentityQuery *query);
|
|
Packit |
79f644 |
gboolean (* is_failed) (GoaIdentityInquiry *inquiry);
|
|
Packit |
79f644 |
};
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
GType goa_identity_inquiry_get_type (void);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
GoaIdentity *goa_identity_inquiry_get_identity (GoaIdentityInquiry *inquiry);
|
|
Packit |
79f644 |
char *goa_identity_inquiry_get_name (GoaIdentityInquiry *inquiry);
|
|
Packit |
79f644 |
char *goa_identity_inquiry_get_banner (GoaIdentityInquiry *inquiry);
|
|
Packit |
79f644 |
gboolean goa_identity_inquiry_is_complete (GoaIdentityInquiry *inquiry);
|
|
Packit |
79f644 |
gboolean goa_identity_inquiry_is_failed (GoaIdentityInquiry *inquiry);
|
|
Packit |
79f644 |
void goa_identity_inquiry_answer_query (GoaIdentityInquiry *inquiry,
|
|
Packit |
79f644 |
GoaIdentityQuery *query,
|
|
Packit |
79f644 |
const char *answer);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
void goa_identity_inquiry_iter_init (GoaIdentityInquiryIter *iter,
|
|
Packit |
79f644 |
GoaIdentityInquiry *inquiry);
|
|
Packit |
79f644 |
GoaIdentityQuery *goa_identity_inquiry_iter_next (GoaIdentityInquiryIter *iter,
|
|
Packit |
79f644 |
GoaIdentityInquiry *inquiry);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
GoaIdentityQueryMode goa_identity_query_get_mode (GoaIdentityInquiry *inquiry,
|
|
Packit |
79f644 |
GoaIdentityQuery *query);
|
|
Packit |
79f644 |
char * goa_identity_query_get_prompt (GoaIdentityInquiry *inquiry,
|
|
Packit |
79f644 |
GoaIdentityQuery *query);
|
|
Packit |
79f644 |
gboolean goa_identity_query_is_answered (GoaIdentityInquiry *inquiry,
|
|
Packit |
79f644 |
GoaIdentityQuery *query);
|
|
Packit |
79f644 |
|
|
Packit |
79f644 |
#endif /* __GOA_IDENTITY_INQUIRY_H__ */
|