AddressBook

Persistent store for node associates (contact list).

Declared in src/libs/libpair/discovery/AddressBook.hpp
Inherits QObject and SimpleDataStore
Inherited By MockAddressBook
Group pair

Detailed description

The AddressBook class is used to keep track of and persist the information a Node has on its associates. Think of it as a fully automated "contact list".

Key features:

  • Asynchronous loading and saving of associate data
  • Query filtering by node type and trust levels
  • Fine-grained change notifications for UI updates

This class is explained in the communication-system explanation.

It is thread safe. The AsyncStore worker calls fromMap(), toMap() and fromDefault() on its thread while the owner uses the book on its thread. One mutex guards the map of associates for both, and no signal is emitted and no save is started while it is held. Each Associate guards its own fields.

See also Associate, KeyStore.

In this section