nostrdb/filters: remove ndb_filter_group from public API
We can just use a list of filters instead when subscribing Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
6cd7b945ca
commit
8b03ed6175
@@ -4,9 +4,6 @@
|
||||
#include <inttypes.h>
|
||||
#include "cursor.h"
|
||||
|
||||
// how many filters are allowed in a filter group
|
||||
#define NDB_MAX_FILTERS 16
|
||||
|
||||
// maximum number of filters allowed in a filter group
|
||||
#define NDB_PACKED_STR 0x1
|
||||
#define NDB_PACKED_ID 0x2
|
||||
@@ -30,7 +27,6 @@ struct ndb_blocks;
|
||||
struct ndb_block;
|
||||
struct ndb_note;
|
||||
struct ndb_tag;
|
||||
struct ndb_filter_group;
|
||||
struct ndb_tags;
|
||||
struct ndb_lmdb;
|
||||
union ndb_packed_str;
|
||||
@@ -241,11 +237,6 @@ struct ndb_filter {
|
||||
struct ndb_filter_elements *elements[NDB_NUM_FILTERS];
|
||||
};
|
||||
|
||||
struct ndb_filter_group {
|
||||
struct ndb_filter *filters[NDB_MAX_FILTERS];
|
||||
int num_filters;
|
||||
};
|
||||
|
||||
struct ndb_config {
|
||||
int flags;
|
||||
int ingester_threads;
|
||||
@@ -470,12 +461,10 @@ int ndb_filter_start_generic_field(struct ndb_filter *, char tag);
|
||||
int ndb_filter_matches(struct ndb_filter *, struct ndb_note *);
|
||||
void ndb_filter_reset(struct ndb_filter *);
|
||||
void ndb_filter_end_field(struct ndb_filter *);
|
||||
void ndb_filter_group_init(struct ndb_filter_group *group);
|
||||
int ndb_filter_group_add(struct ndb_filter_group *group, struct ndb_filter *f);
|
||||
void ndb_filter_destroy(struct ndb_filter *);
|
||||
|
||||
// SUBSCRIPTIONS
|
||||
uint64_t ndb_subscribe(struct ndb *, struct ndb_filter_group *);
|
||||
uint64_t ndb_subscribe(struct ndb *, struct ndb_filter *, int num_filters);
|
||||
int ndb_wait_for_notes(struct ndb *, uint64_t subid, uint64_t *note_ids,
|
||||
int note_id_capacity);
|
||||
int ndb_unsubscribe(int subid);
|
||||
|
||||
Reference in New Issue
Block a user