tnt-net-db

tnt-net-db —

Synopsis




#define     TNT_NET_DB                      (object)
struct      TntNetDB;
gboolean    tnt_net_db_init                 (TntNetDB *net_db,
                                             TntStorage *storage);
TntNetDB*   tnt_net_db_new                  (TntStorage *storage);
void        tnt_net_db_finalize             (FluxObject *net_db);
TntNodeMeta* tnt_net_db_get_node_meta       (TntNetDB *net_db,
                                             TntNodeID node_id);
void        tnt_net_db_set_node_meta        (TntNetDB *net_db,
                                             TntNodeID node_id,
                                             TntNodeMeta *node_meta);
void        tnt_net_db_forget_node          (TntNetDB *net_db,
                                             TntNodeID node_id);
TntNodeID   tnt_net_db_get_random_node_id   (TntNetDB *net_db);
void        tnt_net_db_add_address          (TntNetDB *net_db,
                                             const TntNodeAddress4 *address);

Description

Details

TNT_NET_DB()

#define TNT_NET_DB(object) ((TntNetDB *) object)

object :

struct TntNetDB

struct TntNetDB {

  FluxObject    object;

  TntStorage   *storage;
  GList        *node_meta_list;
  GHashTable   *node_meta_table;
  GHashTable   *blocked_addresses;
  GHashTable   *unblocked_addresses;
  GList        *address_subsets;

  gint          n_nodes;
  guint         save_timeout_id;
};


tnt_net_db_init ()

gboolean    tnt_net_db_init                 (TntNetDB *net_db,
                                             TntStorage *storage);

net_db :
storage :
Returns :

tnt_net_db_new ()

TntNetDB*   tnt_net_db_new                  (TntStorage *storage);

storage :
Returns :

tnt_net_db_finalize ()

void        tnt_net_db_finalize             (FluxObject *net_db);

net_db :

tnt_net_db_get_node_meta ()

TntNodeMeta* tnt_net_db_get_node_meta       (TntNetDB *net_db,
                                             TntNodeID node_id);

net_db :
node_id :
Returns :

tnt_net_db_set_node_meta ()

void        tnt_net_db_set_node_meta        (TntNetDB *net_db,
                                             TntNodeID node_id,
                                             TntNodeMeta *node_meta);

net_db :
node_id :
node_meta :

tnt_net_db_forget_node ()

void        tnt_net_db_forget_node          (TntNetDB *net_db,
                                             TntNodeID node_id);

net_db :
node_id :

tnt_net_db_get_random_node_id ()

TntNodeID   tnt_net_db_get_random_node_id   (TntNetDB *net_db);

net_db :
Returns :

tnt_net_db_add_address ()

void        tnt_net_db_add_address          (TntNetDB *net_db,
                                             const TntNodeAddress4 *address);

net_db :
address :