~ubuntu-branches/ubuntu/edgy/syslog-ng/edgy

« back to all changes in this revision

Viewing changes to src/fdread.h

  • Committer: Bazaar Package Importer
  • Author(s): SZALAY Attila
  • Date: 2006-05-25 11:21:50 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060525112150-b18srkxcrz980xi9
Tags: 1.9.11-1
* New upstream version
  - Fixed log facility and priority detecting. (Closes: #350120, #350344, #357071, #367256)
* Added bison to Build-Dependency. (Closes: #368765)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2002, 2003, 2004 BalaBit IT Ltd, Budapest, Hungary
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify it
 
5
 * under the terms of the GNU General Public License version 2 as published
 
6
 * by the Free Software Foundation.
 
7
 *
 
8
 * Note that this permission is granted for only version 2 of the GPL.
 
9
 *
 
10
 * As an additional exemption you are allowed to compile & link against the
 
11
 * OpenSSL libraries as published by the OpenSSL project. See the file
 
12
 * COPYING for details.
 
13
 *
 
14
 * This program is distributed in the hope that it will be useful,
 
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
 * GNU General Public License for more details.
 
18
 *
 
19
 * You should have received a copy of the GNU General Public License
 
20
 * along with this program; if not, write to the Free Software
 
21
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
22
 */
 
23
 
 
24
#ifndef FDREAD_H_INCLUDED
 
25
#define FDREAD_H_INCLUDED
 
26
 
 
27
#include "syslog-ng.h"
 
28
#include "gsockaddr.h"
 
29
 
 
30
#include <unistd.h>
 
31
 
 
32
#define FR_DONTCLOSE 0x0001
 
33
#define FR_RECV      0x0002
 
34
 
 
35
typedef struct _FDRead
 
36
{
 
37
  gint fd;
 
38
  GIOCondition cond;
 
39
  guint flags;
 
40
  size_t (*read)(struct _FDRead *, void *buf, size_t count, GSockAddr **sa);
 
41
} FDRead;
 
42
 
 
43
static inline ssize_t 
 
44
fd_read(FDRead *s, void *buf, size_t count, GSockAddr **sa)
 
45
{
 
46
  return s->read(s, buf, count, sa);
 
47
}
 
48
 
 
49
FDRead *fd_read_new(gint fd, guint flags);
 
50
void fd_read_free(FDRead *self);
 
51
 
 
52
#endif