From 3b7db97507e8c54c0060c1fd9075360f16f5e8b2 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Fri, 3 Nov 2023 18:16:16 +0100 Subject: [PATCH] start toxsync (no tox yet lol) --- src/CMakeLists.txt | 16 ++++++++++++++++ .../crdtnotes_toxsync/crdtnotes_toxsync.cpp | 6 ++++++ .../crdtnotes_toxsync/crdtnotes_toxsync.hpp | 15 +++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 src/solanaceae/crdtnotes_toxsync/crdtnotes_toxsync.cpp create mode 100644 src/solanaceae/crdtnotes_toxsync/crdtnotes_toxsync.hpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ab874ae..39feea7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,3 +28,19 @@ target_link_libraries(solanaceae_crdtnotes_imgui PUBLIC ) ######################################## + +add_library(solanaceae_crdtnotes_toxsync + ./solanaceae/crdtnotes_toxsync/crdtnotes_toxsync.hpp + ./solanaceae/crdtnotes_toxsync/crdtnotes_toxsync.cpp +) +target_include_directories(solanaceae_crdtnotes_toxsync PUBLIC .) +target_compile_features(solanaceae_crdtnotes_toxsync PUBLIC cxx_std_17) +target_link_libraries(solanaceae_crdtnotes_toxsync PUBLIC + solanaceae_crdtnotes + #solanaceae_util + solanaceae_contact + + #tox +) + +######################################## diff --git a/src/solanaceae/crdtnotes_toxsync/crdtnotes_toxsync.cpp b/src/solanaceae/crdtnotes_toxsync/crdtnotes_toxsync.cpp new file mode 100644 index 0000000..9f3e9b7 --- /dev/null +++ b/src/solanaceae/crdtnotes_toxsync/crdtnotes_toxsync.cpp @@ -0,0 +1,6 @@ +#include "./crdtnotes_toxsync.hpp" + + +CRDTNotesToxSync::CRDTNotesToxSync(CRDTNotes& notes, Contact3Registry& cr) : _notes(notes), _cr(cr) { +} + diff --git a/src/solanaceae/crdtnotes_toxsync/crdtnotes_toxsync.hpp b/src/solanaceae/crdtnotes_toxsync/crdtnotes_toxsync.hpp new file mode 100644 index 0000000..11b8695 --- /dev/null +++ b/src/solanaceae/crdtnotes_toxsync/crdtnotes_toxsync.hpp @@ -0,0 +1,15 @@ +#pragma once + +#include +#include + +class CRDTNotesToxSync { + CRDTNotes& _notes; + Contact3Registry& _cr; + + public: + CRDTNotesToxSync(CRDTNotes& notes, Contact3Registry& cr); + + float iterate(void); +}; +