bool ListenSocketIO::IsShutdownOnConsumerThread() const { MOZ_ASSERT(IsConsumerThread()); return mListenSocket == nullptr; }
bool DaemonSocketIO::IsShutdownOnConsumerThread() const { MOZ_ASSERT(IsConsumerThread()); return mConnection == nullptr; }
void RilSocketIO::ClearDelayedConnectTask() { MOZ_ASSERT(IsConsumerThread()); mDelayedConnectTask = nullptr; }
void RilSocketIO::SetDelayedConnectTask(CancelableTask* aTask) { MOZ_ASSERT(IsConsumerThread()); mDelayedConnectTask = aTask; }
RilSocketIO::~RilSocketIO() { MOZ_ASSERT(IsConsumerThread()); MOZ_ASSERT(IsShutdownOnConsumerThread()); MOZ_COUNT_DTOR_INHERITED(RilSocketIO, ConnectionOrientedSocketIO); }
void ListenSocketIO::ShutdownOnConsumerThread() { MOZ_ASSERT(IsConsumerThread()); MOZ_ASSERT(!IsShutdownOnConsumerThread()); mListenSocket = nullptr; }
void DaemonSocketIO::ShutdownOnConsumerThread() { MOZ_ASSERT(IsConsumerThread()); MOZ_ASSERT(!IsShutdownOnConsumerThread()); mConnection = nullptr; }
void ListenSocketIO::ShutdownOnIOThread() { MOZ_ASSERT(!IsConsumerThread()); MOZ_ASSERT(!mShuttingDownOnIOThread); Close(); // will also remove fd from I/O loop mShuttingDownOnIOThread = true; }
void RilSocketIO::CancelDelayedConnectTask() { MOZ_ASSERT(IsConsumerThread()); if (!mDelayedConnectTask) { return; } mDelayedConnectTask->Cancel(); ClearDelayedConnectTask(); }
ListenSocketIO::~ListenSocketIO() { MOZ_ASSERT(IsConsumerThread()); MOZ_ASSERT(IsShutdownOnConsumerThread()); }