send file obj event (was forgotten)

This commit is contained in:
Green Sky 2025-05-05 22:44:19 +02:00
parent c8e3e93743
commit 7f1a5ea1d4
No known key found for this signature in database
GPG Key ID: DBE05085D874AB4A
3 changed files with 18 additions and 1 deletions

View File

@ -41,6 +41,7 @@ enum class RegistryMessageModel_Event : uint32_t {
//??? //???
send_text, send_text,
send_file_path, send_file_path,
send_file_obj,
MAX MAX
}; };
@ -64,7 +65,7 @@ using RegistryMessageModelEventProviderI = EventProviderI<RegistryMessageModelEv
class RegistryMessageModelI : public RegistryMessageModelEventProviderI, public MessageModel3I { class RegistryMessageModelI : public RegistryMessageModelEventProviderI, public MessageModel3I {
public: public:
static constexpr const char* version {"4"}; static constexpr const char* version {"5"};
// rmm interface // rmm interface
public: public:

View File

@ -141,3 +141,18 @@ bool RegistryMessageModelImpl::sendFilePath(const Contact4 c, std::string_view f
return false; return false;
} }
bool RegistryMessageModelImpl::sendFileObj(const Contact4 c, ObjectHandle o) {
std::cout << "RMM debug: event send file obj\n";
// manual, bc its not an "event"
for (auto* zei : _subscribers.at(size_t(RegistryMessageModel_Event::send_file_obj))) {
if (zei->sendFileObj(c, o)) {
return true;
}
}
std::cerr << "RMM error: event send file obj unhandled\n";
return false;
}

View File

@ -38,5 +38,6 @@ class RegistryMessageModelImpl : public RegistryMessageModelI {
public: // mm3 public: // mm3
bool sendText(const Contact4 c, std::string_view message, bool action = false) override; bool sendText(const Contact4 c, std::string_view message, bool action = false) override;
bool sendFilePath(const Contact4 c, std::string_view file_name, std::string_view file_path) override; bool sendFilePath(const Contact4 c, std::string_view file_name, std::string_view file_path) override;
bool sendFileObj(const Contact4 c, ObjectHandle o) override;
}; };