/** @file lib/client.c
* @brief Simple C client
*
- * See @file lib/eclient.c for an asynchronous-capable client
+ * See @ref lib/eclient.c for an asynchronous-capable client
* implementation.
*/
const char *arg;
struct dynstr d;
+ if(!c->fpout) {
+ error(0, "not connected to server");
+ return -1;
+ }
if(cmd) {
dynstr_init(&d);
dynstr_append_string(&d, cmd);
error(0, "error handling 'prefs' reply: %s", msg);
}
-/** @param Get all preferences for a trcak
+/** @brief Get all preferences for a trcak
* @param c Client
* @param track Track name
* @param kp Where to store linked list of preferences
/** @brief Test whether random play is enabled
* @param c Client
- * @param existsp Where to store result (non-0 iff enabled)
+ * @param enabledp Where to store result (non-0 iff enabled)
* @return 0 on success, non-0 on error
*/
int disorder_random_enabled(disorder_client *c, int *enabledp) {
/** @brief Resolve aliases
* @param c Client
- * @param trackkp Where to store canonical name (UTF-8)
+ * @param trackp Where to store canonical name (UTF-8)
* @param track Track name (UTF-8)
* @return 0 on success, non-0 on error
*/
* @param user Username
* @param password Password
* @param email Email address (UTF-8)
- * @param rights Initial rights or NULL to use default
* @param confirmp Where to store confirmation string
* @return 0 on success, non-0 on error
*/
cookiep);
}
+/** @brief Revoke the cookie used by this session
+ * @param c Client
+ * @return 0 on success, non-0 on error
+ */
+int disorder_revoke(disorder_client *c) {
+ return disorder_simple(c, 0, "revoke", (char *)0);
+}
+
/*
Local Variables:
c-basic-offset:2