## GdauiLogin

GdauiLogin — Connection opening dialog

## Synopsis

    struct              GdauiLogin;
    GtkWidget *         gdaui_login_new                     (const gchar *dsn);
    enum                GdauiLoginMode;
    void                gdaui_login_set_mode                (GdauiLogin *login,
                                                             GdauiLoginMode mode);
    const GdaDsnInfo *  gdaui_login_get_connection_information
                                                            (GdauiLogin *login);
    void                gdaui_login_set_dsn                 (GdauiLogin *login,
                                                             const gchar *dsn);
    void                gdaui_login_set_connection_information
                                                            (GdauiLogin *login,
                                                             const GdaDsnInfo *cinfo);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBox
                                     +----GtkVBox
                                           +----GdauiLogin

## Implemented Interfaces

GdauiLogin implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## Properties

      "dsn"                      gchar*                : Read / Write
      "mode"                     GdauiLoginMode        : Read / Write
      "valid"                    gboolean              : Read

## Signals

      "changed"                                        : Run First

## Description

The GdauiLogin widget can be used when the user needs to enter data to open a connection. It can be customized in several ways:

- data source (DSN) selection can be shown or hidden

- the button to launch the control center to declare new data sources can be shown or hidden

- the form to open a connection not using a DSN can be shown or hidden

## Details

### struct GdauiLogin

    struct GdauiLogin;

### gdaui_login_new ()

    GtkWidget *         gdaui_login_new                     (const gchar *dsn);

Creates a new login widget which enables the user to specify connection parameters.

`dsn` : | a data source name, or `NULL`. [allow-none]
Returns : | a new widget. [transfer full]

Since 4.2

### enum GdauiLoginMode

    typedef enum {
    	GDA_UI_LOGIN_ENABLE_CONTROL_CENTRE_MODE = 1 << 0,
    	GDA_UI_LOGIN_HIDE_DSN_SELECTION_MODE = 1 << 1,
    	GDA_UI_LOGIN_HIDE_DIRECT_CONNECTION_MODE = 1 << 2
    } GdauiLoginMode;

### gdaui_login_set_mode ()

    void                gdaui_login_set_mode                (GdauiLogin *login,
                                                             GdauiLoginMode mode);

Set how `login` operates

`login` : | a GdauiLogin object
`mode` : | a flag

Since 4.2

### gdaui_login_get_connection_information ()

    const GdaDsnInfo *  gdaui_login_get_connection_information
                                                            (GdauiLogin *login);

Get the information specified in `login` as a pointer to a (read-only) GdaDsnInfo. If the connection is not specified by a DSN, then the 'name' attribute of the returned GdaDsnInfo will be `NULL`, and otherwise it will contain the name of the selected DSN.

Retuns: (transfer none): a pointer to a (read-only) GdaDsnInfo.

`login` : | a GdauiLogin object

Since 4.2

### gdaui_login_set_dsn ()

    void                gdaui_login_set_dsn                 (GdauiLogin *login,
                                                             const gchar *dsn);

Changes the information displayed in `login`, to represent `dsn`. If `login`'s mode has `GDA_UI_LOGIN_HIDE_DSN_SELECTION_MODE`, then the DSN information is extracted and displayed in the direct login area.

If `dsn` is not a declared data source name, then a warning is shown and the result is the same as having passed `NULL` for the `dsn` argument.

In any case `login`'s mode (set by `gdaui_login_set_mode()`) is not changed.

`login` : | a GdauiLogin object
`dsn` : | a data source name, or `NULL`. [allow-none]

### gdaui_login_set_connection_information ()

    void                gdaui_login_set_connection_information
                                                            (GdauiLogin *login,
                                                             const GdaDsnInfo *cinfo);

Changes the information displayed in `login`, to represent `cinfo`. If `login`'s mode has `GDA_UI_LOGIN_HIDE_DIRECT_CONNECTION_MODE`, then if `cinfo->name` is not `NULL` it is displayed in the DSN selector, otherwise a warning is shown and the result is the same as having passed `NULL` for the `cinfo` argument.

In any case `login`'s mode (set by `gdaui_login_set_mode()`) is not changed.

`login` : | a GdauiLogin object
`cinfo` : | a pointer to a structure representing the information to display.

## Property Details

### The `"dsn"` property

      "dsn"                      gchar*                : Read / Write

Default value: NULL

### The `"mode"` property

      "mode"                     GdauiLoginMode        : Read / Write

### The `"valid"` property

      "valid"                    gboolean              : Read

Default value: FALSE

## Signal Details

### The `"changed"` signal

    void                user_function                      (GdauiLogin *gdauilogin,
                                                            gboolean    arg1,
                                                            gpointer    user_data)       : Run First

`gdauilogin` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.