#pragma once #include "rpc/rpc_client_c.h" #ifdef __cplusplus extern "C" { #endif // Непрозрачный тип для клиента {{ cls.name }} typedef struct {{ cls.name }}Client {{ cls.name }}Client; // Создание клиента {{ cls.name }} // marshaller - маршаллер, созданный через rpc_client_create_marshaller // Возвращает указатель на клиент или NULL при ошибке {{ cls.name }}Client* {{ cls.name|lower }}_client_create(IpcMarshallerHandle* marshaller); // Уничтожение клиента {{ cls.name }} void {{ cls.name|lower }}_client_destroy({{ cls.name }}Client* client); {% for m in cls.methods %} // Вызов метода {{ m.name }} // client - клиент {{ cls.name }} {% for a in m.args %} // {{ a.name }} - {{ a.type }} аргумент {% endfor %} // Возвращает результат или -1 при ошибке {{ m.return_type }} {{ cls.name|lower }}_{{ m.name }}({{ cls.name }}Client* client{% for a in m.args %}, {{ a.type }} {{ a.name }}{% endfor %}); {% endfor %} #ifdef __cplusplus } #endif