## EUserPrompterServer

EUserPrompterServer — Server-side user prompter

## Synopsis

    #define             E_USER_PROMPTER_SERVER_OBJECT_PATH
    struct              EUserPrompterServer;
    EDBusServer *       e_user_prompter_server_new          (void);
    void                e_user_prompter_server_response     (EUserPrompterServer *server,
                                                             gint prompt_id,
                                                             gint response,
                                                             const ENamedParameters *extension_values);
    gboolean            e_user_prompter_server_register     (EUserPrompterServer *server,
                                                             EExtension *extension,
                                                             const gchar *dialog_name);

## Object Hierarchy

      GObject
       +----EDBusServer
             +----EUserPrompterServer

## Implemented Interfaces

EUserPrompterServer implements EExtensible.

## Signals

      "prompt"                                         : Run Last

## Description

The EUserPrompterServer is the heart of the user prompter D-Bus service. Acting as a global singleton for user prompts from backends.

## Details

### E_USER_PROMPTER_SERVER_OBJECT_PATH

    #define             E_USER_PROMPTER_SERVER_OBJECT_PATH

D-Bus object path of the user prompter.

Since 3.8

### struct EUserPrompterServer

    struct EUserPrompterServer;

Contains only private data that should be read and manipulated using the functions below.

Since 3.8

### e_user_prompter_server_new ()

    EDBusServer *       e_user_prompter_server_new          (void);

Creates a new instance of EUserPrompterServer.

Returns : | a new instance of EUserPrompterServer

Since 3.8

### e_user_prompter_server_response ()

    void                e_user_prompter_server_response     (EUserPrompterServer *server,
                                                             gint prompt_id,
                                                             gint response,
                                                             const ENamedParameters *extension_values);

Finishes prompt initiated by a "prompt" signal or an extension prompt. The `response` for non-extension prompts is a 0-based index of a button used to close the prompt.

The `extension_values` is ignored for non-extension prompts.

`server` : | an EUserPrompterServer
`prompt_id` : | Id of a prompt, which was responded
`response` : | Response of the prompt
`extension_values` : | For extension prompts can pass extra return values. [allow-none]

Since 3.8

### e_user_prompter_server_register ()

    gboolean            e_user_prompter_server_register     (EUserPrompterServer *server,
                                                             EExtension *extension,
                                                             const gchar *dialog_name);

Registers `extension` as a provider of `dialog_name` dialog. The names are compared case sensitively and two extensions cannot provide the same dialog. If the function succeeds, then it adds its own reference on the `extension`.

Extensions providing multiple dialogs call this function multiple times, for each dialog name separately.

`server` : | an EUserPrompterServer
`extension` : | an EUserPrompterServerExtension descendant
`dialog_name` : | name of a dialog, which the `extensions` implement
Returns : | Whether properly registered `extension`

Since 3.8

## Signal Details

### The `"prompt"` signal

    void                user_function                      (EUserPrompterServer *euserprompterserver,
                                                            gint                 arg1,
                                                            gchar               *arg2,
                                                            gchar               *arg3,
                                                            gchar               *arg4,
                                                            gchar               *arg5,
                                                            gboolean             arg6,
                                                            gpointer             arg7,
                                                            gpointer             user_data)                : Run Last