Tells a real change of the phone link from a reading that changes nothing. More...
#include <stdbool.h>Go to the source code of this file.
Data Structures | |
| struct | LinkState |
| The link as last read. Zeroed is a store that has read nothing yet. More... | |
Enumerations | |
| enum | LinkChange { LINK_SAME , LINK_DROPPED , LINK_RECONNECTED } |
| What one reading of the link means. More... | |
Functions | |
| static LinkChange | link_change_read (LinkState *state, bool connected) |
| Takes one reading of the link and says what it means. | |
Tells a real change of the phone link from a reading that changes nothing.
The system store hands each reading of the link here and acts on the answer. The first reading after the store starts only seeds, so a face never buzzes or catches up at launch. A reading that matches the one before is no change either. Only a real drop or a real return reaches the face's buzz, its reconnect callback, and the stores listening for the link.