]> code.citadel.org Git - citadel.git/blobdiff - libcitadel/lib/libcitadel.h
New utility function convert_spaces_to_underscores()
[citadel.git] / libcitadel / lib / libcitadel.h
index 83f69be4c85d5bd58a74507c6090ede16861d155..90bbb3530c8a3f10bf908a587683a5ffd866d140 100644 (file)
@@ -10,7 +10,7 @@
  */
 #include <time.h>
 #include <stdlib.h>
-#define LIBCITADEL_VERSION_NUMBER      107
+#define LIBCITADEL_VERSION_NUMBER      109
 
 /*
  * Here's a bunch of stupid magic to make the MIME parser portable.
@@ -263,6 +263,7 @@ typedef struct HashPos HashPos;
 
 typedef void (*DeleteHashDataFunc)(void * Data);
 typedef const char *(*PrintHashContent)(void * Data);
+typedef int (*CompareFunc)(const void* Item1, const void*Item2);
 
 HashList *NewHash(void);
 
@@ -283,3 +284,11 @@ HashPos *GetNewHashPos(void);
 void DeleteHashPos(HashPos **DelMe);
 
 int GetNextHashPos(HashList *Hash, HashPos *At, long *HKLen, char **HashKey, void **Data);
+
+void SortByHashKey(HashList *Hash);
+void SortByHashKeyStr(HashList *Hash);
+
+const void *GetSearchPayload(const void *HashVoid);
+void SortByPayload(HashList *Hash, CompareFunc SortBy);
+
+void convert_spaces_to_underscores(char *str);