score-back/include/server_api.h
Artur Mukhamadiev 24b6f9937f feat(cloud_point): add OpenCV integration, stereo matching, and get-available-methods RPC
- Add OpenCV and stdexec dependencies
- ImageRPC type bridging OpenCV and RPC layers
- Stereo rectification boilerplate
- get-available-methods RPC method with get_count/get_method_name_by_id/get_method_names
- Tests for remote method retrieval
- CPU/GPU stereo matcher interfaces with SGBM implementation
- Documentation consistency pass across impl and docs

TG-5 #ready-for-test
TG-2 #in-progress
2026-07-12 22:28:21 +03:00

41 lines
1.1 KiB
C++

#ifndef CRPC_SERVER_API
#define CRPC_SERVER_API
#include <cstdint>
#include "export.h"
#ifdef __cplusplus
extern "C" {
#endif //cpp
/**
* @brief basically just std::string wrapper:
* struct rpc_string {
* std::string s;
* };
* has internal gc and would be automatically deallocated on deinit call,
* but it is better to call destroy manually, to prevent exceeding memory usage
*/
struct CRPC_EXPORT rpc_string;
CRPC_EXPORT const char* crpc_str_get_data(const rpc_string*);
CRPC_EXPORT uint64_t crpc_str_get_size(const rpc_string*);
CRPC_EXPORT rpc_string* crpc_str_create(const char* data, uint64_t size);
CRPC_EXPORT void crpc_str_destroy(rpc_string*);
typedef rpc_string*(*callback_t)(rpc_string*);
CRPC_EXPORT void crpc_init(const char* config_path);
CRPC_EXPORT void crpc_init_with_address(const char* ip, int port);
CRPC_EXPORT void crpc_deinit();
CRPC_EXPORT rpc_string* crpc_get_method_name_by_id(uint64_t id);
CRPC_EXPORT uint64_t crpc_get_methods_count();
CRPC_EXPORT void crpc_add_method(callback_t cb, rpc_string* name);
#ifdef __cplusplus
}
#endif //cpp
#endif //CRPC_SERVER_API