core: move device related functions from display.h to device.h

It is ominous that these functions were declared in display.h.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-03-12 10:44:37 +01:00 committed by Dirk Hohndel
parent 04241ebb9d
commit 1496bbc314
7 changed files with 15 additions and 13 deletions

View file

@ -1,7 +1,8 @@
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
/* implements Android specific functions */ /* implements Android specific functions */
#include "dive.h" #include "dive.h"
#include "display.h" #include "device.h"
#include "libdivecomputer.h"
#include "file.h" #include "file.h"
#include "qthelper.h" #include "qthelper.h"
#include <string.h> #include <string.h>

View file

@ -57,6 +57,12 @@ extern uint32_t fp_get_deviceid(struct fingerprint_table *table, unsigned int i)
extern uint32_t fp_get_diveid(struct fingerprint_table *table, unsigned int i); extern uint32_t fp_get_diveid(struct fingerprint_table *table, unsigned int i);
extern char *fp_get_data(struct fingerprint_table *table, unsigned int i); extern char *fp_get_data(struct fingerprint_table *table, unsigned int i);
extern int is_default_dive_computer_device(const char *);
typedef void (*device_callback_t)(const char *name, void *userdata);
extern int enumerate_devices(device_callback_t callback, void *userdata, unsigned int transport);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View file

@ -2,8 +2,6 @@
#ifndef DISPLAY_H #ifndef DISPLAY_H
#define DISPLAY_H #define DISPLAY_H
#include "libdivecomputer.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -26,12 +24,6 @@ struct plot_info {
struct plot_pressure_data *pressures; /* cylinders.nr blocks of nr entries. */ struct plot_pressure_data *pressures; /* cylinders.nr blocks of nr entries. */
}; };
extern int is_default_dive_computer_device(const char *);
typedef void (*device_callback_t)(const char *name, void *userdata);
extern int enumerate_devices(device_callback_t callback, void *userdata, unsigned int transport);
#define AMB_PERCENTAGE 50.0 #define AMB_PERCENTAGE 50.0
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -5,7 +5,7 @@
#include <fnmatch.h> #include <fnmatch.h>
#include "dive.h" #include "dive.h"
#include "file.h" #include "file.h"
#include "display.h" #include "device.h"
#include "core/qthelper.h" #include "core/qthelper.h"
#include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#if !defined(__IPHONE_5_0) #if !defined(__IPHONE_5_0)

View file

@ -7,7 +7,8 @@
#include <fnmatch.h> #include <fnmatch.h>
#include "dive.h" #include "dive.h"
#include "subsurface-string.h" #include "subsurface-string.h"
#include "display.h" #include "device.h"
#include "libdivecomputer.h"
#include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#if !defined(__IPHONE_5_0) #if !defined(__IPHONE_5_0)
#include <CoreServices/CoreServices.h> #include <CoreServices/CoreServices.h>

View file

@ -5,7 +5,8 @@
#include "dive.h" #include "dive.h"
#include "file.h" #include "file.h"
#include "subsurface-string.h" #include "subsurface-string.h"
#include "display.h" #include "device.h"
#include "libdivecomputer.h"
#include "membuffer.h" #include "membuffer.h"
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>

View file

@ -4,7 +4,8 @@
#include "ssrf.h" #include "ssrf.h"
#include <io.h> #include <io.h>
#include "dive.h" #include "dive.h"
#include "display.h" #include "device.h"
#include "libdivecomputer.h"
#include "file.h" #include "file.h"
#include "errorhelper.h" #include "errorhelper.h"
#include "subsurfacesysinfo.h" #include "subsurfacesysinfo.h"