aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-addressbook-model.h
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-model.h')
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.h36
1 files changed, 20 insertions, 16 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-model.h b/addressbook/gui/widgets/e-addressbook-model.h
index 79a606b314..f8fd01b535 100644
--- a/addressbook/gui/widgets/e-addressbook-model.h
+++ b/addressbook/gui/widgets/e-addressbook-model.h
@@ -2,7 +2,6 @@
#ifndef _E_ADDRESSBOOK_MODEL_H_
#define _E_ADDRESSBOOK_MODEL_H_
-#include <gal/e-table/e-table-model.h>
#include "addressbook/backend/ebook/e-book.h"
#include "addressbook/backend/ebook/e-book-view.h"
#include "addressbook/backend/ebook/e-card-simple.h"
@@ -13,18 +12,11 @@
#define E_IS_ADDRESSBOOK_MODEL(o) (GTK_CHECK_TYPE ((o), E_ADDRESSBOOK_MODEL_TYPE))
#define E_IS_ADDRESSBOOK_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_ADDRESSBOOK_MODEL_TYPE))
-/* Virtual Column list:
- 0 Email
- 1 Full Name
- 2 Street
- 3 Phone
-*/
-
typedef struct _EAddressbookModel EAddressbookModel;
typedef struct _EAddressbookModelClass EAddressbookModelClass;
struct _EAddressbookModel {
- ETableModel parent;
+ GtkObject parent;
/* item specific fields */
EBook *book;
@@ -33,8 +25,9 @@ struct _EAddressbookModel {
int get_view_idle;
- ECardSimple **data;
+ ECard **data;
int data_count;
+ int allocated_count;
int create_card_id, remove_card_id, modify_card_id, status_message_id;
@@ -44,21 +37,32 @@ struct _EAddressbookModel {
struct _EAddressbookModelClass {
- ETableModelClass parent_class;
+ GtkObjectClass parent_class;
/*
* Signals
*/
void (*status_message) (EAddressbookModel *model, const gchar *message);
+ void (*card_added) (EAddressbookModel *model, gint index, gint count);
+ void (*card_removed) (EAddressbookModel *model, gint index);
+ void (*card_changed) (EAddressbookModel *model, gint index);
+ void (*model_changed) (EAddressbookModel *model);
};
-GtkType e_addressbook_model_get_type (void);
-ETableModel *e_addressbook_model_new (void);
+GtkType e_addressbook_model_get_type (void);
+EAddressbookModel *e_addressbook_model_new (void);
/* Returns object with ref count of 1. */
-ECard *e_addressbook_model_get_card(EAddressbookModel *model,
- int row);
-void e_addressbook_model_stop (EAddressbookModel *model);
+ECard *e_addressbook_model_get_card (EAddressbookModel *model,
+ int row);
+EBook *e_addressbook_model_get_ebook (EAddressbookModel *model);
+
+void e_addressbook_model_stop (EAddressbookModel *model);
+
+
+int e_addressbook_model_card_count (EAddressbookModel *model);
+ECard *e_addressbook_model_card_at (EAddressbookModel *model, int index);
+gboolean e_addressbook_model_editable (EAddressbookModel *model);
#endif /* _E_ADDRESSBOOK_MODEL_H_ */