mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-05-30 10:59:30 -04:00
36 lines
710 B
C++
36 lines
710 B
C++
// Copyright (C) 2024-2026 Petr Mironychev
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QPointer>
|
|
|
|
namespace LLMQore::Mcp {
|
|
class McpServer;
|
|
class McpHttpServerTransport;
|
|
} // namespace LLMQore::Mcp
|
|
|
|
namespace QodeAssist::Mcp {
|
|
|
|
class McpServerManager : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit McpServerManager(QObject *parent = nullptr);
|
|
~McpServerManager() override;
|
|
|
|
void init();
|
|
|
|
private:
|
|
void reconfigure();
|
|
void startServer();
|
|
void stopServer();
|
|
|
|
QPointer<::LLMQore::Mcp::McpServer> m_server;
|
|
QPointer<::LLMQore::Mcp::McpHttpServerTransport> m_transport;
|
|
quint16 m_runningPort = 0;
|
|
};
|
|
|
|
} // namespace QodeAssist::Mcp
|