1 //===-- SWIG Interface for SBCommunication ----------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
15 eBroadcastBitDisconnected = (1 << 0), ///< Sent when the communications connection is lost.
16 eBroadcastBitReadThreadGotBytes = (1 << 1), ///< Sent by the read thread when bytes become available.
17 eBroadcastBitReadThreadDidExit = (1 << 2), ///< Sent by the read thread when it exits to inform clients.
18 eBroadcastBitReadThreadShouldExit = (1 << 3), ///< Sent by clients that need to cancel the read thread.
19 eBroadcastBitPacketAvailable = (1 << 4), ///< Sent when data received makes a complete packet.
20 eAllEventBits = 0xffffffff
23 typedef void (*ReadThreadBytesReceived) (void *baton, const void *src, size_t src_len);
26 SBCommunication (const char * broadcaster_name);
33 explicit operator bool() const;
38 static const char *GetBroadcasterClass();
40 lldb::ConnectionStatus
41 AdoptFileDesriptor (int fd, bool owns_fd);
43 lldb::ConnectionStatus
44 Connect (const char *url);
46 lldb::ConnectionStatus
56 SetCloseOnEOF (bool b);
61 uint32_t timeout_usec,
62 lldb::ConnectionStatus &status);
65 Write (const void *src,
67 lldb::ConnectionStatus &status);
76 ReadThreadIsRunning ();
79 SetReadThreadBytesReceivedCallback (ReadThreadBytesReceived callback,
80 void *callback_baton);