1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
4 * (GLABELS) Label and Business Card Creation program for GNOME
6 * merge.h: document merge module header file
8 * Copyright (C) 2002 Jim Evins <evins@snaught.com>.
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 #include <glib-object.h>
32 GL_MERGE_SRC_IS_FIXED,
43 GList *field_list; /* List of glMergeFields */
47 #define GL_TYPE_MERGE (gl_merge_get_type ())
48 #define GL_MERGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_MERGE, glMerge))
49 #define GL_MERGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_MERGE, glMergeClass))
50 #define GL_IS_MERGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_MERGE))
51 #define GL_IS_MERGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_MERGE))
52 #define GL_MERGE_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_MERGE, glMergeClass))
55 typedef struct _glMerge glMerge;
56 typedef struct _glMergeClass glMergeClass;
58 typedef struct _glMergePrivate glMergePrivate;
67 struct _glMergeClass {
68 GObjectClass parent_class;
70 GList *(*get_key_list) (glMerge *merge);
72 gchar *(*get_primary_key) (glMerge *merge);
74 void (*open) (glMerge *merge);
76 void (*close) (glMerge *merge);
78 glMergeRecord *(*get_record) (glMerge *merge);
80 void (*copy) (glMerge *dst_merge,
85 void gl_merge_register_backend (GType type,
88 glMergeSrcType src_type,
89 const gchar *first_arg_name,
92 GList *gl_merge_get_descriptions (void);
94 void gl_merge_free_descriptions (GList **descriptions);
96 gchar *gl_merge_description_to_name (gchar *description);
98 GType gl_merge_get_type (void) G_GNUC_CONST;
100 glMerge *gl_merge_new (gchar *name);
102 glMerge *gl_merge_dup (glMerge *orig);
104 gchar *gl_merge_get_name (glMerge *merge);
106 gchar *gl_merge_get_description (glMerge *merge);
108 glMergeSrcType gl_merge_get_src_type (glMerge *merge);
110 void gl_merge_set_src (glMerge *merge,
113 gchar *gl_merge_get_src (glMerge *merge);
115 GList *gl_merge_get_key_list (glMerge *merge);
117 void gl_merge_free_key_list (GList **keys);
119 gchar *gl_merge_get_primary_key (glMerge *merge);
121 gchar *gl_merge_eval_key (glMergeRecord *record,
124 const GList *gl_merge_get_record_list (glMerge *merge);
126 gint gl_merge_get_record_count (glMerge *merge);