Author: adrian.chadd
Date: Tue Apr 21 01:54:46 2009
New Revision: 13960

Added:
    branches/LUSCA_HEAD/libsqstore/Makefile.am
    branches/LUSCA_HEAD/libsqstore/store_log.c
    branches/LUSCA_HEAD/libsqstore/store_log.h

Log:
Bring over the swap log enum / strings from src/



Added: branches/LUSCA_HEAD/libsqstore/Makefile.am
==============================================================================
--- (empty file)
+++ branches/LUSCA_HEAD/libsqstore/Makefile.am  Tue Apr 21 01:54:46 2009
@@ -0,0 +1,7 @@
+## Process this file with automake to produce Makefile.in
+
+libsqstore_a_SOURCES = \
+       store_log.c
+
+noinst_LIBRARIES = \
+       libsqstore.a

Added: branches/LUSCA_HEAD/libsqstore/store_log.c
==============================================================================
--- (empty file)
+++ branches/LUSCA_HEAD/libsqstore/store_log.c  Tue Apr 21 01:54:46 2009
@@ -0,0 +1,21 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+#include "../include/config.h"
+#include "../include/squid_md5.h"
+
+#include "../libcore/kb.h"
+
+#include "store_mgr.h"
+#include "store_log.h"
+
+const char * swap_log_op_str[] = {
+    "SWAP_LOG_NOP",
+    "SWAP_LOG_ADD",
+    "SWAP_LOG_DEL",
+    "SWAP_LOG_VERSION",
+    "SWAP_LOG_MAX"
+};
+

Added: branches/LUSCA_HEAD/libsqstore/store_log.h
==============================================================================
--- (empty file)
+++ branches/LUSCA_HEAD/libsqstore/store_log.h  Tue Apr 21 01:54:46 2009
@@ -0,0 +1,52 @@
+#ifndef        __LIBSQSTORE_STORE_LOG_H__
+#define        __LIBSQSTORE_STORE_LOG_H__
+
+typedef enum {
+    SWAP_LOG_NOP,
+    SWAP_LOG_ADD,
+    SWAP_LOG_DEL,
+    SWAP_LOG_VERSION,
+    SWAP_LOG_MAX
+} swap_log_op;
+
+/*
+ * Do we need to have the dirn in here? I don't think so, since we already
+ * know the dirn ..
+ */
+struct _storeSwapLogData {
+    char op;
+    sfileno swap_filen;
+    time_t timestamp;
+    time_t lastref;
+    time_t expires;
+    time_t lastmod;
+    squid_file_sz swap_file_sz;
+    u_short refcount;
+    u_short flags;
+    unsigned char key[SQUID_MD5_DIGEST_LENGTH];
+};
+
+struct _storeSwapLogHeader {
+    char op;
+    int version;
+    int record_size;
+};
+
+#if SIZEOF_SQUID_FILE_SZ != SIZEOF_SIZE_T
+struct _storeSwapLogDataOld {
+    char op;
+    sfileno swap_filen;
+    time_t timestamp;
+    time_t lastref;
+    time_t expires;
+    time_t lastmod;
+    size_t swap_file_sz;
+    u_short refcount;
+    u_short flags;
+    unsigned char key[SQUID_MD5_DIGEST_LENGTH];
+};
+#endif
+
+extern const char * swap_log_op_str[];
+
+#endif

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to