## ECalClientView

ECalClientView — Recieving change notifications on calendars

## Functions

struct _ECalClient * | e_cal_client_view_ref_client ()
GDBusConnection * | e_cal_client_view_get_connection ()
const gchar * | e_cal_client_view_get_object_path ()
gboolean | e_cal_client_view_is_running ()
void | e_cal_client_view_set_fields_of_interest ()
void | e_cal_client_view_start ()
void | e_cal_client_view_stop ()
void | e_cal_client_view_set_flags ()

## Types and Values

enum | ECalClientViewFlags
struct | ECalClientView
struct | ECalClientViewClass

## Object Hierarchy

        GObject
        ╰── ECalClientView

## Implemented Interfaces

ECalClientView implements GInitable.

## Includes

    #include <libecal/libecal.h>

## Description

This class provides functionality for watching for changes on a given calendar opened with an ECalClient. Use `e_cal_client_get_view()` to create an ECalClientView.

## Functions

### e_cal_client_view_ref_client ()

    struct _ECalClient *
    e_cal_client_view_ref_client (ECalClientView *client_view);

Returns the “client” associated with `client_view` .

The returned ECalClient is referenced for thread-safety. Unreference the ECalClient with `g_object_unref()` when finished with it.

#### Parameters

client_view | an ECalClientView |

#### Returns

an ECalClient.

[type ECalClient][transfer full]

Since: 3.10

### e_cal_client_view_get_connection ()

    GDBusConnection *
    e_cal_client_view_get_connection (ECalClientView *client_view);

Returns the GDBusConnection used to create the D-Bus proxy.

#### Parameters

client_view | an ECalClientView |

#### Returns

the GDBusConnection.

[transfer none]

Since: 3.8

### e_cal_client_view_get_object_path ()

    const gchar *
    e_cal_client_view_get_object_path (ECalClientView *client_view);

Returns the object path used to create the D-Bus proxy.

#### Parameters

client_view | an ECalClientView |

#### Returns

the object path

Since: 3.8

### e_cal_client_view_is_running ()

    gboolean
    e_cal_client_view_is_running (ECalClientView *client_view);

Retunrs: Whether view is running. Not running views are ignoring all events sent from the server.

#### Parameters

client_view | an ECalClientView |

Since: 3.2

### e_cal_client_view_set_fields_of_interest ()

    void
    e_cal_client_view_set_fields_of_interest
                                   (ECalClientView *client_view,
                                    const GSList *fields_of_interest,
                                    GError **error);

Client can instruct server to which fields it is interested in only, thus the server can return less data over the wire. The server can still return complete objects, this is just a hint to it that the listed fields will be used only. The UID/RID fields are returned always. Initial views has no fields of interest and using `NULL` for `fields_of_interest` will unset any previous changes.

Some backends can use summary information of its cache to create artifical objects, which will omit stored object parsing. If this cannot be done then it will simply return object as is stored in the cache.

#### Parameters

client_view | an ECalClientView |
fields_of_interest | List of field names in which the client is interested, or `NULL` to reset the fields of interest. | [element-type utf8][nullable]
error | return location for a GError, or `NULL` |

### e_cal_client_view_start ()

    void
    e_cal_client_view_start (ECalClientView *client_view,
                             GError **error);

Tells `client_view` to start processing events.

#### Parameters

client_view | an ECalClientView |
error | return location for a GError, or `NULL` |

Since: 3.2

### e_cal_client_view_stop ()

    void
    e_cal_client_view_stop (ECalClientView *client_view,
                            GError **error);

Tells `client_view` to stop processing events.

#### Parameters

client_view | an ECalClientView |
error | return location for a GError, or `NULL` |

Since: 3.2

### e_cal_client_view_set_flags ()

    void
    e_cal_client_view_set_flags (ECalClientView *client_view,
                                 ECalClientViewFlags flags,
                                 GError **error);

Sets the `flags` which control the behaviour of `client_view` .

#### Parameters

client_view | an ECalClientView |
flags | the ECalClientViewFlags for `client_view` |
error | return location for a GError, or `NULL` |

Since: 3.6

## Types and Values

### enum ECalClientViewFlags

Flags that control the behaviour of an ECalClientView.

#### Members

E_CAL_CLIENT_VIEW_FLAGS_NONE | Symbolic value for no flags |
E_CAL_CLIENT_VIEW_FLAGS_NOTIFY_INITIAL | If this flag is set then all objects matching the view's query will be sent as notifications when starting the view, otherwise only future changes will be reported. The default for an ECalClientView is `TRUE`. |

Since: 3.6

### struct ECalClientView

    struct ECalClientView;

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

Since: 3.2

### struct ECalClientViewClass

    struct ECalClientViewClass {
    	/* Signals */
    	void		(*objects_added) (ECalClientView *client_view,
    						 const GSList *objects); /* ICalComponent * */
    	void		(*objects_modified) (ECalClientView *client_view,
    						 const GSList *objects); /* ICalComponent * */
    	void		(*objects_removed) (ECalClientView *client_view,
    						 const GSList *uids); /* ECalComponentId * */
    	void		(*progress)		(ECalClientView *client_view,
    						 guint percent,
    						 const gchar *message);
    	void		(*complete)		(ECalClientView *client_view,
    						 const GError *error);
    };

Base class structure for the ECalClientView class

#### Members

`objects_added` () | A signal emitted when new objects are added into the view |
`objects_modified` () | A signal emitted when some objects are modified in the view |
`objects_removed` () | A signal emitted when some objects are removed from the view |
`progress` () | A signal emitted when the backend notifies about the progress |
`complete` () | A signal emitted when the backend finished initial view population |