| 1 |
/* |
| 2 |
* options.h - Defines possible command line options |
| 3 |
* |
| 4 |
* Copyright (C) 2003 Brailcom, o.p.s. |
| 5 |
* |
| 6 |
* This is free software; you can redistribute it and/or modify it |
| 7 |
* under the terms of the GNU General Public License as published by |
| 8 |
* the Free Software Foundation; either version 2, or (at your option) |
| 9 |
* any later version. |
| 10 |
* |
| 11 |
* This software is distributed in the hope that it will be useful, |
| 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 |
* General Public License for more details. |
| 15 |
* |
| 16 |
* You should have received a copy of the GNU General Public License |
| 17 |
* along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 18 |
* |
| 19 |
* $Id: options.h,v 1.10 2006-07-11 16:12:27 hanke Exp $ |
| 20 |
*/ |
| 21 |
|
| 22 |
#include <getopt.h> |
| 23 |
#include "speechd_types.h" |
| 24 |
|
| 25 |
extern signed int rate; |
| 26 |
extern signed int pitch; |
| 27 |
extern signed int pitch_range; |
| 28 |
extern signed int volume; |
| 29 |
|
| 30 |
extern int list_output_modules; |
| 31 |
extern char *output_module; |
| 32 |
extern char *sound_icon; |
| 33 |
extern char *language; |
| 34 |
extern char *voice_type; |
| 35 |
extern char *punctuation_mode; |
| 36 |
extern char *priority; |
| 37 |
extern int pipe_mode; |
| 38 |
extern int character; |
| 39 |
extern int key; |
| 40 |
extern SPDDataMode ssml_mode; |
| 41 |
extern int spelling; |
| 42 |
extern int wait_till_end; |
| 43 |
extern int stop_previous; |
| 44 |
extern int cancel_previous; |
| 45 |
extern int list_synthesis_voices; |
| 46 |
extern char *synthesis_voice; |
| 47 |
|
| 48 |
extern char *application_name; |
| 49 |
extern char *connection_name; |
| 50 |
|
| 51 |
static struct option long_options[] = { |
| 52 |
{"rate", 1, 0, 'r'}, |
| 53 |
{"pitch", 1, 0, 'p'}, |
| 54 |
{"pitch-range", 1, 0, 'R'}, |
| 55 |
{"volume", 1, 0, 'i'}, |
| 56 |
{"output-module", 1, 0, 'o'}, |
| 57 |
{"list-output-modules", no_argument, 0, 'O'}, |
| 58 |
{"sound-icon", required_argument, 0, 'I'}, |
| 59 |
{"language", 1, 0, 'l'}, |
| 60 |
{"voice-type", 1, 0, 't'}, |
| 61 |
{"list-synthesis-voices", no_argument, 0, 'L'}, |
| 62 |
{"synthesis-voice", required_argument, 0, 'y'}, |
| 63 |
{"character", 0, 0, 'c'}, |
| 64 |
{"key", 0, 0, 'k'}, |
| 65 |
{"punctuation-mode", 1, 0, 'm'}, |
| 66 |
{"spelling", 0, 0, 's'}, |
| 67 |
{"ssml", 0, 0, 'x'}, |
| 68 |
{"pipe-mode", 0, 0, 'e'}, |
| 69 |
{"priority", 1, 0, 'P'}, |
| 70 |
{"application-name", 1, 0, 'N'}, |
| 71 |
{"connection-name", 1, 0, 'n'}, |
| 72 |
{"wait", 0, 0, 'w'}, |
| 73 |
{"stop", 1, 0, 'S'}, |
| 74 |
{"cancel", no_argument, 0, 'C'}, |
| 75 |
{"version", 0, 0, 'v'}, |
| 76 |
{"help", 0, 0, 'h'}, |
| 77 |
{0, 0, 0, 0} |
| 78 |
}; |
| 79 |
|
| 80 |
static char *short_options = "r:p:R:i:l:o:OI:t:Ly:ckm:sxeP:N:n:wSCvh"; |
| 81 |
|
| 82 |
int options_parse(int argc, char *argv[]); |
| 83 |
void options_print_version(void); |
| 84 |
void options_print_help(char *argv[]); |