summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-02-03 17:45:46 +0200
committerAlon Levy <alevy@redhat.com>2011-02-10 10:34:26 +0200
commitd7cf75f68c92c7dcc1157fdb59f617eaf221fd1d (patch)
treee1262abeaff31c59a6536665f603e1213cd4aced
parented5e2fc94266a3563b52c51f7630056ea39d72a0 (diff)
client/smartcard: s/reader_id_t/uint32_t/ (libcacard changed)
-rw-r--r--client/smartcard_channel.cpp10
-rw-r--r--client/smartcard_channel.h12
2 files changed, 11 insertions, 11 deletions
diff --git a/client/smartcard_channel.cpp b/client/smartcard_channel.cpp
index 994671f8..e7f38703 100644
--- a/client/smartcard_channel.cpp
+++ b/client/smartcard_channel.cpp
@@ -66,7 +66,7 @@ ReaderData* SmartCardChannel::reader_data_from_vreader(VReader* vreader)
return _unallocated_readers_by_vreader.find(vreader)->second;
}
-ReaderData* SmartCardChannel::reader_data_from_reader_id(reader_id_t reader_id)
+ReaderData* SmartCardChannel::reader_data_from_reader_id(uint32_t reader_id)
{
if (_readers_by_id.count(reader_id) > 0) {
return _readers_by_id.find(reader_id)->second;
@@ -88,7 +88,7 @@ void SmartCardChannel::add_unallocated_reader(VReader* vreader, const char* name
/** called upon the VSC_ReaderAddResponse
*/
-ReaderData* SmartCardChannel::add_reader(reader_id_t reader_id)
+ReaderData* SmartCardChannel::add_reader(uint32_t reader_id)
{
ReaderData* data;
size_t unallocated = _unallocated_readers_by_vreader.size();
@@ -99,7 +99,7 @@ ReaderData* SmartCardChannel::add_reader(reader_id_t reader_id)
_readers_by_vreader.insert(
std::pair<VReader*, ReaderData*>(data->vreader, data));
assert(_readers_by_vreader.count(data->vreader) == 1);
- _readers_by_id.insert(std::pair<reader_id_t, ReaderData*>(reader_id, data));
+ _readers_by_id.insert(std::pair<uint32_t, ReaderData*>(reader_id, data));
assert(_readers_by_id.count(reader_id) == 1);
_unallocated_readers_by_vreader.erase(_unallocated_readers_by_vreader.begin());
assert(_unallocated_readers_by_vreader.size() == unallocated - 1);
@@ -328,7 +328,7 @@ void SmartCardChannel::on_disconnect()
}
-void SmartCardChannel::send_reader_removed(reader_id_t reader_id)
+void SmartCardChannel::send_reader_removed(uint32_t reader_id)
{
send_message(reader_id, VSC_ReaderRemove, NULL, 0);
}
@@ -343,7 +343,7 @@ void SmartCardChannel::send_atr(VReader* vreader)
{
unsigned char atr[ MAX_ATR_LEN];
int atr_len = MAX_ATR_LEN;
- reader_id_t reader_id = reader_data_from_vreader(vreader)->reader_id;
+ uint32_t reader_id = reader_data_from_vreader(vreader)->reader_id;
assert(reader_id != VSCARD_UNDEFINED_READER_ID);
vreader_power_on(vreader, atr, &atr_len);
diff --git a/client/smartcard_channel.h b/client/smartcard_channel.h
index 60c6db5c..1d512a63 100644
--- a/client/smartcard_channel.h
+++ b/client/smartcard_channel.h
@@ -29,7 +29,7 @@ struct ReaderData {
card_insert_pending(false)
{}
VReader *vreader;
- reader_id_t reader_id;
+ uint32_t reader_id;
char* name;
bool card_insert_pending;
};
@@ -102,26 +102,26 @@ protected:
private:
static void* cac_card_events_thread_entry(void* data);
void cac_card_events_thread_main();
- void send_message(reader_id_t reader_id, VSCMsgType type, uint8_t* data, uint32_t len);
+ void send_message(uint32_t reader_id, VSCMsgType type, uint8_t* data, uint32_t len);
Thread* _event_thread;
Application* _app;
VReaderList *_reader_list;
- typedef std::map<reader_id_t, ReaderData*> readers_by_id_t;
+ typedef std::map<uint32_t, ReaderData*> readers_by_id_t;
readers_by_id_t _readers_by_id;
typedef std::map<VReader*, ReaderData*> readers_by_vreader_t;
readers_by_vreader_t _readers_by_vreader;
readers_by_vreader_t _unallocated_readers_by_vreader;
ReaderData* reader_data_from_vreader(VReader* vreader);
- ReaderData* reader_data_from_reader_id(reader_id_t reader_id);
+ ReaderData* reader_data_from_reader_id(uint32_t reader_id);
void add_unallocated_reader(VReader* vreader, const char* name);
- ReaderData* add_reader(reader_id_t reader_id);
+ ReaderData* add_reader(uint32_t reader_id);
void remove_reader(ReaderData* data);
void send_reader_added(const char* reader_name);
- void send_reader_removed(reader_id_t reader_id);
+ void send_reader_removed(uint32_t reader_id);
void send_atr(VReader* vreader);
friend class ReaderAddEvent;