forked from GPSBabel/gpsbabel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
garmin_device_xml.h
56 lines (46 loc) · 1.8 KB
/
garmin_device_xml.h
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
/*
Parse 'GarminDevice.xml' on a Garmin mass storage device (e.g. Zumo,
Nuvi, Colorado, etc. and return key device info.
Copyright (C) 2008-2014 Robert Lipe
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/*
* Describes a file on the unit.
*/
struct gdx_file {
char* path;
char* basename;
char* extension;
char* canon; // full name, when applicable.
};
/*
* The interesting traits of this device.
*/
struct gdx_info {
const char* device_desc;
const char* device_id;
const char* device_mounted_path; // Not from the file; about the file.
gdx_file from_device;
gdx_file to_device;
// gdx_file geocache_logs;
};
const gdx_info* gdx_read(const char* fname);
const gdx_info* gdx_get_info();
const gdx_info* gdx_find_file(char** dirlist);
// This is so gross. By the time we know it's not a USB device
// and could be one of our devices, we're so deep into the callstack
// that can't back out gracefully without bludgeoning most of the
// (Mac|Lin|Win) x (USB|Serial) matrix. Since we don't *really* want
// to progress any further, we just longjump back to the caller...
#include <csetjmp>
extern jmp_buf gdx_jmp_buf;