File: flt-player.h

package info (click to toggle)
xqf 1.0.6-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 4,048 kB
  • sloc: ansic: 31,166; sh: 1,451; xml: 1,039; makefile: 257; perl: 131
file content (61 lines) | stat: -rw-r--r-- 1,629 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* XQF - Quake server browser and launcher
 * Copyright (C) 1998-2000 Roman Pozlevich <roma@botik.ru>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program 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 program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
 */

#ifndef __FLT_PLAYER_H__
#define __FLT_PLAYER_H__

#include <sys/types.h>
#include <regex.h>

#include <gtk/gtk.h>

#include "xqf.h"
#include "filter.h"     /*For server_filter_vars */

enum pattern_mode { 
	PATTERN_MODE_STRING = 0,
	PATTERN_MODE_SUBSTR = 1,
	PATTERN_MODE_REGEXP = 2
};

struct player_pattern {
	char *pattern;
	enum pattern_mode mode;
	unsigned groups;
	char *comment;

	char *error;
	void *data;

	int dirty;
};

extern int player_filter (struct server *s);

extern void player_filter_page (GtkWidget *notebook);

extern void player_filter_new_defaults (void);
extern void player_filter_cfg_clean_up (void);

extern int player_filter_add_player (char *name, unsigned mask);

extern void player_filter_init (void);
extern void player_filter_done (void);


#endif /* __FLT_PLAYER_H__ */