root/trunk/libffado/support/firmware/downloader.h

Revision 1009, 1.4 kB (checked in by ppalmers, 14 years ago)

fiddle around with the argument parsing to ease the reuse by other firmware loaders

Line 
1 /*
2  * Copyright (C) 2005-2008 by Daniel Wagner
3  *
4  * This file is part of FFADO
5  * FFADO = Free Firewire (pro-)audio drivers for linux
6  *
7  * FFADO is based upon FreeBoB
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 2 of the License, or
12  * (at your option) version 3 of the License.
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, see <http://www.gnu.org/licenses/>.
21  *
22  */
23
24 #ifndef downloader_h
25 #define downloader_h
26
27 #include <argp.h>
28 #include <inttypes.h>
29
30 #define MAX_NB_ARGS 5
31
32 /* ------------------------------------- */
33 /* has to be provided by the application */
34 extern const char *doc;
35 extern struct argp_option* options;
36
37 /* ------------------------------------- */
38 struct arguments
39 {
40     char* args[MAX_NB_ARGS];
41     int   nargs;
42     short verbose;
43     int   port;
44     int   force;
45     int   no_bootloader_restart;
46     uint64_t guid;
47 };
48
49 extern struct arguments* args;
50 extern struct argp* argp;
51
52 error_t parse_opt( int key, char* arg, struct argp_state* state );
53 void printDeviceList();
54
55 #endif /* downloader_h */
Note: See TracBrowser for help on using the browser.