chiark / gitweb /
A bit more doxygenization.
[disorder] / lib / client.c
index aabea873291cbc6fe6c2f0aa6ef8e3fc839d7f0f..c06bdf1617a04587ff0bad706a8689843a98ce69 100644 (file)
 #include "rights.h"
 #include "trackdb.h"
 
+/** @brief Client handle contents */
 struct disorder_client {
-  FILE *fpin, *fpout;
+  /** @brief Stream to read from */
+  FILE *fpin;
+  /** @brief Stream to write to */
+  FILE *fpout;
+  /** @brief Peer description */
   char *ident;
+  /** @brief Username */
   char *user;
+  /** @brief Report errors to @c stderr */
   int verbose;
-  char *last;                          /* last error string */
+  /** @brief Last error string */
+  char *last;
 };
 
 /** @brief Create a new client
@@ -547,6 +555,7 @@ int disorder_playing(disorder_client *c, struct queue_entry **qp) {
   return 0;
 }
 
+/** @brief Fetch the queue, recent list, etc */
 static int disorder_somequeue(disorder_client *c,
                              const char *cmd, struct queue_entry **qp) {
   struct queue_entry *qh, **qt = &qh, *q;
@@ -1166,6 +1175,15 @@ int disorder_revoke(disorder_client *c) {
   return disorder_simple(c, 0, "revoke", (char *)0);
 }
 
+/** @brief Request a password reminder email
+ * @param c Client
+ * @param user Username
+ * @return 0 on success, non-0 on error
+ */
+int disorder_reminder(disorder_client *c, const char *user) {
+  return disorder_simple(c, 0, "reminder", user, (char *)0);
+}
+
 /*
 Local Variables:
 c-basic-offset:2