1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- #import "RLMSyncUser.h"
- #import "RLMSyncConfiguration.h"
- #import "RLMSyncUtil_Private.h"
- #import "sync/sync_config.hpp"
- #import "sync/sync_user.hpp"
- #import "sync/impl/sync_metadata.hpp"
- @class RLMSyncConfiguration, RLMSyncSessionRefreshHandle;
- using namespace realm;
- typedef void(^RLMFetchedRealmCompletionBlock)(NSError * _Nullable, RLMRealm * _Nullable, BOOL * _Nonnull);
- NS_ASSUME_NONNULL_BEGIN
- class CocoaSyncUserContext : public SyncUserContext {
- public:
- void register_refresh_handle(const std::string& path, RLMSyncSessionRefreshHandle *handle);
- void unregister_refresh_handle(const std::string& path);
- void invalidate_all_handles();
- RLMUserErrorReportingBlock error_handler() const;
- void set_error_handler(RLMUserErrorReportingBlock);
- private:
-
- std::unordered_map<std::string, RLMSyncSessionRefreshHandle *> m_refresh_handles;
- std::mutex m_mutex;
-
- RLMUserErrorReportingBlock m_error_handler;
- mutable std::mutex m_error_handler_mutex;
- };
- @interface RLMSyncUser ()
- - (instancetype)initWithSyncUser:(std::shared_ptr<SyncUser>)user;
- - (NSURL *)defaultRealmURL;
- - (std::shared_ptr<SyncUser>)_syncUser;
- + (void)_setUpBindingContextFactory;
- @end
- NS_ASSUME_NONNULL_END
|