EBackend

## EBackend EBackend — an abstract base class for backends |

## Synopsis

    #include <libebackend/e-backend.h>

    struct              EBackend;
    gboolean            e_backend_get_online                (EBackend *backend);
    void                e_backend_set_online                (EBackend *backend,
                                                             gboolean online);
    ESource *           e_backend_get_source                (EBackend *backend);
    void                e_backend_last_client_gone          (EBackend *backend);

## Object Hierarchy

      GObject
       +----EBackend

## Properties

      "online"                   gboolean              : Read / Write / Construct
      "source"                   ESource*              : Read / Write / Construct Only

## Signals

      "last-client-gone"                               : Run Last

## Description

An EBackend is paired with an ESource to facilitate performing actions on the local or remote resource described by the ESource.

In other words, whereas a certain backend type knows how to talk to a certain type of server or data store, the ESource fills in configuration details such as host name, user name, resource path, etc.

All EBackend instances are created by an EBackendFactory.

## Details

### struct EBackend

    struct EBackend;

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

Since 3.4

### e_backend_get_online ()

    gboolean            e_backend_get_online                (EBackend *backend);

Returns the online state of `backend`: `TRUE` if `backend` is online, `FALSE` if offline. The online state of each backend is bound to the online state of the EDataFactory that created it.

`backend` : | an EBackend
Returns : | the online state

Since 3.4

### e_backend_set_online ()

    void                e_backend_set_online                (EBackend *backend,
                                                             gboolean online);

Sets the online state of `backend`: `TRUE` if `backend` is online, `FALSE` if offline. The online state of each backend is bound to the online state of the EDataFactory that created it.

`backend` : | an EBackend
`online` : | the online state

Since 3.4

### e_backend_get_source ()

    ESource *           e_backend_get_source                (EBackend *backend);

Returns the ESource to which `backend` is paired.

`backend` : | an EBackend
Returns : | the ESource to which `backend` is paired

Since 3.4

### e_backend_last_client_gone ()

    void                e_backend_last_client_gone          (EBackend *backend);

Emits the "last-client-gone" signal to indicate the last client connection to `backend` has been closed. The `backend` may be finalized after a short period to reclaim resources if no new client connections are established.

`backend` : | an EBackend

Since 3.4

## Property Details

### The `"online"` property

      "online"                   gboolean              : Read / Write / Construct

Whether the backend is online.

Default value: TRUE

### The `"source"` property

      "source"                   ESource*              : Read / Write / Construct Only

The data source being acted upon.

## Signal Details

### The `"last-client-gone"` signal

    void                user_function                      (EBackend *ebackend,
                                                            gpointer  user_data)      : Run Last