Files
idevice/cpp/include/idevice++/syslog_relay.hpp
T
Jackson Coxson bae57ec4d9 Implement rppairing (#79)
* Initial rppairing support

* Use idevice-srp crate

* Add more debug logging to rppairing

* Create pair_rsd_ios tool

* Start work on iOS rppairing

* Set RemoteXPC initial root ID to 0

* Send weird flags after opening reply stream

* Allow rppairing with underlying RemoteXPC connection

* fix(pair_rsd_ios): handle Linux mDNS link-local fallback (#73)

* Implement CDTunnel via rppairing

* Add example to rppair over CoreDeviceProxy

* Implement shim and FFI for RSD services

* Implement C++ RSD connect factories

---------

Co-authored-by: se2crid <151872490+se2crid@users.noreply.github.com>
2026-03-26 23:22:40 -06:00

43 lines
1.4 KiB
C++

// Jackson Coxson
#pragma once
#include <idevice++/bindings.hpp>
#include <idevice++/ffi.hpp>
#include <idevice++/provider.hpp>
#include <memory>
#include <string>
namespace IdeviceFFI {
using SyslogRelayPtr =
std::unique_ptr<SyslogRelayClientHandle,
FnDeleter<SyslogRelayClientHandle, syslog_relay_client_free>>;
class SyslogRelay {
public:
// Factory: connect via Provider (TCP)
static Result<SyslogRelay, FfiError> connect_tcp(Provider& provider);
// Factory: connect via RSD tunnel
static Result<SyslogRelay, FfiError> connect_rsd(AdapterHandle* adapter, RsdHandshakeHandle* handshake);
// Ops
Result<std::string, FfiError> next();
// RAII / moves
~SyslogRelay() noexcept = default;
SyslogRelay(SyslogRelay&&) noexcept = default;
SyslogRelay& operator=(SyslogRelay&&) noexcept = default;
SyslogRelay(const SyslogRelay&) = delete;
SyslogRelay& operator=(const SyslogRelay&) = delete;
SyslogRelayClientHandle* raw() const noexcept { return handle_.get(); }
static SyslogRelay adopt(SyslogRelayClientHandle* h) noexcept { return SyslogRelay(h); }
private:
explicit SyslogRelay(SyslogRelayClientHandle* h) noexcept : handle_(h) {}
SyslogRelayPtr handle_{};
};
} // namespace IdeviceFFI