int data_size;
};
-int blerg_exists(const char *);
-struct blerg *blerg_open(const char *);
-int blerg_close(struct blerg *);
-int blerg_store(struct blerg *, const char *, int);
-int blerg_fetch(struct blerg *, int, char **, int *);
+#define BLERG_INVALID_RECORD 0xFFFFFFFFFFFFFFFF
+
+int blerg_exists(const char *name);
+struct blerg *blerg_open(const char *name);
+int blerg_close(struct blerg *blerg);
+uint64_t blerg_store(struct blerg *blerg, const char *data, int length);
+int blerg_fetch(struct blerg *blerg, uint64_t record, char **data, int *length);
uint64_t blerg_get_record_count(struct blerg *);
-time_t blerg_get_timestamp(struct blerg *blerg, int record);
-int blerg_set_subscription_mark(struct blerg *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_mute(struct blerg *blerg, int v);
+int blerg_get_mute(struct blerg *blerg);
#endif //_DATABASE_H