# filter.h

Go to the documentation of this file.

    00001 /***************************************************************************
    00002  $RCSfile: filter.h,v $
    00003  -------------------
    00004  cvs         : $Id: filter.h,v 1.3 2004/12/16 17:45:13 aquamaniac Exp $
    00005  begin       : Fri Feb 07 2003
    00006  copyright   : (C) 2003 by Martin Preuss
    00007  email       : martin@libchipcard.de
    00008
    00009  ***************************************************************************
    00010  *                                                                         *
    00011  *   This library is free software; you can redistribute it and/or         *
    00012  *   modify it under the terms of the GNU Lesser General Public            *
    00013  *   License as published by the Free Software Foundation; either          *
    00014  *   version 2.1 of the License, or (at your option) any later version.    *
    00015  *                                                                         *
    00016  *   This library is distributed in the hope that it will be useful,       *
    00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
    00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
    00019  *   Lesser General Public License for more details.                       *
    00020  *                                                                         *
    00021  *   You should have received a copy of the GNU Lesser General Public      *
    00022  *   License along with this library; if not, write to the Free Software   *
    00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
    00024  *   MA  02111-1307  USA                                                   *
    00025  *                                                                         *
    00026  ***************************************************************************/
    00027
    00028
    00029 #ifndef GWENHYWFAR_FILTER_H
    00030 #define GWENHYWFAR_FILTER_H
    00031
    00032 #include <gwenhywfar/gwenhywfarapi.h>
    00033 #include <gwenhywfar/ringbuffer.h>
    00034 #include <gwenhywfar/inherit.h>
    00035
    00036
    00037 typedef struct GWEN_FILTER GWEN_FILTER;
    00038
    00039
    00040 GWEN_INHERIT_FUNCTION_LIB_DEFS(GWEN_FILTER, GWENHYWFAR_API)
    00041
    00042
    00043 typedef enum {
    00044   GWEN_Filter_ResultOk=0,
    00045   GWEN_Filter_ResultNeedMore,
    00046   GWEN_Filter_ResultFull,
    00047   GWEN_Filter_ResultError
    00048 } GWEN_FILTER_RESULT;
    00049
    00050
    00051 typedef GWEN_FILTER_RESULT (*GWEN_FILTER_WORKFN)(GWEN_FILTER *f);
    00052
    00053
    00054 GWEN_FILTER *GWEN_Filter_new(const char *name);
    00055 void GWEN_Filter_free(GWEN_FILTER *f);
    00056 GWEN_RINGBUFFER *GWEN_Filter_GetInBuffer(const GWEN_FILTER *f);
    00057 GWEN_RINGBUFFER *GWEN_Filter_GetOutBuffer(const GWEN_FILTER *f);
    00058
    00059 GWEN_FILTER_RESULT GWEN_Filter_Work(GWEN_FILTER *f, int oneLoop);
    00060
    00061 void GWEN_Filter_SetWorkFn(GWEN_FILTER *f, GWEN_FILTER_WORKFN fn);
    00062
    00063
    00070 void GWEN_Filter_AppendNext(GWEN_FILTER *fPredecessor, GWEN_FILTER *fNew);
    00071
    00072
    00073
    00074 #endif
    00075
    00076
    00077
    00078
    00079
    00080
    00081
    00082
    00083
    00084