X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=database%2Fdatabase.h;fp=database%2Fdatabase.h;h=15fd072d93c137d06ed4c5507467f0ac83939cf3;hb=4dbf6205d0ab778edaa0c43e2eca2b3f92bd2dcb;hp=79712494fe01b68d963f6ef185269bdb277076a6;hpb=7a1c06730feac986e1bf29f202b6afe910b56f14;p=blerg.git diff --git a/database/database.h b/database/database.h index 7971249..15fd072 100644 --- a/database/database.h +++ b/database/database.h @@ -23,7 +23,12 @@ 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. Cleared by /status/ with + * {"clear": "mentioned"} */ +#define BLERGSTATUS_MENTIONED 0x00000002 struct blerg { int meta_fd; @@ -50,7 +55,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