3
<TITLE>Source: klineakconfig/lineakparser.h</TITLE>
5
<META NAME="Generator" CONTENT="KDOC ">
7
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
8
<TABLE WIDTH="100%" BORDER="0">
12
<TR><TD valign="top" align="left" cellspacing="10">
13
<h1>Source: klineakconfig/lineakparser.h</h1>
15
<TD valign="top" align="right" colspan="1"></TD></TR>
22
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
23
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
24
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
25
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
26
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
27
</TABLE></TD></TR></TABLE>
29
/***************************************************************************
30
lineakparser.h - description
32
begin : Sat May 25 2002
33
copyright : (C) 2002 by Sheldon Lee Wen
34
email : leewsb@hotmail.com
35
***************************************************************************/
37
/***************************************************************************
39
* This program is free software; you can redistribute it and/or modify *
40
* it under the terms of the GNU General Public License as published by *
41
* the Free Software Foundation; either version 2 of the License, or *
42
* (at your option) any later version. *
44
***************************************************************************/
46
#ifndef LINEAKPARSER_H
47
#define LINEAKPARSER_H
53
#include <qfileinfo.h>
55
#include <qtextstream.h>
70
#include <X11/XKBlib.h>
71
#include <X11/extensions/XKBfile.h>
72
#include <sys/types.h>
77
"# LinEAK - Linux support for Easy Access and Internet Keyboards\n" \
78
"# Copyright (c) 2001,2002 Mark Smulders <Mark@PIRnet.nl>\n" \
79
"# http://lineak.sourceforge.net\n" \
81
"# lineakd configuration file\n" \
83
"# example key configuration:\n" \
84
"# \tplay\t= \"xmms --play-pause\"\n" \
85
"# \teject\t= EAK_EJECT\n" \
87
"# available special actions:\n" \
96
/* special actions in .conf file */
98
/* link them to strings */
99
#define EAK_EJECT "EAK_EJECT"
100
#define EAK_VOLUP "EAK_VOLUP"
101
#define EAK_VOLDOWN "EAK_VOLDOWN"
102
#define EAK_MUTE "EAK_MUTE"
103
#define EAK_SLEEP "EAK_SLEEP"
105
/* the conf and def filenames */
106
#define LINEAKDIR "/.lineak/"
107
#define PICSDIR "/.lineak/Pics/"
108
#define CONFFILE "/.lineak/lineakd.conf" /* (relative from $HOME dir) */
109
#define BAKFILE "/.lineak/.lineakd.conf.backup"
110
#define PIDFILE "/.lineak/lineakd.pid"
111
#define DEFFILE "lineakkb.def"
113
/* for volume settings using the mixer device */
114
#define MIXERDEV "/dev/mixer"
115
#define VOLUP_VALUE 5
116
#define VOLDOWN_VALUE -5
117
#define VOLMUTE_VALUE 0
118
#define MAX_VOLUME 100
122
specialact(QString act="", QString lname="") : action(act), longname(lname) {}
140
/* the EAK we will use.. */
143
EAKeyboard() : EAKnr(0), EAKtype(""), EAKbrand(""),
144
EAKmodel(""), EAKeylist(NULL) { }
152
/**Encapsulates the C functions required to parse the config file.
153
*@author Sheldon Lee Wen
160
//int lineakdRunning(void);
161
void remove_pid_file(void);
162
/** Strip the quotes out of a command. */
163
QString stripEscapedQuotes(QString command);
164
/** Strip the quotes out of a command. */
165
QString escapeQuotes(QString command);
168
/* function prototypes */
169
QString parseconffile(const QString &inFile=QString::null);
170
bool parsedeffile(const QString &inFile=QString::null);
171
bool initEAK (const QString &inKBType=QString::null);
172
void cleanKeylist (void);
173
void cleanConfdata(void);
174
void cleanDefdata(void);
175
void cleanexit(int status);
176
QString backup_conffile (void);
177
bool restore_conffile (void);
178
bool save_conffile (void);
187
const dcfp_data_struct *confdata;
188
const dcfp_data_struct *defdata;
189
const dcfp_data_struct *userdefdata;
190
specialact specialacts[NR_SPECIALS];
191
/** Linked list structure containing my present keyboard selection data */
193
/** map for the brand to models */
194
map< QString, vector<QString> > bmmap;
195
/** map for the kbtype to the full name */
196
map<QString,QString> longkbname;
197
/** Print basic structure */
199
friend class KlineakConfig;
200
friend class KLineakDef;
209
<tr><td><small>Generated by: sheldonl on shugaru on Thu Oct 10 23:58:14 2002, using kdoc 2.0a53.</small></td></tr>