-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprotocol_methods.h
More file actions
40 lines (30 loc) · 1.83 KB
/
Copy pathprotocol_methods.h
File metadata and controls
40 lines (30 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// SPDX-License-Identifier: Apache-2.0
// Copyright 2026 Vladimir Pavlov <mistervvp@outlook.com> (https://github.com/MisterVVP)
#pragma once
#include <string_view>
namespace a2a::core::protocol_methods {
inline constexpr std::string_view kSendMessage = "SendMessage";
inline constexpr std::string_view kSendStreamingMessage = "SendStreamingMessage";
inline constexpr std::string_view kGetTask = "GetTask";
inline constexpr std::string_view kListTasks = "ListTasks";
inline constexpr std::string_view kCancelTask = "CancelTask";
inline constexpr std::string_view kSubscribeToTask = "SubscribeToTask";
inline constexpr std::string_view kCreateTaskPushNotificationConfig = "CreateTaskPushNotificationConfig";
inline constexpr std::string_view kGetTaskPushNotificationConfig = "GetTaskPushNotificationConfig";
inline constexpr std::string_view kListTaskPushNotificationConfigs = "ListTaskPushNotificationConfigs";
inline constexpr std::string_view kDeleteTaskPushNotificationConfig = "DeleteTaskPushNotificationConfig";
inline constexpr std::string_view kPushNotificationConfigsSegment = "/pushNotificationConfigs";
struct GetExtendedAgentCardMethodName final {
static constexpr std::string_view kCanonical = "GetExtendedAgentCard";
static constexpr std::string_view kJsonRpcAlias = "a2a.getExtendedAgentCard";
constexpr operator std::string_view() const noexcept { return kCanonical; }
};
inline constexpr GetExtendedAgentCardMethodName kGetExtendedAgentCard{};
constexpr bool operator==(std::string_view actual, GetExtendedAgentCardMethodName) noexcept {
return actual == GetExtendedAgentCardMethodName::kCanonical ||
actual == GetExtendedAgentCardMethodName::kJsonRpcAlias;
}
constexpr bool operator==(GetExtendedAgentCardMethodName method, std::string_view actual) noexcept {
return actual == method;
}
} // namespace a2a::core::protocol_methods