PhoshNetworkAuthPrompt

PhoshNetworkAuthPrompt — A modal prompt for asking Network credentials

Functions

Signals

void done Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkWindow
                        ╰── PhoshLayerSurface
                            ╰── PhoshSystemModal
                                ╰── PhoshSystemModalDialog
                                    ╰── PhoshNetworkAuthPrompt

Implemented Interfaces

PhoshNetworkAuthPrompt implements AtkImplementorIface and GtkBuildable.

Description

The PhoshNetworkAuthPrompt is used to request network credentials The responses are then passed to NetworkManager's ShellNetworkAgent.

Functions

phosh_network_auth_prompt_new ()

GtkWidget *
phosh_network_auth_prompt_new (ShellNetworkAgent *agent);

phosh_network_auth_prompt_set_request ()

gboolean
phosh_network_auth_prompt_set_request (PhoshNetworkAuthPrompt *self,
                                       char *request_id,
                                       NMConnection *connection,
                                       char *setting_name,
                                       char **hints,
                                       NMSecretAgentGetSecretsFlags flags,
                                       const char *title,
                                       const char *message,
                                       GPtrArray *secrets);

Sets up a network authentication prompt for an auth request.

Parameters

self

The prompt

 

request_id

The unique id of this authentication request

 

connection

The network manager connection

 

setting_name

The connection setting name (e.g. 'vpn')

 

hints

auth request hints (currently unused)

 

flags

Secret flags

 

title

The prompt title

 

message

The prompt message

 

secrets

The secrets to get.

[nullable]

Returns

TRUE if success otherwise (e.g. if the prompt is still in use) FALSE

Types and Values

PhoshNMSecret

typedef struct {
  char     *name;
  char     *key;
  char     *value;
  gboolean  is_pw;
} PhoshNMSecret;

Used for secret transfer between PhoshNetworkAuthManager and PhoshNetworkAuthPrompt

Members

char *name;

The secrets name

 

char *key;

The key that identifies it to the nm plugin

 

char *value;

The value (secret)

 

gboolean is_pw;

Whether this is a secret

 

PHOSH_TYPE_NETWORK_AUTH_PROMPT

#define PHOSH_TYPE_NETWORK_AUTH_PROMPT (phosh_network_auth_prompt_get_type())

PhoshNetworkAuthPrompt

typedef struct _PhoshNetworkAuthPrompt PhoshNetworkAuthPrompt;

Signal Details

The “done” signal

void
user_function (PhoshNetworkAuthPrompt *phoshnetworkauthprompt,
               gboolean                arg1,
               gpointer                user_data)

This signal is emitted when the prompt can be closed. The cancelled argument indicates whether the prompt was cancelled.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Run Last