X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=libcitadel%2Flib%2Flibcitadel.h;h=7dac9e97146dfbe2c577bde3c0c86ccb29334e06;hb=93bfbb18e77f33d6551a4725b1802c6340aa2c60;hp=ce76ac61b1b82d2d767e00092ef5342884700cfa;hpb=b7ac4ac2e4a22ecac902afc38e77b98c2e3e42e2;p=citadel.git diff --git a/libcitadel/lib/libcitadel.h b/libcitadel/lib/libcitadel.h index ce76ac61b..7dac9e971 100644 --- a/libcitadel/lib/libcitadel.h +++ b/libcitadel/lib/libcitadel.h @@ -9,8 +9,8 @@ * since we reference time_t... */ #include - -#define LIBCITADEL_VERSION_NUMBER 105 +#include +#define LIBCITADEL_VERSION_NUMBER 106 /* * Here's a bunch of stupid magic to make the MIME parser portable. @@ -177,6 +177,11 @@ void the_mime_parser(char *partnum, const char *GuessMimeType(char *data, size_t dlen); const char* GuessMimeByFilename(const char *what, size_t len); +/** Run once at Programstart */ +int LoadIconDir(const char *DirName); +/** guess an icon to the mimetype */ +const char *GetIconFilename(char *MimeType, size_t len); +void ShutDownLibCitadel(void); /* tools */ @@ -245,6 +250,10 @@ char *vcard_serialize(struct vCard *); void vcard_fn_to_n(char *vname, char *n, size_t vname_size); void remove_charset_attribute(char *strbuf); +/** + * Citadels Hashlist Implementation + */ + typedef struct HashList HashList; typedef struct HashKey HashKey; @@ -252,24 +261,24 @@ typedef struct HashKey HashKey; typedef struct HashPos HashPos; typedef void (*DeleteHashDataFunc)(void * Data); - - +typedef const char *(*PrintHashContent)(void * Data); HashList *NewHash(void); -void DeleteHash(HashList **Hash); +void DeleteHash(HashList **Hash); -int GetHash(HashList *Hash, char *HKey, long HKLen, void **Data); +int GetHash(HashList *Hash, const 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 GetHashKeys(HashList *Hash, char ***List); -int PrintHash(HashList *Hash); +int PrintHash(HashList *Hash, PrintHashContent first, PrintHashContent Second); HashPos *GetNewHashPos(void); + void DeleteHashPos(HashPos **DelMe); int GetNextHashPos(HashList *Hash, HashPos *At, long *HKLen, char **HashKey, void **Data);