Skip to content

Commit f8f8a49

Browse files
committed
3.1.7 - iOS
1 parent 6eddb28 commit f8f8a49

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+6112
-3619
lines changed

libcblite-3.0.3/.DS_Store

0 Bytes
Binary file not shown.

libcblite-3.0.3/lib/.DS_Store

0 Bytes
Binary file not shown.

libcblite-3.0.3/lib/ios/CouchbaseLite.xcframework/ios-arm64/CouchbaseLite.framework/Headers/CBLBase.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#include <CouchbaseLite/CBL_Edition.h>
2525
#include <CouchbaseLite/CBL_Compat.h>
26-
#include <CouchbaseLite/FLSlice.h>
26+
#include <CouchbaseLite/Fleece.h>
2727
#include <stdbool.h>
2828
#include <stdint.h>
2929

@@ -182,6 +182,18 @@ void CBL_DumpInstances(void) CBLAPI;
182182
typedef struct CBLDatabase CBLDatabase;
183183
/** @} */
184184

185+
/** \defgroup scope Scope
186+
@{ */
187+
/** A collection's scope. */
188+
typedef struct CBLScope CBLScope;
189+
/** @} */
190+
191+
/** \defgroup collection Collection
192+
@{ */
193+
/** A collection, a document container. */
194+
typedef struct CBLCollection CBLCollection;
195+
/** @} */
196+
185197
/** \defgroup documents Documents
186198
@{ */
187199
/** An in-memory copy of a document.

libcblite-3.0.3/lib/ios/CouchbaseLite.xcframework/ios-arm64/CouchbaseLite.framework/Headers/CBLBlob.h

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
#pragma once
2020
#include <CouchbaseLite/CBLBase.h>
21-
#include <CouchbaseLite/Fleece.h>
2221

2322
CBL_CAPI_BEGIN
2423

@@ -82,12 +81,12 @@ CBL_CAPI_BEGIN
8281
/** Returns the length in bytes of a blob's content (from its `length` property). */
8382
uint64_t CBLBlob_Length(const CBLBlob*) CBLAPI;
8483

85-
/** Returns the cryptographic digest of a blob's content (from its `digest` property). */
86-
FLString CBLBlob_Digest(const CBLBlob*) CBLAPI;
87-
8884
/** Returns a blob's MIME type, if its metadata has a `content_type` property. */
8985
FLString CBLBlob_ContentType(const CBLBlob*) CBLAPI;
9086

87+
/** Returns the cryptographic digest of a blob's content (from its `digest` property). */
88+
FLString CBLBlob_Digest(const CBLBlob*) CBLAPI;
89+
9190
/** Returns a blob's metadata. This includes the `digest`, `length`, `content_type`,
9291
and `@type` properties, as well as any custom ones that may have been added. */
9392
FLDict CBLBlob_Properties(const CBLBlob*) CBLAPI;
@@ -100,7 +99,7 @@ CBL_CAPI_BEGIN
10099
#pragma mark - READING:
101100
#endif
102101

103-
/** Reads the blob's contents into memory and returns them.
102+
/** Reads the blob's content into memory and returns them.
104103
@note You are responsible for releasing the result by calling \ref FLSliceResult_Release. */
105104
_cbl_warn_unused
106105
FLSliceResult CBLBlob_Content(const CBLBlob* blob,
@@ -251,10 +250,7 @@ CBL_CAPI_BEGIN
251250
#pragma mark - BINDING DEV SUPPORT FOR BLOB:
252251
#endif
253252

254-
/** (UNCOMMITTED) Use this API if you are developing Javascript language bindings.
255-
If you are developing a native app, you must use the CBLBlob API.
256-
257-
Get a \ref CBLBlob object from the database using the \ref CBLBlob properties.
253+
/** Get a \ref CBLBlob object from the database using the \ref CBLBlob properties.
258254
259255
The \ref CBLBlob properties is a blob's metadata containing two required fields
260256
which are a special marker property `"@type":"blob"`, and property `digest` whose value
@@ -271,10 +267,7 @@ CBL_CAPI_BEGIN
271267
const CBLBlob* _cbl_nullable CBLDatabase_GetBlob(CBLDatabase* db, FLDict properties,
272268
CBLError* _cbl_nullable outError) CBLAPI;
273269

274-
/** (UNCOMMITTED) Use this API if you are developing Javascript language bindings.
275-
If you are developing a native app, you must use the CBLBlob API.
276-
277-
Save a new \ref CBLBlob object into the database without associating it with
270+
/** Save a new \ref CBLBlob object into the database without associating it with
278271
any documents. The properties of the saved \ref CBLBlob object will include
279272
information necessary for referencing the \ref CBLBlob object in the properties
280273
of the document to be saved into the database.

libcblite-3.0.3/lib/ios/CouchbaseLite.xcframework/ios-arm64/CouchbaseLite.framework/Headers/CBLCollection.h

Lines changed: 467 additions & 0 deletions
Large diffs are not rendered by default.

libcblite-3.0.3/lib/ios/CouchbaseLite.xcframework/ios-arm64/CouchbaseLite.framework/Headers/CBLDatabase.h

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
#pragma once
2020
#include <CouchbaseLite/CBLBase.h>
21-
#include <CouchbaseLite/FLSlice.h>
2221

2322
CBL_CAPI_BEGIN
2423

@@ -72,6 +71,14 @@ CBLDatabaseConfiguration CBLDatabaseConfiguration_Default(void) CBLAPI;
7271
@param password The input password, which can be any data.
7372
@return True on success, false if there was a problem deriving the key. */
7473
bool CBLEncryptionKey_FromPassword(CBLEncryptionKey *key, FLString password) CBLAPI;
74+
75+
/** VOLATILE API: Derives an encryption key from a password in a way that is
76+
compatible with certain variants of Couchbase Lite in which a slightly different
77+
hashing algorithm is used. The same notes apply as in CBLEncryptionKey_FromPassword
78+
@param key The derived AES key will be stored here.
79+
@param password The input password, which can be any data.
80+
@return True on success, false if there was a problem deriving the key. */
81+
bool CBLEncryptionKey_FromPasswordOld(CBLEncryptionKey *key, FLString password) CBLAPI;
7582
#endif
7683

7784
/** @} */
@@ -96,7 +103,8 @@ bool CBL_DatabaseExists(FLString name, FLString inDirectory) CBLAPI;
96103
@param fromPath The full filesystem path to the original database (including extension).
97104
@param toName The new database name (without the ".cblite2" extension.)
98105
@param config The database configuration (directory and encryption option.)
99-
@param outError On return, will be set to the error that occurred, if applicable.*/
106+
@param outError On return, will be set to the error that occurred, if applicable.
107+
@note While a database is open, one or more of its files may be in use. Attempting to copy a file, while it is in use, will fail. We recommend that you close a database before attempting to copy it. */
100108
bool CBL_CopyDatabase(FLString fromPath,
101109
FLString toName,
102110
const CBLDatabaseConfiguration* _cbl_nullable config,
@@ -213,15 +221,15 @@ bool CBLDatabase_PerformMaintenance(CBLDatabase* db,
213221
/** Returns the database's name. */
214222
FLString CBLDatabase_Name(const CBLDatabase*) CBLAPI;
215223

216-
/** Returns the database's full filesystem path. */
224+
/** Returns the database's full filesystem path, or null slice if the database is closed or deleted. */
217225
_cbl_warn_unused
218226
FLStringResult CBLDatabase_Path(const CBLDatabase*) CBLAPI;
219227

220-
/** Returns the number of documents in the database. */
228+
/** Returns the number of documents in the database, or zero if the database is closed or deleted.
229+
@warning <b>Deprecated :</b> Use CBLCollection_Count on the default collection instead. */
221230
uint64_t CBLDatabase_Count(const CBLDatabase*) CBLAPI;
222231

223-
/** Returns the database's configuration, as given when it was opened.
224-
@note The encryption key is not filled in, for security reasons. */
232+
/** Returns the database's configuration, as given when it was opened. */
225233
const CBLDatabaseConfiguration CBLDatabase_Config(const CBLDatabase*) CBLAPI;
226234

227235
/** @} */
@@ -232,16 +240,17 @@ const CBLDatabaseConfiguration CBLDatabase_Config(const CBLDatabase*) CBLAPI;
232240
#endif
233241
/** \name Database listeners
234242
@{
235-
A database change listener lets you detect changes made to all documents in a database.
243+
A database change listener lets you detect changes made to all documents in the default collection.
236244
(If you only want to observe specific documents, use a \ref CBLDocumentChangeListener instead.)
237245
@note If there are multiple \ref CBLDatabase instances on the same database file, each one's
238246
listeners will be notified of changes made by other database instances.
239247
@warning Changes made to the database file by other processes will _not_ be notified. */
240248

241-
/** A database change listener callback, invoked after one or more documents are changed on disk.
249+
/** A default collection change listener callback, invoked after one or more documents in the default collection are changed on disk.
242250
@warning By default, this listener may be called on arbitrary threads. If your code isn't
243-
prepared for that, you may want to use \ref CBLDatabase_BufferNotifications
244-
so that listeners will be called in a safe context.
251+
prepared for that, you may want to use \ref CBLDatabase_BufferNotifications
252+
so that listeners will be called in a safe context.
253+
@warning <b>Deprecated :</b> CBLCollectionChangeListener instead.
245254
@param context An arbitrary value given when the callback was registered.
246255
@param db The database that changed.
247256
@param numDocs The number of documents that changed (size of the `docIDs` array)
@@ -251,13 +260,13 @@ typedef void (*CBLDatabaseChangeListener)(void* _cbl_nullable context,
251260
unsigned numDocs,
252261
FLString docIDs[_cbl_nonnull]);
253262

254-
/** Registers a database change listener callback. It will be called after one or more
263+
/** Registers a default collection change listener callback. It will be called after one or more
255264
documents are changed on disk.
265+
@warning <b>Deprecated :</b> Use CBLCollection_AddChangeListener on the default collection instead.
256266
@param db The database to observe.
257267
@param listener The callback to be invoked.
258268
@param context An opaque value that will be passed to the callback.
259-
@return A token to be passed to \ref CBLListener_Remove when it's time to remove the
260-
listener.*/
269+
@return A token to be passed to \ref CBLListener_Remove when it's time to remove the listener.*/
261270
_cbl_warn_unused
262271
CBLListenerToken* CBLDatabase_AddChangeListener(const CBLDatabase* db,
263272
CBLDatabaseChangeListener listener,
@@ -303,7 +312,7 @@ typedef void (*CBLNotificationsReadyCallback)(void* _cbl_nullable context,
303312
@param callback The function to be called when a notification is available.
304313
@param context An arbitrary value that will be passed to the callback. */
305314
void CBLDatabase_BufferNotifications(CBLDatabase *db,
306-
CBLNotificationsReadyCallback callback,
315+
CBLNotificationsReadyCallback _cbl_nullable callback,
307316
void* _cbl_nullable context) CBLAPI;
308317

309318
/** Immediately issues all pending notifications for this database, by calling their listener
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
//
2+
// CBLDefaults.h
3+
// CouchbaseLite
4+
//
5+
// Copyright (c) 2023-present Couchbase, Inc All rights reserved.
6+
//
7+
// Licensed under the Apache License, Version 2.0 (the "License");
8+
// you may not use this file except in compliance with the License.
9+
// You may obtain a copy of the License at
10+
//
11+
// http://www.apache.org/licenses/LICENSE-2.0
12+
//
13+
// Unless required by applicable law or agreed to in writing, software
14+
// distributed under the License is distributed on an "AS IS" BASIS,
15+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
// See the License for the specific language governing permissions and
17+
// limitations under the License.
18+
//
19+
20+
// THIS IS AN AUTOGENERATED FILE, MANUAL CHANGES SHOULD BE EXPECTED TO
21+
// BE OVERWRITTEN
22+
23+
24+
#pragma once
25+
#include <CouchbaseLite/CBL_Compat.h>
26+
#include <CouchbaseLite/CBLReplicator.h>
27+
28+
CBL_CAPI_BEGIN
29+
30+
/** \defgroup constants Constants
31+
32+
@{
33+
34+
Constants for default configuration values. */
35+
36+
/** \name CBLLogFileConfiguration
37+
@{
38+
*/
39+
40+
/** [false] Plaintext is not used, and instead binary encoding is used in log files */
41+
CBL_PUBLIC extern const bool kCBLDefaultLogFileUsePlainText;
42+
43+
/** [524288] 512 KiB for the size of a log file */
44+
CBL_PUBLIC extern const size_t kCBLDefaultLogFileMaxSize;
45+
46+
/** [1] 1 rotated file present (2 total, including the currently active log file) */
47+
CBL_PUBLIC extern const uint32_t kCBLDefaultLogFileMaxRotateCount;
48+
49+
50+
/** @} */
51+
52+
/** \name CBLFullTextIndexConfiguration
53+
@{
54+
*/
55+
56+
/** [false] Accents and ligatures are not ignored when indexing via full text search */
57+
CBL_PUBLIC extern const bool kCBLDefaultFullTextIndexIgnoreAccents;
58+
59+
60+
/** @} */
61+
62+
/** \name CBLReplicatorConfiguration
63+
@{
64+
*/
65+
66+
/** [kCBLReplicatorTypePushAndPull] Perform bidirectional replication */
67+
CBL_PUBLIC extern const CBLReplicatorType kCBLDefaultReplicatorType;
68+
69+
/** [false] One-shot replication is used, and will stop once all initial changes are processed */
70+
CBL_PUBLIC extern const bool kCBLDefaultReplicatorContinuous;
71+
72+
/** [300] A heartbeat messages is sent every 300 seconds to keep the connection alive */
73+
CBL_PUBLIC extern const unsigned kCBLDefaultReplicatorHeartbeat;
74+
75+
/** [10] When replicator is not continuous, after 10 failed attempts give up on the replication */
76+
CBL_PUBLIC extern const unsigned kCBLDefaultReplicatorMaxAttemptsSingleShot;
77+
78+
/** [UINT_MAX] When replicator is continuous, never give up unless explicitly stopped */
79+
CBL_PUBLIC extern const unsigned kCBLDefaultReplicatorMaxAttemptsContinuous;
80+
81+
/** [300] Max wait time between retry attempts in seconds */
82+
CBL_PUBLIC extern const unsigned kCBLDefaultReplicatorMaxAttemptWaitTime;
83+
84+
/** [false] Purge documents when a user loses access */
85+
CBL_PUBLIC extern const bool kCBLDefaultReplicatorDisableAutoPurge;
86+
87+
/** [false] Whether or not a replicator only accepts cookies for the sender's parent domains */
88+
CBL_PUBLIC extern const bool kCBLDefaultReplicatorAcceptParentCookies;
89+
90+
/** @} */
91+
92+
/** @} */
93+
94+
CBL_CAPI_END

0 commit comments

Comments
 (0)