just use one symlink to the binding source, make more stuff compile
This commit is contained in:
parent
3aaf988953
commit
50ecaa3b22
|
@ -18,10 +18,13 @@
|
|||
|
||||
#include "shared_realm.hpp"
|
||||
|
||||
#if __APPLE__
|
||||
#include "external_commit_helper.hpp"
|
||||
#endif
|
||||
|
||||
#include "binding_context.hpp"
|
||||
#include "schema.hpp"
|
||||
#include "transact_log_handler.hpp"
|
||||
#include "impl/transact_log_handler.hpp"
|
||||
|
||||
#include <realm/commit_log.hpp>
|
||||
#include <realm/group_shared.hpp>
|
||||
|
@ -101,9 +104,11 @@ Realm::Realm(Config config)
|
|||
}
|
||||
|
||||
Realm::~Realm() {
|
||||
#if __APPLE__
|
||||
if (m_notifier) { // might not exist yet if an error occurred during init
|
||||
m_notifier->remove_realm(this);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Group *Realm::read_group()
|
||||
|
@ -154,11 +159,15 @@ SharedRealm Realm::get_shared_realm(Config config)
|
|||
// FIXME - need to validate that schemas match
|
||||
realm->m_config.schema = std::make_unique<Schema>(*existing->m_config.schema);
|
||||
|
||||
#if __APPLE__
|
||||
realm->m_notifier = existing->m_notifier;
|
||||
realm->m_notifier->add_realm(realm.get());
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
#if __APPLE__
|
||||
realm->m_notifier = std::make_shared<ExternalCommitHelper>(realm.get());
|
||||
#endif
|
||||
|
||||
// otherwise get the schema from the group
|
||||
realm->m_config.schema = std::make_unique<Schema>(ObjectStore::schema_from_group(realm->read_group()));
|
||||
|
@ -290,7 +299,9 @@ void Realm::commit_transaction()
|
|||
|
||||
m_in_transaction = false;
|
||||
transaction::commit(*m_shared_group, *m_history, m_binding_context.get());
|
||||
#if __APPLE__
|
||||
m_notifier->notify_others();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Realm::cancel_transaction()
|
||||
|
@ -398,15 +409,17 @@ uint64_t Realm::get_schema_version(const realm::Realm::Config &config)
|
|||
|
||||
void Realm::close()
|
||||
{
|
||||
#if __APPLE__
|
||||
if (m_notifier) {
|
||||
m_notifier->remove_realm(this);
|
||||
}
|
||||
m_notifier = nullptr;
|
||||
#endif
|
||||
|
||||
m_group = nullptr;
|
||||
m_shared_group = nullptr;
|
||||
m_history = nullptr;
|
||||
m_read_only_group = nullptr;
|
||||
m_notifier = nullptr;
|
||||
m_binding_context = nullptr;
|
||||
}
|
||||
|
||||
|
|
|
@ -124,8 +124,10 @@ namespace realm {
|
|||
|
||||
Group *m_group = nullptr;
|
||||
|
||||
#if __APPLE__
|
||||
std::shared_ptr<_impl::ExternalCommitHelper> m_notifier;
|
||||
|
||||
#endif
|
||||
|
||||
public:
|
||||
std::unique_ptr<BindingContext> m_binding_context;
|
||||
|
||||
|
|
|
@ -5,23 +5,35 @@ include $(CLEAR_VARS)
|
|||
LOCAL_MODULE := librealmreact
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
js_list.cpp \
|
||||
js_results.cpp \
|
||||
js_init.cpp \
|
||||
js_realm.cpp \
|
||||
js_util.cpp \
|
||||
js_object.cpp \
|
||||
js_schema.cpp \
|
||||
rpc.cpp \
|
||||
src/js_list.cpp \
|
||||
src/js_results.cpp \
|
||||
src/js_init.cpp \
|
||||
src/js_realm.cpp \
|
||||
src/js_util.cpp \
|
||||
src/js_object.cpp \
|
||||
src/js_schema.cpp \
|
||||
src/rpc.cpp \
|
||||
src/object-store/index_set.cpp \
|
||||
src/object-store/list.cpp \
|
||||
src/object-store/object_schema.cpp \
|
||||
src/object-store/object_store.cpp \
|
||||
src/object-store/results.cpp \
|
||||
src/object-store/schema.cpp \
|
||||
src/object-store/shared_realm.cpp \
|
||||
src/object-store/parser/parser.cpp \
|
||||
src/object-store/parser/query_builder.cpp \
|
||||
src/object-store/impl/transact_log_handler.cpp
|
||||
|
||||
LOCAL_CFLAGS += -Wall -Werror -fexceptions
|
||||
LOCAL_C_INCLUDES := src/object-store
|
||||
LOCAL_C_INCLUDES += src/object-store/parser
|
||||
LOCAL_C_INCLUDES += ../../../../../../../vendor
|
||||
LOCAL_C_INCLUDES += ../../../../../../../vendor/PEGTL
|
||||
LOCAL_C_INCLUDES += ../../../../../../../core/include
|
||||
|
||||
LOCAL_CFLAGS += -fexceptions -std=c++14 -frtti -Wno-extern-c-compat
|
||||
CXX11_FLAGS := -std=c++11
|
||||
LOCAL_CFLAGS += $(CXX11_FLAGS)
|
||||
LOCAL_EXPORT_CPPFLAGS := $(CXX11_FLAGS)
|
||||
|
||||
LOCAL_C_INCLUDES := ../../../../../../../vendor
|
||||
LOCAL_C_INCLUDES += ../../../../../../../core/include
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := libjsc
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/binding_context.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/index_set.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/index_set.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/js_init.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/js_init.h
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/js_list.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/js_list.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/js_object.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/js_object.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/js_realm.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/js_realm.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/js_results.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/js_results.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/js_schema.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/js_schema.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/js_util.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/js_util.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/list.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/list.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/object_accessor.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/object_schema.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/object_schema.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/object_store.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/object_store.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/parser/parser.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/platform.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/property.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/parser/query_builder.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/results.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/results.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/rpc.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/rpc.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/schema.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/schema.hpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/shared_realm.cpp
|
|
@ -1 +0,0 @@
|
|||
../../../../../../../src/object-store/shared_realm.hpp
|
|
@ -0,0 +1 @@
|
|||
../../../../../../../src
|
Loading…
Reference in New Issue