RLMRealm_Private.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. ////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2014 Realm Inc.
  4. //
  5. // Licensed under the Apache License, Version 2.0 (the "License");
  6. // you may not use this file except in compliance with the License.
  7. // You may obtain a copy of the License at
  8. //
  9. // http://www.apache.org/licenses/LICENSE-2.0
  10. //
  11. // Unless required by applicable law or agreed to in writing, software
  12. // distributed under the License is distributed on an "AS IS" BASIS,
  13. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. // See the License for the specific language governing permissions and
  15. // limitations under the License.
  16. //
  17. ////////////////////////////////////////////////////////////////////////////
  18. #import <Realm/RLMRealm.h>
  19. @class RLMFastEnumerator, RLMSyncSubscription;
  20. NS_ASSUME_NONNULL_BEGIN
  21. // Disable syncing files to disk. Cannot be re-enabled. Use only for tests.
  22. FOUNDATION_EXTERN void RLMDisableSyncToDisk(void);
  23. // Set whether the skip backup attribute should be set on temporary files.
  24. FOUNDATION_EXTERN void RLMSetSkipBackupAttribute(bool value);
  25. FOUNDATION_EXTERN NSData * _Nullable RLMRealmValidatedEncryptionKey(NSData *key);
  26. FOUNDATION_EXTERN RLMSyncSubscription *RLMCastToSyncSubscription(id obj);
  27. // Set the queue used for async open. For testing purposes only.
  28. FOUNDATION_EXTERN void RLMSetAsyncOpenQueue(dispatch_queue_t queue);
  29. // Translate an in-flight exception resulting from an operation on a SharedGroup to
  30. // an NSError or NSException (if error is nil)
  31. void RLMRealmTranslateException(NSError **error);
  32. // RLMRealm private members
  33. @interface RLMRealm ()
  34. @property (nonatomic, readonly) BOOL dynamic;
  35. @property (nonatomic, readwrite) RLMSchema *schema;
  36. + (void)resetRealmState;
  37. - (void)registerEnumerator:(RLMFastEnumerator *)enumerator;
  38. - (void)unregisterEnumerator:(RLMFastEnumerator *)enumerator;
  39. - (void)detachAllEnumerators;
  40. - (void)sendNotifications:(RLMNotification)notification;
  41. - (void)verifyThread;
  42. - (void)verifyNotificationsAreSupported:(bool)isCollection;
  43. - (RLMRealm *)frozenCopy NS_RETURNS_RETAINED;
  44. @end
  45. NS_ASSUME_NONNULL_END