Branch: master

670a4b34 2015-09-16 16:39:26 Timothy Pearson
Add certificate list availability signal to tdehwlib cryptographic card module
M tdecore/tdehw/tdecryptographiccarddevice.cpp
M tdecore/tdehw/tdecryptographiccarddevice.h
diff --git a/tdecore/tdehw/tdecryptographiccarddevice.cpp b/tdecore/tdehw/tdecryptographiccarddevice.cpp
index 111cbce..0125c39 100644
--- a/tdecore/tdehw/tdecryptographiccarddevice.cpp
+++ b/tdecore/tdehw/tdecryptographiccarddevice.cpp
@@ -540,6 +540,9 @@
 		m_cardPresent = true;
 		m_cardATR = atr;
 		emit(cardInserted(this));
+		if (m_cardCertificates.count() > 0) {
+			emit(certificateListAvailable(this));
+		}
 	}
 	else if (status == "REMOVED") {
 		m_cardPresent = false;
@@ -549,6 +552,9 @@
 	else if (status == "PRESENT") {
 		m_cardATR = atr;
 		m_cardPresent = true;
+		if (m_cardCertificates.count() > 0) {
+			emit(certificateListAvailable(this));
+		}
 	}
 }
 
diff --git a/tdecore/tdehw/tdecryptographiccarddevice.h b/tdecore/tdehw/tdecryptographiccarddevice.h
index e917c9a..ba40079 100644
--- a/tdecore/tdehw/tdecryptographiccarddevice.h
+++ b/tdecore/tdehw/tdecryptographiccarddevice.h
@@ -149,6 +149,7 @@
 	signals:
 		void cardInserted(TDECryptographicCardDevice*);
 		void cardRemoved(TDECryptographicCardDevice*);
+		void certificateListAvailable(TDECryptographicCardDevice*);
 		void pinRequested(TQString prompt, TDECryptographicCardDevice* cdevice);
 
 	private: