2000-12-19 14:05:04 +00:00
|
|
|
/* -*- mode: c; style: linux -*- */
|
|
|
|
|
|
|
|
/* config-log.h
|
2001-01-12 14:40:26 +00:00
|
|
|
* Copyright (C) 2000-2001 Ximian, Inc.
|
2000-12-19 14:05:04 +00:00
|
|
|
*
|
2001-01-12 15:03:02 +00:00
|
|
|
* Written by Bradford Hovinen (hovinen@ximian.com)
|
2000-12-19 14:05:04 +00:00
|
|
|
*
|
|
|
|
* 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, 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 __CONFIG_LOG_H
|
|
|
|
#define __CONFIG_LOG_H
|
|
|
|
|
|
|
|
#include <gnome.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
#define CONFIG_LOG(obj) GTK_CHECK_CAST (obj, config_log_get_type (), ConfigLog)
|
|
|
|
#define CONFIG_LOG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, config_log_get_type (), ConfigLogClass)
|
|
|
|
#define IS_CONFIG_LOG(obj) GTK_CHECK_TYPE (obj, config_log_get_type ())
|
|
|
|
|
|
|
|
typedef struct _ConfigLog ConfigLog;
|
|
|
|
typedef struct _ConfigLogClass ConfigLogClass;
|
2001-04-22 01:05:26 +00:00
|
|
|
typedef struct _ConfigLogPrivate ConfigLogPrivate;
|
2000-12-19 14:05:04 +00:00
|
|
|
|
|
|
|
typedef struct _Location Location;
|
|
|
|
|
|
|
|
typedef gint (*ConfigLogIteratorCB) (ConfigLog *, gint, gchar *,
|
|
|
|
struct tm *, gpointer);
|
2001-08-03 14:38:09 +00:00
|
|
|
typedef void (*GarbageCollectCB) (ConfigLog *, gchar *, gint, gpointer);
|
2000-12-19 14:05:04 +00:00
|
|
|
|
|
|
|
struct _ConfigLog
|
|
|
|
{
|
|
|
|
GtkObject object;
|
|
|
|
|
2001-04-22 01:05:26 +00:00
|
|
|
ConfigLogPrivate *p;
|
2000-12-19 14:05:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _ConfigLogClass
|
|
|
|
{
|
|
|
|
GtkObjectClass parent;
|
|
|
|
};
|
|
|
|
|
2002-04-11 19:13:49 +00:00
|
|
|
GType config_log_get_type (void);
|
2000-12-19 14:05:04 +00:00
|
|
|
|
2001-08-03 14:38:09 +00:00
|
|
|
GtkObject *config_log_open (Location *location);
|
|
|
|
void config_log_delete (ConfigLog *config_log);
|
2000-12-19 14:05:04 +00:00
|
|
|
|
2001-08-03 14:38:09 +00:00
|
|
|
gint config_log_get_rollback_id_for_date (ConfigLog *config_log,
|
|
|
|
struct tm *date,
|
2001-08-20 15:47:57 +00:00
|
|
|
const gchar *backend_id);
|
2001-08-03 14:38:09 +00:00
|
|
|
gint config_log_get_rollback_id_by_steps (ConfigLog *config_log,
|
|
|
|
guint steps,
|
2001-08-20 15:47:57 +00:00
|
|
|
const gchar *backend_id);
|
2000-12-19 14:05:04 +00:00
|
|
|
|
2001-09-12 15:30:41 +00:00
|
|
|
const gchar *config_log_get_backend_id_for_id (ConfigLog *config_log,
|
2001-08-03 14:38:09 +00:00
|
|
|
gint id);
|
2001-08-20 15:47:57 +00:00
|
|
|
const struct tm *config_log_get_date_for_id (ConfigLog *config_log,
|
2001-08-03 14:38:09 +00:00
|
|
|
gint id);
|
2000-12-19 14:05:04 +00:00
|
|
|
|
2001-08-03 14:38:09 +00:00
|
|
|
gint config_log_write_entry (ConfigLog *config_log,
|
2001-08-20 15:47:57 +00:00
|
|
|
const gchar *backend_id,
|
2001-08-03 14:38:09 +00:00
|
|
|
gboolean is_default_data);
|
2000-12-19 14:05:04 +00:00
|
|
|
|
2001-08-03 14:38:09 +00:00
|
|
|
void config_log_iterate (ConfigLog *config_log,
|
|
|
|
ConfigLogIteratorCB callback,
|
|
|
|
gpointer data);
|
2000-12-19 14:05:04 +00:00
|
|
|
|
2001-08-03 14:38:09 +00:00
|
|
|
void config_log_reset_filenames (ConfigLog *config_log);
|
|
|
|
void config_log_reload (ConfigLog *config_log);
|
|
|
|
|
|
|
|
void config_log_garbage_collect (ConfigLog *config_log,
|
|
|
|
gchar *backend_id,
|
|
|
|
GarbageCollectCB callback,
|
|
|
|
gpointer data);
|
2000-12-19 14:05:04 +00:00
|
|
|
|
|
|
|
#endif /* __CONFIG_LOG */
|