Remove cpp 17 features and implement Rust into CPP

This commit is contained in:
Jackson Coxson
2025-08-29 14:19:28 -06:00
parent 4fde7cf06b
commit 1169408da1
41 changed files with 1638 additions and 1212 deletions

View File

@@ -5,7 +5,6 @@
#include <idevice++/ffi.hpp>
#include <idevice++/provider.hpp>
#include <memory>
#include <optional>
#include <string>
namespace IdeviceFFI {
@@ -16,16 +15,15 @@ using LockdownPtr =
class Lockdown {
public:
// Factory: connect via Provider
static std::optional<Lockdown> connect(Provider& provider, FfiError& err);
static Result<Lockdown, FfiError> connect(Provider& provider);
// Factory: wrap an existing Idevice socket (consumes it on success)
static std::optional<Lockdown> from_socket(Idevice&& socket, FfiError& err);
static Result<Lockdown, FfiError> from_socket(Idevice&& socket);
// Ops
bool start_session(const PairingFile& pf, FfiError& err);
std::optional<std::pair<uint16_t, bool>> start_service(const std::string& identifier,
FfiError& err);
std::optional<plist_t> get_value(const char* key, const char* domain, FfiError& err);
Result<void, FfiError> start_session(const PairingFile& pf);
Result<std::pair<uint16_t, bool>, FfiError> start_service(const std::string& identifier);
Result<plist_t, FfiError> get_value(const char* key, const char* domain);
// RAII / moves
~Lockdown() noexcept = default;