InfGtkAccountCreationDialog

InfGtkAccountCreationDialog — A dialog to request a new account on a server.

Stability Level

Unstable, unless otherwise indicated

Synopsis

#include <libinfgtk/inf-gtk-account-creation-dialog.h>

                    InfGtkAccountCreationDialog;
struct              InfGtkAccountCreationDialogClass;
InfGtkAccountCreationDialog * inf_gtk_account_creation_dialog_new
                                                        (GtkWindow *parent,
                                                         GtkDialogFlags dialog_flags,
                                                         InfIo *io,
                                                         InfBrowser *browser);
void                inf_gtk_account_creation_dialog_set_browser
                                                        (InfGtkAccountCreationDialog *dlg,
                                                         InfBrowser *browser);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBin
                                 +----GtkWindow
                                       +----GtkDialog
                                             +----InfGtkAccountCreationDialog

Implemented Interfaces

InfGtkAccountCreationDialog implements AtkImplementorIface and GtkBuildable.

Properties

  "browser"                  InfBrowser*           : Read / Write / Construct
  "io"                       InfIo*                : Read / Write / Construct Only

Signals

  "account-created"                                : Run Last

Description

InfGtkAccountCreationDialog is a dialog widget which allows to request creation of a new account on an infinote server. If the "can-create-acl-account" permission is not granted, the dialog shows an error message instead.

Details

InfGtkAccountCreationDialog

typedef struct _InfGtkAccountCreationDialog InfGtkAccountCreationDialog;

InfGtkAccountCreationDialog is an opaque data type. You should only access it via the public API functions.


struct InfGtkAccountCreationDialogClass

struct InfGtkAccountCreationDialogClass {
  void(*account_created)(InfGtkAccountCreationDialog* dialog,
                         gnutls_x509_privkey_t key,
                         InfCertificateChain* chain,
                         const InfAclAccount* account);
};

This structure contains the default signal handlers for the InfGtkAccountCreationDialog class.

account_created ()

Default signal handler for the "account-created" signal.

inf_gtk_account_creation_dialog_new ()

InfGtkAccountCreationDialog * inf_gtk_account_creation_dialog_new
                                                        (GtkWindow *parent,
                                                         GtkDialogFlags dialog_flags,
                                                         InfIo *io,
                                                         InfBrowser *browser);

Creates a new InfGtkAccountCreationDialog, which can be used to generate a new account on the infinote directory represented by the given browser.

parent :

Parent GtkWindow of the dialog.

dialog_flags :

Flags for the dialog, see GtkDialogFlags.

io :

A InfIo object to schedule asynchronous operations.

browser :

The InfBrowser for which to create a new account.

Returns :

A new InfGtkAccountCreationDialog. Free with gtk_widget_destroy() when no longer needed.

inf_gtk_account_creation_dialog_set_browser ()

void                inf_gtk_account_creation_dialog_set_browser
                                                        (InfGtkAccountCreationDialog *dlg,
                                                         InfBrowser *browser);

Changes the browser for which to create a new account.

dlg :

A InfGtkAccountCreationDialog.

browser :

The InfBrowser for which to create a new account, or NULL.

Property Details

The "browser" property

  "browser"                  InfBrowser*           : Read / Write / Construct

The infinote directory for which to create an account.


The "io" property

  "io"                       InfIo*                : Read / Write / Construct Only

The InfIo object to schedule asynchronous operations.

Signal Details

The "account-created" signal

void                user_function                      (InfGtkAccountCreationDialog *dialog,
                                                        gpointer                     key,
                                                        InfCertificateChain         *certificate,
                                                        InfAclAccount               *account,
                                                        gpointer                     user_data)        : Run Last

This signal is emitted whenever a new account has been created with the dialog. Along with the created account, the login credentials are provided. Note that the private key is owned by the dialog, and will be deleted after the signal was emitted.

dialog :

The InfGtkAccountCreationDialog emitting the signal.

key :

A newly generated private key that the user certificate is signed with.

certificate :

A certificate signed by the server associated to the new account.

account :

The newly created account.

user_data :

user data set when the signal handler was connected.