interface refinement and disabling old transfer components
This commit is contained in:
parent
c107debf0f
commit
9728f71c98
@ -28,7 +28,7 @@ target_compile_features(solanaceae_message3 PUBLIC cxx_std_17)
|
|||||||
target_link_libraries(solanaceae_message3 PUBLIC
|
target_link_libraries(solanaceae_message3 PUBLIC
|
||||||
solanaceae_util
|
solanaceae_util
|
||||||
solanaceae_contact
|
solanaceae_contact
|
||||||
solanaceae_object_store # for fwd.hpp in components
|
solanaceae_object_store # for fwd.hpp
|
||||||
EnTT::EnTT
|
EnTT::EnTT
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -76,6 +76,7 @@ namespace Message::Components {
|
|||||||
ObjectHandle o;
|
ObjectHandle o;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if 0
|
||||||
namespace Transfer {
|
namespace Transfer {
|
||||||
|
|
||||||
//struct TransferState {
|
//struct TransferState {
|
||||||
@ -153,6 +154,7 @@ namespace Message::Components {
|
|||||||
};
|
};
|
||||||
|
|
||||||
} // Transfer
|
} // Transfer
|
||||||
|
#endif
|
||||||
|
|
||||||
// points to the front/newer message
|
// points to the front/newer message
|
||||||
// together they define a range that is,
|
// together they define a range that is,
|
||||||
|
@ -32,6 +32,7 @@ DEFINE_COMP_ID(Message::Components::MessageText)
|
|||||||
DEFINE_COMP_ID(Message::Components::TagMessageIsAction)
|
DEFINE_COMP_ID(Message::Components::TagMessageIsAction)
|
||||||
DEFINE_COMP_ID(Message::Components::MessageFileObject)
|
DEFINE_COMP_ID(Message::Components::MessageFileObject)
|
||||||
|
|
||||||
|
#if 0
|
||||||
DEFINE_COMP_ID(Message::Components::Transfer::TagHaveAll)
|
DEFINE_COMP_ID(Message::Components::Transfer::TagHaveAll)
|
||||||
DEFINE_COMP_ID(Message::Components::Transfer::BytesSent)
|
DEFINE_COMP_ID(Message::Components::Transfer::BytesSent)
|
||||||
DEFINE_COMP_ID(Message::Components::Transfer::BytesReceived)
|
DEFINE_COMP_ID(Message::Components::Transfer::BytesReceived)
|
||||||
@ -43,6 +44,7 @@ DEFINE_COMP_ID(Message::Components::Transfer::StateCanceled)
|
|||||||
DEFINE_COMP_ID(Message::Components::Transfer::FileInfo)
|
DEFINE_COMP_ID(Message::Components::Transfer::FileInfo)
|
||||||
DEFINE_COMP_ID(Message::Components::Transfer::FileInfoLocal)
|
DEFINE_COMP_ID(Message::Components::Transfer::FileInfoLocal)
|
||||||
DEFINE_COMP_ID(Message::Components::Transfer::ActionAccept)
|
DEFINE_COMP_ID(Message::Components::Transfer::ActionAccept)
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef DEFINE_COMP_ID
|
#undef DEFINE_COMP_ID
|
||||||
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <solanaceae/contact/contact_model3.hpp>
|
#include <solanaceae/contact/contact_model3.hpp>
|
||||||
|
#include <solanaceae/object_store/fwd.hpp>
|
||||||
//#include "./file.hpp"
|
|
||||||
|
|
||||||
// TODO: move, rename, do something?, change in favor of tox?
|
// TODO: move, rename, do something?, change in favor of tox?
|
||||||
//enum class FileKind : uint32_t {
|
//enum class FileKind : uint32_t {
|
||||||
@ -20,8 +19,9 @@ struct MessageModel3I {
|
|||||||
|
|
||||||
//virtual bool sendFile(const Contact& c, std::string_view file_name, std::unique_ptr<FileI> file) { (void)c,(void)message,(void)action; return false; }
|
//virtual bool sendFile(const Contact& c, std::string_view file_name, std::unique_ptr<FileI> file) { (void)c,(void)message,(void)action; return false; }
|
||||||
virtual bool sendFilePath(const Contact3 c, std::string_view file_name, std::string_view file_path) { (void)c,(void)file_name,(void)file_path; return false; }
|
virtual bool sendFilePath(const Contact3 c, std::string_view file_name, std::string_view file_path) { (void)c,(void)file_name,(void)file_path; return false; }
|
||||||
|
virtual bool sendFileObj(const Contact3 c, ObjectHandle o) { (void)c,(void)o; return false; } // ideal for forwarding
|
||||||
|
|
||||||
|
// we want this back :)
|
||||||
//virtual bool sendFileMem(const Contact& c, std::string_view file_name, const std::vector<uint8_t>& file) = 0;
|
//virtual bool sendFileMem(const Contact& c, std::string_view file_name, const std::vector<uint8_t>& file) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ enum class RegistryMessageModel_Event : uint32_t {
|
|||||||
message_updated,
|
message_updated,
|
||||||
message_destroy,
|
message_destroy,
|
||||||
|
|
||||||
|
//???
|
||||||
send_text,
|
send_text,
|
||||||
send_file_path,
|
send_file_path,
|
||||||
|
|
||||||
@ -64,12 +65,13 @@ struct RegistryMessageModelEventI : public MessageModel3I {
|
|||||||
// mm3
|
// mm3
|
||||||
// send text
|
// send text
|
||||||
// send file path
|
// send file path
|
||||||
|
// send file obj
|
||||||
};
|
};
|
||||||
using RegistryMessageModelEventProviderI = EventProviderI<RegistryMessageModelEventI>;
|
using RegistryMessageModelEventProviderI = EventProviderI<RegistryMessageModelEventI>;
|
||||||
|
|
||||||
class RegistryMessageModel : public RegistryMessageModelEventProviderI, public MessageModel3I {
|
class RegistryMessageModel : public RegistryMessageModelEventProviderI, public MessageModel3I {
|
||||||
public:
|
public:
|
||||||
static constexpr const char* version {"1"};
|
static constexpr const char* version {"2"};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Contact3Registry& _cr;
|
Contact3Registry& _cr;
|
||||||
|
Loading…
Reference in New Issue
Block a user