+push(@h, @gpl,
+ "#ifndef CLIENT_STUBS_H\n",
+ "#define CLIENT_STUBS_H\n",
+ "\n");
+
+push(@c, @gpl,
+ "\n");
+
+# The protocol ----------------------------------------------------------------
+
+simple("adopt",
+ "Adopt a track",
+ "Makes the calling user owner of a randomly picked track.",
+ [["id", "Track ID"]]);
+
+simple("adduser",
+ "Create a user",
+ "Create a new user. Requires the 'admin' right. Email addresses etc must be filled in in separate commands.",
+ [["user", "New username"],
+ ["password", "Initial password"],
+ ["rights", "Initial rights (optional)"]]);
+
+list("allfiles",
+ "List files and directories in a directory",
+ "See 'files' and 'dirs' for more specific lists.",
+ [["dir", "Directory to list (optional)"],
+ ["re", "Regexp that results must match (optional)"]],
+ ["files", "List of matching files and directories"]);
+
+string_login("confirm",
+ "Confirm registration",
+ "The confirmation string must have been created with 'register'. The username is returned so the caller knows who they are.",
+ [["confirmation", "Confirmation string"]]);
+#TODO update docs - this logs you in
+
+string_login("cookie",
+ "Log in with a cookie",
+ "The cookie must have been created with 'make-cookie'. The username is returned so the caller knows who they are.",
+ [["cookie", "Cookie string"]]);
+
+simple("deluser",
+ "Delete user",
+ "Requires the 'admin' right.",
+ [["user", "User to delete"]]);
+
+list("dirs",
+ "List directories in a directory",
+ "",
+ [["dir", "Directory to list (optional)"],
+ ["re", "Regexp that results must match (optional)"]],
+ ["files", "List of matching directories"]);
+
+simple("disable",
+ "Disable play",
+ "Play will stop at the end of the current track, if one is playing. Requires the 'global prefs' right.",
+ []);
+
+simple("edituser",
+ "Set a user property",
+ "With the 'admin' right you can do anything. Otherwise you need the 'userinfo' right and can only set 'email' and 'password'.",
+ [["username", "User to modify"],
+ ["property", "Property name"],
+ ["value", "New property value"]]);
+
+simple("enable",
+ "Enable play",
+ "Requires the 'global prefs' right.",
+ []);
+
+boolean("enabled",
+ "Detect whether play is enabled",
+ "",
+ [],
+ ["enabled", "1 if play is enabled and 0 otherwise"]);
+
+boolean("exists",
+ "Test whether a track exists",
+ "",
+ [["track", "Track name"]],
+ ["exists", "1 if the track exists and 0 otherwise"]);
+
+list("files",
+ "List files in a directory",
+ "",
+ [["dir", "Directory to list (optional)"],
+ ["re", "Regexp that results must match (optional)"]],
+ ["files", "List of matching files"]);
+
+string("get",
+ "Get a track preference",
+ "If the track does not exist that is an error. If the track exists but the preference does not then a null value is returned.",
+ [["track", "Track name"],
+ ["pref", "Preference name"]],
+ ["value", "Preference value"]);
+
+string("get-global",
+ "Get a global preference",
+ "If the preference does exist not then a null value is returned.",
+ [["pref", "Global preference name"]],
+ ["value", "Preference value"]);