aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/e-card-cursor.h
blob: b318e646c42e2c4d58e402689db06108ecc75fdf (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
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 *
 * Author:
 *   Nat Friedman (nat@helixcode.com)
 *
 * Copyright 2000, Helix Code, Inc.
 */

#ifndef __E_CARD_CURSOR_H__
#define __E_CARD_CURSOR_H__

#include <libgnome/gnome-defs.h>
#include <gtk/gtk.h>
#include <addressbook/backend/ebook/addressbook.h>
#include <addressbook/backend/ebook/e-card.h>

BEGIN_GNOME_DECLS

typedef struct _ECardCursor        ECardCursor;
typedef struct _ECardCursorPrivate ECardCursorPrivate;
typedef struct _ECardCursorClass   ECardCursorClass;

struct _ECardCursor {
    GtkObject           parent;
    ECardCursorPrivate *priv;
};

struct _ECardCursorClass {
    GtkObjectClass parent;
};

/* Creating a new addressbook. */
ECardCursor *e_card_cursor_new       (Evolution_CardCursor  corba_cursor);
ECardCursor *e_card_cursor_construct (ECardCursor          *cursor,
                      Evolution_CardCursor  corba_cursor);

GtkType      e_card_cursor_get_type    (void);

/* Fetching cards. */
long         e_card_cursor_get_length  (ECardCursor          *cursor);
ECard       *e_card_cursor_get_nth     (ECardCursor          *cursor,
                    const long            nth);
#define E_CARD_CURSOR_TYPE        (e_card_cursor_get_type ())
#define E_CARD_CURSOR(o)          (GTK_CHECK_CAST ((o), E_CARD_CURSOR_TYPE, ECardCursor))
#define E_CARD_CURSOR_CLASS(k)    (GTK_CHECK_CLASS_CAST((k), E_CARD_CURSOR_TYPE, ECardCursorClass))
#define E_IS_CARD_CURSOR(o)       (GTK_CHECK_TYPE ((o), E_CARD_CURSOR_TYPE))
#define E_IS_CARD_CURSOR_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_CARD_CURSOR_TYPE))

END_GNOME_DECLS

#endif /* ! __E_CARD_CURSOR_H__ */