]> git.ipfire.org Git - ipfire-2.x.git/blob - src/libsmooth/libsmooth.h
Merge remote-tracking branch 'mfischer/libpcap' into next
[ipfire-2.x.git] / src / libsmooth / libsmooth.h
1 /* SmoothWall libsmooth.
2 *
3 * This program is distributed under the terms of the GNU General Public
4 * Licence. See the file COPYING for details.
5 *
6 * (c) Lawrence Manning, 2001
7 * Contains prototypes for library functions.
8 *
9 */
10
11 #ifndef ___LIBSMOOTH_H
12 #define ___LIBSMOOTH_H
13
14 #include <stdio.h>
15 #include <stdlib.h>
16 #include <string.h>
17 #include <ctype.h>
18 #include <wchar.h>
19 #include <locale.h>
20 #include <unistd.h>
21 #include <sys/file.h>
22 #include <sys/types.h>
23 #include <sys/stat.h>
24 #include <fcntl.h>
25 #include <newt.h>
26 #include <dirent.h>
27 #include <sys/mount.h>
28
29 #include <sys/socket.h>
30 #include <netinet/in.h>
31 #include <arpa/inet.h>
32
33 #include <linux/cdrom.h>
34 #include <sys/ioctl.h>
35
36 #define STRING_SIZE 1024
37
38 struct keyvalue {
39 char key[STRING_SIZE];
40 char value[STRING_SIZE];
41 struct keyvalue *next;
42 };
43
44 /* libsmooth.c */
45 void stripnl(char *s);
46 int mysystem(const char* output, const char *command);
47 void errorbox(char *message);
48 int statuswindowscroll(int width, int height, const char *title, const char *text, ...);
49 int disclaimerbox(char *message);
50 void statuswindow(int width, int height, const char *title, const char *text, ...);
51 int runcommandwithprogress(int width, int height, const char *title, const char *command,
52 int lines, char *text, ...);
53 int runcommandwithstatus(const char *command, const char* title, const char *message, const char* output);
54 int runhiddencommandwithstatus(const char *command, const char* title, const char *message, const char* output);
55 int splashWindow(const char* title, const char* message, unsigned int timeout);
56 int checkformodule(const char *module);
57 int replace(char filename1[], char *from, char *to);
58 char* get_version(void);
59
60 /* varval.c */
61 struct keyvalue *initkeyvalues(void);
62 void freekeyvalues(struct keyvalue *head);
63 int readkeyvalues(struct keyvalue *head, char *filename);
64 int writekeyvalues(struct keyvalue *head, char *filename);
65 int findkey(struct keyvalue *head, char *key, char *value);
66 void appendkeyvalue(struct keyvalue *head, char *key, char *value);
67 void replacekeyvalue(struct keyvalue *head, char *key, char *value);
68
69 #endif