summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-01-17 19:10:21 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2013-01-17 19:44:59 +0100
commit6844ba662e2ebfc0d08408fdd3d3b853a4320eca (patch)
treeb02e3a2b6b5de6db854697b141e36181fe3596a5 /include
parente0b5fcb1c513c8360dd41e005c124600e6b62e4a (diff)
downloadmsitools-6844ba662e2ebfc0d08408fdd3d3b853a4320eca.tar.gz
msitools-6844ba662e2ebfc0d08408fdd3d3b853a4320eca.tar.xz
msitools-6844ba662e2ebfc0d08408fdd3d3b853a4320eca.zip
libmsi: simplify LibmsiDatabase, use flags
Diffstat (limited to 'include')
-rw-r--r--include/libmsi-database.h1
-rw-r--r--include/libmsi-types.h12
2 files changed, 8 insertions, 5 deletions
diff --git a/include/libmsi-database.h b/include/libmsi-database.h
index 756270e..cceb306 100644
--- a/include/libmsi-database.h
+++ b/include/libmsi-database.h
@@ -43,6 +43,7 @@ GType libmsi_database_get_type (void) G_GNUC_CONST;
LibmsiDatabase * libmsi_database_new (const gchar *path,
+ guint flags,
const char *persist,
GError **error);
diff --git a/include/libmsi-types.h b/include/libmsi-types.h
index 73edcf4..58eefe0 100644
--- a/include/libmsi-types.h
+++ b/include/libmsi-types.h
@@ -74,11 +74,13 @@ typedef enum LibmsiColInfo
LIBMSI_COL_INFO_TYPES = 1
} LibmsiColInfo;
-#define LIBMSI_DB_OPEN_READONLY (const char *)0
-#define LIBMSI_DB_OPEN_TRANSACT (const char *)1
-#define LIBMSI_DB_OPEN_CREATE (const char *)2
-
-#define LIBMSI_DB_OPEN_PATCHFILE 32 / sizeof(*LIBMSI_DB_OPEN_READONLY)
+typedef enum LibmsiDbFlags
+{
+ LIBMSI_DB_FLAGS_READONLY = 1 << 0,
+ LIBMSI_DB_FLAGS_CREATE = 1 << 1,
+ LIBMSI_DB_FLAGS_TRANSACT = 1 << 2,
+ LIBMSI_DB_FLAGS_PATCH = 1 << 3,
+} LibmsiDbFlags;
typedef enum LibmsiDBError
{