Avoid including <db.h> in a public header file.
authorMatthew Barnes <mbarnes@redhat.com>
Wed, 27 Jun 2012 12:15:52 +0000 (08:15 -0400)
committerMatthew Barnes <mbarnes@redhat.com>
Wed, 27 Jun 2012 12:21:20 +0000 (08:21 -0400)
Don't want Berkeley DB to be a requirement in libedata-book.pc.

addressbook/libedata-book/e-book-backend-db-cache.c
addressbook/libedata-book/e-book-backend-db-cache.h

index 9b9c055..3e7086d 100644 (file)
@@ -23,6 +23,8 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include <db.h>
+
 #include "e-book-backend-db-cache.h"
 #include "e-book-backend.h"
 #include "e-book-backend-sexp.h"
index 58cf044..b0742ca 100644 (file)
 #define E_BOOK_BACKEND_DB_CACHE_H
 
 #include <libebook/libebook.h>
-#include "db.h"
 
 G_BEGIN_DECLS
 
+/* Avoid including <db.h> in a public header file. */
+typedef struct __db DB;
+
 EContact * e_book_backend_db_cache_get_contact (DB *db, const gchar *uid);
 gchar *e_book_backend_db_cache_get_filename (DB *db);
 void e_book_backend_db_cache_set_filename (DB *db, const gchar *filename);