|
blip
0.1
|
Low-level Android event looper. More...
#include <Looper.hpp>
Public Member Functions | |
| Looper () | |
| Construct a new Looper for the calling thread. More... | |
| ~Looper () | |
| Destructor. More... | |
| void | addInputDescriptor (filedesc_t fd, uint_t id) |
| Add an input descriptor to the looper's list of file descriptors to monitor. More... | |
| void | addOutputDescriptor (filedesc_t fd, uint_t id) |
| Add an output descriptor to the looper's list of file descriptors to monitor. More... | |
| void | removeDescriptor (filedesc_t fd) |
| Remove a file descriptor from this looper's list of file descriptors to monitor. More... | |
| void | interrupt () |
| Interrupt the Looper. More... | |
Static Public Member Functions | |
| static int | poll (timespan_ms_t timeout) |
| Poll the Looper, returning if any of the monitored file descriptors are ready. More... | |
Low-level Android event looper.
[TODO...document]
| ~Looper | ( | ) |
Destructor.
| void addInputDescriptor | ( | filedesc_t | fd, |
| uint_t | id | ||
| ) |
Add an input descriptor to the looper's list of file descriptors to monitor.
| fd | The file descriptor. |
| id | The event ID. |
| void addOutputDescriptor | ( | filedesc_t | fd, |
| uint_t | id | ||
| ) |
Add an output descriptor to the looper's list of file descriptors to monitor.
| fd | The file descriptor. |
| id | The event ID. |
| void interrupt | ( | ) |
Interrupt the Looper.
|
static |
Poll the Looper, returning if any of the monitored file descriptors are ready.
| timeout | The number of milliseconds to wait before timing out. |
| IOException | If an I/O error occurs. |
| InterruptedException | If the poll was interrupted via a call to interrupt(). |
| void removeDescriptor | ( | filedesc_t | fd | ) |
Remove a file descriptor from this looper's list of file descriptors to monitor.
| fd | The file descriptor. |