Git commit bfde0d022e89f14bce985412efc3c79b1847beae by Harald Sitter. Committed on 12/10/2021 at 11:28. Pushed by sitter into branch 'master'.
drop ieee1394 support bit of an oddball kcm at this point - firewire has largely been abandoned in favor of usb3/thunderbolt - there is no actually maintained cli tooling for it so it can't become a cli module, which is a bit meh cause CLI is the future :tm: - it's unclear if this still works because there appears to be no way to synthesize a device on the kernel level or a VM level so unless someone has a port and suitable device this entire kcm is effectively untestable M +0 -11 Modules/CMakeLists.txt D +0 -15 Modules/view1394/CMakeLists.txt D +0 -3 Modules/view1394/Messages.sh D +0 -10 Modules/view1394/README D +0 -240 Modules/view1394/kcmview1394.desktop D +0 -321 Modules/view1394/view1394.cpp D +0 -66 Modules/view1394/view1394.h D +0 -173 Modules/view1394/view1394widget.ui D +0 -20 cmake/FindRAW1394.cmake M +0 -29 doc/index.docbook https://invent.kde.org/plasma/kinfocenter/commit/bfde0d022e89f14bce985412efc3c79b1847beae diff --git a/Modules/CMakeLists.txt b/Modules/CMakeLists.txt index 32f50c2f..cfe96425 100644 --- a/Modules/CMakeLists.txt +++ b/Modules/CMakeLists.txt @@ -13,17 +13,6 @@ add_subdirectory(pci) add_subdirectory( samba ) add_subdirectory( nics ) -find_package(RAW1394 MODULE) -set_package_properties(RAW1394 PROPERTIES DESCRIPTION "library for direct access to IEEE 1394 bus" - URL "https://ieee1394.wiki.kernel.org/index.php/Main_Page" - TYPE OPTIONAL - PURPOSE "View FireWire devices in kinfocenter." - ) - -if(RAW1394_FOUND) - add_subdirectory( view1394 ) -endif() - find_package(USB1 MODULE) set_package_properties(USB1 PROPERTIES DESCRIPTION "library that provides generic access to USB devicess" URL "https://libusb.info/" diff --git a/Modules/view1394/CMakeLists.txt b/Modules/view1394/CMakeLists.txt deleted file mode 100644 index 60d4d666..00000000 --- a/Modules/view1394/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# KI18N Translation Domain for this library -add_definitions(-DTRANSLATION_DOMAIN=\"kcmview1394\") - - -########### next target ############### - -set(kcm_view1394_PART_SRCS view1394.cpp ) - - -ki18n_wrap_ui(kcm_view1394_PART_SRCS view1394widget.ui ) - -kcoreaddons_add_plugin(kcm_view1394 SOURCES ${kcm_view1394_PART_SRCS} INSTALL_NAMESPACE "plasma/kcms/kinfocenter") -kcoreaddons_desktop_to_json(kcm_view1394 "kcmview1394.desktop") - -target_link_libraries(kcm_view1394 KF5::KCMUtils KF5::I18n ${RAW1394_LIBRARIES} ) diff --git a/Modules/view1394/Messages.sh b/Modules/view1394/Messages.sh deleted file mode 100644 index e7e5e79c..00000000 --- a/Modules/view1394/Messages.sh +++ /dev/null @@ -1,3 +0,0 @@ -#! /usr/bin/env bash -$EXTRACTRC *.ui >> rc.cpp -$XGETTEXT *.cpp -o $podir/kcmview1394.pot diff --git a/Modules/view1394/README b/Modules/view1394/README deleted file mode 100644 index 1c06c412..00000000 --- a/Modules/view1394/README +++ /dev/null @@ -1,10 +0,0 @@ -this kcontrol module shows the current configuration of the IEEE 1394 bus. -It uses libraw1394 (see www.linux1394.org). I don't know how the 1394 apis -on other OS's look, feel free to port it :-) - -The file oui.txt is available from the hwdata project, installed as system -package: -https://github.com/vcrhonek/hwdata - -Alex -<[email protected]> diff --git a/Modules/view1394/kcmview1394.desktop b/Modules/view1394/kcmview1394.desktop deleted file mode 100644 index 84652f9a..00000000 --- a/Modules/view1394/kcmview1394.desktop +++ /dev/null @@ -1,240 +0,0 @@ -[Desktop Entry] -Icon=camera-web -Type=Service -X-KDE-ServiceTypes=KCModule -Exec=kinfocenter kcmview1394 - -X-KDE-KInfoCenter-Category=device_information -X-KDE-Library=kcm_view1394 -X-KDE-ParentApp=kinfocenter -X-DocPath=kinfocenter/kcmview1394.html - -Name=IEEE 1394 Devices -Name[af]=IEEE 1394 toestelle -Name[ar]=أجهزة IEEE 1394 -Name[as]=IEEE 1394 যন্ত্ৰ -Name[ast]=Preseoss IEEE 1394 -Name[az]=IEEE 1394 Qurğuları -Name[be]=Прылады IEEE 1394 -Name[be@latin]=Pryłady IEEE 1394 -Name[bg]=Устройства IEEE 1394 -Name[bn]=IEEE 1394 Devices -Name[bn_IN]=IEEE 1394 ডিভাইস -Name[br]=Trobarzhelloù IEEE 1394 -Name[bs]=IEEE 1394 uređaji -Name[ca]=Dispositius IEEE 1394 -Name[ca@valencia]=Dispositius IEEE 1394 -Name[cs]=IEEE 1394 zařízení -Name[csb]=Ùrządzenia IEEE 1394 -Name[cy]=Dyfeisiau IEE 1394 -Name[da]=IEEE 1394-enheder -Name[de]=IEEE-1394-Geräte -Name[el]=Συσκευές IEEE 1394 -Name[en_GB]=IEEE 1394 Devices -Name[eo]=IEEE 1394 Aparatoj -Name[es]=Dispositivos IEEE 1394 -Name[et]=IEEE 1394 seadmed -Name[eu]=IEEE 1394 gailuak -Name[fa]=دستگاههای IEEE 1394 -Name[fi]=IEEE 1394 (Firewire)-laitteet -Name[fr]=Périphériques IEEE 1394 -Name[fy]=IEEE 1394-apparaten -Name[ga]=Gléasanna IEEE 1394 -Name[gl]=Dispositivos IEEE 1394 -Name[gu]=IEEE 1394 ઉપકરણો -Name[he]=התקני IEEE 1394 -Name[hi]=आईईईई 1394 औज़ार -Name[hne]=आईईईई 1394 उपकरन -Name[hr]=IEEE 1394 uređaji -Name[hsb]=IEEE 1394-graty -Name[hu]=IEEE 1394-eszközök -Name[ia]=Dispositivos IEEE 1394 -Name[id]=Perangkat IEEE 1394 -Name[is]=IEEE 1394 tæki -Name[it]=Dispositivi IEEE 1394 -Name[ja]=IEEE 1394 デバイス -Name[ka]=IEEE 1394 მოწყობილობები -Name[kk]=IEEE 1394 құрылғылар -Name[km]=ឧបករណ៍ IEEE 1394 -Name[kn]=ಐಇಇಇ 1394 ಸಾಧನಗಳು -Name[ko]=IEEE 1394 장치 -Name[ku]=Cîhazên IEEE 1394 -Name[lt]=IEEE 1394 įrenginiai -Name[lv]=IEEE 1394 (Fireware) ierīces -Name[mai]=आईईईई 1394 अओजार -Name[mk]=IEEE 1394 уреди -Name[ml]=ഐട്രിപ്പ്ള്ഇ 1394 ഉപകരണങ്ങള് -Name[mr]=IEEE 1394 साधने -Name[ms]=Peranti IEEE 1394 -Name[nb]=IEEE 1394-enheter -Name[nds]=IEEE-1394-Reedschappen -Name[ne]=IEEE 1394 यन्त्र -Name[nl]=IEEE 1394-apparaten -Name[nn]=IEEE 1394-einingar -Name[or]=IEEE 1394 ଉପକରଣଗୁଡ଼ିକ -Name[pa]=IEEE 1394 ਡਿਵਾਈਸ -Name[pl]=Urządzenia IEEE 1394 -Name[pt]=Dispositivos IEEE 1394 -Name[pt_BR]=Dispositivos IEEE 1394 -Name[ro]=Dispozitive IEEE 1394 -Name[ru]=Устройства IEEE 1394 -Name[se]=IEEE 1394-ovttadagat -Name[si]=IEEE 1394 මෙවලම් -Name[sk]=Zariadenia IEEE 1394 -Name[sl]=Naprave IEEE 1394 -Name[sr]=ИЕЕЕ 1394 уређаји -Name[sr@ijekavian]=ИЕЕЕ 1394 уређаји -Name[sr@ijekavianlatin]=IEEE 1394 uređaji -Name[sr@latin]=IEEE 1394 uređaji -Name[sv]=IEEE 1394-enheter -Name[ta]=IEEE 1394 சாதனங்கள் -Name[te]=ఐఈఈఈ 1394 పరికరాలు -Name[tg]=Дастгоҳҳои EEE 1394 -Name[th]=อุปกรณ์ IEEE 1394 -Name[tr]=IEEE 1394 Aygıtları -Name[ug]=IEEE 1394 ئۈسكۈنىلەر -Name[uk]=Пристрої IEEE 1394 -Name[uz]=IEEE 1394 uskunalar -Name[uz@cyrillic]=IEEE 1394 ускуналар -Name[vi]=Thiết bị IEEE 1394 -Name[wa]=Éndjins IEEE 1394 -Name[x-test]=xxIEEE 1394 Devicesxx -Name[zh_CN]=IEEE 1394 设备 -Name[zh_TW]=IEEE 1394 裝置 - -Comment=Attached IEEE 1394 devices -Comment[af]=Gekoppelde IEEE 1394 toestelle -Comment[ar]=أجهزة IEEE 1394 الموصولة -Comment[as]=সংযুক্ত IEEE 1394 যন্ত্ৰ -Comment[ast]=Los preseos IEEE 1394 espataos -Comment[az]=Qoşulmuş IEEE 1394 qurğuları -Comment[be@latin]=Padłučanyja pryłady IEEE 1394 -Comment[bg]=Свързани устройства IEEE 1394 -Comment[bn]=লাগানো IEEE 1394 ডিভাইস-সমূহ -Comment[bn_IN]=সংযুক্ত IEEE 1394 ডিভাইস -Comment[bs]=Prikačeni IEEE 1394 uređaji -Comment[ca]=Dispositius IEEE 1394 connectats -Comment[ca@valencia]=Dispositius IEEE 1394 connectats -Comment[cs]=Připojená IEEE 1394 zařízení -Comment[csb]=Pòdłączoné ùrządzenié IEEE 1394 -Comment[da]=Forbundne IEEE 1394-enheder -Comment[de]=Angeschlossene IEEE-1394-Geräte -Comment[el]=Συνδεδεμένες συσκευές IEEE 1394 -Comment[en_GB]=Attached IEEE 1394 devices -Comment[eo]=Kunmetitaj IEEE 1394 aparatoj -Comment[es]=Dispositivos IEEE 1394 conectados -Comment[et]=Ühendatud IEEE 1394 seadmed -Comment[eu]=Erantsitako IEEE 1394 gailuak -Comment[fi]=Liitetyt IEEE 1394 (Firewire)-laitteet -Comment[fr]=Périphériques IEEE 1394 branchés -Comment[fy]=Taheakke IEEE 1394-apparaten -Comment[ga]=Gléasanna ceangailte IEEE 1394 -Comment[gl]=Dispositivos IEEE 1394 conectados -Comment[gu]=જોડેલ IEEE 1394 ઉપકરણો -Comment[he]=התקני IEEE 1394 מחוברים -Comment[hi]=आईईईई 1394 उपकरण जोड़ें -Comment[hne]=जुड़े होय आईईईई 1394 उपकरन -Comment[hr]=Priključeni IEEE 1394 uređaji -Comment[hsb]=Přizamknjene IEEE 1394-graty -Comment[hu]=Csatlakoztatott IEEE 1394-eszközök -Comment[ia]=Dispositivos IEEE 1394 attachate -Comment[id]=Perangkat IEEE 1394 yang terlampir -Comment[is]=Tengd IEEE 1394 tæki -Comment[it]=Dispositivi IEEE 1394 collegati -Comment[ja]=接続されている IEEE 1394 デバイス -Comment[kk]=Тіркеулі IEEE 1394 құрылғылар -Comment[km]=បានភ្ជាប់ឧបករណ៍ IEEE 1394 -Comment[kn]=ಅಳವಡಿಸಲಾಗಿರುವ ಐಇಇಇ 1394 ಸಾಧನಗಳು -Comment[ko]=연결된 IEEE 1394 장치 -Comment[ku]=Cîhazên IEEE 1394 yên girêdayî -Comment[lt]=Prijungti IEEE 1394 įrenginiai -Comment[lv]=IEEE 1394 (Fireware) ierīces -Comment[mai]=जोड़ल आईईईई 1394 युक्ति -Comment[mk]=Прикачени IEEE 1394 Уреди -Comment[ml]=ഈ കമ്പ്യൂട്ടറില് ഘടിപ്പിച്ചിട്ടുള്ള ഐട്രിപ്പ്ള്ഇ 1394 ഉപകരണങ്ങള് -Comment[mr]=जोडलेली IEEE 1394 साधने -Comment[nb]=Tilkoblede IEEE 1394-enheter -Comment[nds]=Tokoppelt IEEE-1394-Reedschappen -Comment[nl]=IEEE 1394-apparaten die op deze computer zijn aangesloten -Comment[nn]=Tilkopla IEEE 1394-einingar -Comment[or]=ସଂଲଗ୍ନ IEEE 1394 ଉପକରଣଗୁଡ଼ିକ -Comment[pa]=ਅਟੈਚ ਹੋਏ IEEE 1394 ਡਿਵਾਈਸ -Comment[pl]=Podłączone urządzenia IEEE 1394 -Comment[pt]=Dispositivos IEEE 1394 -Comment[pt_BR]=Dispositivos IEEE 1394 conectados -Comment[ro]=Dispozitive IEEE 1394 atașate -Comment[ru]=Подключённые устройства IEEE 1394 -Comment[se]=Laktašuvvon IEEE 1394-ovttadagat -Comment[si]=ඇමිණූ IEEE 1394 මෙවලම් -Comment[sk]=Pripojené IEEE 1394 zariadenia -Comment[sl]=Priključene naprave IEEE 1394 -Comment[sr]=Прикачени ИЕЕЕ 1394 уређаји -Comment[sr@ijekavian]=Прикачени ИЕЕЕ 1394 уређаји -Comment[sr@ijekavianlatin]=Prikačeni IEEE 1394 uređaji -Comment[sr@latin]=Prikačeni IEEE 1394 uređaji -Comment[sv]=Anslutna IEEE 1394-enheter -Comment[ta]=IEEE 1394 சாதனங்கள் இணைக்கப்பட்டுள்ளது -Comment[te]=అనుభందించిన IEEE 1394 పరికరాలు -Comment[tg]=Дастгоҳҳои васлшудаи EEE 1394 -Comment[th]=อุปกรณ์ IEEE 1394 ที่ถูกเชื่อมต่อ -Comment[tr]=IEEE 1394 Aygıtları eklendi -Comment[ug]=چېتىلغان IEEE 1394 ئۈسكۈنىلەر -Comment[uk]=Під’єднані пристрої IEEE 1394 -Comment[uz]=Ulangan IEEE 1394 uskunalar -Comment[uz@cyrillic]=Уланган IEEE 1394 ускуналар -Comment[vi]=Thiết bị IEEE 1394 đã kết nối -Comment[wa]=Éndjins IEEE 1394 ataetchîs -Comment[x-test]=xxAttached IEEE 1394 devicesxx -Comment[zh_CN]=本机已连接的 IEEE 1394 设备 -Comment[zh_TW]=已加上 IEEE 1394 裝置 - -X-KDE-Keywords=1394,Firewire,devices,viewer,control -X-KDE-Keywords[ast]=IEEE,1394,Firewire,preseos,visor,control -X-KDE-Keywords[az]=1394,Firewire,devices,viewer,control,qurğu,baxış,nəzarət,idarəetmə -X-KDE-Keywords[bs]=1394,Firewire,uređaji,gledatelj,kontrola -X-KDE-Keywords[ca]=1394,Firewire,dispositius,visor,control -X-KDE-Keywords[ca@valencia]=1394,Firewire,dispositius,visor,control -X-KDE-Keywords[cs]=1394,Firewire,zařízení,prohlížeč,ovládání -X-KDE-Keywords[da]=1394,Firewire,enheder,fremviser,kontrol -X-KDE-Keywords[de]=1394,Firewire,Geräte,Betrachter,Steuerung -X-KDE-Keywords[el]=1394,Firewire,συσκευές,προβολέας,έλεγχος -X-KDE-Keywords[en_GB]=1394,Firewire,devices,viewer,control -X-KDE-Keywords[es]=1394,Firewire,dispositivos,visor,control -X-KDE-Keywords[et]=1394,Firewire,seadmed,näitaja,juhtimine -X-KDE-Keywords[eu]=1394,Firewire,gailuak,erakuslea,ikustailea,kontrola -X-KDE-Keywords[fi]=1394,Firewire,laitteet,katselin,katseluohjelma,hallinta -X-KDE-Keywords[fr]=1394, Firewire, périphériques, afficheur, contrôle -X-KDE-Keywords[ga]=1394,Firewire,gléasanna,amharcán,rialú -X-KDE-Keywords[gl]=1394,Firewire,dispositivos,visor,control -X-KDE-Keywords[hu]=1394,Firewire,eszközök,megjelenítő,beállítás -X-KDE-Keywords[ia]=1394,Firewire,dispositivos,visor,controlo -X-KDE-Keywords[id]=1394,Firewire,perangkat,penampil,kendali -X-KDE-Keywords[it]=1394,Firewire,dispositivi,visualizzatore,controllo -X-KDE-Keywords[kk]=1394,Firewire,devices,viewer,control -X-KDE-Keywords[km]=1394,Firewire,devices,viewer,control -X-KDE-Keywords[ko]=1394,Firewire,devices,viewer,control,파이어와이어,장치,뷰어,제어 -X-KDE-Keywords[lt]=1394,Firewire,įrenginiai,irenginiai,žiūryklė,ziurykle,valdymas -X-KDE-Keywords[mr]=1394, फायरवायर, साधन, प्रदर्शक, नियंत्रण -X-KDE-Keywords[nb]=1394,Firewire,enheter,visning,styring -X-KDE-Keywords[nds]=1394,Firewire,Reedschappen,Kieker,Stüern -X-KDE-Keywords[nl]=1394,Firewire,apparaten,viewer,besturing -X-KDE-Keywords[nn]=1394,Firewire,einingar,vising,styring,kontroll -X-KDE-Keywords[pa]=1394,ਫਿਰਮਵੇਅਰ,ਡਿਵਾਈਸ,ਦਰਸ਼ਕ,ਕੰਟਰੋਲ -X-KDE-Keywords[pl]=1394,Firewire,urządzenia,przeglądarka,sterowanie -X-KDE-Keywords[pt]=1394,Firewire,dispositivos,visualizador,controlo -X-KDE-Keywords[pt_BR]=1394,Firewire,dispositivos,visualizador,controle -X-KDE-Keywords[ro]=1394,Firewire,dispozitive,vizualizor,control -X-KDE-Keywords[ru]=1394,Firewire,devices,viewer,control,устройства,просмотр,контроль,управление -X-KDE-Keywords[sk]=1394,Firewire,zariadenia,prehliadač,ovládanie -X-KDE-Keywords[sl]=1394,firewire,naprave,krmilniki,pregledovalnik,nadzor -X-KDE-Keywords[sr]=1394,Firewire,devices,viewer,control,фајервајер,уређаји,приказивач,управљање -X-KDE-Keywords[sr@ijekavian]=1394,Firewire,devices,viewer,control,фајервајер,уређаји,приказивач,управљање -X-KDE-Keywords[sr@ijekavianlatin]=1394,Firewire,devices,viewer,control,Firewire,uređaji,prikazivač,upravljanje -X-KDE-Keywords[sr@latin]=1394,Firewire,devices,viewer,control,Firewire,uređaji,prikazivač,upravljanje -X-KDE-Keywords[sv]=1394,Firewire,enheter,visning,kontroll -X-KDE-Keywords[tr]=1394,Firewire,aygıtlar,gösterici,denetim -X-KDE-Keywords[uk]=1394,Firewire,devices,viewer,control,пристрій,пристрої,перегляд,переглядач,керування,контроль -X-KDE-Keywords[vi]=1394,Firewire,devices,viewer,control,thiết bị,trình xem,điều khiển -X-KDE-Keywords[x-test]=xx1394xx,xxFirewirexx,xxdevicesxx,xxviewerxx,xxcontrolxx -X-KDE-Keywords[zh_CN]=1394,Firewire,devices,viewer,control,火线,设备,查看器,控制 -X-KDE-Keywords[zh_TW]=1394,Firewire,devices,viewer,control diff --git a/Modules/view1394/view1394.cpp b/Modules/view1394/view1394.cpp deleted file mode 100644 index 63944324..00000000 --- a/Modules/view1394/view1394.cpp +++ /dev/null @@ -1,321 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2003 Alexander Neundorf <[email protected]> - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#include "view1394.h" - -#include <KLocalizedString> -#include <QFile> -#include <QLayout> -#include <QPushButton> -#include <QTextStream> -#include <QTreeWidget> -#include <QTreeWidgetItem> -#include <QVBoxLayout> - -#include <KPluginFactory> - -#include <netinet/in.h> -#include <stdio.h> -#include <string.h> -#include <sys/time.h> -#include <sys/types.h> -#include <unistd.h> - -#include <QStandardPaths> -#include <libraw1394/csr.h> - -#define CONFIGROM_BASE 0x00 -#define CONFIGROM_CAP 0x08 -#define CONFIGROM_GUID_HI 0x0c -#define CONFIGROM_GUID_LO 0x10 -#define MAX_1394_PORTS 16 - -int my_reset_handler(raw1394handle_t handle, unsigned int) -{ - View1394 *view1394 = (View1394 *)raw1394_get_userdata(handle); - if (view1394) - view1394->rescanBus(); - return 0; -} - -K_PLUGIN_CLASS_WITH_JSON(View1394, "kcmview1394.json") - -View1394::View1394(QWidget *parent, const QVariantList &) - : KCModule(parent) - , m_insideRescanBus(false) - , m_ouiDb(nullptr) -{ - setQuickHelp( - i18n("<qt>Here you can see some information about " - "your IEEE 1394 configuration. " - "The meaning of the columns:" - "<ul>" - "<li><b>Name</b>: port or node name, the number can change with each bus reset</li>" - "<li><b>GUID</b>: the 64 bit GUID of the node</li>" - "<li><b>Local</b>: checked if the node is an IEEE 1394 port of your computer</li>" - "<li><b>IRM</b>: checked if the node is isochronous resource manager capable</li>" - "<li><b>CRM</b>: checked if the node is cycle master capable</li>" - "<li><b>ISO</b>: checked if the node supports isochronous transfers</li>" - "<li><b>BM</b>: checked if the node is bus manager capable</li>" - "<li><b>PM</b>: checked if the node is power management capable</li>" - "<li><b>Acc</b>: the cycle clock accuracy of the node, valid from 0 to 100</li>" - "<li><b>Speed</b>: the speed of the node</li>" - "<li><b>Vendor</b>: the vendor of the device</li>" - "</ul></qt>")); - - QVBoxLayout *box = new QVBoxLayout(this); - box->setContentsMargins(0, 0, 0, 0); - m_view = new View1394Widget(this); - /* - for (int i=2; i<8; i++) - m_view->m_listview->setColumnAlignment(i, Qt::AlignHCenter); - m_view->m_listview->setColumnAlignment(8, Qt::AlignRight); - m_view->m_listview->setColumnAlignment(9, Qt::AlignRight); - */ - box->addWidget(m_view); - m_view->layout()->setContentsMargins(0, 0, 0, 0); - connect(m_view->m_busResetPb, &QPushButton::clicked, this, &View1394::generateBusReset); - connect(&m_rescanTimer, &QTimer::timeout, this, &View1394::rescanBus); - rescanBus(); -} - -View1394::~View1394() -{ - foreach (QSocketNotifier *notifier, m_notifiers) { - delete notifier; - } - - m_notifiers.clear(); - delete m_ouiDb; -} - -bool View1394::readConfigRom(raw1394handle_t handle, nodeid_t nodeid, quadlet_t &firstQuad, quadlet_t &cap, octlet_t &guid) -{ - quadlet_t q = 0; - firstQuad = 0; - cap = 0; - guid = 0; - nodeaddr_t addr = CSR_REGISTER_BASE + CSR_CONFIG_ROM + CONFIGROM_BASE; - for (int count = 0; count < 5; count++) { - struct timeval tv; - q = 0; - int res = raw1394_read(handle, nodeid | 0xffc0, addr, sizeof(q), &q); - if (res == 0) { - firstQuad = ntohl(q); - break; - } - tv.tv_sec = 0; - tv.tv_usec = 10 * 1000; - select(0, nullptr, nullptr, nullptr, &tv); - } - if (firstQuad == 0) - return false; - - addr = CSR_REGISTER_BASE + CSR_CONFIG_ROM + CONFIGROM_CAP; - if (raw1394_read(handle, nodeid | 0xffc0, addr, sizeof(q), &q) != 0) - return false; - - cap = ntohl(q); - - addr = CSR_REGISTER_BASE + CSR_CONFIG_ROM + CONFIGROM_GUID_HI; - if (raw1394_read(handle, nodeid | 0xffc0, addr, sizeof(q), &q) != 0) - return false; - - guid = octlet_t(ntohl(q)) << 32; - - addr = CSR_REGISTER_BASE + CSR_CONFIG_ROM + CONFIGROM_GUID_LO; - if (raw1394_read(handle, nodeid | 0xffc0, addr, sizeof(q), &q) != 0) - return false; - - guid = guid | ntohl(q); - - return true; -} - -void View1394::callRaw1394EventLoop(int fd) -{ - for (QList<raw1394handle_t>::iterator it = m_handles.begin(); it != m_handles.end(); ++it) - if (raw1394_get_fd(*it) == fd) { - raw1394_loop_iterate(*it); - break; - } -} - -void View1394::rescanBus() -{ - if (m_insideRescanBus) { - m_rescanTimer.setSingleShot(true); - m_rescanTimer.start(100); - return; - } - m_insideRescanBus = true; - // static int depth=0; - // depth++; - m_notifiers.clear(); - for (QList<raw1394handle_t>::iterator it = m_handles.begin(); it != m_handles.end(); ++it) - raw1394_destroy_handle(*it); - m_handles.clear(); - m_view->m_listview->clear(); - - raw1394handle_t handle = raw1394_new_handle(); - if (handle == nullptr) { - m_insideRescanBus = false; - return; - } - // now search for new stuff - struct raw1394_portinfo p_info[MAX_1394_PORTS]; - int num_of_cards = raw1394_get_port_info(handle, p_info, MAX_1394_PORTS); - raw1394_destroy_handle(handle); - // iterate over all cards - for (int i = 0; i < num_of_cards; i++) { - handle = raw1394_new_handle(); - if (raw1394_set_port(handle, i) != 0) { - raw1394_destroy_handle(handle); - continue; - } - raw1394_set_userdata(handle, this); - raw1394_set_bus_reset_handler(handle, my_reset_handler); - QSocketNotifier *notif = new QSocketNotifier(raw1394_get_fd(handle), QSocketNotifier::Read); - connect(notif, &QSocketNotifier::activated, this, &View1394::callRaw1394EventLoop); - m_notifiers.append(notif); - m_handles.append(handle); - - QStringList cardContents; - cardContents << i18n("Port %1:\"%2\"", i, p_info[i].name); - QTreeWidgetItem *card = new QTreeWidgetItem(m_view->m_listview, cardContents); - - int num_of_nodes = raw1394_get_nodecount(handle); - - int localNodeId = raw1394_get_local_id(handle); - // iterate over all nodes connected to this card - for (int j = 0; j < num_of_nodes; j++) { - // get the guid of the node - octlet_t guid = 0; - quadlet_t firstQuad = 0; - quadlet_t cap = 0; - bool success = readConfigRom(handle, j, firstQuad, cap, guid); - - QString nodeStr = i18n("Node %1", j); - if (!success) { - QStringList notReadyList; - notReadyList << nodeStr << i18n("Not ready"); - new QTreeWidgetItem(card, notReadyList); - continue; - } - // minimal config rom - if (((firstQuad >> 24) & 0xff) == 1) { - QString guidStr = QString::number(firstQuad, 16); - guidStr = "0x" + guidStr.rightJustified(6, QLatin1Char('0')); - - QStringList romList; - romList << nodeStr << guidStr; - new QTreeWidgetItem(card, romList); - } - // general config rom - else { - QString guidStr; - char buf[32]; - snprintf(buf, 32, "%lX", guid); - guidStr = buf; - guidStr = "0x" + guidStr.rightJustified(16, QLatin1Char('0')); - QString local = ((j | 0xffc0) == localNodeId) ? QStringLiteral("X") : QString(); - QString irmStr = (cap & 0x80000000) ? QStringLiteral("X") : QString(); - QString cmStr = (cap & 0x40000000) ? QStringLiteral("X") : QString(); - QString isStr = (cap & 0x20000000) ? QStringLiteral("X") : QString(); - QString bmStr = (cap & 0x10000000) ? QStringLiteral("X") : QString(); - QString pmStr = (cap & 0x08000000) ? QStringLiteral("X") : QString(); - QString accStr = QString::number((cap & 0x00ff0000) >> 16); - int speed = (cap & 0x00000007); - QString speedStr; - switch (speed) { - case (3): - speedStr = QStringLiteral("800"); - break; - case (2): - speedStr = QStringLiteral("400"); - break; - case (1): - speedStr = QStringLiteral("200"); - break; - case (0): - default: - speedStr = QStringLiteral("100"); - break; - } - - QStringList nodeContents; - nodeContents << nodeStr << guidStr << local << irmStr << cmStr << isStr << bmStr << pmStr << accStr << speedStr << ouiDb()->vendor(guid); - - new QTreeWidgetItem(card, nodeContents); - } - } - card->setExpanded(true); - } - // depth--; - m_insideRescanBus = false; -} - -void View1394::generateBusReset() -{ - for (QList<raw1394handle_t>::iterator it = m_handles.begin(); it != m_handles.end(); ++it) - raw1394_reset_bus(*it); -} - -OuiDb *View1394::ouiDb() -{ - if (m_ouiDb == nullptr) - m_ouiDb = new OuiDb(); - return m_ouiDb; -} - -OuiDb::OuiDb() -{ - const char *paths[] = {"/var/lib/ieee-data/oui.txt", /* Debian, ieee-data with updates */ - "/usr/share/ieee-data/oui.txt", /* Debian, plain ieee-data */ - "/usr/share/hwdata/oui.txt", /* hwdata */ - nullptr}; - QString filename; - for (int i = 0; paths[i]; ++i) { - if (QFile::exists(QLatin1String(paths[i]))) { - filename = QLatin1String(paths[i]); - loadFromOuiTxt(filename); - break; - } - } -} - -void OuiDb::loadFromOuiTxt(const QString &filename) -{ - QFile f(filename); - if (!f.open(QIODevice::ReadOnly | QIODevice::Text)) - return; - - QTextStream ts(&f); -#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) - ts.setCodec("UTF-8"); -#endif - while (!ts.atEnd()) { - const QString line = ts.readLine(); - if (line.isEmpty() || !line.contains(QLatin1String("(base 16)"))) - continue; - m_vendorIds.insert(line.section(QLatin1Char(' '), 0, 0), line.section(QLatin1Char('\t'), 1, -1, QString::SectionSkipEmpty).trimmed()); - } -} - -QString OuiDb::vendor(octlet_t guid) -{ - guid = (guid & 0xffffff0000000000LL) >> 40; - QString key = QString::number((unsigned int)(guid), 16); - key = key.rightJustified(6, '0').toUpper(); - QString v = m_vendorIds[key]; - if (v.isEmpty()) - v = i18n("Unknown"); - return v; -} - -// ------------------------------------------------------------------------ - -#include "view1394.moc" diff --git a/Modules/view1394/view1394.h b/Modules/view1394/view1394.h deleted file mode 100644 index d3bbaf73..00000000 --- a/Modules/view1394/view1394.h +++ /dev/null @@ -1,66 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2003 Alexander Neundorf <[email protected]> - * - * SPDX-License-Identifier: GPL-2.0-or-later - */ - -#ifndef VIEW1394_H_ -#define VIEW1394_H_ - -#include <KCModule> - -#include <QMap> -#include <QSocketNotifier> - -#include <QTimer> - -#include "ui_view1394widget.h" - -#include <libraw1394/raw1394.h> - -class OuiDb -{ -public: - OuiDb(); - QString vendor(octlet_t guid); - -private: - void loadFromOuiTxt(const QString &filename); - QMap<QString, QString> m_vendorIds; -}; - -class View1394Widget : public QWidget, public Ui::View1394Widget -{ -public: - View1394Widget(QWidget *parent) - : QWidget(parent) - { - setupUi(this); - } -}; - -class View1394 : public KCModule -{ - Q_OBJECT -public: - View1394(QWidget *parent, const QVariantList &args); - virtual ~View1394(); - -public Q_SLOTS: - // Public slots - void rescanBus(); - void generateBusReset(); - -private: - View1394Widget *m_view; - QList<raw1394handle_t> m_handles; - QList<QSocketNotifier *> m_notifiers; - bool readConfigRom(raw1394handle_t handle, nodeid_t nodeid, quadlet_t &firstQuad, quadlet_t &cap, octlet_t &guid); - bool m_insideRescanBus; - QTimer m_rescanTimer; - OuiDb *m_ouiDb; - OuiDb *ouiDb(); -private Q_SLOTS: - void callRaw1394EventLoop(int fd); -}; -#endif diff --git a/Modules/view1394/view1394widget.ui b/Modules/view1394/view1394widget.ui deleted file mode 100644 index 6f52456f..00000000 --- a/Modules/view1394/view1394widget.ui +++ /dev/null @@ -1,173 +0,0 @@ -<ui version="4.0" stdsetdef="1" > - <class>View1394Widget</class> - <widget class="QWidget" name="View1394Widget" > - <property name="geometry" > - <rect> - <x>0</x> - <y>0</y> - <width>501</width> - <height>378</height> - </rect> - </property> - <layout class="QVBoxLayout" > - <item> - <widget class="QTreeWidget" name="m_listview" > - <property name="rootIsDecorated" > - <bool>true</bool> - </property> - <column> - <property name="text" > - <string>Name</string> - </property> - <property name="clickable" > - <bool>true</bool> - </property> - <property name="resizable" > - <bool>true</bool> - </property> - </column> - <column> - <property name="text" > - <string>GUID</string> - </property> - <property name="clickable" > - <bool>true</bool> - </property> - <property name="resizable" > - <bool>true</bool> - </property> - </column> - <column> - <property name="text" > - <string>Local</string> - </property> - <property name="clickable" > - <bool>true</bool> - </property> - <property name="resizable" > - <bool>true</bool> - </property> - </column> - <column> - <property name="text" > - <string>IRM</string> - </property> - <property name="clickable" > - <bool>true</bool> - </property> - <property name="resizable" > - <bool>true</bool> - </property> - </column> - <column> - <property name="text" > - <string>CRM</string> - </property> - <property name="clickable" > - <bool>true</bool> - </property> - <property name="resizable" > - <bool>true</bool> - </property> - </column> - <column> - <property name="text" > - <string>ISO</string> - </property> - <property name="clickable" > - <bool>true</bool> - </property> - <property name="resizable" > - <bool>true</bool> - </property> - </column> - <column> - <property name="text" > - <string>BM</string> - </property> - <property name="clickable" > - <bool>true</bool> - </property> - <property name="resizable" > - <bool>true</bool> - </property> - </column> - <column> - <property name="text" > - <string>PM</string> - </property> - <property name="clickable" > - <bool>true</bool> - </property> - <property name="resizable" > - <bool>true</bool> - </property> - </column> - <column> - <property name="text" > - <string>Acc</string> - </property> - <property name="clickable" > - <bool>true</bool> - </property> - <property name="resizable" > - <bool>true</bool> - </property> - </column> - <column> - <property name="text" > - <string>Speed</string> - </property> - <property name="clickable" > - <bool>true</bool> - </property> - <property name="resizable" > - <bool>true</bool> - </property> - </column> - <column> - <property name="text" > - <string>Vendor</string> - </property> - <property name="clickable" > - <bool>true</bool> - </property> - <property name="resizable" > - <bool>true</bool> - </property> - </column> - </widget> - </item> - <item> - <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> - </property> - <item> - <spacer name="spacer1" > - <property name="sizeHint" > - <size> - <width>40</width> - <height>20</height> - </size> - </property> - <property name="sizeType" > - <enum>Expanding</enum> - </property> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="m_busResetPb" > - <property name="text" > - <string>Generate 1394 Bus Reset</string> - </property> - </widget> - </item> - </layout> - </item> - </layout> - </widget> - </ui> diff --git a/cmake/FindRAW1394.cmake b/cmake/FindRAW1394.cmake deleted file mode 100644 index c6ce3568..00000000 --- a/cmake/FindRAW1394.cmake +++ /dev/null @@ -1,20 +0,0 @@ -# - Try to find the raw1394 directory library -# Once done this will define -# -# RAW1394_FOUND - system has RAW1394 -# RAW1394_INCLUDE_DIR - the RAW1394 include directory -# RAW1394_LIBRARIES - The libraries needed to use FAM - -if(RAW1394_INCLUDE_DIR AND RAW1394_LIBRARIES) - set(RAW1394_FIND_QUIETLY TRUE) -endif(RAW1394_INCLUDE_DIR AND RAW1394_LIBRARIES) - -FIND_PATH(RAW1394_INCLUDE_DIR libraw1394/raw1394.h) - -FIND_LIBRARY(RAW1394_LIBRARIES NAMES raw1394 ) - -include(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(RAW1394 DEFAULT_MSG RAW1394_LIBRARIES RAW1394_INCLUDE_DIR) - -MARK_AS_ADVANCED(RAW1394_INCLUDE_DIR RAW1394_LIBRARIES) - diff --git a/doc/index.docbook b/doc/index.docbook index ace8c77f..0294b6fa 100644 --- a/doc/index.docbook +++ b/doc/index.docbook @@ -431,35 +431,6 @@ The user cannot modify any settings on this page. <!--****************************************--> -<sect2 id="kcmview1394"> -<title>IEEE 1394 Device Information Module</title> - -<para>The IEEE 1394 interface, also known as <trademark>FireWire</trademark>, -is a serial bus interface standard for high-speed -communications and isochronous real-time data transfer.</para> - -<para>The list in this module displays all devices attached to IEEE 1394 bus and -allows you to reset the bus by clicking the <guibutton>Generate 1394 Bus Reset</guibutton> -button.</para> - -<para>The meaning of the columns in this list:</para> -<itemizedlist> -<listitem><para><guilabel>Name</guilabel>: port or node name, the number can change with each bus reset</para></listitem> -<listitem><para><guilabel>GUID</guilabel>: the 64 bit GUID of the node</para></listitem> -<listitem><para><guilabel>Local</guilabel>: checked if the node is an IEEE 1394 port of your computer</para></listitem> -<listitem><para><guilabel>IRM</guilabel>: checked if the node is isochronous resource manager capable</para></listitem> -<listitem><para><guilabel>CRM</guilabel>: checked if the node is cycle master capable</para></listitem> -<listitem><para><guilabel>ISO</guilabel>: checked if the node supports isochronous transfers</para></listitem> -<listitem><para><guilabel>BM</guilabel>: checked if the node is bus manager capable</para></listitem> -<listitem><para><guilabel>PM</guilabel>: checked if the node is power management capable</para></listitem> -<listitem><para><guilabel>Acc</guilabel>: the cycle clock accuracy of the node, valid from 0 to 100</para></listitem> -<listitem><para><guilabel>Speed</guilabel>: the speed of the node</para></listitem> -<listitem><para><guilabel>Vendor</guilabel>: the vendor of the device</para></listitem> -</itemizedlist> -</sect2> - -<!--****************************************--> - <sect2 id="kcmusb"> <title>&USB; Controller/&USB; Devices Information Module</title>
