2000-02-08 Federico Mena Quintero <federico@helixcode.com> * evolution-calendar.idl (Cal): Added get_uids() method to get a list of UIDs based on object types. * cal-backend.c (cal_backend_get_uids): Implemented get_uids() in the backend. * cal.c (Cal_get_uids): Implemented get_uids() method. * cal-client.c (cal_client_get_uids): Implemented client-side function. * cal-util.c (cal_obj_instance_list_free): Doh. Free the list, not the last link. (cal_obj_uid_list_free): New function to free a list of UIDs. * GnomeCal.idl (Repository): Removed unused method get_object_by_id_list(). This is just for cleanup purposes and to remind me exactly of what needs to be moved over to evolution-calendar.idl. (Repository): Removed unused get_objects() method. * corba-cal.c (init_calendar_repo_class): Removed the unused get_objects method. * calobj.h (CalObjFindStatus): New status value enumeration for the find function. * calobj.c (ical_object_find_in_string): New function to parse a complete calendar and find a calendar object in it. This should be used instead ical_object_new_from_string() in the future. * evolution-calendar.idl (CalObjInstance): Added an uid field. Now the idea is that whenever calendar object strings are passed around, their UIDs are passed along with them so that the actual object can be pulled from the whole VCAL object using its UID to identify it. * cal-util.h (CalObjInstance): Added uid field. * cal-util.c (cal_obj_instance_list_free): Free the UIDs. * cal-backend.c (build_event_list): Store the object's UID in the instance structure. * cal.c (Cal_get_events_in_range): Copy the UID field to the CORBA structure. * cal-client.c (cal_client_get_events_in_range): Copy the UID field from the CORBA structure. * main.c (gnome_cal_file_menu): Removed unfinished html-month stuff. * Makefile.am (gnomecal_SOURCES): Removed html-month.c. * gnome-cal.c: #include "alarm.h" (mail_notify): Made static. * alarm.h: #include "calobj.h" * corba-cal-factory.h (init_corba_server): Fixed prototype. * quick-view.c (create_items_for_event): Made static. * gncal-todo.c (column_resized): Made static. * layout.c (find_index): Made static. svn path=/trunk/; revision=1699
86 lines
2.4 KiB
C
86 lines
2.4 KiB
C
/* Evolution calendar client
|
||
*
|
||
* Copyright (C) 2000 Helix Code, Inc.
|
||
*
|
||
* Author: Federico Mena-Quintero <federico@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_CLIENT_H
|
||
#define CAL_CLIENT_H
|
||
|
||
#include <libgnome/gnome-defs.h>
|
||
#include <gtk/gtkobject.h>
|
||
#include "cal-util.h"
|
||
|
||
BEGIN_GNOME_DECLS
|
||
|
||
|
||
|
||
#define CAL_CLIENT_TYPE (cal_client_get_type ())
|
||
#define CAL_CLIENT(obj) (GTK_CHECK_CAST ((obj), CAL_CLIENT_TYPE, CalClient))
|
||
#define CAL_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), CAL_CLIENT_TYPE, CalClientClass))
|
||
#define IS_CAL_CLIENT(obj) (GTK_CHECK_TYPE ((obj), CAL_CLIENT_TYPE))
|
||
#define IS_CAL_CLIENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), CAL_CLIENT_TYPE))
|
||
|
||
typedef struct _CalClient CalClient;
|
||
typedef struct _CalClientClass CalClientClass;
|
||
|
||
/* Load status for the cal_loaded signal */
|
||
typedef enum {
|
||
CAL_CLIENT_LOAD_SUCCESS,
|
||
CAL_CLIENT_LOAD_ERROR
|
||
} CalClientLoadStatus;
|
||
|
||
struct _CalClient {
|
||
GtkObject object;
|
||
|
||
/* Private data */
|
||
gpointer priv;
|
||
};
|
||
|
||
struct _CalClientClass {
|
||
GtkObjectClass parent_class;
|
||
|
||
/* Notification signals */
|
||
|
||
void (* cal_loaded) (CalClient *client, CalClientLoadStatus status);
|
||
|
||
void (* obj_added) (CalClient *client, const char *uid);
|
||
void (* obj_removed) (CalClient *client, const char *uid);
|
||
void (* obj_changed) (CalClient *client, const char *uid);
|
||
};
|
||
|
||
GtkType cal_client_get_type (void);
|
||
|
||
CalClient *cal_client_construct (CalClient *client);
|
||
|
||
CalClient *cal_client_new (void);
|
||
|
||
gboolean cal_client_load_calendar (CalClient *client, const char *str_uri);
|
||
|
||
char *cal_client_get_object (CalClient *client, const char *uid);
|
||
|
||
GList *cal_client_get_uids (CalClient *client, CalObjType type);
|
||
|
||
GList *cal_client_get_events_in_range (CalClient *client, time_t start, time_t end);
|
||
|
||
|
||
|
||
END_GNOME_DECLS
|
||
|
||
#endif
|