diff options
author | Federico Mena Quintero <federico@helixcode.com> | 2000-05-09 00:58:27 +0800 |
---|---|---|
committer | Federico Mena Quintero <federico@src.gnome.org> | 2000-05-09 00:58:27 +0800 |
commit | 8160d7388e27c6f97e3ed96bc5d61fbf20ff2d16 (patch) | |
tree | ff1ff2df49f02deccc5424fdf6004f1b90e05553 /calendar/pcs/cal-backend-imc.h | |
parent | c2dde9ab64a79b483804cddbd9622827b4b2baf2 (diff) | |
download | gsoc2013-evolution-8160d7388e27c6f97e3ed96bc5d61fbf20ff2d16.tar.gz gsoc2013-evolution-8160d7388e27c6f97e3ed96bc5d61fbf20ff2d16.tar.zst gsoc2013-evolution-8160d7388e27c6f97e3ed96bc5d61fbf20ff2d16.zip |
CalBackendClass now is just an interface for calendar backends; this is an
2000-05-08 Federico Mena Quintero <federico@helixcode.com>
* pcs/cal-backend.h (CalBackendClass): CalBackendClass now is just
an interface for calendar backends; this is an abstract class.
Put in the vtable for the backend methods.
* pcs/cal-backend.c (cal_backend_new): Removed function, since
CalBackend is not just an abstract class.
Removed implementation-specific functions and made public
functions call the virtual methods instead.
* pcs/cal-backend-imc.[ch]: New files with the CalBackendIMC
implementation; this implements a backend for iCalendar and
vCalendar files. Moved the implementation-specific stuff from
cal-backend.[ch] to here.
* pcs/cal-backend-imc.c (CalendarFormat): Moved enumeration to
here. Added a CAL_UNKNOWN value for when the backend is not
loaded yet.
(cal_backend_imc_init): Initialize priv->format as CAL_UNKNOWN.
(save_to_vcal): Use the same VCProdIdProp value as in
cal-util/calobj.c. Use "1.0" as the VCVersionProp as per the
vCalendar spec.
(ensure_uid): Return nothing, since the result value need not be
used anymore.
(add_object): Since we mark the calendar as dirty anyways, we do
not need to check the result value of ensure_uid() anymore.
(remove_object): Asssert that we know how to handle the object's
type. We do this in add_object() anyways.
* pcs/Makefile.am (libpcs_a_SOURCES): Added cal-backend-imc.[ch].
* gui/gnome-cal.c: Replaced debugging printf()s with g_message()
so that we can see the line number where they occur.
* gui/gnome-cal.c (gnome_calendar_load_cb): Sort of handle the
LOAD_METHOD_NOT_SUPPORTED result code, and added a default for the
switch.
* cal-client/cal-listener.h (CalListenerLoadStatus): Removed
enumeration; it is stupid to translate all values for the
CalClient when it is going to translate them again.
(CalListenerClass::cal_loaded): This signal now passes the
LoadStatus directly from the CORBA side.
* cal-client/cal-listener.c (Listener_cal_loaded): Do not
translate the status value.
* cal-client/cal-client.h (CalClientLoadStatus): Added the
CAL_CLIENT_LOAD_METHOD_NOT_SUPPORTED error code.
* cal-client/cal-client.c (cal_loaded_cb): Translate the CORBA
version of the LoadStatus result code.
* pcs/cal-factory.c (CalFactoryPrivate): New methods field for the
hash table from method strings to the GtkTypes for backend class
types.
(cal_factory_init): Create the priv->methods hash table.
(cal_factory_destroy): Free the priv->methods hash table.
(cal_factory_register_method): New function to register a backend
class for a particular URI method.
(launch_backend_for_uri): New function to launch a backend for a
particular URI's method.
(load_backend): Use launch_backend_for_uri(). Move the error
notification code from load_fn() to here.
(create_backend): Use launch_backend_for_uri(). Move the error
notification code form create_fn() to here; it is #ifdefed out
since currently cal_backend_create() does not have any error
reporting capabilities.
* idl/evolution-calendar.idl (Listener::LoadStatus): Added a
PROTOCOL_NOT_SUPPORTED error code.
* pcs/cal-factory.c (cal_factory_load cal_factory_create): Removed
functions, since they were supposed to be internal only.
(CalFactory_load): Call queue_load_create_job() directly.
(CalFactory_create): Likewise.
svn path=/trunk/; revision=2921
Diffstat (limited to 'calendar/pcs/cal-backend-imc.h')
-rw-r--r-- | calendar/pcs/cal-backend-imc.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/calendar/pcs/cal-backend-imc.h b/calendar/pcs/cal-backend-imc.h new file mode 100644 index 0000000000..b0fa93611e --- /dev/null +++ b/calendar/pcs/cal-backend-imc.h @@ -0,0 +1,60 @@ +/* Evolution calendar - Internet Mail Consortium formats backend + * + * Copyright (C) 2000 Helix Code, Inc. + * + * Authors: Federico Mena-Quintero <federico@helixcode.com> + * Seth Alves <alves@helixcode.com> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef CAL_BACKEND_IMC_H +#define CAL_BACKEND_IMC_H + +#include <libgnome/gnome-defs.h> +#include "cal-backend.h" + +BEGIN_GNOME_DECLS + + + +#define CAL_BACKEND_IMC_TYPE (cal_backend_imc_get_type ()) +#define CAL_BACKEND_IMC(obj) (GTK_CHECK_CAST ((obj), CAL_BACKEND_IMC_TYPE, CalBackendIMC)) +#define CAL_BACKEND_IMC_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_BACKEND_IMC_TYPE, \ + CalBackendIMCClass)) +#define IS_CAL_BACKEND_IMC(obj) (GTK_CHECK_TYPE ((obj), CAL_BACKEND_IMC_TYPE)) +#define IS_CAL_BACKEND_IMC_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_BACKEND_IMC_TYPE)) + +typedef struct _CalBackendIMC CalBackendIMC; +typedef struct _CalBackendIMCClass CalBackendIMCClass; + +struct _CalBackendIMC { + CalBackend backend; + + /* Private data */ + gpointer priv; +}; + +struct _CalBackendIMCClass { + CalBackendClass parent_class; +}; + +GtkType cal_backend_imc_get_type (void); + + + +END_GNOME_DECLS + +#endif |