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:
52
sdks/swift/Sources/CQuicProChat/quicprochat_ffi.h
Normal file
52
sdks/swift/Sources/CQuicProChat/quicprochat_ffi.h
Normal file
@@ -0,0 +1,52 @@
|
||||
// quicprochat_ffi.h — C header for libquicprochat_ffi.
|
||||
//
|
||||
// Mirrors the extern "C" functions from crates/quicprochat-ffi/src/lib.rs.
|
||||
|
||||
#ifndef QUICPROCHAT_FFI_H
|
||||
#define QUICPROCHAT_FFI_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Status codes.
|
||||
#define QPQ_OK 0
|
||||
#define QPQ_ERROR 1
|
||||
#define QPQ_AUTH_FAILED 2
|
||||
#define QPQ_TIMEOUT 3
|
||||
#define QPQ_NOT_CONNECTED 4
|
||||
|
||||
// Opaque handle type.
|
||||
typedef struct QpqHandle QpqHandle;
|
||||
|
||||
// Connect to a quicprochat server. Returns NULL on failure.
|
||||
QpqHandle* qpq_connect(const char* server, const char* ca_cert, const char* server_name);
|
||||
|
||||
// Authenticate with OPAQUE credentials.
|
||||
int qpq_login(QpqHandle* handle, const char* username, const char* password);
|
||||
|
||||
// Send a message to a recipient (by username).
|
||||
int qpq_send(QpqHandle* handle, const char* recipient,
|
||||
const uint8_t* message, size_t message_len);
|
||||
|
||||
// Receive pending messages (blocking). On success, *out_json is a
|
||||
// heap-allocated JSON string that must be freed with qpq_free_string.
|
||||
int qpq_receive(QpqHandle* handle, uint32_t timeout_ms, char** out_json);
|
||||
|
||||
// Disconnect and free the handle.
|
||||
void qpq_disconnect(QpqHandle* handle);
|
||||
|
||||
// Return the last error message, or NULL. Do NOT free the result.
|
||||
const char* qpq_last_error(const QpqHandle* handle);
|
||||
|
||||
// Free a string returned by qpq_receive.
|
||||
void qpq_free_string(char* ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // QUICPROCHAT_FFI_H
|
||||
Reference in New Issue
Block a user