]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/spotlight.h
Use a linked list for the SL queries
[netatalk.git] / etc / afpd / spotlight.h
index adcac14d411e269dd0f7ce6b5bdd4ed9750fe107..49a8fac063dd1d72204b617f7a8810b6751ada1c 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <atalk/dalloc.h>
 #include <atalk/globals.h>
+#include <atalk/volume.h>
 
 /**************************************************************************************************
  * Spotlight module stuff
@@ -37,6 +38,7 @@ struct sl_module_export {
     int (*sl_mod_start_search)(void *);
     int (*sl_mod_fetch_result)(void *);
     int (*sl_mod_end_search)  (void *);
+    int (*sl_mod_error)       (void *);
 };
 
 extern int sl_mod_load(const char *path);
@@ -85,13 +87,17 @@ typedef enum {
 } slq_state_t;
 
 /* Internal query data structure */
-typedef struct {
+typedef struct _slq_t {
+    struct list_head slq_list;        /* queries are stored in a list                                   */
     slq_state_t    slq_state;         /* State                                                          */
+    AFPObj         *slq_obj;          /* global AFPObj handle                                           */
+    const struct vol *slq_vol;        /* volume handle                                                  */
+    DALLOC_CTX     *slq_reply;        /* reply handle                                                   */
     time_t         slq_time;          /* timestamp where we received this query                         */
     uint64_t       slq_ctx1;          /* client context 1                                               */
     uint64_t       slq_ctx2;          /* client context 2                                               */
     const char     *slq_qstring;      /* the Spotlight query string                                     */
-    DALLOC_CTX     *slq_reqinfo;      /* array with requested metadata                                  */
+    sl_array_t     *slq_reqinfo;      /* array with requested metadata                                  */
     void           *slq_tracker_cursor; /* Tracker query result cursor                                  */
 } slq_t;