Skip to content

Commit

Permalink
[bindgen] follow up to #7300
Browse files Browse the repository at this point in the history
  • Loading branch information
kneth committed Apr 25, 2024
1 parent b2e42c8 commit 2955493
Showing 1 changed file with 19 additions and 27 deletions.
46 changes: 19 additions & 27 deletions bindgen/spec.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# yaml-language-server: $schema=generated/spec.schema.json

headers:
- "realm/sync/config.hpp"
- "realm/sync/subscriptions.hpp"
Expand All @@ -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"

Expand Down Expand Up @@ -231,7 +230,7 @@ enums:
values:
- NoEncryption
- Encryption
- NoMetadata
- InMemory

LoggerLevel:
cppName: util::Logger::Level
Expand Down Expand Up @@ -301,7 +300,7 @@ enums:
- download

SyncUserState:
cppName: UserState
cppName: SyncUser::State
values:
- LoggedOut
- LoggedIn
Expand Down Expand Up @@ -485,7 +484,7 @@ records:

SyncConfig:
fields:
user: SharedSyncUser
user: SharedUser
partition_value:
type: std::string
default: ""
Expand Down Expand Up @@ -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
Expand All @@ -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<AppError>)>&&)'
request_refresh_user: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
request_refresh_location: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
request_access_token: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
track_realm: '(std::string_view)'
create_file_action: '(action: SyncFileAction, original_path: std::string_view, requested_recovery_dir: std::optional<std::string>, 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
Expand All @@ -1238,8 +1223,16 @@ classes:
app: SharedApp
methods:
log_out: ()
subscribe: '(observer: (user: IgnoreArgument<const app::User&>)) -> UserSubscriptionToken'
path_for_realm: '(config: SyncConfig&, custom_file_name: std::optional<std::string>&) -> std::string'
subscribe: '(observer: (user: IgnoreArgument<const User&>)) -> UserSubscriptionToken'
unsubscribe: '(token: UserSubscriptionToken)'
access_token_refresh_required: '() -> bool'
request_log_out: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
request_refresh_user: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
request_refresh_location: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
request_access_token: '(cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
track_realm: '(path: std::string_view)'
create_file_action: '(action: SyncFileAction, original_path: std::string_view, requested_recovery_dir: std::optional<std::string>, partition_value: std::string_view) -> std::string'

UserProfile:
cppName: app::UserProfile
Expand Down Expand Up @@ -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<SharedUser>&, err: std::optional<AppError>)>&&)'
log_out:
Expand All @@ -1297,6 +1289,7 @@ classes:
make_streaming_request: '(user: SharedUser, name: std::string, args: bson::BsonArray, service_name: std::optional<std::string>) -> Request'
update_base_url: '(base_url: std::optional<std::string>, cb: AsyncCallback<(err: std::optional<AppError>)>&&)'
get_base_url: '() const -> std::string'
immediately_run_file_actions: '(realm_path: std::string) -> bool'

WatchStream:
cppName: app::WatchStream
Expand Down Expand Up @@ -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<SharedSyncSession>'
get_existing_active_session: '(path: const std::string&) -> Nullable<SharedSyncSession>'
get_all_sessions_for: '(user: const User&) -> std::vector<SharedSyncSession>'

ThreadSafeReference: {}
AsyncOpenTask:
Expand All @@ -1375,7 +1368,6 @@ classes:
state: SyncSessionState
connection_state: SyncSessionConnectionState
path: std::string
user: SharedSyncUser
config: SyncConfig
full_realm_url: std::string
methods:
Expand Down

0 comments on commit 2955493

Please sign in to comment.