Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 1 | //===-- SBCommunication.cpp -------------------------------------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "lldb/API/SBCommunication.h" |
| 11 | #include "lldb/API/SBBroadcaster.h" |
| 12 | #include "lldb/Core/Communication.h" |
| 13 | #include "lldb/Core/ConnectionFileDescriptor.h" |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 14 | #include "lldb/Core/Log.h" |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 15 | |
| 16 | using namespace lldb; |
| 17 | using namespace lldb_private; |
| 18 | |
| 19 | |
| 20 | |
| 21 | SBCommunication::SBCommunication() : |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 22 | m_opaque (NULL), |
| 23 | m_opaque_owned (false) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 24 | { |
| 25 | } |
| 26 | |
Greg Clayton | eecb0f3 | 2010-12-04 02:39:47 +0000 | [diff] [blame] | 27 | SBCommunication::SBCommunication(const char * broadcaster_name) : |
| 28 | m_opaque (new Communication (broadcaster_name)), |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 29 | m_opaque_owned (true) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 30 | { |
Greg Clayton | e005f2c | 2010-11-06 01:53:30 +0000 | [diff] [blame] | 31 | LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 32 | |
| 33 | if (log) |
Greg Clayton | 49ce682 | 2010-10-31 03:01:06 +0000 | [diff] [blame] | 34 | log->Printf ("SBCommunication::SBCommunication (broadcaster_name=\"%s\") => " |
| 35 | "SBCommunication(%p)", broadcaster_name, m_opaque); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | SBCommunication::~SBCommunication() |
| 39 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 40 | if (m_opaque && m_opaque_owned) |
| 41 | delete m_opaque; |
| 42 | m_opaque = NULL; |
| 43 | m_opaque_owned = false; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 44 | } |
| 45 | |
Greg Clayton | eecb0f3 | 2010-12-04 02:39:47 +0000 | [diff] [blame] | 46 | bool |
| 47 | SBCommunication::GetCloseOnEOF () |
| 48 | { |
| 49 | if (m_opaque) |
| 50 | return m_opaque->GetCloseOnEOF (); |
| 51 | return false; |
| 52 | } |
| 53 | |
| 54 | void |
| 55 | SBCommunication::SetCloseOnEOF (bool b) |
| 56 | { |
| 57 | if (m_opaque) |
| 58 | m_opaque->SetCloseOnEOF (b); |
| 59 | } |
| 60 | |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 61 | ConnectionStatus |
| 62 | SBCommunication::CheckIfBytesAvailable () |
| 63 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 64 | if (m_opaque) |
| 65 | return m_opaque->BytesAvailable (0, NULL); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 66 | return eConnectionStatusNoConnection; |
| 67 | } |
| 68 | |
| 69 | ConnectionStatus |
| 70 | SBCommunication::WaitForBytesAvailableInfinite () |
| 71 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 72 | if (m_opaque) |
| 73 | return m_opaque->BytesAvailable (UINT32_MAX, NULL); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 74 | return eConnectionStatusNoConnection; |
| 75 | } |
| 76 | |
| 77 | ConnectionStatus |
| 78 | SBCommunication::WaitForBytesAvailableWithTimeout (uint32_t timeout_usec) |
| 79 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 80 | if (m_opaque) |
| 81 | return m_opaque->BytesAvailable (timeout_usec, NULL); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 82 | return eConnectionStatusNoConnection; |
| 83 | } |
| 84 | |
| 85 | ConnectionStatus |
| 86 | SBCommunication::Connect (const char *url) |
| 87 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 88 | if (m_opaque) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 89 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 90 | if (!m_opaque->HasConnection ()) |
| 91 | m_opaque->SetConnection (new ConnectionFileDescriptor()); |
| 92 | return m_opaque->Connect (url, NULL); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 93 | } |
| 94 | return eConnectionStatusNoConnection; |
| 95 | } |
| 96 | |
| 97 | ConnectionStatus |
| 98 | SBCommunication::AdoptFileDesriptor (int fd, bool owns_fd) |
| 99 | { |
Greg Clayton | e005f2c | 2010-11-06 01:53:30 +0000 | [diff] [blame] | 100 | LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 101 | |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 102 | ConnectionStatus status = eConnectionStatusNoConnection; |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 103 | if (m_opaque) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 104 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 105 | if (m_opaque->HasConnection ()) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 106 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 107 | if (m_opaque->IsConnected()) |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 108 | m_opaque->Disconnect(); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 109 | } |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 110 | m_opaque->SetConnection (new ConnectionFileDescriptor (fd, owns_fd)); |
| 111 | if (m_opaque->IsConnected()) |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 112 | status = eConnectionStatusSuccess; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 113 | else |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 114 | status = eConnectionStatusLostConnection; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 115 | } |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 116 | |
| 117 | if (log) |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 118 | log->Printf ("SBCommunication(%p)::AdoptFileDescriptor (fd=%d, ownd_fd=%i) => %s", |
| 119 | m_opaque, fd, owns_fd, Communication::ConnectionStatusAsCString (status)); |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 120 | |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 121 | return status; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 122 | } |
| 123 | |
| 124 | |
| 125 | ConnectionStatus |
| 126 | SBCommunication::Disconnect () |
| 127 | { |
Greg Clayton | e005f2c | 2010-11-06 01:53:30 +0000 | [diff] [blame] | 128 | LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 129 | |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 130 | ConnectionStatus status= eConnectionStatusNoConnection; |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 131 | if (m_opaque) |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 132 | status = m_opaque->Disconnect (); |
| 133 | |
| 134 | if (log) |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 135 | log->Printf ("SBCommunication(%p)::Disconnect () => %s", m_opaque, |
Caroline Tice | 61ba7ec | 2010-10-26 23:49:36 +0000 | [diff] [blame] | 136 | Communication::ConnectionStatusAsCString (status)); |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 137 | |
| 138 | return status; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 139 | } |
| 140 | |
| 141 | bool |
| 142 | SBCommunication::IsConnected () const |
| 143 | { |
Greg Clayton | e005f2c | 2010-11-06 01:53:30 +0000 | [diff] [blame] | 144 | LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 145 | bool result = false; |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 146 | if (m_opaque) |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 147 | result = m_opaque->IsConnected (); |
| 148 | |
| 149 | if (log) |
| 150 | log->Printf ("SBCommunication(%p)::IsConnected () => %i", m_opaque, result); |
| 151 | |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 152 | return false; |
| 153 | } |
| 154 | |
| 155 | size_t |
| 156 | SBCommunication::Read (void *dst, size_t dst_len, uint32_t timeout_usec, ConnectionStatus &status) |
| 157 | { |
Greg Clayton | e005f2c | 2010-11-06 01:53:30 +0000 | [diff] [blame] | 158 | LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 159 | if (log) |
| 160 | log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%zu, timeout_usec=%u, &status)...", |
| 161 | m_opaque, dst, dst_len, timeout_usec); |
| 162 | size_t bytes_read = 0; |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 163 | if (m_opaque) |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 164 | bytes_read = m_opaque->Read (dst, dst_len, timeout_usec, status, NULL); |
| 165 | else |
| 166 | status = eConnectionStatusNoConnection; |
| 167 | |
| 168 | if (log) |
| 169 | log->Printf ("SBCommunication(%p)::Read (dst=%p, dst_len=%zu, timeout_usec=%u, &status=%s) => %zu", |
| 170 | m_opaque, dst, dst_len, timeout_usec, Communication::ConnectionStatusAsCString (status), |
| 171 | bytes_read); |
| 172 | return bytes_read; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 173 | } |
| 174 | |
| 175 | |
| 176 | size_t |
| 177 | SBCommunication::Write (const void *src, size_t src_len, ConnectionStatus &status) |
| 178 | { |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 179 | size_t bytes_written = 0; |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 180 | if (m_opaque) |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 181 | bytes_written = m_opaque->Write (src, src_len, status, NULL); |
| 182 | else |
| 183 | status = eConnectionStatusNoConnection; |
| 184 | |
Greg Clayton | e005f2c | 2010-11-06 01:53:30 +0000 | [diff] [blame] | 185 | LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 186 | if (log) |
| 187 | log->Printf ("SBCommunication(%p)::Write (src=%p, src_len=%zu, &status=%s) => %zu", |
| 188 | m_opaque, src, src_len, Communication::ConnectionStatusAsCString (status), bytes_written); |
| 189 | |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 190 | return 0; |
| 191 | } |
| 192 | |
| 193 | bool |
| 194 | SBCommunication::ReadThreadStart () |
| 195 | { |
Greg Clayton | e005f2c | 2010-11-06 01:53:30 +0000 | [diff] [blame] | 196 | LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 197 | |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 198 | bool success = false; |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 199 | if (m_opaque) |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 200 | success = m_opaque->StartReadThread (); |
| 201 | |
Caroline Tice | 926060e | 2010-10-29 21:48:37 +0000 | [diff] [blame] | 202 | log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API); |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 203 | if (log) |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 204 | log->Printf ("SBCommunication(%p)::ReadThreadStart () => %i", m_opaque, success); |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 205 | |
| 206 | return success; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 207 | } |
| 208 | |
| 209 | |
| 210 | bool |
| 211 | SBCommunication::ReadThreadStop () |
| 212 | { |
Greg Clayton | e005f2c | 2010-11-06 01:53:30 +0000 | [diff] [blame] | 213 | LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 214 | if (log) |
| 215 | log->Printf ("SBCommunication(%p)::ReadThreadStop ()...", m_opaque); |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 216 | |
| 217 | bool success = false; |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 218 | if (m_opaque) |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 219 | success = m_opaque->StopReadThread (); |
| 220 | |
| 221 | if (log) |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 222 | log->Printf ("SBCommunication(%p)::ReadThreadStop () => %i", m_opaque, success); |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 223 | |
| 224 | return success; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 225 | } |
| 226 | |
| 227 | bool |
| 228 | SBCommunication::ReadThreadIsRunning () |
| 229 | { |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 230 | bool result = false; |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 231 | if (m_opaque) |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 232 | result = m_opaque->ReadThreadIsRunning (); |
Greg Clayton | e005f2c | 2010-11-06 01:53:30 +0000 | [diff] [blame] | 233 | LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 234 | if (log) |
| 235 | log->Printf ("SBCommunication(%p)::ReadThreadIsRunning () => %i", m_opaque, result); |
| 236 | return result; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 237 | } |
| 238 | |
| 239 | bool |
| 240 | SBCommunication::SetReadThreadBytesReceivedCallback |
| 241 | ( |
| 242 | ReadThreadBytesReceived callback, |
| 243 | void *callback_baton |
| 244 | ) |
| 245 | { |
Greg Clayton | e005f2c | 2010-11-06 01:53:30 +0000 | [diff] [blame] | 246 | LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 247 | |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 248 | bool result = false; |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 249 | if (m_opaque) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 250 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 251 | m_opaque->SetReadThreadBytesReceivedCallback (callback, callback_baton); |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 252 | result = true; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 253 | } |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 254 | |
| 255 | if (log) |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 256 | log->Printf ("SBCommunication(%p)::SetReadThreadBytesReceivedCallback (callback=%p, baton=%p) => %i", |
| 257 | m_opaque, callback, callback_baton, result); |
Caroline Tice | 7826c88 | 2010-10-26 03:11:13 +0000 | [diff] [blame] | 258 | |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 259 | return result; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 260 | } |
| 261 | |
| 262 | SBBroadcaster |
| 263 | SBCommunication::GetBroadcaster () |
| 264 | { |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 265 | SBBroadcaster broadcaster (m_opaque, false); |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 266 | |
Greg Clayton | e005f2c | 2010-11-06 01:53:30 +0000 | [diff] [blame] | 267 | LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); |
Greg Clayton | a66ba46 | 2010-10-30 04:51:46 +0000 | [diff] [blame] | 268 | |
| 269 | if (log) |
| 270 | log->Printf ("SBCommunication(%p)::GetBroadcaster () => SBBroadcaster (%p)", |
| 271 | m_opaque, broadcaster.get()); |
| 272 | |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 273 | return broadcaster; |
| 274 | } |
| 275 | |
| 276 | |
| 277 | // |
| 278 | //void |
| 279 | //SBCommunication::CreateIfNeeded () |
| 280 | //{ |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 281 | // if (m_opaque == NULL) |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 282 | // { |
| 283 | // static uint32_t g_broadcaster_num; |
| 284 | // char broadcaster_name[256]; |
| 285 | // ::snprintf (name, broadcaster_name, "%p SBCommunication", this); |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 286 | // m_opaque = new Communication (broadcaster_name); |
| 287 | // m_opaque_owned = true; |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 288 | // } |
Greg Clayton | 63094e0 | 2010-06-23 01:19:29 +0000 | [diff] [blame] | 289 | // assert (m_opaque); |
Chris Lattner | 24943d2 | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 290 | //} |
| 291 | // |
| 292 | // |