diff options
author | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2005-11-08 13:04:32 +0000 |
---|---|---|
committer | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2005-11-08 13:04:32 +0000 |
commit | 1fcc35aad699f3d40ca786b99c7255cf8aa55892 (patch) | |
tree | 88fb669ab0ab13822d4fcef8bf854d30e97dd9b6 /include/rfid/rfid_protocol.h | |
parent | b40ece7ac6d4c72cf8a648fd1b7eee30130eac77 (diff) |
move include directory for pkginclude compliance
git-svn-id: https://svn.gnumonks.org/trunk/librfid@1664 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'include/rfid/rfid_protocol.h')
-rw-r--r-- | include/rfid/rfid_protocol.h | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/include/rfid/rfid_protocol.h b/include/rfid/rfid_protocol.h deleted file mode 100644 index bd9570f..0000000 --- a/include/rfid/rfid_protocol.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef _RFID_PROTOCOL_H -#define _RFID_PROTOCOL_H - -#include <rfid/rfid_layer2.h> - -struct rfid_protocol_handle; - -struct rfid_protocol_handle * -rfid_protocol_init(struct rfid_layer2_handle *l2h, unsigned int id); -int rfid_protocol_open(struct rfid_protocol_handle *ph); -int rfid_protocol_transcieve(struct rfid_protocol_handle *ph, - const unsigned char *tx_buf, unsigned int tx_len, - unsigned char *rx_buf, unsigned int *rx_len, - unsigned int timeout, unsigned int flags); -int -rfid_protocol_read(struct rfid_protocol_handle *ph, - unsigned int page, - unsigned char *rx_data, - unsigned int *rx_len); - -int -rfid_protocol_write(struct rfid_protocol_handle *ph, - unsigned int page, - unsigned char *tx_data, - unsigned int tx_len); - -int rfid_protocol_fini(struct rfid_protocol_handle *ph); -int rfid_protocol_close(struct rfid_protocol_handle *ph); - -enum rfid_protocol_id { - RFID_PROTOCOL_UNKNOWN, - RFID_PROTOCOL_TCL, - RFID_PROTOCOL_MIFARE_UL, - RFID_PROTOCOL_MIFARE_CLASSIC, -}; - - -#ifdef __LIBRFID__ - -struct rfid_protocol { - struct rfid_protocol *next; - unsigned int id; - char *name; - struct { - struct rfid_protocol_handle *(*init)(struct rfid_layer2_handle *l2h); - int (*open)(struct rfid_protocol_handle *ph); - int (*close)(struct rfid_protocol_handle *ph); - int (*fini)(struct rfid_protocol_handle *ph); - /* transcieve for session based transport protocols */ - int (*transcieve)(struct rfid_protocol_handle *ph, - const unsigned char *tx_buf, - unsigned int tx_len, - unsigned char *rx_buf, - unsigned int *rx_len, - unsigned int timeout, - unsigned int flags); - /* read/write for synchronous memory cards */ - int (*read)(struct rfid_protocol_handle *ph, - unsigned int page, - unsigned char *rx_data, - unsigned int *rx_len); - int (*write)(struct rfid_protocol_handle *ph, - unsigned int page, - unsigned char *tx_data, - unsigned int tx_len); - } fn; -}; - -int rfid_protocol_register(struct rfid_protocol *p); - -#include <rfid/rfid_protocol_tcl.h> -#include <rfid/rfid_protocol_mifare_ul.h> -#include <rfid/rfid_protocol_mifare_classic.h> - -struct rfid_protocol_handle { - struct rfid_layer2_handle *l2h; - struct rfid_protocol *proto; - union { - struct tcl_handle tcl; - } priv; /* priv has to be last, since - * it could contain additional - * private data over the end of - * sizeof(priv). */ -}; - -#endif /* __LIBRFID__ */ - -#endif /* _RFID_PROTOCOL_H */ |