@@ -1119,7 +1119,9 @@ class ObjectBoxC {
11191119 late final _dart_store_is_open _store_is_open =
11201120 _store_is_open_ptr.asFunction <_dart_store_is_open>();
11211121
1122- /// Get a store previously opened with createShared() matching the given path of the DB directory.
1122+ /// Attach to a previously opened store matching the path of the DB directory, which was used for opening the store.
1123+ /// The returned store is a new instance (e.g. different pointer value) with its own lifetime and must also be closed.
1124+ /// The actual underlying store is only closed when the last store OBX_store instance is closed.
11231125 /// @returns nullptr if no open store was found (i.e. not opened before or already closed)
11241126 ffi.Pointer <OBX_store > store_attach (
11251127 ffi.Pointer <ffi.Int8 > path,
@@ -5410,7 +5412,7 @@ class ObjectBoxC {
54105412
54115413 /// Initialize the http-server with the given options.
54125414 /// Note: the given options are always freed by this function, including when an error occurs.
5413- /// @param opt required parameter holding the options (see obx_admin_opt_*())
5415+ /// @param options required parameter holding the options (see obx_admin_opt_*())
54145416 /// @returns NULL if the operation failed, see functions like obx_last_error_code() to get error details
54155417 ffi.Pointer <OBX_admin > admin (
54165418 ffi.Pointer <OBX_admin_options > options,
@@ -5967,7 +5969,7 @@ class ObjectBoxC {
59675969 /// E.g. a client with an incompatible model will be rejected during login.
59685970 /// @param store_options Options for the server's store.
59695971 /// It is freed automatically (same as with obx_store_open()) - don't use or free it afterwards.
5970- /// @param uri The URI (following the pattern protocol:: //IP:port) the server should listen on.
5972+ /// @param uri The URI (following the pattern " protocol://IP:port" ) the server should listen on.
59715973 /// Supported \b protocols are "ws" (WebSockets) and "wss" (secure WebSockets).
59725974 /// To use the latter ("wss"), you must also call obx_sync_server_certificate_path().
59735975 /// To bind to all available \b interfaces, including those that are available from the "outside", use 0.0.0.0 as
@@ -6218,6 +6220,27 @@ class ObjectBoxC {
62186220 _sync_server_stats_string_ptr
62196221 .asFunction <_dart_sync_server_stats_string>();
62206222
6223+ /// Configure admin with a sync server, attaching the store and enabling custom sync-server functionality in the UI.
6224+ /// This is a replacement for obx_admin_opt_store() and obx_admin_opt_store_path() - don't set them for the server.
6225+ /// After configuring, this acts as obx_admin() - see for more details.
6226+ /// You must use obx_admin_close() to stop & free resources after you're done; obx_sync_server_stop() doesn't do that.
6227+ /// @param options configuration set up with obx_admin_opt_*. You can pass NULL to use the default options.
6228+ ffi.Pointer <OBX_admin > sync_server_admin (
6229+ ffi.Pointer <OBX_sync_server > server,
6230+ ffi.Pointer <OBX_admin_options > options,
6231+ ) {
6232+ return _sync_server_admin (
6233+ server,
6234+ options,
6235+ );
6236+ }
6237+
6238+ late final _sync_server_admin_ptr =
6239+ _lookup< ffi.NativeFunction <_c_sync_server_admin>> (
6240+ 'obx_sync_server_admin' );
6241+ late final _dart_sync_server_admin _sync_server_admin =
6242+ _sync_server_admin_ptr.asFunction <_dart_sync_server_admin>();
6243+
62216244 /// Initializes Dart API - call before any other obx_dart_* functions.
62226245 int dartc_init_api (
62236246 ffi.Pointer <ffi.Void > data,
@@ -6978,7 +7001,7 @@ const int OBX_VERSION_MAJOR = 0;
69787001
69797002const int OBX_VERSION_MINOR = 15 ;
69807003
6981- const int OBX_VERSION_PATCH = 0 ;
7004+ const int OBX_VERSION_PATCH = 1 ;
69827005
69837006const int OBX_ID_NEW = - 1 ;
69847007
@@ -10680,6 +10703,16 @@ typedef _dart_sync_server_stats_string = ffi.Pointer<ffi.Int8> Function(
1068010703 int include_zero_values,
1068110704);
1068210705
10706+ typedef _c_sync_server_admin = ffi.Pointer <OBX_admin > Function (
10707+ ffi.Pointer <OBX_sync_server > server,
10708+ ffi.Pointer <OBX_admin_options > options,
10709+ );
10710+
10711+ typedef _dart_sync_server_admin = ffi.Pointer <OBX_admin > Function (
10712+ ffi.Pointer <OBX_sync_server > server,
10713+ ffi.Pointer <OBX_admin_options > options,
10714+ );
10715+
1068310716typedef _c_dartc_init_api = ffi.Int32 Function (
1068410717 ffi.Pointer <ffi.Void > data,
1068510718);
0 commit comments