From 29554934131750a9b3e6f633cf46fc6a3b69f612 Mon Sep 17 00:00:00 2001 From: Kenneth Geisshirt Date: Thu, 25 Apr 2024 12:53:51 +0200 Subject: [PATCH] [bindgen] follow up to #7300 --- bindgen/spec.yml | 46 +++++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/bindgen/spec.yml b/bindgen/spec.yml index 76284e08fa7..da81184be48 100644 --- a/bindgen/spec.yml +++ b/bindgen/spec.yml @@ -1,5 +1,3 @@ -# yaml-language-server: $schema=generated/spec.schema.json - headers: - "realm/sync/config.hpp" - "realm/sync/subscriptions.hpp" @@ -20,6 +18,7 @@ headers: - "realm/object-store/sync/sync_manager.hpp" - "realm/object-store/sync/sync_session.hpp" - "realm/object-store/sync/sync_user.hpp" + - "realm/object-store/sync/app_user.hpp" - "realm/object-store/sync/mongo_collection.hpp" - "realm/util/bson/bson.hpp" @@ -231,7 +230,7 @@ enums: values: - NoEncryption - Encryption - - NoMetadata + - InMemory LoggerLevel: cppName: util::Logger::Level @@ -301,7 +300,7 @@ enums: - download SyncUserState: - cppName: UserState + cppName: SyncUser::State values: - LoggedOut - LoggedIn @@ -485,7 +484,7 @@ records: SyncConfig: fields: - user: SharedSyncUser + user: SharedUser partition_value: type: std::string default: "" @@ -1203,8 +1202,9 @@ classes: UserSubscriptionToken: cppName: app::User::Token - SyncUser: - sharedPtrWrapped: SharedSyncUser + User: + cppName: app::User + sharedPtrWrapped: SharedUser properties: is_logged_in: bool user_id: std::string @@ -1213,21 +1213,6 @@ classes: access_token: std::string refresh_token: std::string state: SyncUserState - sync_manager: SharedSyncManager - methods: - access_token_refresh_required: bool - request_log_out: '(cb: AsyncCallback<(err: std::optional)>&&)' - request_refresh_user: '(cb: AsyncCallback<(err: std::optional)>&&)' - request_refresh_location: '(cb: AsyncCallback<(err: std::optional)>&&)' - request_access_token: '(cb: AsyncCallback<(err: std::optional)>&&)' - track_realm: '(std::string_view)' - create_file_action: '(action: SyncFileAction, original_path: std::string_view, requested_recovery_dir: std::optional, partition_value: std::string_view) -> std::string' - - User: - base: SyncUser - cppName: app::User - sharedPtrWrapped: SharedUser - properties: is_anonymous: bool device_id: std::string has_device_id: bool @@ -1238,8 +1223,16 @@ classes: app: SharedApp methods: log_out: () - subscribe: '(observer: (user: IgnoreArgument)) -> UserSubscriptionToken' + path_for_realm: '(config: SyncConfig&, custom_file_name: std::optional&) -> std::string' + subscribe: '(observer: (user: IgnoreArgument)) -> UserSubscriptionToken' unsubscribe: '(token: UserSubscriptionToken)' + access_token_refresh_required: '() -> bool' + request_log_out: '(cb: AsyncCallback<(err: std::optional)>&&)' + request_refresh_user: '(cb: AsyncCallback<(err: std::optional)>&&)' + request_refresh_location: '(cb: AsyncCallback<(err: std::optional)>&&)' + request_access_token: '(cb: AsyncCallback<(err: std::optional)>&&)' + track_realm: '(path: std::string_view)' + create_file_action: '(action: SyncFileAction, original_path: std::string_view, requested_recovery_dir: std::optional, partition_value: std::string_view) -> std::string' UserProfile: cppName: app::UserProfile @@ -1272,7 +1265,6 @@ classes: get_cached_app: '(app_id: const std::string&) -> SharedApp' clear_cached_apps: () close_all_sync_sessions: () - methods: log_in_with_credentials: '(credentials: AppCredentials, cb: AsyncCallback<(user: const Nullable&, err: std::optional)>&&)' log_out: @@ -1297,6 +1289,7 @@ classes: make_streaming_request: '(user: SharedUser, name: std::string, args: bson::BsonArray, service_name: std::optional) -> Request' update_base_url: '(base_url: std::optional, cb: AsyncCallback<(err: std::optional)>&&)' get_base_url: '() const -> std::string' + immediately_run_file_actions: '(realm_path: std::string) -> bool' WatchStream: cppName: app::WatchStream @@ -1357,8 +1350,8 @@ classes: set_timeouts: '(timeouts: SyncClientTimeouts)' reconnect: () wait_for_sessions_to_terminate: () - get_existing_active_session: '(path: const std::string&) -> SharedSyncSession' - get_all_sessions_for: '(user: const SyncUser&) -> std::vector' + get_existing_active_session: '(path: const std::string&) -> Nullable' + get_all_sessions_for: '(user: const User&) -> std::vector' ThreadSafeReference: {} AsyncOpenTask: @@ -1375,7 +1368,6 @@ classes: state: SyncSessionState connection_state: SyncSessionConnectionState path: std::string - user: SharedSyncUser config: SyncConfig full_realm_url: std::string methods: