aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/e-card-list.h
blob: 7ceeef19930850c08b801e3ddeef49368ed211da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * Authors:
 *   Chris Lahey <clahey@helixcode.com>
 *
 * Copyright (C) 2000 Helix Code, Inc.
 * Copyright (C) 1999 The Free Software Foundation
 */

#ifndef __E_CARD_LIST_H__
#define __E_CARD_LIST_H__

#include <time.h>
#include <gtk/gtk.h>
#include <stdio.h>
#include <e-card-iterator.h>

#define E_TYPE_CARD_LIST            (e_card_list_get_type ())
#define E_CARD_LIST(obj)            (GTK_CHECK_CAST ((obj), E_TYPE_CARD_LIST, ECardList))
#define E_CARD_LIST_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), E_TYPE_CARD_LIST, ECardListClass))
#define E_IS_CARD_LIST(obj)         (GTK_CHECK_TYPE ((obj), E_TYPE_CARD_LIST))
#define E_IS_CARD_LIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), E_TYPE_CARD_LIST))

typedef void *(*ECardListCopyFunc) (const void *data, void *closure);
typedef void (*ECardListFreeFunc) (void *data, void *closure);

typedef struct _ECardList ECardList;
typedef struct _ECardListClass ECardListClass;

struct _ECardList {
    GtkObject          object;
    GList             *list;
    GList             *iterators;
    ECardListCopyFunc  copy;
    ECardListFreeFunc  free;
    void              *closure;
};

struct _ECardListClass {
    GtkObjectClass parent_class;
};

ECardList     *e_card_list_new                  (ECardListCopyFunc  copy, 
                         ECardListFreeFunc  free,
                         void              *closure);
ECardIterator *e_card_list_get_iterator         (ECardList         *list);
void           e_card_list_append               (ECardList         *list,
                         const void        *data);

/* For iterators to call. */
void           e_card_list_invalidate_iterators (ECardList         *list, 
                         ECardIterator     *skip);
void           e_card_list_remove_iterator      (ECardList         *list,
                         ECardIterator     *iterator);

/* Standard Gtk function */
GtkType        e_card_list_get_type             (void);

#endif /* ! __E_CARD_LIST_H__ */