mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-27 07:18:11 +00:00
Settings - Sound: Add Advert scope
This commit is contained in:
@@ -144,7 +144,7 @@ void BaseChatMesh::onAdvertRecv(mesh::Packet* packet, const mesh::Identity& id,
|
||||
if (!shouldAutoAddContactType(parser.getType())) {
|
||||
ContactInfo ci;
|
||||
populateContactFromAdvert(ci, id, parser, timestamp);
|
||||
onDiscoveredContact(ci, true, packet->path_len, packet->path); // let UI know
|
||||
onDiscoveredContact(ci, true, packet->path_len, packet->path, packet->isRouteFlood()); // let UI know
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ void BaseChatMesh::onAdvertRecv(mesh::Packet* packet, const mesh::Identity& id,
|
||||
if (max_hops > 0 && packet->getPathHashCount() >= max_hops) {
|
||||
ContactInfo ci;
|
||||
populateContactFromAdvert(ci, id, parser, timestamp);
|
||||
onDiscoveredContact(ci, true, packet->path_len, packet->path); // let UI know
|
||||
onDiscoveredContact(ci, true, packet->path_len, packet->path, packet->isRouteFlood()); // let UI know
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ void BaseChatMesh::onAdvertRecv(mesh::Packet* packet, const mesh::Identity& id,
|
||||
if (from == NULL) {
|
||||
ContactInfo ci;
|
||||
populateContactFromAdvert(ci, id, parser, timestamp);
|
||||
onDiscoveredContact(ci, true, packet->path_len, packet->path);
|
||||
onDiscoveredContact(ci, true, packet->path_len, packet->path, packet->isRouteFlood());
|
||||
onContactsFull();
|
||||
MESH_DEBUG_PRINTLN("onAdvertRecv: unable to allocate contact slot for new contact");
|
||||
return;
|
||||
@@ -183,7 +183,7 @@ void BaseChatMesh::onAdvertRecv(mesh::Packet* packet, const mesh::Identity& id,
|
||||
from->last_advert_timestamp = timestamp;
|
||||
from->lastmod = getRTCClock()->getCurrentTime();
|
||||
|
||||
onDiscoveredContact(*from, is_new, packet->path_len, packet->path); // let UI know
|
||||
onDiscoveredContact(*from, is_new, packet->path_len, packet->path, packet->isRouteFlood()); // let UI know
|
||||
}
|
||||
|
||||
int BaseChatMesh::searchPeersByHash(const uint8_t* hash) {
|
||||
|
||||
@@ -102,7 +102,7 @@ protected:
|
||||
virtual bool shouldOverwriteWhenFull() const { return false; }
|
||||
virtual uint8_t getAutoAddMaxHops() const { return 0; } // 0 = no limit, 1 = direct (0 hops), N = up to N-1 hops
|
||||
virtual void onContactOverwrite(const uint8_t* pub_key) {};
|
||||
virtual void onDiscoveredContact(ContactInfo& contact, bool is_new, uint8_t path_len, const uint8_t* path) = 0;
|
||||
virtual void onDiscoveredContact(ContactInfo& contact, bool is_new, uint8_t path_len, const uint8_t* path, bool was_flood) = 0;
|
||||
virtual ContactInfo* processAck(const uint8_t *data) = 0;
|
||||
virtual void onContactPathUpdated(const ContactInfo& contact) = 0;
|
||||
virtual bool onContactPathRecv(ContactInfo& from, uint8_t* in_path, uint8_t in_path_len, uint8_t* out_path, uint8_t out_path_len, uint8_t extra_type, uint8_t* extra, uint8_t extra_len);
|
||||
|
||||
Reference in New Issue
Block a user