#ifndef E_CAL_H
#define E_CAL_H
-#include <glib-object.h>
-#include "libedataserver/e-source-list.h"
-#include "libedataserver/e-source.h"
+#ifndef E_CAL_DISABLE_DEPRECATED
+
+#include <libedataserver/e-source.h>
#include <libecal/e-cal-recur.h>
#include <libecal/e-cal-util.h>
#include <libecal/e-cal-view.h>
#define E_IS_CAL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_CAL))
#define E_IS_CAL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), E_TYPE_CAL))
+#define E_TYPE_CAL_SOURCE_TYPE (e_cal_source_type_enum_get_type ())
#define E_CAL_SET_MODE_STATUS_ENUM_TYPE (e_cal_set_mode_status_enum_get_type ())
#define CAL_MODE_ENUM_TYPE (cal_mode_enum_get_type ())
/* Whether the ecal is not loaded, is being loaded, or is already loaded */
typedef enum {
E_CAL_LOAD_NOT_LOADED,
- E_CAL_LOAD_AUTHENTICATING,
E_CAL_LOAD_LOADING,
E_CAL_LOAD_LOADED
} ECalLoadState;
+/**
+ * EDataCalMode:
+ *
+ * FIXME: Document me.
+ *
+ * Since: 3.2
+ **/
+typedef enum {
+ Local = 1 << 0,
+ Remote = 1 << 1,
+ AnyMode = 0x07
+} EDataCalMode;
+
struct _ECal {
GObject object;
/* Notification signals */
+ #ifndef E_CAL_DISABLE_DEPRECATED
void (* cal_opened) (ECal *ecal, ECalendarStatus status);
+ #endif
+ void (* cal_opened_ex) (ECal *ecal, const GError *error);
void (* cal_set_mode) (ECal *ecal, ECalSetModeStatus status, CalMode mode);
void (* backend_error) (ECal *ecal, const gchar *message);
void (* backend_died) (ECal *ecal);
};
-typedef gchar * (* ECalAuthFunc) (ECal *ecal,
- const gchar *prompt,
- const gchar *key,
- gpointer user_data);
-
GType e_cal_get_type (void);
-GType e_cal_open_status_enum_get_type (void);
GType e_cal_source_type_enum_get_type (void);
GType e_cal_set_mode_status_enum_get_type (void);
GType cal_mode_enum_get_type (void);
ECal *e_cal_new (ESource *source, ECalSourceType type);
-ECal *e_cal_new_from_uri (const gchar *uri, ECalSourceType type);
-ECal *e_cal_new_system_calendar (void);
-ECal *e_cal_new_system_tasks (void);
-ECal *e_cal_new_system_memos (void);
-
-void e_cal_set_auth_func (ECal *ecal, ECalAuthFunc func, gpointer data);
gboolean e_cal_open (ECal *ecal, gboolean only_if_exists, GError **error);
void e_cal_open_async (ECal *ecal, gboolean only_if_exists);
ECalLoadState e_cal_get_load_state (ECal *ecal);
ESource *e_cal_get_source (ECal *ecal);
-const gchar *e_cal_get_uri (ECal *ecal);
gboolean e_cal_is_read_only (ECal *ecal, gboolean *read_only, GError **error);
gboolean e_cal_get_cal_address (ECal *ecal, gchar **cal_address, GError **error);
gboolean e_cal_get_timezone (ECal *ecal, const gchar *tzid, icaltimezone **zone, GError **error);
gboolean e_cal_add_timezone (ECal *ecal, icaltimezone *izone, GError **error);
/* Sets the default timezone to use to resolve DATE and floating DATE-TIME
- values. This will typically be from the user's timezone setting. Call this
- before using any other functions. It will pass the default timezone on to
- the server. Returns TRUE on success. */
+ * values. This will typically be from the user's timezone setting. Call this
+ * before using any other functions. It will pass the default timezone on to
+ * the server. Returns TRUE on success. */
gboolean e_cal_set_default_timezone (ECal *ecal, icaltimezone *zone, GError **error);
gboolean e_cal_get_query (ECal *ecal, const gchar *sexp, ECalView **query, GError **error);
icaltimezone *e_cal_resolve_tzid_cb (const gchar *tzid, gpointer data);
/* Returns a complete VCALENDAR for a VEVENT/VTODO including all VTIMEZONEs
- used by the component. It also includes a 'METHOD:PUBLISH' property. */
+ * used by the component. It also includes a 'METHOD:PUBLISH' property. */
gchar * e_cal_get_component_as_string (ECal *ecal, icalcomponent *icalcomp);
const gchar * e_cal_get_error_message (ECalendarStatus status);
/* Calendar/Tasks Discovery */
-gboolean e_cal_open_default (ECal **ecal, ECalSourceType type, ECalAuthFunc func, gpointer data, GError **error);
-gboolean e_cal_set_default (ECal *ecal, GError **error);
-gboolean e_cal_set_default_source (ESource *source, ECalSourceType type, GError **error);
-gboolean e_cal_get_sources (ESourceList **sources, ECalSourceType type, GError **error);
const gchar * e_cal_get_local_attachment_store (ECal *ecal);
gboolean e_cal_get_recurrences_no_master (ECal *ecal);
gboolean e_cal_get_attachments_for_comp (ECal *ecal, const gchar *uid, const gchar *rid, GSList **list, GError **error);
G_END_DECLS
+#endif /* E_CAL_DISABLE_DEPRECATED */
+
#endif