HttpService.h
1/* Copyright (C) 2020-2026 by Marc Boris Duerner
2 SPDX-License-Identifier: LGPL-2.1-or-later WITH mif-exception
3*/
4
5#ifndef PT_MCP_HTTPSERVICE_H
6#define PT_MCP_HTTPSERVICE_H
7
8#include <Pt/Mcp/Api.h>
9#include <Pt/Http/Service.h>
10#include <Pt/Types.h>
11
12namespace Pt {
13
14namespace Remoting {
16}
17
18namespace Mcp {
19
20class ToolDeclaration;
21
39class PT_MCP_API HttpService : public Http::Service
40{
41 public:
45 const ToolDeclaration& decl);
46
49 virtual ~HttpService();
50
51 protected:
52 // inheritdoc
54
55 // inheritdoc
57
58 private:
59 Remoting::ServiceDefinition* _serviceDef;
60 const ToolDeclaration* _decl;
61 Pt::varint_t _r1;
62 Pt::varint_t _r2;
63};
64
65} // namespace Mcp
66
67} // namespace Pt
68
69#endif // PT_MCP_HTTPSERVICE_H
HTTP request message.
Definition Request.h:65
Handles one HTTP request and writes the reply.
Definition Responder.h:109
Factory for request responders.
Definition Service.h:77
virtual void onReleaseResponder(Http::Responder *resp)
Destroys a responder created by a server.
HttpService(Remoting::ServiceDefinition &serviceDef, const ToolDeclaration &decl)
Creates a service for serviceDef and decl.
virtual Http::Responder * onGetResponder(const Http::Request &request)
Creates a responder to handle request received by a server.
virtual ~HttpService()
Destroys the service.
MCP server name, version and tool catalog.
Definition ToolDeclaration.h:126
Remote service definition.
Definition ServiceDefinition.h:59
Model Context Protocol (MCP) services.
Remote services and clients.
Definition HttpService.h:39
Core module.
Definition Allocator.h:33