Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dart::bin::DescriptorInfoSingleMixin< DI > Class Template Reference

#include <eventhandler.h>

Inheritance diagram for dart::bin::DescriptorInfoSingleMixin< DI >:

Public Member Functions

 DescriptorInfoSingleMixin (intptr_t fd, bool disable_tokens)
 
virtual ~DescriptorInfoSingleMixin ()
 
virtual bool IsListeningSocket () const
 
virtual void SetPortAndMask (Dart_Port port, intptr_t mask)
 
virtual void RemovePort (Dart_Port port)
 
virtual void RemoveAllPorts ()
 
virtual Dart_Port NextNotifyDartPort (intptr_t events_ready)
 
virtual void NotifyAllDartPorts (uintptr_t events)
 
virtual void ReturnTokens (Dart_Port port, int count)
 
virtual intptr_t Mask ()
 
virtual void Close ()
 

Detailed Description

template<typename DI>
class dart::bin::DescriptorInfoSingleMixin< DI >

Definition at line 267 of file eventhandler.h.

Constructor & Destructor Documentation

◆ DescriptorInfoSingleMixin()

template<typename DI >
dart::bin::DescriptorInfoSingleMixin< DI >::DescriptorInfoSingleMixin ( intptr_t  fd,
bool  disable_tokens 
)
inline

Definition at line 272 of file eventhandler.h.

273 : DI(fd),
274 port_(0),
275 tokens_(kTokenCount),
276 mask_(0),
277 disable_tokens_(disable_tokens) {}

◆ ~DescriptorInfoSingleMixin()

template<typename DI >
virtual dart::bin::DescriptorInfoSingleMixin< DI >::~DescriptorInfoSingleMixin ( )
inlinevirtual

Definition at line 279 of file eventhandler.h.

279{}

Member Function Documentation

◆ Close()

template<typename DI >
virtual void dart::bin::DescriptorInfoSingleMixin< DI >::Close ( )
inlinevirtual

Definition at line 340 of file eventhandler.h.

340{ DI::Close(); }

◆ IsListeningSocket()

template<typename DI >
virtual bool dart::bin::DescriptorInfoSingleMixin< DI >::IsListeningSocket ( ) const
inlinevirtual

Definition at line 281 of file eventhandler.h.

281{ return false; }

◆ Mask()

template<typename DI >
virtual intptr_t dart::bin::DescriptorInfoSingleMixin< DI >::Mask ( )
inlinevirtual

Definition at line 333 of file eventhandler.h.

333 {
334 if (tokens_ <= 0) {
335 return 0;
336 }
337 return mask_;
338 }

◆ NextNotifyDartPort()

template<typename DI >
virtual Dart_Port dart::bin::DescriptorInfoSingleMixin< DI >::NextNotifyDartPort ( intptr_t  events_ready)
inlinevirtual

Definition at line 302 of file eventhandler.h.

302 {
303 ASSERT(IS_IO_EVENT(events_ready) ||
304 IS_EVENT(events_ready, kDestroyedEvent));
305 if (!disable_tokens_) {
306 tokens_--;
307 }
308 return port_;
309 }
#define ASSERT(E)
#define IS_IO_EVENT(data)
#define IS_EVENT(data, event_bit)

◆ NotifyAllDartPorts()

template<typename DI >
virtual void dart::bin::DescriptorInfoSingleMixin< DI >::NotifyAllDartPorts ( uintptr_t  events)
inlinevirtual

Definition at line 311 of file eventhandler.h.

311 {
312 // Unexpected close, asynchronous destroy or error events are the only
313 // ones we broadcast to all listeners.
314 ASSERT(IS_EVENT(events, kCloseEvent) || IS_EVENT(events, kErrorEvent) ||
315 IS_EVENT(events, kDestroyedEvent));
316
317 if (port_ != 0) {
318 DartUtils::PostInt32(port_, events);
319 }
320 if (!disable_tokens_) {
321 tokens_--;
322 }
323 }
static bool PostInt32(Dart_Port port_id, int32_t value)
Definition dartutils.cc:676

◆ RemoveAllPorts()

template<typename DI >
virtual void dart::bin::DescriptorInfoSingleMixin< DI >::RemoveAllPorts ( )
inlinevirtual

Definition at line 297 of file eventhandler.h.

297 {
298 port_ = 0;
299 mask_ = 0;
300 }

◆ RemovePort()

template<typename DI >
virtual void dart::bin::DescriptorInfoSingleMixin< DI >::RemovePort ( Dart_Port  port)
inlinevirtual

Definition at line 289 of file eventhandler.h.

289 {
290 // TODO(dart:io): Find out where we call RemovePort() with the invalid
291 // port. Afterwards remove the part in the ASSERT here.
292 ASSERT(port_ == 0 || port_ == port);
293 port_ = 0;
294 mask_ = 0;
295 }

◆ ReturnTokens()

template<typename DI >
virtual void dart::bin::DescriptorInfoSingleMixin< DI >::ReturnTokens ( Dart_Port  port,
int  count 
)
inlinevirtual

Definition at line 325 of file eventhandler.h.

325 {
326 ASSERT(port_ == port);
327 if (!disable_tokens_) {
328 tokens_ += count;
329 }
330 ASSERT(tokens_ <= kTokenCount);
331 }
int count

◆ SetPortAndMask()

template<typename DI >
virtual void dart::bin::DescriptorInfoSingleMixin< DI >::SetPortAndMask ( Dart_Port  port,
intptr_t  mask 
)
inlinevirtual

Definition at line 283 of file eventhandler.h.

283 {
284 ASSERT(port_ == 0 || port == port_);
285 port_ = port;
286 mask_ = mask;
287 }
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service port
Definition switches.h:87

The documentation for this class was generated from the following file: