#ifndef ORBITHUB_MREMOTENG_IMPORTER_H #define ORBITHUB_MREMOTENG_IMPORTER_H #include "profile_repository.h" #include #include #include #include // A profile parsed out of an mRemoteNG confCons.xml export, plus which // folder (if any) it belongs to, expressed the same way ProfilesWindow's // own folder paths are ("Parent/Child"). struct MRemoteNGImportedProfile { Profile profile; QString folderPath; }; struct MRemoteNGImportResult { // Non-empty only when parsing failed outright (malformed XML, or a // FullFileEncryption="true" export -- that encrypts the whole node // tree with the user's master password, which OrbitHub has no way to // ask for or use, so those files can't be read at all here). QString errorMessage; // Every folder path that appeared, including ones with no directly // imported profile in them (e.g. a container that held only // unsupported-protocol connections). std::vector folders; std::vector profiles; // " ()" for each connection whose protocol // OrbitHub doesn't support (VNC, Telnet, HTTP, ...) -- skipped, never // silently dropped. QStringList skippedUnsupportedProtocol; }; // Passwords are never read from the file, even for the common case where // they're readable without a master password (mRemoteNG only encrypts the // Password attribute itself, not the surrounding plaintext fields) -- // OrbitHub never persists credentials on a Profile in the first place. MRemoteNGImportResult parseMRemoteNGConnections(const QByteArray& xmlData); #endif