X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=database%2Fdatabase.h;h=6dfcf9dddabe2675566f55599a1fad8b7be53d03;hb=3e3138025852408ef03f3213972e042e12841bed;hp=e60d6099698ab6fcc915e9b317a0f235c8437c54;hpb=7a6eb2318ad7e2c245649213780ad14ecc9a64a7;p=blerg.git diff --git a/database/database.h b/database/database.h index e60d609..6dfcf9d 100644 --- a/database/database.h +++ b/database/database.h @@ -23,7 +23,11 @@ struct meta { uint32_t status; }; -#define BLERGMETA_MUTED 0x00000001 +/* meta.status is a bitfield of these options */ +/* Muted - if set, tags/refs and subscriptions are not calculated */ +#define BLERGSTATUS_MUTED 0x00000001 +/* Mentioned - if set, user has been mentioned. */ +#define BLERGSTATUS_MENTIONED 0x00000002 struct blerg { int meta_fd; @@ -40,6 +44,7 @@ struct blerg { #define BLERG_INVALID_RECORD 0xFFFFFFFFFFFFFFFF +int blerg_init(); int blerg_exists(const char *name); struct blerg *blerg_open(const char *name); int blerg_close(struct blerg *blerg); @@ -49,7 +54,7 @@ uint64_t blerg_get_record_count(struct blerg *); time_t blerg_get_timestamp(struct blerg *blerg, uint64_t record); int blerg_set_subscription_mark(struct blerg *blerg); uint64_t blerg_get_subscription_mark(struct blerg *blerg); -int blerg_set_mute(struct blerg *blerg, int v); -int blerg_get_mute(struct blerg *blerg); +int blerg_set_status(struct blerg *blerg, uint32_t status, int v); +int blerg_get_status(struct blerg *blerg, uint32_t status); #endif //_DATABASE_H