]> git.scottworley.com Git - tattlekey/blobdiff - client/sends.h
client: Rename: send → press
[tattlekey] / client / sends.h
index 02d49db846c767905da47ed83bfe65d7e2912dfc..b13f9a8e65b0b38e0053cd647110f851fd097bd7 100644 (file)
@@ -8,10 +8,15 @@ typedef struct {
   uint32_t timestamp;
   u16_t seq;
   u8_t send_count;
-} send_t;
-
-uint32_t next_send(send_t *s);
+} press_t;
 
 bool next_send_less_than(void *user_data, pheap_node_id_t a, pheap_node_id_t b);
 
+void create_press(press_t *presses, pheap_t *sleeps_heap, uint32_t timestamp,
+                  u16_t seq);
+
+/* When do we next need to send something (in seconds since boot)?
+ * Returns -1 if there's nothing pending. */
+int32_t next_scheduled_send(press_t *presses, pheap_t *sleeps_heap);
+
 #endif