]> wimlib.net Git - wimlib/blobdiff - include/wimlib/lookup_table.h
Refactor headers
[wimlib] / include / wimlib / lookup_table.h
similarity index 96%
rename from src/lookup_table.h
rename to include/wimlib/lookup_table.h
index 91c42571d498f4787910d1553229f1ee23f33cba..a01598c24896efd5a7df99b011ce1f2de17b36e1 100644 (file)
@@ -1,20 +1,16 @@
 #ifndef _WIMLIB_LOOKUP_TABLE_H
 #define _WIMLIB_LOOKUP_TABLE_H
-#include "wimlib_internal.h"
-#include "dentry.h"
-#include "sha1.h"
-#include <sys/types.h>
 
-/* Size of each lookup table entry in the WIM file. */
-#define WIM_LOOKUP_TABLE_ENTRY_DISK_SIZE 50
+#include "wimlib/assert.h"
+#include "wimlib/dentry.h"
+#include "wimlib/list.h"
+#include "wimlib/sha1.h"
+#include "wimlib/types.h"
+#include "wimlib/wim.h"
 
 #define LOOKUP_FLAG_ADS_OK             0x00000001
 #define LOOKUP_FLAG_DIRECTORY_OK       0x00000002
 
-#ifdef __WIN32__
-#include <windef.h>
-#endif
-
 
 /* The lookup table of a WIM file maps SHA1 message digests to streams of data.
  * Here, the in-memory structure is implemented as a hash table.
@@ -36,6 +32,9 @@ struct wim_lookup_table {
 };
 
 #ifdef WITH_NTFS_3G
+
+struct _ntfs_volume;
+
 struct ntfs_location {
        tchar *path;
        utf16lechar *stream_name;
@@ -269,18 +268,8 @@ wim_resource_compressed_size(const struct wim_lookup_table_entry *lte)
        return lte->resource_entry.size;
 }
 
-/*
- * XXX Probably should store the compression type directly in the lookup table
- * entry
- */
-static inline int
-wim_resource_compression_type(const struct wim_lookup_table_entry *lte)
-{
-       if (!(lte->resource_entry.flags & WIM_RESHDR_FLAG_COMPRESSED)
-           || lte->resource_location != RESOURCE_IN_WIM)
-               return WIMLIB_COMPRESSION_TYPE_NONE;
-       return wimlib_get_compression_type(lte->wim);
-}
+extern int
+wim_resource_compression_type(const struct wim_lookup_table_entry *lte);
 
 static inline bool
 lte_filename_valid(const struct wim_lookup_table_entry *lte)
@@ -329,7 +318,7 @@ lookup_table_unlink(struct wim_lookup_table *table, struct wim_lookup_table_entr
 }
 
 extern struct wim_lookup_table_entry *
-new_lookup_table_entry();
+new_lookup_table_entry(void);
 
 extern struct wim_lookup_table_entry *
 clone_lookup_table_entry(const struct wim_lookup_table_entry *lte);
@@ -500,4 +489,4 @@ hash_unhashed_stream(struct wim_lookup_table_entry *lte,
 extern struct wim_lookup_table_entry **
 retrieve_lte_pointer(struct wim_lookup_table_entry *lte);
 
-#endif
+#endif /* _WIMLIB_LOOKUP_TABLE_H */