chiark / gitweb /
Limit rescan/recheck messages to one every 10 seconds (and at most one
[disorder] / lib / configuration.h
index a06524cb3133b8c53c28621242e7075c275d6e14..51dc835341221168139f0c5623e1cf2a3f3b1f5e 100644 (file)
@@ -1,3 +1,4 @@
+
 /*
  * This file is part of DisOrder.
  * Copyright (C) 2004-2008 Richard Kettlewell
 #ifndef CONFIGURATION_H
 #define CONFIGURATION_H
 
+#include <pcre.h>
+
 #include "speaker-protocol.h"
 #include "rights.h"
 
-struct real_pcre;
-
 /* Configuration is kept in a @struct config@; the live configuration
  * is always pointed to by @config@.  Values in @config@ are UTF-8 encoded.
  */
@@ -69,7 +70,7 @@ struct collectionlist {
 
 struct namepart {
   char *part;                          /* part */
-  struct real_pcre *re;                        /* regexp */
+  pcre *re;                            /* regexp */
   char *replace;                       /* replacement string */
   char *context;                       /* context glob */
   unsigned reflags;                    /* regexp flags */
@@ -84,7 +85,7 @@ struct transform {
   char *type;                          /* track or dir */
   char *context;                       /* sort or choose */
   char *replace;                       /* substitution string */
-  struct real_pcre *re;                        /* compiled re */
+  pcre *re;                            /* compiled re */
   unsigned flags;                      /* regexp flags */
 };
 
@@ -183,6 +184,8 @@ struct config {
    * BACKEND_NETWORK.
    */
   int api;
+
+/* These values had better be non-negative */
 #define BACKEND_ALSA 0                 /**< Use ALSA (Linux only) */
 #define BACKEND_COMMAND 1              /**< Execute a command */
 #define BACKEND_NETWORK 2              /**< Transmit RTP  */
@@ -283,6 +286,12 @@ struct config {
 
   /** @brief Whether to allow user management over TCP */
   int remote_userman;
+
+  /** @brief Maximum age of biased-up tracks */
+  long new_bias_age;
+
+  /** @brief Maximum bias */
+  long new_bias;
   
   /* derived values: */
   int nparts;                          /* number of distinct name parts */