Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Vasily Khoruzhick
libfprint
Commits
61483a4c
Commit
61483a4c
authored
Nov 29, 2018
by
Bastien Nocera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib: Make the fp_print_data structure private
And add a couple of helpers for the upekts driver to use.
parent
2b21430a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
15 deletions
+31
-15
doc/libfprint-sections.txt
doc/libfprint-sections.txt
+0
-1
libfprint/drivers/upekts.c
libfprint/drivers/upekts.c
+2
-2
libfprint/fp_internal.h
libfprint/fp_internal.h
+13
-0
libfprint/fpi-data.c
libfprint/fpi-data.c
+13
-0
libfprint/fpi-data.h
libfprint/fpi-data.h
+3
-12
No files found.
doc/libfprint-sections.txt
View file @
61483a4c
...
...
@@ -281,7 +281,6 @@ fpi_assemble_lines
<SECTION>
<INCLUDE>fpi-data.h</INCLUDE>
<FILE>fpi-data</FILE>
fp_print_data_type
fp_print_data_item
fpi_print_data_new
...
...
libfprint/drivers/upekts.c
View file @
61483a4c
...
...
@@ -1042,7 +1042,7 @@ static void e_handle_resp02(struct fp_dev *dev, unsigned char *data,
item
=
fpi_print_data_item_new
(
data_len
-
sizeof
(
scan_comp
));
memcpy
(
item
->
data
,
data
+
sizeof
(
scan_comp
),
data_len
-
sizeof
(
scan_comp
));
f
data
->
prints
=
g_slist_prepend
(
fdata
->
prints
,
item
);
f
pi_print_data_add_item
(
fdata
,
item
);
result
=
FP_ENROLL_COMPLETE
;
}
...
...
@@ -1204,7 +1204,7 @@ static void verify_start_sm_run_state(fpi_ssm *ssm, struct fp_dev *dev, void *us
break
;
case
VERIFY_INIT
:
;
struct
fp_print_data
*
print
=
fpi_dev_get_verify_data
(
dev
);
struct
fp_print_data_item
*
item
=
print
->
print
s
->
data
;
struct
fp_print_data_item
*
item
=
fpi_
print
_
data
_get_item
(
print
)
;
size_t
data_len
=
sizeof
(
verify_hdr
)
+
item
->
length
;
unsigned
char
*
data
=
g_malloc
(
data_len
);
struct
libusb_transfer
*
transfer
;
...
...
libfprint/fp_internal.h
View file @
61483a4c
...
...
@@ -39,6 +39,19 @@
extern
libusb_context
*
fpi_usb_ctx
;
extern
GSList
*
opened_devices
;
/* fp_print_data structure definition */
enum
fp_print_data_type
{
PRINT_DATA_RAW
=
0
,
/* memset-imposed default */
PRINT_DATA_NBIS_MINUTIAE
};
struct
fp_print_data
{
uint16_t
driver_id
;
uint32_t
devtype
;
enum
fp_print_data_type
type
;
GSList
*
prints
;
};
/* fp_dev structure definition */
enum
fp_dev_state
{
DEV_STATE_INITIAL
=
0
,
...
...
libfprint/fpi-data.c
View file @
61483a4c
...
...
@@ -149,6 +149,19 @@ struct fp_print_data *fpi_print_data_new(struct fp_dev *dev)
fpi_driver_get_data_type
(
dev
->
drv
));
}
struct
fp_print_data_item
*
fpi_print_data_get_item
(
struct
fp_print_data
*
data
)
{
return
data
->
prints
->
data
;
}
void
fpi_print_data_add_item
(
struct
fp_print_data
*
data
,
struct
fp_print_data_item
*
item
)
{
data
->
prints
=
g_slist_prepend
(
data
->
prints
,
item
);
}
/**
* fp_print_data_get_data:
* @data: the stored print
...
...
libfprint/fpi-data.h
View file @
61483a4c
...
...
@@ -20,24 +20,15 @@
#ifndef __FPI_DATA_H__
#define __FPI_DATA_H__
enum
fp_print_data_type
{
PRINT_DATA_RAW
=
0
,
/* memset-imposed default */
PRINT_DATA_NBIS_MINUTIAE
};
struct
fp_print_data
;
struct
fp_print_data_item
{
size_t
length
;
unsigned
char
data
[
0
];
};
struct
fp_print_data
{
uint16_t
driver_id
;
uint32_t
devtype
;
enum
fp_print_data_type
type
;
GSList
*
prints
;
};
struct
fp_print_data
*
fpi_print_data_new
(
struct
fp_dev
*
dev
);
struct
fp_print_data_item
*
fpi_print_data_item_new
(
size_t
length
);
struct
fp_print_data_item
*
fpi_print_data_get_item
(
struct
fp_print_data
*
data
);
void
fpi_print_data_add_item
(
struct
fp_print_data
*
data
,
struct
fp_print_data_item
*
item
);
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment