]> code.citadel.org Git - citadel.git/blobdiff - libcitadel/lib/libcitadel.h
THIS IS 1.05
[citadel.git] / libcitadel / lib / libcitadel.h
index 66c1134ccffba0f718306e58dbd76944f91fef97..ce76ac61b1b82d2d767e00092ef5342884700cfa 100644 (file)
@@ -3,6 +3,15 @@
  *
  */
 
+
+
+/*
+ * since we reference time_t...
+ */
+#include <time.h>
+
+#define LIBCITADEL_VERSION_NUMBER      105
+
 /*
  * Here's a bunch of stupid magic to make the MIME parser portable.
  */
 #define SIZ    4096
 #endif
 
+
+/*
+ * View definitions.
+ * Note that not all views are implemented in all clients.
+ */
+#define        VIEW_BBS                0       /* Bulletin board view */
+#define VIEW_MAILBOX           1       /* Mailbox summary */
+#define VIEW_ADDRESSBOOK       2       /* Address book view */
+#define VIEW_CALENDAR          3       /* Calendar view */
+#define VIEW_TASKS             4       /* Tasks view */
+#define VIEW_NOTES             5       /* Notes view */
+#define        VIEW_WIKI               6       /* Wiki view */
+#define VIEW_CALBRIEF          7       /* Brief Calendar view */
+#define VIEW_JOURNAL           8       /* Journal view */
+
+
 #ifndef IsEmptyStr
 #define IsEmptyStr(a) ((a)[0] == '\0')
 #endif
@@ -19,6 +44,7 @@
  */
 
 char *libcitadel_version_string(void);
+int libcitadel_version_number(void);
 
 
 /*
@@ -148,6 +174,9 @@ void the_mime_parser(char *partnum,
                      int dont_decode
 );
 
+const char *GuessMimeType(char *data, size_t dlen);
+const char* GuessMimeByFilename(const char *what, size_t len);
+
 
 
 /* tools */
@@ -215,3 +244,32 @@ char *vcard_get_prop(struct vCard *v, char *propname, int is_partial,
 char *vcard_serialize(struct vCard *);
 void vcard_fn_to_n(char *vname, char *n, size_t vname_size);
 void remove_charset_attribute(char *strbuf);
+
+typedef struct HashList HashList;
+
+typedef struct HashKey HashKey;
+
+typedef struct HashPos HashPos;
+
+typedef void (*DeleteHashDataFunc)(void * Data);
+
+
+
+HashList *NewHash(void);
+void DeleteHash(HashList **Hash);
+
+
+int GetHash(HashList *Hash, char *HKey, long HKLen, void **Data);
+
+void Put(HashList *Hash, char *HKey, long HKLen, void *Data, DeleteHashDataFunc DeleteIt);
+
+int GetKey(HashList *Hash, char *HKey, long HKLen, void **Data);
+
+int GetHashKeys(HashList *Hash, const char ***List);
+
+int PrintHash(HashList *Hash);
+
+HashPos *GetNewHashPos(void);
+void DeleteHashPos(HashPos **DelMe);
+
+int GetNextHashPos(HashList *Hash, HashPos *At, long *HKLen, char **HashKey, void **Data);