2026-05-20 09:15:03 +10:00
|
|
|
// This file was generated with the assistance of an AI coding tool.
|
|
|
|
|
/********************************************************************************
|
|
|
|
|
* *
|
2026-07-03 09:39:27 +10:00
|
|
|
* This file is part of Bonsai. *
|
2026-05-20 09:15:03 +10:00
|
|
|
* *
|
2026-07-03 09:39:27 +10:00
|
|
|
* Bonsai is free software: you can redistribute it and/or modify *
|
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
2026-05-20 09:15:03 +10:00
|
|
|
* the Free Software Foundation, either version 3.0 of the License, or *
|
|
|
|
|
* (at your option) any later version. *
|
|
|
|
|
* *
|
2026-07-03 09:39:27 +10:00
|
|
|
* Bonsai is distributed in the hope that it will be useful, *
|
2026-05-20 09:15:03 +10:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
2026-07-03 09:39:27 +10:00
|
|
|
* GNU General Public License for more details. *
|
2026-05-20 09:15:03 +10:00
|
|
|
* *
|
2026-07-03 09:39:27 +10:00
|
|
|
* You should have received a copy of the GNU General Public License *
|
2026-05-20 09:15:03 +10:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
|
|
|
|
* *
|
|
|
|
|
********************************************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef IFCINTERFACE_MODULES_CONNECTORS_DISCOVERY_H
|
|
|
|
|
#define IFCINTERFACE_MODULES_CONNECTORS_DISCOVERY_H
|
|
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
2026-05-20 09:38:10 +10:00
|
|
|
namespace bonsaiviewer::modules::connectors {
|
2026-05-20 09:15:03 +10:00
|
|
|
|
|
|
|
|
struct ConnectorManifest {
|
|
|
|
|
QString id; // from connector.json; stable identifier
|
|
|
|
|
QString name; // human-readable label
|
|
|
|
|
QString version; // informational
|
|
|
|
|
QString folder; // directory containing connector.json
|
|
|
|
|
QString exec_path; // resolved executable; absolute when possible,
|
|
|
|
|
// otherwise a bare name for PATH lookup at launch
|
|
|
|
|
};
|
|
|
|
|
|
2026-05-20 20:56:55 +10:00
|
|
|
// Scans the connectors directory bundled alongside the executable.
|
2026-05-20 09:15:03 +10:00
|
|
|
// First match wins for any given id; duplicates and malformed manifests
|
|
|
|
|
// are skipped with a qWarning. Returned in discovery order so first-wins
|
|
|
|
|
// is observable to callers.
|
|
|
|
|
std::vector<ConnectorManifest> discoverConnectors();
|
|
|
|
|
|
2026-05-20 20:56:55 +10:00
|
|
|
// Connectors directory bundled next to the executable
|
|
|
|
|
// (<applicationDirPath>/connectors). Exposed for tests and for
|
|
|
|
|
// "open connectors dir" affordances.
|
|
|
|
|
QString bundledConnectorsDir();
|
2026-05-20 09:15:03 +10:00
|
|
|
|
2026-05-20 09:38:10 +10:00
|
|
|
} // namespace bonsaiviewer::modules::connectors
|
2026-05-20 09:15:03 +10:00
|
|
|
|
|
|
|
|
#endif
|