BLooper(const char* name, int32 priority, int32 port_capacity) -------------- ~BLooper() -------------- BLooper(BMessage* data) -------------- Instantiate(BMessage* data) -------------- Archive(BMessage* data, bool deep) const -------------- PostMessage(uint32 command) -------------- PostMessage(BMessage* message) -------------- PostMessage(uint32 command, BHandler* handler, BHandler* reply_to) -------------- PostMessage(BMessage* message, BHandler* handler, BHandler* reply_to); -------------- DispatchMessage(BMessage* message, BHandler* handler) -------------- MessageReceived(BMessage* msg) -------------- CurrentMessage() const -------------- DetachCurrentMessage() -------------- MessageQueue() const -------------- IsMessageWaiting() -------------- case 1: looper is unlocked and queue is empty case 2: looper is unlocked and queue is filled case 3: looper is locked and queue is empty case 4: looper is locked and queue is filled case 5: looper is locked, message is posted, queue is emptied AddHandler(BHandler* handler); -------------- case : handler is NULL case : looper is unlocked RemoveHandler(BHandler* handler) -------------- case 1: handler is NULL case 2: handler doesn't belong to this looper case 3: handler is valid, looper is unlocked case 4: handler doesn't belong to this looper, looper is unlocked case 5: handler has filters; FilterList() should be NULL on remove CountHandlers() const; -------------- case : No handlers added case : Several handlers added, then removed HandlerAt(int32 index) const; -------------- case 1: No handlers added, check for looper itself case 2: Index out of range (CountHandlers() + 1) case 3: Several handlers added, checked against expected indices case 4: Looper is not locked IndexOf(BHandler* handler) const; -------------- case 1: handler is NULL case 2: handler is valid, doesn't belong to this looper case 3: handler is valid, belongs to looper case 4: handler is valid, one of many added and removed case 5: handler is valid, looper is unlocked PreferredHandler() const; -------------- SetPreferredHandler(BHandler* handler); -------------- Run(); -------------- case 1: Attempt to call Run() twice case 2: Check Thread() against return of Run() case 3: Delete looper after calling Run() Quit() -------------- case 1: Call Quit() on unlocked BLooper QuitRequested() -------------- Lock() -------------- Unlock() -------------- IsLocked() const -------------- LockWithTimeout(bigtime_t timeout) -------------- Thread() const -------------- Team() const -------------- LooperForThread(thread_id tid) -------------- case 1: tid is valid case 2: tid is not valid LockingThread() const -------------- CountLocks() const -------------- CountLockRequests() const -------------- Sem() const -------------- ResolveSpecifier(BMessage* msg, int32 index, BMessage* specifier, int32 form, const char* property); -------------- GetSupportedSuites(BMessage* data) -------------- AddCommonFilter(BMessageFilter* filter) -------------- case : NULL filter case : Valid filter, looper not locked case : Valid filter, looper locked case : Valid filter, looper locked, owned by another looper RemoveCommonFilter(BMessageFilter* filter) -------------- case : NULL filter case : Valid filter, looper not locked case : Valid filter, not owned by looper case : Valid filter, owned by looper SetCommonFilterList(BList* filters) -------------- case : NULL list case : Valid list, looper not locked case : Valid list, looper locked case : Valid list, looper locked, owned by another looper CommonFilterList() const -------------- case : Default constructed BLooper Perform(perform_code d, void* arg) -------------- case 1: returns B_ERROR;