| 1 | //===-- ProtocolEvents.h --------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | // |
| 9 | // This file contains POD structs based on the DAP specification at |
| 10 | // https://microsoft.github.io/debug-adapter-protocol/specification |
| 11 | // |
| 12 | // This is not meant to be a complete implementation, new interfaces are added |
| 13 | // when they're needed. |
| 14 | // |
| 15 | // Each struct has a toJSON and fromJSON function, that converts between |
| 16 | // the struct and a JSON representation. (See JSON.h) |
| 17 | // |
| 18 | //===----------------------------------------------------------------------===// |
| 19 | |
| 20 | #ifndef LLDB_TOOLS_LLDB_DAP_PROTOCOL_PROTOCOL_EVENTS_H |
| 21 | #define LLDB_TOOLS_LLDB_DAP_PROTOCOL_PROTOCOL_EVENTS_H |
| 22 | |
| 23 | #include "Protocol/ProtocolTypes.h" |
| 24 | #include "llvm/Support/JSON.h" |
| 25 | |
| 26 | namespace lldb_dap::protocol { |
| 27 | |
| 28 | /// The event indicates that one or more capabilities have changed. |
| 29 | /// |
| 30 | /// Since the capabilities are dependent on the client and its UI, it might not |
| 31 | /// be possible to change that at random times (or too late). |
| 32 | /// |
| 33 | /// Consequently this event has a hint characteristic: a client can only be |
| 34 | /// expected to make a 'best effort' in honoring individual capabilities but |
| 35 | /// there are no guarantees. |
| 36 | /// |
| 37 | /// Only changed capabilities need to be included, all other capabilities keep |
| 38 | /// their values. |
| 39 | struct CapabilitiesEventBody { |
| 40 | Capabilities capabilities; |
| 41 | }; |
| 42 | llvm::json::Value toJSON(const CapabilitiesEventBody &); |
| 43 | |
| 44 | } // end namespace lldb_dap::protocol |
| 45 | |
| 46 | #endif |
| 47 | |