bankd_pcsc: Add CSV based mapping of bank-id/slot-nr to PC/SC reader name
In the PC/SC world, each slot is associated with a string name. In the
bankd for PC/SC readers, we need to establish a mapping which
bank_id/slot_nr maps to which given string name. We use a minimalistic
CSV file for defining those mappings. The file is read only once at
bankd startup time.
Change-Id: Ifd2caab670625e2e3fbc57b966dce2f43b690417
diff --git a/src/bankd.h b/src/bankd.h
index 61bf34a..2759478 100644
--- a/src/bankd.h
+++ b/src/bankd.h
@@ -138,4 +138,9 @@
/* list of bankd_workers. accessed/modified by multiple threads; protected by mutex */
struct llist_head workers;
pthread_mutex_t workers_mutex;
+
+ struct llist_head pcsc_slot_names;
};
+
+int bankd_pcsc_read_slotnames(struct bankd *bankd, const char *csv_file);
+const char *bankd_pcsc_get_slot_name(struct bankd *bankd, const struct bank_slot *slot);