* add skelleton hash lib.
authorWilfried Göesgens <willi@citadel.org>
Sun, 20 Jan 2008 15:05:22 +0000 (15:05 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 20 Jan 2008 15:05:22 +0000 (15:05 +0000)
libcitadel/Makefile.in
libcitadel/lib/hash.c [new file with mode: 0644]
libcitadel/lib/hash.h [new file with mode: 0644]

index 4c619e3b60c4645cc2c493811bb8c51d43269089..710d4f3bb6e6f62c2585e7e8579c86d6fc324f1a 100755 (executable)
@@ -101,7 +101,7 @@ LINK_LIB = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -no-undefined $(VSNFLAG)
 LINK_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) $(LDFLAGS) -o $@
 LINK_CXX_EXE = $(LIBTOOL) $(LTFLAGS) --mode=link $(CXXCOMPILE) $(LDFLAGS) -o $@
 
-LIB_OBJS = lib/libcitadel.lo lib/mime_parser.lo lib/tools.lo lib/vcard.lo
+LIB_OBJS = lib/libcitadel.lo lib/mime_parser.lo lib/tools.lo lib/vcard.lo lib/hash.lo
 $(LIBRARY): $(LIB_OBJS)
        $(LINK_LIB) $(LIB_OBJS)
 
@@ -109,6 +109,8 @@ lib/libcitadel.lo: lib/libcitadel.c lib/libcitadel.h
 lib/mime_parser.lo: lib/mime_parser.c lib/libcitadel.h
 lib/tools.lo: lib/tools.c lib/libcitadel.h
 lib/vcard.lo: lib/vcard.c lib/libcitadel.h
+lib/hash.lo: lib/hash
+.c lib/libcitadel.h
 
 .SUFFIXES: .c .cpp .lo .o
 
diff --git a/libcitadel/lib/hash.c b/libcitadel/lib/hash.c
new file mode 100644 (file)
index 0000000..f61f136
--- /dev/null
@@ -0,0 +1,37 @@
+#include "hash.h"
+
+
+typedef struct HashList {
+       void *Members;
+       long nMembersUsed;
+       long MemberSize;
+       
+};
+
+typedef struct Payload {
+       void *Data;
+       char *HashKey;
+       DeleteHashDataFunc Destructor;
+};
+
+typedef struct HashKey {
+       long Key;
+       long Position;
+};
+
+
+int GetHash(HashList *Hash, char *HKey, void **Payload)
+{
+}
+
+void Put(HashList *Hash, char *HKey, long HKLen, void *Payload, DeleteHashDataFunc DeleteIt)
+{
+}
+
+int GetKey(HashList *Hash, char *HKey, long HKLen, void **Payload)
+{
+}
+
+int GetHashKeys(HashList *Hash, char **List)
+{
+}
diff --git a/libcitadel/lib/hash.h b/libcitadel/lib/hash.h
new file mode 100644 (file)
index 0000000..3e8be3d
--- /dev/null
@@ -0,0 +1,14 @@
+
+typedef struct HashList HashList;
+
+typedef struct HashKey HashKey;
+
+typedef void (*DeleteHashDataFunc)(void * Data);
+
+int GetHash(HashList *Hash, char *HKey, void **Payload);
+
+void Put(HashList *Hash, char *HKey, long HKLen, void *Payload, DeleteHashDataFunc DeleteIt);
+
+int GetKey(HashList *Hash, char *HKey, long HKLen, void **Payload);
+
+int GetHashKeys(HashList *Hash, char **List);