Add a setting to toggle whether replication is allowed, to be able to make a pure room, or even less, node.

This commit is contained in:
2024-08-14 20:02:46 -04:00
parent b37669184a
commit 107666cc60
4 changed files with 67 additions and 3 deletions

View File

@ -41,6 +41,9 @@ typedef enum _tf_ssb_change_t
k_tf_ssb_change_update,
} tf_ssb_change_t;
/**
** The origin of a broadcast entry.
*/
typedef enum _tf_ssb_broadcast_origin_t
{
k_tf_ssb_broadcast_origin_discovery,
@ -972,6 +975,20 @@ bool tf_ssb_is_room(tf_ssb_t* ssb);
*/
void tf_ssb_set_is_room(tf_ssb_t* ssb, bool is_room);
/**
** Get whether the running server supports replication of messages and blobs.
** @param ssb The SSB instance.
** @return True if the server is a replicator.
*/
bool tf_ssb_is_replicator(tf_ssb_t* ssb);
/**
** Set whether the running server supports replication of messages and blobs.
** @param ssb The SSB instance.
** @param is_replicator Whether to support replication.
*/
void tf_ssb_set_is_replicator(tf_ssb_t* ssb, bool is_replicator);
/**
** Get the name of the room hosted by the running server.
** @param ssb The SSB instance.