title: What is a 'slot' in sd-bus (C language)
body: <p>There are several APIs in systemd's <code>sd-bus.h</code> file which optionally take a <code>slot</code> argument. Here's some examples:</p>
  
  <pre><code>int sd_bus_call_async(sd_bus *bus, sd_bus_slot **slot, sd_bus_message *m, sd_bus_message_handler_t callback, void *userdata, uint64_t usec);
  int sd_bus_add_filter(sd_bus *bus, sd_bus_slot **slot, sd_bus_message_handler_t callback, void *userdata);
  int sd_bus_add_fallback(sd_bus *bus, sd_bus_slot **slot, const char *prefix, sd_bus_message_handler_t callback, void *userdata);
  </code></pre>
  
  <p>If the calling code specifies <code>NULL</code> then it becomes a "floating slot" which I guess means the calling code doesn't need to worry about it.</p>
  
  <p>Most of the example source code I see out there is like this example project: <a href="https://github.com/tasleson/dbus-signals/blob/6d0e43d02d24ed51a17ce7df15a3a0a64ec0170d/spamsignals.c#L160" rel="noreferrer">https://github.com/tasleson/dbus-signals/blob/6d0e43d02d24ed51a17ce7df15a3a0a64ec0170d/spamsignals.c#L160</a></p>
  
  <p>It takes a slot, and then sometime later it unreferences the slot. But it doesn't actually do anything with it.</p>