chore: rename quicproquo → quicprochat in docs, Docker, CI, and packaging
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
This commit is contained in:
@@ -1,34 +1,34 @@
|
||||
# QuicProQuo Kotlin SDK
|
||||
# QuicProChat Kotlin SDK
|
||||
|
||||
Kotlin/JVM wrapper over `libquicproquo_ffi` via JNI for Android and JVM platforms.
|
||||
Kotlin/JVM wrapper over `libquicprochat_ffi` via JNI for Android and JVM platforms.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Kotlin 1.9+ / JDK 17+
|
||||
- `libquicproquo_ffi` built for the target architecture
|
||||
- JNI bridge compiled (`jni/dev_quicproquo_NativeBridge.c`)
|
||||
- `libquicprochat_ffi` built for the target architecture
|
||||
- JNI bridge compiled (`jni/dev_quicprochat_NativeBridge.c`)
|
||||
|
||||
## Building the Native Library
|
||||
|
||||
```sh
|
||||
# Linux (JVM)
|
||||
cargo build --release -p quicproquo-ffi
|
||||
cargo build --release -p quicprochat-ffi
|
||||
|
||||
# Android (aarch64)
|
||||
cargo build --release -p quicproquo-ffi --target aarch64-linux-android
|
||||
cargo build --release -p quicprochat-ffi --target aarch64-linux-android
|
||||
|
||||
# Android (armv7)
|
||||
cargo build --release -p quicproquo-ffi --target armv7-linux-androideabi
|
||||
cargo build --release -p quicprochat-ffi --target armv7-linux-androideabi
|
||||
```
|
||||
|
||||
### Compiling the JNI Bridge
|
||||
|
||||
```sh
|
||||
cd jni
|
||||
gcc -shared -fPIC -o libquicproquo_jni.so \
|
||||
gcc -shared -fPIC -o libquicprochat_jni.so \
|
||||
-I"$JAVA_HOME/include" -I"$JAVA_HOME/include/linux" \
|
||||
dev_quicproquo_NativeBridge.c \
|
||||
-L ../../../../target/release -lquicproquo_ffi
|
||||
dev_quicprochat_NativeBridge.c \
|
||||
-L ../../../../target/release -lquicprochat_ffi
|
||||
```
|
||||
|
||||
## Installation
|
||||
@@ -37,7 +37,7 @@ gcc -shared -fPIC -o libquicproquo_jni.so \
|
||||
|
||||
```kotlin
|
||||
dependencies {
|
||||
implementation(files("libs/quicproquo-0.1.0.jar"))
|
||||
implementation(files("libs/quicprochat-0.1.0.jar"))
|
||||
}
|
||||
```
|
||||
|
||||
@@ -46,7 +46,7 @@ Or include as a local project module.
|
||||
## Usage
|
||||
|
||||
```kotlin
|
||||
import dev.quicproquo.QpqClient
|
||||
import dev.quicprochat.QpqClient
|
||||
|
||||
val client = QpqClient("127.0.0.1:5001", caCertPath = "ca.pem")
|
||||
|
||||
@@ -86,16 +86,16 @@ try {
|
||||
|
||||
## Structure
|
||||
|
||||
- `src/main/kotlin/dev/quicproquo/QpqClient.kt` -- High-level client
|
||||
- `src/main/kotlin/dev/quicproquo/NativeBridge.kt` -- JNI declarations
|
||||
- `src/main/kotlin/dev/quicproquo/QpqError.kt` -- Exception types
|
||||
- `jni/dev_quicproquo_NativeBridge.c` -- JNI C bridge to FFI
|
||||
- `src/main/kotlin/dev/quicprochat/QpqClient.kt` -- High-level client
|
||||
- `src/main/kotlin/dev/quicprochat/NativeBridge.kt` -- JNI declarations
|
||||
- `src/main/kotlin/dev/quicprochat/QpqError.kt` -- Exception types
|
||||
- `jni/dev_quicprochat_NativeBridge.c` -- JNI C bridge to FFI
|
||||
|
||||
## Android Integration
|
||||
|
||||
1. Add the native libraries to `src/main/jniLibs/<abi>/`:
|
||||
- `arm64-v8a/libquicproquo_ffi.so`
|
||||
- `armeabi-v7a/libquicproquo_ffi.so`
|
||||
- `arm64-v8a/libquicprochat_ffi.so`
|
||||
- `armeabi-v7a/libquicprochat_ffi.so`
|
||||
2. Add the JNI bridge library alongside
|
||||
3. The `NativeBridge` class loads the library via `System.loadLibrary`
|
||||
|
||||
@@ -107,5 +107,5 @@ rustup target add aarch64-linux-android armv7-linux-androideabi
|
||||
|
||||
# Build with the NDK linker
|
||||
CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android21-clang \
|
||||
cargo build --release -p quicproquo-ffi --target aarch64-linux-android
|
||||
cargo build --release -p quicprochat-ffi --target aarch64-linux-android
|
||||
```
|
||||
|
||||
@@ -2,7 +2,7 @@ plugins {
|
||||
kotlin("jvm") version "1.9.22"
|
||||
}
|
||||
|
||||
group = "dev.quicproquo"
|
||||
group = "dev.quicprochat"
|
||||
version = "0.1.0"
|
||||
|
||||
repositories {
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
/**
|
||||
* JNI bridge between Kotlin/Java and libquicproquo_ffi.
|
||||
* JNI bridge between Kotlin/Java and libquicprochat_ffi.
|
||||
*
|
||||
* Compile with:
|
||||
* gcc -shared -fPIC -o libquicproquo_jni.so \
|
||||
* gcc -shared -fPIC -o libquicprochat_jni.so \
|
||||
* -I"$JAVA_HOME/include" -I"$JAVA_HOME/include/linux" \
|
||||
* dev_quicproquo_NativeBridge.c \
|
||||
* -L ../../../../target/release -lquicproquo_ffi
|
||||
* dev_quicprochat_NativeBridge.c \
|
||||
* -L ../../../../target/release -lquicprochat_ffi
|
||||
*/
|
||||
|
||||
#include <jni.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Forward declarations for libquicproquo_ffi functions. */
|
||||
/* Forward declarations for libquicprochat_ffi functions. */
|
||||
typedef struct QpqHandle QpqHandle;
|
||||
|
||||
extern QpqHandle* qpq_connect(const char* server, const char* ca_cert, const char* server_name);
|
||||
@@ -27,7 +27,7 @@ extern void qpq_free_string(char* ptr);
|
||||
/* --- JNI exports --- */
|
||||
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_dev_quicproquo_NativeBridge_nativeConnect(
|
||||
Java_dev_quicprochat_NativeBridge_nativeConnect(
|
||||
JNIEnv* env, jclass cls,
|
||||
jstring server, jstring caCert, jstring serverName)
|
||||
{
|
||||
@@ -45,7 +45,7 @@ Java_dev_quicproquo_NativeBridge_nativeConnect(
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_dev_quicproquo_NativeBridge_nativeLogin(
|
||||
Java_dev_quicprochat_NativeBridge_nativeLogin(
|
||||
JNIEnv* env, jclass cls,
|
||||
jlong handle, jstring username, jstring password)
|
||||
{
|
||||
@@ -61,7 +61,7 @@ Java_dev_quicproquo_NativeBridge_nativeLogin(
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_dev_quicproquo_NativeBridge_nativeSend(
|
||||
Java_dev_quicprochat_NativeBridge_nativeSend(
|
||||
JNIEnv* env, jclass cls,
|
||||
jlong handle, jstring recipient, jbyteArray message)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ Java_dev_quicproquo_NativeBridge_nativeSend(
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_dev_quicproquo_NativeBridge_nativeReceive(
|
||||
Java_dev_quicprochat_NativeBridge_nativeReceive(
|
||||
JNIEnv* env, jclass cls,
|
||||
jlong handle, jint timeoutMs)
|
||||
{
|
||||
@@ -97,7 +97,7 @@ Java_dev_quicproquo_NativeBridge_nativeReceive(
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_dev_quicproquo_NativeBridge_nativeDisconnect(
|
||||
Java_dev_quicprochat_NativeBridge_nativeDisconnect(
|
||||
JNIEnv* env, jclass cls, jlong handle)
|
||||
{
|
||||
QpqHandle* h = (QpqHandle*)(uintptr_t)handle;
|
||||
@@ -107,7 +107,7 @@ Java_dev_quicproquo_NativeBridge_nativeDisconnect(
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_dev_quicproquo_NativeBridge_nativeLastError(
|
||||
Java_dev_quicprochat_NativeBridge_nativeLastError(
|
||||
JNIEnv* env, jclass cls, jlong handle)
|
||||
{
|
||||
QpqHandle* h = (QpqHandle*)(uintptr_t)handle;
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package dev.quicproquo
|
||||
package dev.quicprochat
|
||||
|
||||
/**
|
||||
* JNI bridge to libquicproquo_ffi native library.
|
||||
* JNI bridge to libquicprochat_ffi native library.
|
||||
*
|
||||
* Load the library with:
|
||||
* ```kotlin
|
||||
* System.loadLibrary("quicproquo_ffi")
|
||||
* System.loadLibrary("quicprochat_ffi")
|
||||
* ```
|
||||
*
|
||||
* Or set `java.library.path` to the directory containing the shared object.
|
||||
*/
|
||||
internal object NativeBridge {
|
||||
|
||||
/** Status codes (mirrors crates/quicproquo-ffi/src/lib.rs). */
|
||||
/** Status codes (mirrors crates/quicprochat-ffi/src/lib.rs). */
|
||||
const val QPQ_OK = 0
|
||||
const val QPQ_ERROR = 1
|
||||
const val QPQ_AUTH_FAILED = 2
|
||||
@@ -20,7 +20,7 @@ internal object NativeBridge {
|
||||
const val QPQ_NOT_CONNECTED = 4
|
||||
|
||||
init {
|
||||
System.loadLibrary("quicproquo_ffi")
|
||||
System.loadLibrary("quicprochat_ffi")
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package dev.quicproquo
|
||||
package dev.quicprochat
|
||||
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import java.io.Closeable
|
||||
|
||||
/**
|
||||
* High-level quicproquo client for Android/JVM.
|
||||
* High-level quicprochat client for Android/JVM.
|
||||
*
|
||||
* Wraps `libquicproquo_ffi` via JNI to provide a Kotlin-native API.
|
||||
* Wraps `libquicprochat_ffi` via JNI to provide a Kotlin-native API.
|
||||
*
|
||||
* ```kotlin
|
||||
* val client = QpqClient("127.0.0.1:5001", caCertPath = "ca.pem")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package dev.quicproquo
|
||||
package dev.quicprochat
|
||||
|
||||
/** Base exception for quicproquo SDK errors. */
|
||||
/** Base exception for quicprochat SDK errors. */
|
||||
open class QpqException(message: String, cause: Throwable? = null) :
|
||||
RuntimeException(message, cause)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user