redesign autoconf/automake infrastructure to support
[librfid] / include / librfid / rfid_layer2.h
index 4622a02..0f6f683 100644 (file)
@@ -14,10 +14,16 @@ enum rfid_layer2_id {
        RFID_LAYER2_ISO15693,
 };
 
+/* 0...0xffff = global options, 0x10000...0x1ffff = private options */
+#define RFID_OPT_L2_PRIV               0x00010000
+enum rfid_layer2_opt {
+       RFID_OPT_LAYER2_UID             = 0x0001,
+};
+
 struct rfid_layer2_handle *rfid_layer2_init(struct rfid_reader_handle *rh,
                                            unsigned int id);
 int rfid_layer2_open(struct rfid_layer2_handle *l2h);
-int rfid_layer2_transcieve(struct rfid_layer2_handle *l2h,
+int rfid_layer2_transceive(struct rfid_layer2_handle *l2h,
                           enum rfid_frametype frametype,
                           const unsigned char *tx_buf, unsigned int tx_len,
                           unsigned char *rx_buf, unsigned int *rx_len,
@@ -28,7 +34,7 @@ int rfid_layer2_getopt(struct rfid_layer2_handle *ph, int optname,
                        void *optval, unsigned int *optlen);
 int rfid_layer2_setopt(struct rfid_layer2_handle *ph, int optname,
                        const void *optval, unsigned int optlen);
-
+char *rfid_layer2_name(struct rfid_layer2_handle *l2h);
 #ifdef __LIBRFID__
 
 #include <librfid/rfid_layer2_iso14443a.h>
@@ -42,7 +48,7 @@ struct rfid_layer2 {
        struct {
                struct rfid_layer2_handle *(*init)(struct rfid_reader_handle *h);
                int (*open)(struct rfid_layer2_handle *h);
-               int (*transcieve)(struct rfid_layer2_handle *h,
+               int (*transceive)(struct rfid_layer2_handle *h,
                                  enum rfid_frametype frametype,
                                  const unsigned char *tx_buf, 
                                  unsigned int tx_len, unsigned char *rx_buf, 
@@ -63,6 +69,7 @@ struct rfid_layer2_handle {
        struct rfid_reader_handle *rh;
        unsigned char uid[10];  /* triple size 14443a id is 10 bytes */
        unsigned int uid_len;
+       unsigned int proto_supported;
        union {
                struct iso14443a_handle iso14443a;
                struct iso14443b_handle iso14443b;