LiteCore
Couchbase Lite cross-platform core implementation
Loading...
Searching...
No Matches
c4PeerSync.h
Go to the documentation of this file.
1//
2// c4PeerSync.h
3//
4// Copyright 2025-Present Couchbase, Inc.
5//
6// Use of this software is governed by the Business Source License included
7// in the file licenses/BSL-Couchbase.txt. As of the Change Date specified
8// in that file, in accordance with the Business Source License, use of this
9// software will be governed by the Apache License, Version 2.0, included in
10// the file licenses/APL2.txt.
11//
12
13#pragma once
14#include "c4PeerSyncTypes.h"
15
16#ifdef COUCHBASE_ENTERPRISE
19
21CBL_CORE_API extern struct c4LogDomain* C4NONNULL const kC4DiscoveryLog;
22
24CBL_CORE_API extern struct c4LogDomain* C4NONNULL const kC4P2PLog;
25
27CBL_CORE_API const char* c4peerSync_nameOfProtocol(C4PeerSyncProtocol) C4API;
28
32CBL_CORE_API C4PeerSync* C4NULLABLE c4peersync_new(const C4PeerSyncParameters*, C4Error* C4NULLABLE outError) C4API;
33
37CBL_CORE_API C4PeerID c4peersync_getMyID(C4PeerSync*) C4API;
38
40CBL_CORE_API void c4peersync_setProgressLevel(C4PeerSync*, C4ReplicatorProgressLevel) C4API;
41
47CBL_CORE_API void c4peersync_start(C4PeerSync*) C4API;
48
55CBL_CORE_API void c4peersync_stop(C4PeerSync*) C4API;
56
60CBL_CORE_API C4PeerID* C4NULLABLE c4peersync_getOnlinePeers(C4PeerSync*, size_t* outCount) C4API;
61
65CBL_CORE_API C4PeerInfo* C4NULLABLE c4peersync_getPeerInfo(C4PeerSync*, C4PeerID) C4API;
66
69CBL_CORE_API void c4peerinfo_free(C4PeerInfo* C4NULLABLE) C4API;
70
73CBL_CORE_API C4PeerID c4peerid_fromCert(C4Cert*) C4API;
74
77CBL_CORE_API C4PeerID c4peerid_fromCertData(C4Slice certData) C4API;
78
81#endif // COUCHBASE_ENTERPRISE
#define CBL_CORE_API
Definition c4Compat.h:131
#define C4NULLABLE
Definition c4Compat.h:38
#define C4API
Definition c4Compat.h:106
#define C4_ASSUME_NONNULL_BEGIN
Definition c4Compat.h:36
#define C4API_END_DECLS
Definition c4Compat.h:108
#define C4NONNULL
Definition c4Compat.h:39
#define C4API_BEGIN_DECLS
Definition c4Compat.h:107
#define C4_ASSUME_NONNULL_END
Definition c4Compat.h:37
struct C4PeerSync C4PeerSync
A peer-to-peer sync session.
Definition c4Base.h:162
FLSlice C4Slice
Definition c4Base.h:48
struct C4Cert C4Cert
An X.509 certificate, or certificate signing request (CSR).
Definition c4Base.h:122
C4ReplicatorProgressLevel
Definition c4ReplicatorTypes.h:91
An error value.
Definition c4Error.h:133