just use one symlink to the binding source, make more stuff compile

This commit is contained in:
Ari Lazier 2015-12-01 20:49:31 -08:00
parent 3aaf988953
commit 50ecaa3b22
40 changed files with 44 additions and 52 deletions

View File

@ -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;
}

View File

@ -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;

View File

@ -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)

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/binding_context.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/index_set.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/index_set.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/js_init.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/js_init.h

View File

@ -1 +0,0 @@
../../../../../../../src/js_list.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/js_list.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/js_object.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/js_object.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/js_realm.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/js_realm.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/js_results.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/js_results.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/js_schema.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/js_schema.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/js_util.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/js_util.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/list.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/list.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/object_accessor.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/object_schema.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/object_schema.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/object_store.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/object_store.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/parser/parser.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/platform.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/property.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/parser/query_builder.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/results.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/results.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/rpc.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/rpc.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/schema.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/schema.hpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/shared_realm.cpp

View File

@ -1 +0,0 @@
../../../../../../../src/object-store/shared_realm.hpp

View File

@ -0,0 +1 @@
../../../../../../../src