Move the I/O implementations to the public api
The I/O implementations need to be exposed in the public api, otherwise applications won't be able to use them!
This commit is contained in:
parent
ef2402eff5
commit
44eba5515c
@ -7,6 +7,11 @@ libdivecomputer_HEADERS = \
|
|||||||
descriptor.h \
|
descriptor.h \
|
||||||
iterator.h \
|
iterator.h \
|
||||||
iostream.h \
|
iostream.h \
|
||||||
|
serial.h \
|
||||||
|
bluetooth.h \
|
||||||
|
irda.h \
|
||||||
|
usbhid.h \
|
||||||
|
custom.h \
|
||||||
device.h \
|
device.h \
|
||||||
parser.h \
|
parser.h \
|
||||||
datetime.h \
|
datetime.h \
|
||||||
|
|||||||
@ -22,11 +22,11 @@
|
|||||||
#ifndef DC_BLUETOOTH_H
|
#ifndef DC_BLUETOOTH_H
|
||||||
#define DC_BLUETOOTH_H
|
#define DC_BLUETOOTH_H
|
||||||
|
|
||||||
#include <libdivecomputer/common.h>
|
#include "common.h"
|
||||||
#include <libdivecomputer/context.h>
|
#include "context.h"
|
||||||
#include <libdivecomputer/iostream.h>
|
#include "iostream.h"
|
||||||
#include <libdivecomputer/iterator.h>
|
#include "iterator.h"
|
||||||
#include <libdivecomputer/descriptor.h>
|
#include "descriptor.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -22,9 +22,9 @@
|
|||||||
#ifndef DC_CUSTOM_H
|
#ifndef DC_CUSTOM_H
|
||||||
#define DC_CUSTOM_H
|
#define DC_CUSTOM_H
|
||||||
|
|
||||||
#include <libdivecomputer/common.h>
|
#include "common.h"
|
||||||
#include <libdivecomputer/context.h>
|
#include "context.h"
|
||||||
#include <libdivecomputer/iostream.h>
|
#include "iostream.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -22,11 +22,11 @@
|
|||||||
#ifndef DC_IRDA_H
|
#ifndef DC_IRDA_H
|
||||||
#define DC_IRDA_H
|
#define DC_IRDA_H
|
||||||
|
|
||||||
#include <libdivecomputer/common.h>
|
#include "common.h"
|
||||||
#include <libdivecomputer/context.h>
|
#include "context.h"
|
||||||
#include <libdivecomputer/iostream.h>
|
#include "iostream.h"
|
||||||
#include <libdivecomputer/iterator.h>
|
#include "iterator.h"
|
||||||
#include <libdivecomputer/descriptor.h>
|
#include "descriptor.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -22,11 +22,11 @@
|
|||||||
#ifndef DC_SERIAL_H
|
#ifndef DC_SERIAL_H
|
||||||
#define DC_SERIAL_H
|
#define DC_SERIAL_H
|
||||||
|
|
||||||
#include <libdivecomputer/common.h>
|
#include "common.h"
|
||||||
#include <libdivecomputer/context.h>
|
#include "context.h"
|
||||||
#include <libdivecomputer/iostream.h>
|
#include "iostream.h"
|
||||||
#include <libdivecomputer/iterator.h>
|
#include "iterator.h"
|
||||||
#include <libdivecomputer/descriptor.h>
|
#include "descriptor.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -22,11 +22,11 @@
|
|||||||
#ifndef DC_USBHID_H
|
#ifndef DC_USBHID_H
|
||||||
#define DC_USBHID_H
|
#define DC_USBHID_H
|
||||||
|
|
||||||
#include <libdivecomputer/common.h>
|
#include "common.h"
|
||||||
#include <libdivecomputer/context.h>
|
#include "context.h"
|
||||||
#include <libdivecomputer/iostream.h>
|
#include "iostream.h"
|
||||||
#include <libdivecomputer/iterator.h>
|
#include "iterator.h"
|
||||||
#include <libdivecomputer/descriptor.h>
|
#include "descriptor.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -549,7 +549,7 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\bluetooth.h"
|
RelativePath="..\include\libdivecomputer\bluetooth.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
@ -589,7 +589,7 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\custom.h"
|
RelativePath="..\include\libdivecomputer\custom.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
@ -653,7 +653,7 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\irda.h"
|
RelativePath="..\include\libdivecomputer\irda.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
@ -761,7 +761,7 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\serial.h"
|
RelativePath="..\include\libdivecomputer\serial.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
@ -833,7 +833,7 @@
|
|||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\src\usbhid.h"
|
RelativePath="..\include\libdivecomputer\usbhid.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
<File
|
||||||
|
|||||||
@ -71,20 +71,19 @@ libdivecomputer_la_SOURCES = \
|
|||||||
checksum.h checksum.c \
|
checksum.h checksum.c \
|
||||||
array.h array.c \
|
array.h array.c \
|
||||||
buffer.c \
|
buffer.c \
|
||||||
cochran_commander.h cochran_commander.c cochran_commander_parser.c
|
cochran_commander.h cochran_commander.c cochran_commander_parser.c \
|
||||||
|
socket.h socket.c \
|
||||||
|
irda.c \
|
||||||
|
usbhid.c \
|
||||||
|
bluetooth.c \
|
||||||
|
custom.c
|
||||||
|
|
||||||
if OS_WIN32
|
if OS_WIN32
|
||||||
libdivecomputer_la_SOURCES += serial.h serial_win32.c
|
libdivecomputer_la_SOURCES += serial_win32.c
|
||||||
else
|
else
|
||||||
libdivecomputer_la_SOURCES += serial.h serial_posix.c
|
libdivecomputer_la_SOURCES += serial_posix.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
libdivecomputer_la_SOURCES += socket.h socket.c
|
|
||||||
libdivecomputer_la_SOURCES += irda.h irda.c
|
|
||||||
libdivecomputer_la_SOURCES += usbhid.h usbhid.c
|
|
||||||
libdivecomputer_la_SOURCES += bluetooth.h bluetooth.c
|
|
||||||
libdivecomputer_la_SOURCES += custom.h custom.c
|
|
||||||
|
|
||||||
if OS_WIN32
|
if OS_WIN32
|
||||||
libdivecomputer_la_SOURCES += libdivecomputer.rc
|
libdivecomputer_la_SOURCES += libdivecomputer.rc
|
||||||
endif
|
endif
|
||||||
|
|||||||
@ -46,7 +46,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "bluetooth.h"
|
#include <libdivecomputer/bluetooth.h>
|
||||||
|
|
||||||
#include "common-private.h"
|
#include "common-private.h"
|
||||||
#include "context-private.h"
|
#include "context-private.h"
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <stdlib.h> // malloc, free
|
#include <stdlib.h> // malloc, free
|
||||||
|
|
||||||
#include "custom.h"
|
#include <libdivecomputer/custom.h>
|
||||||
|
|
||||||
#include "iostream-private.h"
|
#include "iostream-private.h"
|
||||||
#include "common-private.h"
|
#include "common-private.h"
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "irda.h"
|
#include <libdivecomputer/irda.h>
|
||||||
|
|
||||||
#include "common-private.h"
|
#include "common-private.h"
|
||||||
#include "context-private.h"
|
#include "context-private.h"
|
||||||
|
|||||||
@ -50,6 +50,33 @@ dc_iostream_purge
|
|||||||
dc_iostream_sleep
|
dc_iostream_sleep
|
||||||
dc_iostream_close
|
dc_iostream_close
|
||||||
|
|
||||||
|
dc_serial_device_get_name
|
||||||
|
dc_serial_device_free
|
||||||
|
dc_serial_iterator_new
|
||||||
|
dc_serial_open
|
||||||
|
|
||||||
|
dc_bluetooth_addr2str
|
||||||
|
dc_bluetooth_str2addr
|
||||||
|
dc_bluetooth_device_get_address
|
||||||
|
dc_bluetooth_device_get_name
|
||||||
|
dc_bluetooth_device_free
|
||||||
|
dc_bluetooth_iterator_new
|
||||||
|
dc_bluetooth_open
|
||||||
|
|
||||||
|
dc_irda_device_get_address
|
||||||
|
dc_irda_device_get_name
|
||||||
|
dc_irda_device_free
|
||||||
|
dc_irda_iterator_new
|
||||||
|
dc_irda_open
|
||||||
|
|
||||||
|
dc_usbhid_device_get_vid
|
||||||
|
dc_usbhid_device_get_pid
|
||||||
|
dc_usbhid_device_free
|
||||||
|
dc_usbhid_iterator_new
|
||||||
|
dc_usbhid_open
|
||||||
|
|
||||||
|
dc_custom_open
|
||||||
|
|
||||||
dc_parser_new
|
dc_parser_new
|
||||||
dc_parser_new2
|
dc_parser_new2
|
||||||
dc_parser_get_type
|
dc_parser_get_type
|
||||||
|
|||||||
@ -52,7 +52,7 @@
|
|||||||
#define NOPTY 1
|
#define NOPTY 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "serial.h"
|
#include <libdivecomputer/serial.h>
|
||||||
|
|
||||||
#include "common-private.h"
|
#include "common-private.h"
|
||||||
#include "context-private.h"
|
#include "context-private.h"
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
#define NOGDI
|
#define NOGDI
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
#include "serial.h"
|
#include <libdivecomputer/serial.h>
|
||||||
|
|
||||||
#include "common-private.h"
|
#include "common-private.h"
|
||||||
#include "context-private.h"
|
#include "context-private.h"
|
||||||
|
|||||||
@ -49,7 +49,7 @@
|
|||||||
#include <hidapi/hidapi.h>
|
#include <hidapi/hidapi.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "usbhid.h"
|
#include <libdivecomputer/usbhid.h>
|
||||||
|
|
||||||
#include "common-private.h"
|
#include "common-private.h"
|
||||||
#include "context-private.h"
|
#include "context-private.h"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user