chiark / gitweb /
Accept unquoted cookie paths, even though they are formally illegal.
[disorder] / lib / rights.h
index f4bf363ae3833628243cbf71f68681d8d05ae62a..c51ca5ca0c4bcc0b04c472651e9b64c234aa6ddd 100644 (file)
@@ -24,6 +24,8 @@
 #ifndef RIGHTS_H
 #define RIGHTS_H
 
+struct queue_entry;
+
 /** @brief User can perform read-only operations */
 #define RIGHT_READ            0x00000001
 
 /** @brief User can modify global preferences */
 #define RIGHT_GLOBAL_PREFS    0x00020000
 
+/** @brief User can pause/resume */
+#define RIGHT_PAUSE           0x00040000
+
 /** @brief Current rights mask */
-#define RIGHTS__MASK          0x0003ffff
+#define RIGHTS__MASK          0x0007ffff
+
+/** @brief Connection is local
+ *
+ * This isn't a rights bit, it's used in @file server.c to limit
+ * certain commands to local connections.
+ */
+#define RIGHT__LOCAL          0x80000000
 
 /** @brief Unsigned type big enough for rights */
 typedef uint32_t rights_type;
 
-rights_type default_rights(void);
 char *rights_string(rights_type r);
-int parse_rights(const char *s, rights_type *rp);
+int parse_rights(const char *s, rights_type *rp, int report);
+int right_scratchable(rights_type rights, const char *who,
+                     const struct queue_entry *q);
+int right_movable(rights_type rights, const char *who,
+                 const struct queue_entry *q);
+int right_removable(rights_type rights, const char *who,
+                   const struct queue_entry *q);
 
 #endif /* RIGHTS_H */