Export the filter function in the public api
The functionality provided by the filter function is not only useful for the built-in transports, but also for the applications. For example in combination with a custom transport.
This commit is contained in:
parent
4a9be44afd
commit
ed871137b1
@ -331,7 +331,6 @@
|
||||
<ClInclude Include="..\..\src\cressi_leonardo.h" />
|
||||
<ClInclude Include="..\..\src\deepblu_cosmiq.h" />
|
||||
<ClInclude Include="..\..\src\deepsix_excursion.h" />
|
||||
<ClInclude Include="..\..\src\descriptor-private.h" />
|
||||
<ClInclude Include="..\..\src\device-private.h" />
|
||||
<ClInclude Include="..\..\src\diverite_nitekq.h" />
|
||||
<ClInclude Include="..\..\src\divesoft_freedom.h" />
|
||||
|
||||
@ -52,6 +52,9 @@ dc_descriptor_get_model (dc_descriptor_t *descriptor);
|
||||
unsigned int
|
||||
dc_descriptor_get_transports (dc_descriptor_t *descriptor);
|
||||
|
||||
int
|
||||
dc_descriptor_filter (dc_descriptor_t *descriptor, dc_transport_t transport, const void *userdata);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
@ -16,7 +16,7 @@ endif
|
||||
|
||||
libdivecomputer_la_SOURCES = \
|
||||
version.c \
|
||||
descriptor-private.h descriptor.c \
|
||||
descriptor.c \
|
||||
iostream-private.h iostream.c \
|
||||
iterator-private.h iterator.c \
|
||||
common-private.h common.c \
|
||||
|
||||
@ -51,7 +51,6 @@
|
||||
#include "context-private.h"
|
||||
#include "iostream-private.h"
|
||||
#include "iterator-private.h"
|
||||
#include "descriptor-private.h"
|
||||
#include "platform.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* libdivecomputer
|
||||
*
|
||||
* Copyright (C) 2017 Jef Driesen
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library 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
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef DC_DESCRIPTOR_PRIVATE_H
|
||||
#define DC_DESCRIPTOR_PRIVATE_H
|
||||
|
||||
#include <libdivecomputer/descriptor.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
int
|
||||
dc_descriptor_filter (dc_descriptor_t *descriptor, dc_transport_t transport, const void *userdata);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* DC_DESCRIPTOR_PRIVATE_H */
|
||||
@ -23,10 +23,10 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libdivecomputer/descriptor.h>
|
||||
#include <libdivecomputer/usbhid.h>
|
||||
#include <libdivecomputer/usb.h>
|
||||
|
||||
#include "descriptor-private.h"
|
||||
#include "iterator-private.h"
|
||||
#include "platform.h"
|
||||
|
||||
|
||||
@ -47,7 +47,6 @@
|
||||
#include "context-private.h"
|
||||
#include "iostream-private.h"
|
||||
#include "iterator-private.h"
|
||||
#include "descriptor-private.h"
|
||||
#include "array.h"
|
||||
#include "platform.h"
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ dc_descriptor_get_product
|
||||
dc_descriptor_get_type
|
||||
dc_descriptor_get_model
|
||||
dc_descriptor_get_transports
|
||||
dc_descriptor_filter
|
||||
|
||||
dc_iostream_get_transport
|
||||
dc_iostream_set_timeout
|
||||
|
||||
@ -57,7 +57,6 @@
|
||||
#include "context-private.h"
|
||||
#include "iostream-private.h"
|
||||
#include "iterator-private.h"
|
||||
#include "descriptor-private.h"
|
||||
#include "platform.h"
|
||||
#include "timer.h"
|
||||
|
||||
|
||||
@ -31,7 +31,6 @@
|
||||
#include "context-private.h"
|
||||
#include "iostream-private.h"
|
||||
#include "iterator-private.h"
|
||||
#include "descriptor-private.h"
|
||||
#include "platform.h"
|
||||
|
||||
static dc_status_t dc_serial_iterator_next (dc_iterator_t *iterator, void *item);
|
||||
|
||||
@ -39,7 +39,6 @@
|
||||
#include "common-private.h"
|
||||
#include "context-private.h"
|
||||
#include "iostream-private.h"
|
||||
#include "descriptor-private.h"
|
||||
#include "iterator-private.h"
|
||||
#include "platform.h"
|
||||
#include "array.h"
|
||||
|
||||
@ -57,7 +57,6 @@
|
||||
#include "common-private.h"
|
||||
#include "context-private.h"
|
||||
#include "iostream-private.h"
|
||||
#include "descriptor-private.h"
|
||||
#include "iterator-private.h"
|
||||
#include "platform.h"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user