Rename all project references from quicproquo/qpq to quicprochat/qpc across documentation, Docker configuration, CI workflows, packaging scripts, operational configs, and build tooling. - Docker: crate paths, binary names, user/group, data dirs, env vars - CI: workflow crate references, binary names, artifact names - Docs: all markdown files under docs/, SDK READMEs, book.toml - Packaging: OpenWrt Makefile, init script, UCI config (file renames) - Scripts: justfile, dev-shell, screenshot, cross-compile, ai_team - Operations: Prometheus config, alert rules, Grafana dashboard - Config: .env.example (QPQ_* → QPC_*), CODEOWNERS paths - Top-level: README, CONTRIBUTING, ROADMAP, CLAUDE.md
51 lines
1.3 KiB
Markdown
51 lines
1.3 KiB
Markdown
# QuicProChat Java SDK
|
|
|
|
Java wrapper over `libquicprochat_ffi` via JNI for JVM and Android.
|
|
|
|
## Prerequisites
|
|
|
|
- JDK 17+
|
|
- `libquicprochat_ffi` built for the target platform
|
|
- JNI bridge compiled (shared with Kotlin SDK: `../kotlin/jni/`)
|
|
|
|
## Building
|
|
|
|
```sh
|
|
# Build Rust FFI library
|
|
cargo build --release -p quicprochat-ffi
|
|
|
|
# Build Java SDK
|
|
./gradlew build
|
|
```
|
|
|
|
## Usage
|
|
|
|
```java
|
|
import dev.quicprochat.QpqClient;
|
|
|
|
try (QpqClient client = new QpqClient("127.0.0.1:5001", "ca.pem")) {
|
|
client.login("alice", "secret");
|
|
client.send("bob", "hello".getBytes());
|
|
|
|
var messages = client.receive(5000);
|
|
messages.forEach(msg -> System.out.println("Received: " + msg));
|
|
}
|
|
```
|
|
|
|
## API
|
|
|
|
| Method | Description |
|
|
|---|---|
|
|
| `new QpqClient(server, caCertPath)` | Connect to server |
|
|
| `client.login(username, password)` | OPAQUE authentication |
|
|
| `client.send(recipient, message)` | Send message by username |
|
|
| `client.receive(timeoutMs)` | Receive pending messages |
|
|
| `client.close()` / `client.disconnect()` | Disconnect |
|
|
| `client.isConnected()` | Connection status |
|
|
|
|
## Structure
|
|
|
|
- `src/main/java/dev/quicprochat/QpqClient.java` -- High-level client
|
|
- `src/main/java/dev/quicprochat/NativeBridge.java` -- JNI declarations
|
|
- JNI C bridge shared with Kotlin SDK at `../kotlin/jni/`
|