Skip to content

CBL-8080: Add JNI support for per-transport MultipeerReplicator status#472

Open
pasin wants to merge 2 commits intomasterfrom
feature/CBL-8080
Open

CBL-8080: Add JNI support for per-transport MultipeerReplicator status#472
pasin wants to merge 2 commits intomasterfrom
feature/CBL-8080

Conversation

@pasin
Copy link
Copy Markdown
Collaborator

@pasin pasin commented Apr 24, 2026

  • Implement JNI for per-transport status notifications.
  • Implement JNI for getting status by transport.
  • Clean up JNI API comments in the header file.

- Implement JNI for per-transport status notifications.
- Implement JNI for getting status by transport.
- Clean up JNI API comments in the header file.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds JNI plumbing to expose per-transport MultipeerReplicator status to the Java layer, including a native getStatus API and updated callback wiring, plus small related constant/header comment updates.

Changes:

  • Introduces PeerSyncProtocols.NONE and adds protocol documentation in C4Constants.
  • Updates the multipeer JNI callback onSyncStatusChanged to pass a new C4PeerSyncStatus Java object, and adds a native getStatus(peer, protocol) implementation.
  • Cleans up/updates the generated JNI header comments for NativeC4MultipeerReplicator.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
common/main/java/com/couchbase/lite/internal/core/C4Constants.java Adds/clarifies peer sync protocol constants, including a new NONE value.
common/main/cpp/native_c4multipeerreplicator.cc Wires per-transport status through JNI via C4PeerSyncStatus, updates callback signature, and adds getStatus.
common/main/cpp/com_couchbase_lite_internal_core_impl_NativeC4MultipeerReplicator.h Updates JNI header comment blocks to match the current native API (including new getStatus).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread common/main/java/com/couchbase/lite/internal/core/C4Constants.java Outdated
Comment thread common/main/cpp/native_c4multipeerreplicator.cc
Comment thread common/main/cpp/native_c4multipeerreplicator.cc Outdated
Comment thread common/main/cpp/native_c4multipeerreplicator.cc Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants