Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libfprint
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
85
Issues
85
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
libfprint
libfprint
Commits
b071f3cd
Commit
b071f3cd
authored
Oct 08, 2007
by
Daniel Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial fingerprint data representation ideas
parent
59b73af9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
0 deletions
+63
-0
libfprint/Makefile.am
libfprint/Makefile.am
+1
-0
libfprint/data.c
libfprint/data.c
+47
-0
libfprint/fp_internal.h
libfprint/fp_internal.h
+10
-0
libfprint/fprint.h
libfprint/fprint.h
+5
-0
No files found.
libfprint/Makefile.am
View file @
b071f3cd
...
...
@@ -10,5 +10,6 @@ libfprint_la_LIBADD = $(LIBUSB_LIBS) $(GLIB_LIBS)
libfprint_la_SOURCES
=
\
core.c
\
data.c
\
$(DRIVER_SRC)
libfprint/data.c
0 → 100644
View file @
b071f3cd
/*
* Fingerprint data handling and storage
* Copyright (C) 2007 Daniel Drake <dsd@gentoo.org>
*
* 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
*/
#include <config.h>
#include <string.h>
#include <glib.h>
#include "fp_internal.h"
struct
fp_print_data
*
fpi_print_data_new
(
struct
fp_driver
*
drv
,
size_t
length
)
{
struct
fp_print_data
*
data
=
g_malloc
(
sizeof
(
*
data
)
+
length
);
data
->
driver_name
=
drv
->
name
;
data
->
length
=
length
;
}
unsigned
char
*
fpi_print_data_get_buffer
(
struct
fp_print_data
*
data
)
{
return
data
->
buffer
;
}
API_EXPORTED
void
fp_print_data_free
(
struct
fp_print_data
*
data
)
{
g_free
(
data
);
}
int
fpi_print_data_compatible
(
struct
fp_dev
*
dev
,
struct
fp_print_data
*
data
)
{
return
strcmp
(
dev
->
drv
->
name
,
data
->
driver_name
)
==
0
;
}
libfprint/fp_internal.h
View file @
b071f3cd
...
...
@@ -57,5 +57,15 @@ struct fp_dscv_dev {
const
struct
fp_driver
*
drv
;
};
struct
fp_print_data
{
const
char
*
driver_name
;
size_t
length
;
unsigned
char
buffer
[
0
];
};
struct
fp_print_data
*
fpi_print_data_new
(
struct
fp_driver
*
drv
,
size_t
length
);
unsigned
char
*
fpi_print_data_get_buffer
(
struct
fp_print_data
*
data
);
int
fpi_print_data_compatible
(
struct
fp_dev
*
dev
,
struct
fp_print_data
*
data
);
#endif
libfprint/fprint.h
View file @
b071f3cd
...
...
@@ -24,6 +24,7 @@
struct
fp_dscv_dev
;
struct
fp_dev
;
struct
fp_driver
;
struct
fp_print_data
;
/* Device discovery */
struct
fp_dscv_dev
**
fp_discover_devs
(
void
);
...
...
@@ -39,6 +40,10 @@ const struct fp_driver *fp_dev_get_driver(struct fp_dev *dev);
const
char
*
fp_driver_get_name
(
const
struct
fp_driver
*
drv
);
const
char
*
fp_driver_get_full_name
(
const
struct
fp_driver
*
drv
);
/* Data handling */
void
fp_print_data_free
(
struct
fp_print_data
*
data
);
/* Library */
int
fp_init
(
void
);
#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