## EUserPrompterServer

EUserPrompterServer — Server-side user prompter

## Synopsis

    #define             E_USER_PROMPTER_SERVER_OBJECT_PATH
    struct              EUserPrompterServer;
    struct              EUserPrompterServerClass;
    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);

## 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 {
    	EDBusServer parent;
    	EUserPrompterServerPrivate *priv;
    };

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

Since 3.8

### struct EUserPrompterServerClass

    struct EUserPrompterServerClass {
    	EDBusServerClass parent_class;

    	/* signals */
    	void		(*prompt)		(EUserPrompterServer *server,
    						 gint id,
    						 const gchar *type,
    						 const gchar *title,
    						 const gchar *primary_text,
    						 const gchar *secondary_text,
    						 gboolean use_markup,
    						 const GSList *button_captions);
    };

### 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