diff options
Diffstat (limited to 'kcontrol/smartcard')
-rw-r--r-- | kcontrol/smartcard/Makefile.am | 17 | ||||
-rw-r--r-- | kcontrol/smartcard/configure.in.in | 3 | ||||
-rw-r--r-- | kcontrol/smartcard/nosmartcardbase.ui | 81 | ||||
-rw-r--r-- | kcontrol/smartcard/smartcard.cpp | 400 | ||||
-rw-r--r-- | kcontrol/smartcard/smartcard.desktop | 212 | ||||
-rw-r--r-- | kcontrol/smartcard/smartcard.h | 89 | ||||
-rw-r--r-- | kcontrol/smartcard/smartcardbase.ui | 310 |
7 files changed, 1112 insertions, 0 deletions
diff --git a/kcontrol/smartcard/Makefile.am b/kcontrol/smartcard/Makefile.am new file mode 100644 index 000000000..61d49dfb2 --- /dev/null +++ b/kcontrol/smartcard/Makefile.am @@ -0,0 +1,17 @@ +AM_CPPFLAGS = $(all_includes) +kde_module_LTLIBRARIES = kcm_smartcard.la + +kcm_smartcard_la_SOURCES = smartcard.cpp smartcardbase.ui nosmartcardbase.ui smartcard.skel + +kcm_smartcard_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined + +kcm_smartcard_la_LIBADD = -ltdeui -lksmartcard $(LIB_TDEIO) + +METASOURCES = AUTO + +noinst_HEADERS = smartcard.h + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kcmsmartcard.pot + +xdg_apps_DATA = smartcard.desktop diff --git a/kcontrol/smartcard/configure.in.in b/kcontrol/smartcard/configure.in.in new file mode 100644 index 000000000..e7e3ba1df --- /dev/null +++ b/kcontrol/smartcard/configure.in.in @@ -0,0 +1,3 @@ + +KDE_CHECK_HEADER(kcarddb.h, FOUND_KSMCARD="yes", FOUND_KSMCARD="no") +AM_CONDITIONAL(include_kcontrol_smartcard, test "$FOUND_KSMCARD" = "yes") diff --git a/kcontrol/smartcard/nosmartcardbase.ui b/kcontrol/smartcard/nosmartcardbase.ui new file mode 100644 index 000000000..ceaec9e3f --- /dev/null +++ b/kcontrol/smartcard/nosmartcardbase.ui @@ -0,0 +1,81 @@ +<!DOCTYPE UI><UI version="3.0" stdsetdef="1"> +<class>NoSmartcardBase</class> +<widget class="QWidget"> + <property name="name"> + <cstring>NoSmartcardBase</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>460</width> + <height>480</height> + </rect> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>TextLabel1</cstring> + </property> + <property name="text"> + <string><b>Unable to contact the TDE smartcard service.</b></string> + </property> + <property name="alignment"> + <set>WordBreak|AlignVCenter</set> + </property> + </widget> + <widget class="QGroupBox"> + <property name="name"> + <cstring>GroupBox1</cstring> + </property> + <property name="title"> + <string>Possible Reasons</string> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>TextLabel1_2</cstring> + </property> + <property name="text"> + <string> +1) The TDE daemon, 'kded' is not running. You can restart it by running the command 'tdeinit' and then try reloading the TDE Control Center to see if this message goes away. + +2) You don't appear to have smartcard support in the TDE libraries. You will need to recompile the tdelibs package with libpcsclite installed.</string> + </property> + <property name="alignment"> + <set>WordBreak|AlignVCenter</set> + </property> + </widget> + </vbox> + </widget> + <spacer> + <property name="name" stdset="0"> + <cstring>Spacer5</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </vbox> +</widget> +<includes> + <include location="local" impldecl="in implementation">kdialog.h</include> +</includes> +<layoutdefaults spacing="3" margin="6"/> +<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +</UI> diff --git a/kcontrol/smartcard/smartcard.cpp b/kcontrol/smartcard/smartcard.cpp new file mode 100644 index 000000000..f0891db16 --- /dev/null +++ b/kcontrol/smartcard/smartcard.cpp @@ -0,0 +1,400 @@ +/** + * smartcard.cpp + * + * Copyright (c) 2001 George Staikos <staikos@kde.org> + * Copyright (c) 2001 Fernando Llobregat <fernando.llobregat@free.fr> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> + +#include <dcopclient.h> + +#include <tdeaboutdata.h> +#include <tdeapplication.h> +#include <kcarddb.h> +#include <kcardfactory.h> +#include <kcardgsm_impl.h> +#include <tdeconfig.h> +#include <kdebug.h> +#include <kdialog.h> +#include <tdeglobal.h> +#include <tdelistview.h> +#include <tdelocale.h> +#include <tdemessagebox.h> +#include <tdepopupmenu.h> + +#include "smartcard.h" + +KSmartcardConfig::KSmartcardConfig(TQWidget *parent, const char *name) + : TDECModule(parent, name),DCOPObject(name) +{ + + TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); + config = new TDEConfig("ksmartcardrc", false, false); + + DCOPClient *dc = TDEApplication::kApplication()->dcopClient(); + + _ok = false; + dc->remoteInterfaces("kded", "kardsvc", &_ok); + + TDEAboutData *about = + new TDEAboutData(I18N_NOOP("kcmsmartcard"), I18N_NOOP("TDE Smartcard Control Module"), + 0, 0, TDEAboutData::License_GPL, + I18N_NOOP("(c) 2001 George Staikos")); + + about->addAuthor("George Staikos", 0, "staikos@kde.org"); + setAboutData( about ); + + if (_ok) { + + + base = new SmartcardBase(this); + layout->add(base); + + _popUpKardChooser = new TDEPopupMenu(this,"KpopupKardChooser"); + _popUpKardChooser->insertItem(i18n("Change Module..."), + this, + TQT_SLOT(slotLaunchChooser())); + // The config backend + + connect(base->launchManager, TQT_SIGNAL(clicked()), TQT_SLOT( changed() )); + connect(base->beepOnInsert, TQT_SIGNAL(clicked()), TQT_SLOT( changed() )); + connect(base->enableSupport, TQT_SIGNAL(clicked()), TQT_SLOT( changed() )); + + + connect(base->enablePolling, TQT_SIGNAL(clicked()), TQT_SLOT( changed() )); + connect(base->_readerHostsListView, + TQT_SIGNAL(rightButtonPressed(TQListViewItem *,const TQPoint &,int)), + this, + TQT_SLOT(slotShowPopup(TQListViewItem *,const TQPoint &,int))); + + + + if (!connectDCOPSignal("", + "", + "signalReaderListChanged(TQStringList)", + "loadReadersTab(TQStringList)", + FALSE)) + + kdDebug()<<"Error connecting to DCOP server" <<endl; + + + if (!connectDCOPSignal("", + "", + "signalCardStateChanged(TQString,bool,TQString)", + "updateReadersState (TQString,bool,TQString) ", + FALSE)) + + kdDebug()<<"Error connecting to DCOP server" <<endl; + _cardDB= new KCardDB(); + load(); + } else { + layout->add(new NoSmartcardBase(this)); + } +} + + + + +KSmartcardConfig::~KSmartcardConfig() +{ + delete config; + delete _cardDB; +} + +void KSmartcardConfig::slotLaunchChooser(){ + + + if ( KCardDB::launchSelector(base->_readerHostsListView->currentItem()->parent()->text(0))){ + + KMessageBox::sorry(this,i18n("Unable to launch KCardChooser")); + } + + +} + +void KSmartcardConfig::slotShowPopup(TQListViewItem * item ,const TQPoint & _point,int i) +{ + + //The popup only appears in cards, not in the slots1 + if (item->isSelectable()) return; + _popUpKardChooser->exec(_point); + +} + + +void KSmartcardConfig::updateReadersState (TQString readerName, + bool isCardPresent, + TQString atr) { + + TDEListViewItem * tID=(TDEListViewItem *) base->_readerHostsListView->findItem(readerName, 0); + if (tID==0) return; + + TDEListViewItem * tIDChild=(TDEListViewItem*) tID->firstChild(); + if (tIDChild==NULL) return; + + delete tIDChild; + + if (!isCardPresent) + (void) new TDEListViewItem(tID,i18n("No card inserted")); + else{ + + getSupportingModule(tID,atr); + } + + +} + + + +void KSmartcardConfig::loadReadersTab( TQStringList lr){ + + //Prepare data for dcop calls + TQByteArray data, retval; + TQCString rettype; + TQDataStream arg(data, IO_WriteOnly); + TQCString modName = "kardsvc"; + arg << modName; + + // New view items + TDEListViewItem * temp; + + //If the smartcard support is disabled we unload the kardsvc KDED module + // and return + + base->_readerHostsListView->clear(); + + if (!config->readBoolEntry("Enable Support", false)){ + + + + + // New view items + TDEListViewItem * temp; + kapp->dcopClient()->call("kded", "kded", "unloadModule(TQCString)", + data, rettype, retval); + + (void) new TDEListViewItem(base->_readerHostsListView, + i18n("Smart card support disabled")); + + + return; + + } + + if (lr.isEmpty()){ + + + (void) new TDEListViewItem(base->_readerHostsListView, + i18n("No readers found. Check 'pcscd' is running")); + return; + } + + for (TQStringList::Iterator _slot=lr.begin();_slot!=lr.end();++_slot){ + + temp= new TDEListViewItem(base->_readerHostsListView,*_slot); + + + TQByteArray dataATR; + TQDataStream argATR(dataATR,IO_WriteOnly); + argATR << *_slot; + + kapp->dcopClient()->call("kded", "kardsvc", "getCardATR(TQString)", + dataATR, rettype, retval); + + + TQString cardATR; + TQDataStream retReaderATR(retval, IO_ReadOnly); + retReaderATR>>cardATR; + + if (cardATR.isNull()){ + + (void) new TDEListViewItem(temp,i18n("NO ATR or no card inserted")); + continue; + } + + getSupportingModule(temp,cardATR); + + + + + } + +} + + +void KSmartcardConfig::getSupportingModule( TDEListViewItem * ant, + TQString & cardATR) const{ + + + if (cardATR.isNull()){ + + (void) new TDEListViewItem(ant,i18n("NO ATR or no card inserted")); + return; + } + + + TQString modName=_cardDB->getModuleName(cardATR); + if (!modName.isNull()){ + TQStringList mng= TQStringList::split(",",modName); + TQString type=mng[0]; + TQString subType=mng[1]; + TQString subSubType=mng[2]; + TDEListViewItem * hil =new TDEListViewItem(ant, + i18n("Managed by: "), + type, + subType, + subSubType); + hil->setSelectable(FALSE); + } + else{ + + + TDEListViewItem * hil =new TDEListViewItem(ant, + i18n("No module managing this card")); + hil->setSelectable(FALSE); + } + + } +void KSmartcardConfig::load() +{ + load( false ); + +void KSmartcardConfig::load(bool useDefaults ) +{ + + //Prepare data for dcop calls + TQByteArray data, retval; + TQCString rettype; + TQDataStream arg(data, IO_WriteOnly); + TQCString modName = "kardsvc"; + arg << modName; + + //Update the toggle buttons with the current configuration + + config->setReadDefaults( useDefaults ); + + if (_ok) { + base->enableSupport->setChecked(config->readBoolEntry("Enable Support", + false)); + base->enablePolling->setChecked(config->readBoolEntry("Enable Polling", + true)); + base->beepOnInsert->setChecked(config->readBoolEntry("Beep on Insert", + true)); + base->launchManager->setChecked(config->readBoolEntry("Launch Manager", + true)); + } + + // We call kardsvc to retrieve the current readers + kapp->dcopClient()->call("kded", "kardsvc", "getSlotList ()", + data, rettype, retval); + TQStringList readers; + readers.clear(); + TQDataStream retReader(retval, IO_ReadOnly); + retReader>>readers; + + //And we update the panel + loadReadersTab(readers); + + emit changed(useDefaults); + +} + + +void KSmartcardConfig::save() +{ +if (_ok) { + config->writeEntry("Enable Support", base->enableSupport->isChecked()); + config->writeEntry("Enable Polling", base->enablePolling->isChecked()); + config->writeEntry("Beep on Insert", base->beepOnInsert->isChecked()); + config->writeEntry("Launch Manager", base->launchManager->isChecked()); + + + TQByteArray data, retval; + TQCString rettype; + TQDataStream arg(data, IO_WriteOnly); + TQCString modName = "kardsvc"; + arg << modName; + + // Start or stop the server as needed + if (base->enableSupport->isChecked()) { + + kapp->dcopClient()->call("kded", "kded", "loadModule(TQCString)", + data, rettype, retval); + config->sync(); + + kapp->dcopClient()->call("kded", "kardsvc", "reconfigure()", + data, rettype, retval); + } else { + + + + kapp->dcopClient()->call("kded", "kded", "unloadModule(TQCString)", + data, rettype, retval); + } + + +} + emit changed(false); +} + +void KSmartcardConfig::defaults() +{ + load( true ); +} + + + +TQString KSmartcardConfig::quickHelp() const +{ + return i18n("<h1>smartcard</h1> This module allows you to configure TDE support" + " for smartcards. These can be used for various tasks such as storing" + " SSL certificates and logging in to the system."); +} + +extern "C" +{ + KDE_EXPORT TDECModule *create_smartcard(TQWidget *parent, const char *) + { + return new KSmartcardConfig(parent, "kcmsmartcard"); + } + + KDE_EXPORT void init_smartcard() + { + TDEConfig *config = new TDEConfig("ksmartcardrc", false, false); + bool start = config->readBoolEntry("Enable Support", false); + delete config; + + if (start) { + TQByteArray data, retval; + TQCString rettype; + TQDataStream arg(data, IO_WriteOnly); + TQCString modName = "kardsvc"; + arg << modName; + kapp->dcopClient()->call("kded", "kded", "loadModule(TQCString)", + data, rettype, retval); + } + } +} + + +#include "smartcard.moc" + diff --git a/kcontrol/smartcard/smartcard.desktop b/kcontrol/smartcard/smartcard.desktop new file mode 100644 index 000000000..600aea709 --- /dev/null +++ b/kcontrol/smartcard/smartcard.desktop @@ -0,0 +1,212 @@ +[Desktop Entry] +Icon=identity +Type=Application +Exec=tdecmshell smartcard +DocPath=kcontrol/smartcard.html + +X-TDE-Library=smartcard +X-TDE-Init=smartcard +X-TDE-ParentApp=kcontrol +Name=Smartcards +Name[af]=Smartkaarte +Name[ar]=البطاقات الذكية +Name[be]=Смарткарткі +Name[bn]=স্মার্টকার্ড +Name[ca]=Targetes intel·ligents +Name[csb]=Kartë bezpiekù +Name[el]=Έξυπνες κάρτες +Name[eo]=Memorkartoj +Name[et]=Kiipkaardid +Name[eu]=Txartel adimendunak +Name[fa]=کارتهای هوشمند +Name[fi]=Älykortit +Name[fr]=Cartes à puce +Name[fy]=Chipkaarten +Name[ga]=Cártaí Cliste +Name[he]=כרטיסים חכמים +Name[hi]=स्मार्टकार्ड +Name[hu]=Smartcard-beállítások +Name[is]=Snjallkort +Name[it]=Smartcard +Name[ja]=スマートカード +Name[ka]=სხარტი ბარათები +Name[kk]=Смарт-карталар +Name[ko]=스마트카드 +Name[lo]=ສະມາດຄາດ +Name[lt]=Gudrios kortelės +Name[lv]=Smartkartes +Name[mk]=Паметни картички +Name[ms]=Kad pintar +Name[nb]=Smartkort +Name[nds]=Smartkoorten +Name[ne]=स्मार्टकार्ड +Name[nl]=Chipkaarten +Name[nn]=Smartkort +Name[nso]=Dikarata ye botsana +Name[pa]=ਸਮਾਟ-ਕਾਰਡ +Name[pl]=Karty bezpieczeństwa +Name[pt_BR]=Smart Cards +Name[ro]=Smartcard-uri +Name[ru]=Смарткарты +Name[rw]=Amakaritarukuruzi +Name[se]=Jierbmásgoarttat +Name[sk]=Smartcard +Name[sl]=Pametne kartice +Name[sr]=Smart картице +Name[sr@Latn]=Smart kartice +Name[ss]=Smartcards +Name[sv]=Smartkort +Name[ta]=ஸ்மார்ட்கார்டுகள் +Name[te]=స్మార్ట్ కార్డులు +Name[tg]=Кортҳои боҳуш +Name[th]=สมาร์ทการ์ด +Name[tr]=Smartcard +Name[tt]=Smartkard +Name[uk]=Смарт-карти +Name[uz]=Smartcard'lar +Name[uz@cyrillic]=Smartcard'лар +Name[ven]=Garata +Name[vi]=Thẻ thông minh +Name[zh_CN]=智能卡 +Name[zh_TW]=智慧卡 +Name[zu]=Amakhadi akhaliphile +Comment=Configure smartcard support +Comment[af]=Konfigureer smartkaart ondersteun +Comment[ar]=إعداد دعم البطاقات الذكية +Comment[az]=Smartcard dəstəyini quraşdır +Comment[be]=Настаўленні падтрымкі смарткартак +Comment[bg]=Настройване поддръжката на smartcard +Comment[bn]=স্মার্টকার্ড সেটিংস কনফিগার করুন +Comment[bs]=Podesite podršku za smartcard +Comment[ca]=Configura el funcionament de les targetes intel·ligents +Comment[cs]=Nastavení podpory smartcards +Comment[csb]=Kònfigùracëjô kartów bezpiekù (SmartCards) +Comment[cy]=Ffurfweddu cynhaliaeth cerdyn smart +Comment[da]=Indstil smartcard-understøttelse +Comment[de]=Smartcard-Unterstützung einrichten +Comment[el]=Ρύθμιση υποστήριξης έξυπνων καρτών +Comment[eo]=Agordi subtenon por memorkartoj +Comment[es]=Configuración del soporte para tarjetas Smart +Comment[et]=Kiipkaardi toetuse seadistamine +Comment[eu]=Konfiguratu txartel adimendunen euskarria +Comment[fa]=پیکربندی پشتیبانی کارت هوشمند +Comment[fi]=Smartcard-tuki +Comment[fr]=Configuration de la gestion des cartes à puce +Comment[fy]=Chipkaartstipe ynstelle +Comment[ga]=Cumraigh tacaíocht do Chártaí Cliste +Comment[gl]=Configurar o soporte para smartcard +Comment[he]=שינוי הגדרות התמיכה בכרטיסים חכמים +Comment[hi]=स्मार्ट-कार्ड समर्थन कॉन्फ़िगर करें +Comment[hr]=Konfiguriranje smartcard podrške +Comment[hu]=A smartcard-támogatás beállításai +Comment[is]=Stilla stuðning við snjallkort +Comment[it]=Configura supporto smartcard +Comment[ja]=スマートカードサポートの設定 +Comment[kk]=Смарт-карталарды қолдауын баптау +Comment[km]=កំណត់រចនាសម្ព័ន្ធការគាំទ្រ Smartcard +Comment[ko]=스마트카드 지원 설정 +Comment[lo]=ປັບແຕ່ງການສະຫນັບສະຫນູນສະມາດຄາດ +Comment[lt]=Konfigūruoti gudrių kortelių palaikymą +Comment[lv]=Konfigurēt smārtkaršu atbalstu +Comment[mk]=Конфигурирајте ја поддршката за паметни картички +Comment[mn]=Smartcard дэмжилэг тохируулах +Comment[ms]=Konfigur sokongan kad pintar +Comment[mt]=Ikkonfigura s-sapport għal "smartcards" +Comment[nb]=Oppsett av smartkortstøtte +Comment[nds]=Ünnerstütten för Smartkoorten inrichten +Comment[ne]=स्मार्टकार्ड समर्थन कन्फिगर गर्नुहोस् +Comment[nl]=Chipkaartondersteuning instellen +Comment[nn]=Oppsett av smartkortstøtte +Comment[nso]=Beakanya thekgo ya karata ye botsana +Comment[pa]=ਸਮਾਟ-ਕਾਰਡ ਸਹਾਇਤਾ ਸੰਰਚਨਾ +Comment[pl]=Konfiguracja kart bezpieczeństwa (SmartCards) +Comment[pt]=Configurar o suporte de 'smartcards' +Comment[pt_BR]=Configurar suporte a Smart Cards +Comment[ro]=Configurează suportul pentru smartcard-uri +Comment[ru]=Настройка поддержки смарткарт +Comment[rw]=Kuboneza iyifashisha rya karitarukuruzi +Comment[se]=Heivet jierbmásgoartadoarjja +Comment[sk]=Nastavenie podpory smartcard +Comment[sl]=Nastavi podporo pametnih kartic +Comment[sr]=Подешавање подршке за smart картице +Comment[sr@Latn]=Podešavanje podrške za smart kartice +Comment[sv]=Anpassa stöd för smartkort +Comment[ta]=ஸ்மார்ட் கார்டு ஆதரவை அமை +Comment[tg]=Танзими пуштибонӣ аз кортҳои боҳуш +Comment[th]=ปรับแต่งการสนับสนุนสมาร์ตการ์ด +Comment[tr]=Smartcard desteğini yapılandır +Comment[tt]=Smartkard totıluın caylaw +Comment[uk]=Налаштування підтримки смарт-карт +Comment[uz]=Smartcard'ni moslash +Comment[uz@cyrillic]=Smartcard'ни мослаш +Comment[ven]=Dzudzanyani thikhedzo ya garata +Comment[vi]=Cấu hình các hỗ trợ thẻ thông minh +Comment[wa]=Apontiaedjes so sopoirt di smartcard +Comment[xh]=Qwalasela inkxaso ye smartcard +Comment[zh_CN]=配置智能卡支持 +Comment[zh_TW]=設定智慧卡 (SmartCard) 支援 +Comment[zu]=Hlanganisela ukuxhaswa kwekhadi elikhaliphile +Keywords=Smartcard,PKCS,SSL,reader,smart,card +Keywords[ar]=بطاقة ذكية,PKCS,SSL,قارئ,ذكية,بطاقة +Keywords[be]=Смарткарта,Смарткартка,Чытач,Карта,Смарт,Smartcard,PKCS,SSL,reader,smart,card +Keywords[bg]=карти, поддръжка, Smartcard, PKCS, SSL, reader, smart, card +Keywords[ca]=Targeta intel·ligent,PKCS,SSL,lector,smart,targeta +Keywords[csb]=Smartcard,PKCS,SSL,czëtôrz,bezpiek,karta +Keywords[cy]=Smartcard,PKCS,SSL,darllenydd,smart,cerdyn +Keywords[da]=Smartcard,PKCS,SSL,læser,smart,card +Keywords[de]=Smartcard,PKCS,SSL,Reader,Smart,Card,Leser +Keywords[el]=Έξυπνη κάρτα,PKCS,SSL,αναγνώστης,έξυπνη,κάρτα +Keywords[eo]=Memorkarto,PKCS,SSL,legilo,memoro,karto +Keywords[es]=Smartcard,PKCS,SSL,lector,smart,tarjeta +Keywords[et]=Smartcard,PKCS,SSL,lugeja,kiipkaart,kaart,kiip +Keywords[eu]=Txartel adimenduna,PKCS,SSL,irakurgailua,adimenduna,txartela +Keywords[fa]=کارت هوشمند، PKCS، SSL، خواننده، هوشمند، کارت +Keywords[fi]=Älykortti,PKCS,SSL,lukija +Keywords[fr]=carte à puce,puce,smartcard,pkcs,ssl,lecteur,carte +Keywords[fy]=Smartcard,PKCS,SSL,reader,smart,card,chipkaart,kaart +Keywords[ga]=Smartcard,PKCS,SSL,léitheoir,cliste,cárta +Keywords[gl]=Smartcard,PKCS,SSL,lector,pequena,tarxeta +Keywords[he]=כרטיסים חכמים,PKCS,SSL,קורא,כרטיס,חכם, Smartcard,reader,smart,card +Keywords[hi]=स्मार्टकार्ड,पीकेसीएस,एसएसएल,रीडर,स्मार्ट,कार्ड +Keywords[hr]=Smartcard,PKCS,SSL,reader,smart,card,čitač,kartica +Keywords[hu]=smartcard,PKCS,SSL,olvasó,smart,kártya +Keywords[is]=Snjallkort,PKCS,SSL,reader,smart,card,snjall,kort +Keywords[it]=smartcard,PKCS,SSL,lettore +Keywords[ja]=スマートカード,PKCS,SSL,リーダー,スマート,カード +Keywords[km]=Smartcard,PKCS,SSL,ឧបករណ៍អាន,smart,ប័ណ្ណ +Keywords[lt]=Smartcard,PKCS,SSL,reader,smart,card, gudri kortelė,skaitytuvas,gudri,kortelė +Keywords[mk]=Smartcard,PKCS,SSL,reader,smart,card,паметна картичка,читач,паметна,картичка +Keywords[mn]=Smartcard,PKCS,SSL,Reader,Smart,Card,Уншигч +Keywords[nb]=smartkort,PKCS,SSL,leser,smart,kort +Keywords[nds]=Smartcard,PKCS,SSL,Leser,smart,card,Koort,Koorten +Keywords[ne]=स्मार्टकार्ड,PKCS,SSL, रिडर, छरितो, कार्ड +Keywords[nl]=Smartcard,PKCS,SSL,reader,smart,card,chipkaart,kaart +Keywords[nn]=smartkort,PKCS,SSL,lesar,smart,kort +Keywords[nso]=Karata ye botsana,PKCS,SSL,mmadi,botsana,karata +Keywords[pa]=Smartcard,PKCS,SSL,reader,smart,card, ਰੀਡਰ, ਕਾਰਡ, ਸਮਾਟ +Keywords[pl]=Smartcard,PKCS,SSL,czytnik,bezpieczeństwo,karta +Keywords[pt]=smartcard,PKCS,SSL,leitor,smart,placa +Keywords[pt_BR]=Smart Card,PKCS,SSL,leitor,smart,card +Keywords[ro]=smartcard,PKCS,SSL,cititor,smart,card +Keywords[rw]=Ikaritarukuruzi,PKCS,SSL,cyiza,ikarita +Keywords[se]=jierbmásgoarta,PKCS,SSL,logan,jierbmái,goarta +Keywords[sk]=Smartcard,PKCS,SSL,čítačka,karta,inteligentná +Keywords[sl]=Smartcard,PKCS,SSL,bralnik,pamet,kartica +Keywords[sr]=Smartcard,PKCS,SSL,reader,читач,smart,card,картица +Keywords[sr@Latn]=Smartcard,PKCS,SSL,reader,čitač,smart,card,kartica +Keywords[sv]=Smartkort,PKCS,SSL,läsare,smart,kort +Keywords[ta]=ஸ்மார்ட்கார்டு,PKCS,SSL,படிப்பான்,புத்திசாலி,அட்டை +Keywords[th]=สมาร์ตการ์ด,PKCS,SSL,เครื่องอ่าน,ฉลาด,การ์ด +Keywords[tr]=Smartcard,PKCS,SSL,okuyucu,smart,kart,akıllıkart +Keywords[uk]=Smartcard,PKCS,SSL,смарт-карта,зчитувач,картка +Keywords[uz]=Smartcard,PKCS,SSL,oʻquvchi,smart,card +Keywords[uz@cyrillic]=Smartcard,PKCS,SSL,ўқувчи,smart,card +Keywords[ven]=Garata,PKCS,SSL,muvhali,zwavhudi,Garata +Keywords[vi]=Thẻ thông minh,PKCS,SSL,đầu đọc,thông minh,thẻ +Keywords[wa]=Smartcard,PKCS,SSL,léjheu,smart,card +Keywords[xh]=Smartcard,PKCS,SSL,umfundi,bukeka,ikhadi +Keywords[zh_CN]=Smartcard,PKCS,SSL,reader,smart,card,智能卡,智能,卡,读卡器 +Keywords[zh_TW]=Smartcard,PKCS,SSL,reader,smart,card,智慧卡,閱讀器,智慧,卡 +Keywords[zu]=Ikhadi elikhaliphile,PKCS,SSLumfundi,okukhaliphile,ikhadi + +Categories=Qt;TDE;X-TDE-settings-peripherals; diff --git a/kcontrol/smartcard/smartcard.h b/kcontrol/smartcard/smartcard.h new file mode 100644 index 000000000..7cb90478e --- /dev/null +++ b/kcontrol/smartcard/smartcard.h @@ -0,0 +1,89 @@ +/** + * smartcard.h + * + * Copyright (c) 2001 George Staikos <staikos@kde.org> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef _KCM_SMARTCARD_H +#define _KCM_SMARTCARD_H + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <dcopobject.h> + +#include <tdecmodule.h> + +#include "smartcardbase.h" +#include "nosmartcardbase.h" + +class TDEConfig; +class KCardDB; +class TDEPopupMenu; +class TDEListViewItem; + +class KSmartcardConfig : public TDECModule, public DCOPObject +{ + K_DCOP + Q_OBJECT + + +public: + KSmartcardConfig(TQWidget *parent = 0L, const char *name = 0L); + virtual ~KSmartcardConfig(); + + SmartcardBase *base; + + void load(); + void load( bool useDefaults); + void save(); + void defaults(); + + int buttons(); + TQString quickHelp() const; + + k_dcop: + + + void updateReadersState (TQString readerName, + bool isCardPresent, + TQString atr); + void loadReadersTab (TQStringList lr); + + private slots: + + void slotShowPopup(TQListViewItem * item ,const TQPoint & _point,int i); + void slotLaunchChooser(); + + + +private: + + TDEConfig *config; + bool _ok; + KCardDB * _cardDB; + TDEPopupMenu * _popUpKardChooser; + + void getSupportingModule( TDEListViewItem * ant, + TQString & cardATR) const ; + + +}; + +#endif + diff --git a/kcontrol/smartcard/smartcardbase.ui b/kcontrol/smartcard/smartcardbase.ui new file mode 100644 index 000000000..e7a3344ce --- /dev/null +++ b/kcontrol/smartcard/smartcardbase.ui @@ -0,0 +1,310 @@ +<!DOCTYPE UI><UI version="3.0" stdsetdef="1"> +<class>SmartcardBase</class> +<widget class="QWidget"> + <property name="name"> + <cstring>SmartcardBase</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>519</width> + <height>356</height> + </rect> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QTabWidget" row="0" column="0"> + <property name="name"> + <cstring>TabWidget2</cstring> + </property> + <property name="enabled"> + <bool>true</bool> + </property> + <widget class="QWidget"> + <property name="name"> + <cstring>tab</cstring> + </property> + <attribute name="title"> + <string>Smartcard Support</string> + </attribute> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QCheckBox" row="0" column="0"> + <property name="name"> + <cstring>enableSupport</cstring> + </property> + <property name="text"> + <string>&Enable smartcard support</string> + </property> + </widget> + <widget class="QLayoutWidget" row="1" column="0"> + <property name="name"> + <cstring>Layout2</cstring> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QCheckBox" row="0" column="1"> + <property name="name"> + <cstring>enablePolling</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Enable &polling to autodetect card events</string> + </property> + <property name="whatsThis" stdset="0"> + <string>In most cases you should have this enabled. It allows TDE to automatically detect card insertion and reader hotplug events.</string> + </property> + </widget> + <spacer row="0" column="0" rowspan="3" colspan="1"> + <property name="name" stdset="0"> + <cstring>Spacer3</cstring> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + <property name="sizeType"> + <enum>Fixed</enum> + </property> + <property name="sizeHint"> + <size> + <width>15</width> + <height>20</height> + </size> + </property> + </spacer> + <widget class="QCheckBox" row="2" column="1"> + <property name="name"> + <cstring>launchManager</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>Automatically &launch card manager if inserted card is unclaimed</string> + </property> + <property name="whatsThis" stdset="0"> + <string>When you insert a smartcard, TDE can automatically launch a management tool if no other application attempts to use the card.</string> + </property> + </widget> + <widget class="QCheckBox" row="1" column="1"> + <property name="name"> + <cstring>beepOnInsert</cstring> + </property> + <property name="enabled"> + <bool>false</bool> + </property> + <property name="text"> + <string>&Beep on card insert and removal</string> + </property> + </widget> + </grid> + </widget> + <spacer row="2" column="0"> + <property name="name" stdset="0"> + <cstring>Spacer4</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </grid> + </widget> + <widget class="QWidget"> + <property name="name"> + <cstring>tab</cstring> + </property> + <attribute name="title"> + <string>Readers</string> + </attribute> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QLayoutWidget" row="0" column="0"> + <property name="name"> + <cstring>Layout3</cstring> + </property> + <vbox> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="TDEListView"> + <column> + <property name="text"> + <string>Reader</string> + </property> + <property name="clickable"> + <bool>true</bool> + </property> + <property name="resizeable"> + <bool>true</bool> + </property> + </column> + <column> + <property name="text"> + <string>Type</string> + </property> + <property name="clickable"> + <bool>true</bool> + </property> + <property name="resizeable"> + <bool>true</bool> + </property> + </column> + <column> + <property name="text"> + <string>Subtype</string> + </property> + <property name="clickable"> + <bool>true</bool> + </property> + <property name="resizeable"> + <bool>true</bool> + </property> + </column> + <column> + <property name="text"> + <string>SubSubtype</string> + </property> + <property name="clickable"> + <bool>true</bool> + </property> + <property name="resizeable"> + <bool>true</bool> + </property> + </column> + <property name="name"> + <cstring>_readerHostsListView</cstring> + </property> + <property name="rootIsDecorated"> + <bool>true</bool> + </property> + </widget> + <widget class="Line"> + <property name="name"> + <cstring>Line1</cstring> + </property> + <property name="frameShape" stdset="0"> + <enum>HLine</enum> + </property> + <property name="frameShadow"> + <enum>Sunken</enum> + </property> + <property name="orientation"> + <enum>Horizontal</enum> + </property> + </widget> + <widget class="QGroupBox"> + <property name="name"> + <cstring>GroupBox3</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>1</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>PCSCLite Configuration</string> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>TextLabel2</cstring> + </property> + <property name="geometry"> + <rect> + <x>10</x> + <y>20</y> + <width>380</width> + <height>40</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>1</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>To add new readers you have to modify /etc/readers.conf file and re-start pcscd</string> + </property> + <property name="alignment"> + <set>WordBreak|AlignVCenter</set> + </property> + </widget> + </widget> + </vbox> + </widget> + </grid> + </widget> + </widget> + </grid> +</widget> +<connections> + <connection> + <sender>enableSupport</sender> + <signal>toggled(bool)</signal> + <receiver>enablePolling</receiver> + <slot>setEnabled(bool)</slot> + </connection> + <connection> + <sender>enableSupport</sender> + <signal>toggled(bool)</signal> + <receiver>beepOnInsert</receiver> + <slot>setEnabled(bool)</slot> + </connection> + <connection> + <sender>enableSupport</sender> + <signal>toggled(bool)</signal> + <receiver>launchManager</receiver> + <slot>setEnabled(bool)</slot> + </connection> + <connection> + <sender>enableSupport</sender> + <signal>toggled(bool)</signal> + <receiver>SmartcardBase</receiver> + <slot>enableSupport_toggled(bool)</slot> + </connection> + <connection> + <sender>enablePolling</sender> + <signal>toggled(bool)</signal> + <receiver>SmartcardBase</receiver> + <slot>enablePolling_toggled(bool)</slot> + </connection> +</connections> +<includes> + <include location="local" impldecl="in implementation">smartcardbase.ui.h</include> +</includes> +<Q_SLOTS> + <slot>slotTestReader()</slot> + <slot>enableSupport_toggled(bool)</slot> + <slot>enablePolling_toggled(bool)</slot> +</Q_SLOTS> +<includes> + <include location="local" impldecl="in implementation">kdialog.h</include> +</includes> +<layoutdefaults spacing="3" margin="6"/> +<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/> +</UI> |