Index: include/libroar/roardl.h
===================================================================
--- include/libroar/roardl.h	(revision 5961)
+++ include/libroar/roardl.h	(revision 5982)
@@ -60,5 +60,5 @@
 #define ROAR_DL_FN_DRIVER               3 /* Driver, roard? */
 #define ROAR_DL_FN_SOURCE               4 /* Sources, roard? */
-#define ROAR_DL_FN_FILTER               5 /* Filter, libroardsp */
+#define ROAR_DL_FN_FILTER               5 /* Filter, libroardsp, libroarlight */
 #define ROAR_DL_FN_FF                   6 /* file format??? */
 #define ROAR_DL_FN_AUTH                 7 /* Auth */
@@ -357,4 +357,11 @@
 
 
+// Filter Infrastructure (FN_FILTER):
+// Parameters for FNREG registration: 
+#define ROAR_DL_FILTER_SUBTYPE_DSP   0 /* libroardsp */
+#define ROAR_DL_FILTER_SUBTYPE_SLFI  1 /* libroarlight */
+// ROAR_DL_FILTER_{VERSION,SIZE}_* are defined in corresponding headers.
+
+
 // Common protocol interface (CPI):
 struct roar_dl_proto {
@@ -467,4 +474,7 @@
 int                      roar_dl_unregister_fn(struct roar_dl_lhandle * lhandle);
 
+// asking for a object:
+int                      roar_dl_query_fn(struct roar_dl_lhandle ** lhandle, int fn, int subtype, const void ** object, size_t * objectlen, int version, int * options, ssize_t index);
+
 #endif
 
Index: include/libroarlight/libroarlight.h
===================================================================
--- include/libroarlight/libroarlight.h	(revision 5961)
+++ include/libroarlight/libroarlight.h	(revision 5982)
@@ -44,4 +44,5 @@
 #include "pwm.h"
 #include "laser.h"
+#include "slfi.h"
 
 #endif
Index: include/libroarlight/slfi.h
===================================================================
--- include/libroarlight/slfi.h	(revision 5982)
+++ include/libroarlight/slfi.h	(revision 5982)
@@ -0,0 +1,99 @@
+//slfi.h:
+
+/*
+ *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2009-2014
+ *
+ *  This file is part of libroar a part of RoarAudio,
+ *  a cross-platform sound system for both, home and professional use.
+ *  See README for details.
+ *
+ *  This file is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 3
+ *  as published by the Free Software Foundation.
+ *
+ *  libroar is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this software; see the file COPYING.  If not, write to
+ *  the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+ *  Boston, MA 02110-1301, USA.
+ *
+ *  NOTE for everyone want's to change something and send patches:
+ *  read README and HACKING! There a addition information on
+ *  the license of this document you need to read before you send
+ *  any patches.
+ *
+ *  NOTE for uses of non-GPL (LGPL,...) software using libesd, libartsc
+ *  or libpulse*:
+ *  The libs libroaresd, libroararts and libroarpulse link this lib
+ *  and are therefore GPL. Because of this it may be illigal to use
+ *  them with any software that uses libesd, libartsc or libpulse*.
+ */
+
+// SLFI = Simple Light Filter Infrastructure
+
+#ifndef _LIBROARLIGHT_SLFI_H_
+#define _LIBROARLIGHT_SLFI_H_
+
+#include "libroarlight.h"
+
+enum roar_slfi_command {
+ ROAR_SLFI_CMD_NONE = 0x00000000U,
+ ROAR_SLFI_CMD_PUSH = 0x00000001U, /* push a new filter into the container */
+ ROAR_SLFI_CMD_MAX  = 0xFFFFFFFFU
+};
+
+#define ROAR_SLFI_FLAG_NONE        0x00000000U  /* no flags */
+#define ROAR_SLFI_FLAG_ON_UPDATE   0x00000001U  /* update() only needs to be run if there is an actual update */
+
+struct roar_slfi_inst;
+
+struct roar_slfi_filter {
+ const char * name;
+ const char * description;
+ const uint32_t flags;
+ // init
+ int (*init)(struct roar_slfi_inst * inst, const struct roar_keyval * para, ssize_t paralen);
+ // uninit
+ int (*uninit)(struct roar_slfi_inst * inst);
+ // update
+ int (*update)(struct roar_slfi_inst * inst, uint8_t * universe, ssize_t size_of_universe, int32_t usecspassed, const uint8_t * event, size_t eventlen);
+ // ctl
+ int (*ctl)(struct roar_slfi_inst * inst, enum roar_slfi_command command, void * argp);
+};
+
+#define ROAR_DL_FILTER_VERSION_SLFI   0
+#define ROAR_DL_FILTER_SIZE_SLFI      sizeof(struct roar_slfi_filter)
+
+#define ROAR_DL_PLUGIN_REG_SLFI(obj) \
+static int _roaraudio_library_ROAR_DL_FN_FILTER(struct roar_dl_librarypara * para, struct roar_dl_libraryinst * lib) { \
+ size_t i; \
+ (void)para, (void)lib; \
+ for (i = 0; i < (sizeof((obj))/sizeof(*(obj))); i++) { \
+  ROAR_DL_PLUGIN_REG_FN(ROAR_DL_FILTER_SUBTYPE_SLFI, (obj)[i], ROAR_DL_FILTER_VERSION_SLFI); \
+ } \
+ return 0; \
+}
+
+struct roar_slfi_inst {
+ size_t refc;
+ const struct roar_slfi_filter * impl;
+ uint32_t flags; // same as flags on *impl. just runtime updateable.
+ void * userdata;
+ struct roar_dl_lhandle * lhandle; // used in case we autoload this as plugin.
+ int (*cb_event_add)(struct roar_slfi_inst * inst, void * userdata, uint8_t event);
+ void * cb_event_add_userdata;
+};
+
+struct roar_slfi_inst * roar_slfi_new(const char * name, int autoload, const struct roar_keyval * para, ssize_t paralen);
+int roar_slfi_ref(struct roar_slfi_inst * inst);
+int roar_slfi_unref(struct roar_slfi_inst * inst);
+int roar_slfi_update(struct roar_slfi_inst * inst, uint8_t * universe, ssize_t size_of_universe, int32_t usecspassed, const uint8_t * event, size_t eventlen);
+int roar_slfi_ctl(struct roar_slfi_inst * inst, enum roar_slfi_command command, void * argp);
+
+#endif
+
+//ll
