Couchbase Lite C
Couchbase Lite C API
CBLPrediction.h
Go to the documentation of this file.
1//
2// CBLPrediction.h
3//
4// Copyright (c) 2024 Couchbase, Inc All rights reserved.
5//
6// Licensed under the Apache License, Version 2.0 (the "License");
7// you may not use this file except in compliance with the License.
8// You may obtain a copy of the License at
9//
10// http://www.apache.org/licenses/LICENSE-2.0
11//
12// Unless required by applicable law or agreed to in writing, software
13// distributed under the License is distributed on an "AS IS" BASIS,
14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15// See the License for the specific language governing permissions and
16// limitations under the License.
17//
18
19#pragma once
20#include "CBLBase.h"
21
22#ifdef COUCHBASE_ENTERPRISE
23
25
27typedef struct {
30
40 FLMutableDict _cbl_nullable (* _cbl_nonnull prediction)(void* _cbl_nullable context, FLDict input);
41
43 void (*_cbl_nullable unregistered)(void* context);
45
50
54
56
57#endif
#define CBLAPI
Definition: CBL_Compat.h:104
#define _cbl_nullable
Definition: CBL_Compat.h:92
#define CBL_CAPI_BEGIN
Definition: CBL_Compat.h:105
#define CBL_CAPI_END
Definition: CBL_Compat.h:106
void CBL_RegisterPredictiveModel(FLString name, CBLPredictiveModel model)
Registers a predictive model.
void CBL_UnregisterPredictiveModel(FLString name)
Unregisters the predictive model.
struct _FLDict * FLMutableDict
A reference to a mutable dictionary.
Definition: FLBase.h:40
const struct _FLDict * FLDict
A reference to a dictionary (map) value.
Definition: FLBase.h:37
Predictive Model
Definition: CBLPrediction.h:27
void *_cbl_nullable context
A pointer to any external data needed by the prediction callback, which will receive this as its firs...
Definition: CBLPrediction.h:29
A simple reference to a block of memory.
Definition: FLSlice.h:45