## EShell EShell — the backbone of Evolution |

## Functions

EShell * | e_shell_get_default ()
void | e_shell_load_modules ()
GList * | e_shell_get_shell_backends ()
const gchar * | e_shell_get_canonical_name ()
EShellBackend * | e_shell_get_backend_by_name ()
EShellBackend * | e_shell_get_backend_by_scheme ()
EClientCache * | e_shell_get_client_cache ()
ESourceRegistry * | e_shell_get_registry ()
ECredentialsPrompter * | e_shell_get_credentials_prompter ()
void | e_shell_allow_auth_prompt_for ()
GtkWidget * | e_shell_create_shell_window ()
guint | e_shell_handle_uris ()
void | e_shell_submit_alert ()
GtkWindow * | e_shell_get_active_window ()
gboolean | e_shell_get_express_mode ()
const gchar * | e_shell_get_module_directory ()
gboolean | e_shell_get_network_available ()
void | e_shell_set_network_available ()
void | e_shell_lock_network_available ()
gboolean | e_shell_get_online ()
void | e_shell_set_online ()
GtkWidget * | e_shell_get_preferences_window ()
void | e_shell_event ()
gboolean | e_shell_quit ()
void | e_shell_cancel_quit ()
gboolean | e_shell_requires_shutdown ()

## Types and Values

enum | EShellQuitReason
struct | EShell

## Includes

    #include <shell/e-shell.h>

## Description

## Functions

### e_shell_get_default ()

    EShell *
    e_shell_get_default (void);

`e_shell_get_default` is deprecated and should not be used in newly-written code.

Returns the EShell created by ``main()``.

Try to obtain the EShell from elsewhere if you can. This function is intended as a temporary workaround for when that proves difficult.

#### Returns

the EShell singleton

### e_shell_load_modules ()

    void
    e_shell_load_modules (EShell *shell);

`e_shell_load_modules` is deprecated and should not be used in newly-written code.

Loads all installed modules and performs some internal bookkeeping. This function should be called after creating the EShell instance but before initiating migration or starting the main loop.

#### Parameters

shell | an EShell |

### e_shell_get_shell_backends ()

    GList *
    e_shell_get_shell_backends (EShell *shell);

`e_shell_get_shell_backends` is deprecated and should not be used in newly-written code.

Returns a list of loaded EShellBackend instances. The list is owned by `shell` and should not be modified or freed.

#### Parameters

shell | an EShell |

#### Returns

a list of loaded EShellBackend instances

### e_shell_get_canonical_name ()

    const gchar *
    e_shell_get_canonical_name (EShell *shell,
                                const gchar *name);

`e_shell_get_canonical_name` is deprecated and should not be used in newly-written code.

Returns the canonical name for the EShellBackend whose name or alias is `name` .

#### Parameters

shell | an EShell |
name | the name or alias of an EShellBackend |

#### Returns

the canonical EShellBackend name

### e_shell_get_backend_by_name ()

    EShellBackend *
    e_shell_get_backend_by_name (EShell *shell,
                                 const gchar *name);

`e_shell_get_backend_by_name` is deprecated and should not be used in newly-written code.

Returns the corresponding EShellBackend for the given name or alias, or `NULL` if `name` is not recognized.

#### Parameters

shell | an EShell |
name | the name or alias of an EShellBackend |

#### Returns

the EShellBackend named `name` , or `NULL`

### e_shell_get_backend_by_scheme ()

    EShellBackend *
    e_shell_get_backend_by_scheme (EShell *shell,
                                   const gchar *scheme);

`e_shell_get_backend_by_scheme` is deprecated and should not be used in newly-written code.

Returns the EShellBackend that implements the given URI scheme, or `NULL` if `scheme` is not recognized.

#### Parameters

shell | an EShell |
scheme | a URI scheme |

#### Returns

the EShellBackend that implements `scheme` , or `NULL`

### e_shell_get_client_cache ()

    EClientCache *
    e_shell_get_client_cache (EShell *shell);

`e_shell_get_client_cache` is deprecated and should not be used in newly-written code.

Returns the EClientCache instance for `shell` .

#### Parameters

shell | an EShell |

#### Returns

the EClientCache instance for `shell`

### e_shell_get_registry ()

    ESourceRegistry *
    e_shell_get_registry (EShell *shell);

`e_shell_get_registry` is deprecated and should not be used in newly-written code.

Returns the shell's ESourceRegistry which holds all ESource instances.

#### Parameters

shell | an EShell |

#### Returns

the ESourceRegistry

### e_shell_get_credentials_prompter ()

    ECredentialsPrompter *
    e_shell_get_credentials_prompter (EShell *shell);

`e_shell_get_credentials_prompter` is deprecated and should not be used in newly-written code.

Returns the shell's ECredentialsPrompter which responds to ESource instances credential requests.

#### Parameters

shell | an EShell |

#### Returns

the ECredentialsPrompter

Since: 3.16

### e_shell_allow_auth_prompt_for ()

    void
    e_shell_allow_auth_prompt_for (EShell *shell,
                                   ESource *source);

`e_shell_allow_auth_prompt_for` is deprecated and should not be used in newly-written code.

Allows direct credentials prompt for `source` . That means, when the `source` will emit 'credentials-required' signal, then a user will be asked accordingly. When the auth prompt is disabled, aonly an EAlert is shown.

#### Parameters

shell | an EShell |
source | an ESource |

Since: 3.16

### e_shell_create_shell_window ()

    GtkWidget *
    e_shell_create_shell_window (EShell *shell,
                                 const gchar *view_name);

`e_shell_create_shell_window` is deprecated and should not be used in newly-written code.

Creates a new EShellWindow. Use this function instead of `e_shell_window_new()` so that `shell` can properly configure the window.

#### Parameters

shell | an EShell |
view_name | name of the initial shell view, or `NULL` |

#### Returns

a new EShellWindow

### e_shell_handle_uris ()

    guint
    e_shell_handle_uris (EShell *shell,
                         const gchar * const *uris,
                         gboolean do_import);

`e_shell_handle_uris` is deprecated and should not be used in newly-written code.

Emits the “handle-uri” signal for each URI.

#### Parameters

shell | an EShell |
uris | `NULL`-terminated list of URIs |
do_import | request an import of the URIs |

#### Returns

the number of URIs successfully handled

### e_shell_submit_alert ()

    void
    e_shell_submit_alert (EShell *shell,
                          EAlert *alert);

`e_shell_submit_alert` is deprecated and should not be used in newly-written code.

Broadcasts `alert` to all EShellWindows. This should only be used for application-wide alerts such as a network outage. Submit view-specific alerts to the appropriate EShellContent instance.

#### Parameters

shell | an EShell |
alert | an EAlert |

### e_shell_get_active_window ()

    GtkWindow *
    e_shell_get_active_window (EShell *shell);

`e_shell_get_active_window` is deprecated and should not be used in newly-written code.

Returns the most recently focused watched window, according to `gtk_application_get_windows()`. Convenient for finding a parent for a transient window.

Note the returned window is not necessarily an EShellWindow.

#### Parameters

shell | an EShell or `NULL` to use the default shell |

#### Returns

the most recently focused watched window

### e_shell_get_express_mode ()

    gboolean
    e_shell_get_express_mode (EShell *shell);

`e_shell_get_express_mode` is deprecated and should not be used in newly-written code.

Returns `TRUE` if Evolution is in express mode.

#### Parameters

shell | an EShell |

#### Returns

`TRUE` if Evolution is in express mode

### e_shell_get_module_directory ()

    const gchar *
    e_shell_get_module_directory (EShell *shell);

`e_shell_get_module_directory` is deprecated and should not be used in newly-written code.

Returns the directory from which EModules were loaded.

#### Parameters

shell | an EShell |

#### Returns

the EModule directory

### e_shell_get_network_available ()

    gboolean
    e_shell_get_network_available (EShell *shell);

`e_shell_get_network_available` is deprecated and should not be used in newly-written code.

Returns `TRUE` if a network is available.

#### Parameters

shell | an EShell |

#### Returns

`TRUE` if a network is available

### e_shell_set_network_available ()

    void
    e_shell_set_network_available (EShell *shell,
                                   gboolean network_available);

`e_shell_set_network_available` is deprecated and should not be used in newly-written code.

Sets whether a network is available. This is usually called in response to a status change signal from NetworkManager. If the network becomes unavailable while “online” is `TRUE`, the `shell` will force “online” to `FALSE` until the network becomes available again.

#### Parameters

shell | an EShell |
network_available | whether a network is available |

### e_shell_lock_network_available ()

    void
    e_shell_lock_network_available (EShell *shell);

`e_shell_lock_network_available` is deprecated and should not be used in newly-written code.

Locks the value of “network-available” to `TRUE`. Further attempts to set the property will be ignored.

This is used for the --force-online command-line option, which is intended to override the network availability status as reported by NetworkManager or other network monitoring software.

#### Parameters

shell | an EShell |

### e_shell_get_online ()

    gboolean
    e_shell_get_online (EShell *shell);

`e_shell_get_online` is deprecated and should not be used in newly-written code.

Returns `TRUE` if Evolution is online, `FALSE` if Evolution is offline. Evolution may be offline because the user elected to work offline, or because the network has become unavailable.

#### Parameters

shell | an EShell |

#### Returns

`TRUE` if Evolution is online

### e_shell_set_online ()

    void
    e_shell_set_online (EShell *shell,
                        gboolean online);

`e_shell_set_online` is deprecated and should not be used in newly-written code.

Asynchronously places Evolution in online or offline mode.

#### Parameters

shell | an EShell |
online | `TRUE` to go online, `FALSE` to go offline |

### e_shell_get_preferences_window ()

    GtkWidget *
    e_shell_get_preferences_window (EShell *shell);

`e_shell_get_preferences_window` is deprecated and should not be used in newly-written code.

Returns the Evolution Preferences window.

#### Parameters

shell | an EShell |

#### Returns

the preferences window

### e_shell_event ()

    void
    e_shell_event (EShell *shell,
                   const gchar *event_name,
                   gpointer event_data);

`e_shell_event` is deprecated and should not be used in newly-written code.

The “event” signal acts as a cheap mechanism for broadcasting events to the rest of the application, such as new mail arriving. The `event_name` is used as the signal detail, and `event_data` may point to an object or data structure associated with the event.

#### Parameters

shell | an EShell |
event_name | the name of the event |
event_data | data associated with the event |

### e_shell_quit ()

    gboolean
    e_shell_quit (EShell *shell,
                  EShellQuitReason reason);

`e_shell_quit` is deprecated and should not be used in newly-written code.

Requests an application shutdown. This happens in two phases: the first is synchronous, the second is asynchronous.

In the first phase, the `shell` emits a “quit-requested” signal to potentially give the user a chance to cancel shutdown. If the user cancels shutdown, the function returns `FALSE`. Otherwise it proceeds into the second phase.

In the second phase, the `shell` emits a “prepare-for-quit” signal and immediately returns `TRUE`. Signal handlers may delay the actual application shutdown while they clean up resources, but there is no way to cancel shutdown at this point.

Consult the documentation for these two signals for details on how to handle them.

#### Parameters

shell | an EShell |
reason | the reason for quitting |

#### Returns

`TRUE` if shutdown is underway, `FALSE` if it was cancelled

### e_shell_cancel_quit ()

    void
    e_shell_cancel_quit (EShell *shell);

`e_shell_cancel_quit` is deprecated and should not be used in newly-written code.

This function may only be called from “quit-requested” signal handlers to prevent Evolution from quitting. Calling this will stop further emission of the “quit-requested” signal.

Note: This function has no effect during a “prepare-for-quit” signal emission.

#### Parameters

shell | an EShell |

### e_shell_requires_shutdown ()

    gboolean
    e_shell_requires_shutdown (EShell *shell);

`e_shell_requires_shutdown` is deprecated and should not be used in newly-written code.

## Types and Values

### enum EShellQuitReason

`EShellQuitReason` is deprecated and should not be used in newly-written code.

These values are passed in the “quit-requested” signal to indicate why the shell is requesting to shut down.

#### Members

E_SHELL_QUIT_ACTION | `E_SHELL_WINDOW_ACTION_QUIT` was activated. |
E_SHELL_QUIT_LAST_WINDOW | The last watched window has been destroyed. |
E_SHELL_QUIT_OPTION | The program was invoked with --quit. Extensions will never see this value because they are not loaded when --quit is given. |
E_SHELL_QUIT_REMOTE_REQUEST | Another Evolution process requested we quit. |
E_SHELL_QUIT_SESSION_REQUEST | The desktop session requested we quit. |

### struct EShell

    struct EShell {
    	GtkApplication parent;
    	EShellPrivate *priv;
    };

`EShell` is deprecated and should not be used in newly-written code.

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