send file obj event (was forgotten)
This commit is contained in:
		@@ -41,6 +41,7 @@ enum class RegistryMessageModel_Event : uint32_t {
 | 
			
		||||
	//???
 | 
			
		||||
	send_text,
 | 
			
		||||
	send_file_path,
 | 
			
		||||
	send_file_obj,
 | 
			
		||||
 | 
			
		||||
	MAX
 | 
			
		||||
};
 | 
			
		||||
@@ -64,7 +65,7 @@ using RegistryMessageModelEventProviderI = EventProviderI<RegistryMessageModelEv
 | 
			
		||||
 | 
			
		||||
class RegistryMessageModelI : public RegistryMessageModelEventProviderI, public MessageModel3I {
 | 
			
		||||
	public:
 | 
			
		||||
		static constexpr const char* version {"4"};
 | 
			
		||||
		static constexpr const char* version {"5"};
 | 
			
		||||
 | 
			
		||||
	// rmm interface
 | 
			
		||||
	public:
 | 
			
		||||
 
 | 
			
		||||
@@ -141,3 +141,18 @@ bool RegistryMessageModelImpl::sendFilePath(const Contact4 c, std::string_view f
 | 
			
		||||
	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;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -38,5 +38,6 @@ class RegistryMessageModelImpl : public RegistryMessageModelI {
 | 
			
		||||
	public: // mm3
 | 
			
		||||
		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 sendFileObj(const Contact4 c, ObjectHandle o) override;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user