1 /* Evolution calendar - weather backend factory
3 * Copyright (C) 2005 Novell, Inc (www.novell.com)
5 * Authors: David Trowbridge <trowbrds@cs.colorado.edu>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of version 2 of the GNU Lesser General Public
9 * License as published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 #include "e-cal-backend-weather-factory.h"
28 #include "e-cal-backend-weather.h"
31 ECalBackendFactory parent_object;
32 } ECalBackendWeatherFactory;
35 ECalBackendWeatherClass parent_class;
36 } ECalBackendWeatherFactoryClass;
39 e_cal_backend_weather_factory_instance_init (ECalBackendWeatherFactory *factory)
44 _get_protocol (ECalBackendFactory *factory)
50 _events_new_backend (ECalBackendFactory *factory, ESource *source)
52 return g_object_new (e_cal_backend_weather_get_type (),
54 "kind", ICAL_VEVENT_COMPONENT,
58 static icalcomponent_kind
59 _events_get_kind (ECalBackendFactory *factory)
61 return ICAL_VEVENT_COMPONENT;
65 events_backend_factory_class_init (ECalBackendWeatherFactoryClass *klass)
67 E_CAL_BACKEND_FACTORY_CLASS (klass)->get_protocol = _get_protocol;
68 E_CAL_BACKEND_FACTORY_CLASS (klass)->get_kind = _events_get_kind;
69 E_CAL_BACKEND_FACTORY_CLASS (klass)->new_backend = _events_new_backend;
73 events_backend_factory_get_type (GTypeModule *module)
77 sizeof (ECalBackendWeatherFactoryClass),
78 NULL, /* base_class_init */
79 NULL, /* base_class_finalize */
80 (GClassInitFunc) events_backend_factory_class_init,
81 NULL, /* class_finalize */
82 NULL, /* class_data */
85 (GInstanceInitFunc) e_cal_backend_weather_factory_instance_init
87 type = g_type_module_register_type (module,
88 E_TYPE_CAL_BACKEND_FACTORY,
89 "ECalBackendWeatherEventsFactory",
95 static GType weather_type[1];
98 eds_module_initialize (GTypeModule *module)
100 weather_type[0] = events_backend_factory_get_type (module);
104 eds_module_shutdown (void)
109 eds_module_list_types (const GType **types, int *num_types)
111 *types = weather_type;